This repository has been archived by the owner on Mar 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 164
/
script.txt
128 lines (102 loc) · 4.64 KB
/
script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#============================================
python3 convert_weights.py \
--class_names coco.names \
--weights_file weights/yolov3.weights \
--data_format NHWC
python3 convert_weights_pb.py \
--class_names coco.names \
--weights_file weights/yolov3.weights \
--data_format NHWC \
--output_graph pbmodels/frozen_yolo_v3.pb
#============================================
#============================================
python3 convert_weights.py \
--class_names coco.names \
--weights_file weights/yolov3-tiny.weights \
--data_format NHWC \
--tiny
python3 convert_weights_pb.py \
--class_names coco.names \
--weights_file weights/yolov3-tiny.weights \
--data_format NHWC \
--tiny \
--output_graph pbmodels/frozen_tiny_yolo_v3.pb
#============================================
cd git;cd tensorflow
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=/home/b920405/git/OpenVINO-YoloV3/pbmodels/frozen_yolo_v3.pb
#========================================================================================================
Found 1 possible inputs: (name=inputs, type=float(1), shape=[?,416,416,3])
No variables spotted.
Found 1 possible outputs: (name=output_boxes, op=ConcatV2)
Found 62002034 (62.00M) const parameters, 0 (0) variable parameters, and 0 control_edges
Op types used: 536 Const, 372 Identity, 87 Mul, 75 Conv2D, 72 FusedBatchNorm, 72 Maximum, 28 Add, \
24 Reshape, 14 ConcatV2, 9 Sigmoid, 6 Tile, 6 Range, 5 Pad, 4 SplitV, 3 Pack, 3 RealDiv, 3 Fill, \
3 Exp, 3 BiasAdd, 2 ResizeNearestNeighbor, 2 Sub, 1 Placeholder
To use with tensorflow/tools/benchmark:benchmark_model try these arguments:
bazel run tensorflow/tools/benchmark:benchmark_model -- \
--graph=/home/b920405/git/OpenVINO-YoloV3/pbmodels/frozen_yolo_v3.pb \
--show_flops \
--input_layer=inputs \
--input_layer_type=float \
--input_layer_shape=-1,416,416,3 \
--output_layer=output_boxes
#========================================================================================================
cd git;cd tensorflow
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=/home/b920405/git/OpenVINO-YoloV3/pbmodels/frozen_tiny_yolo_v3.pb
#========================================================================================================
Found 1 possible inputs: (name=inputs, type=float(1), shape=[?,416,416,3])
No variables spotted.
Found 1 possible outputs: (name=output_boxes, op=ConcatV2)
Found 8858858 (8.86M) const parameters, 0 (0) variable parameters, and 0 control_edges
Op types used: 134 Const, 63 Identity, 21 Mul, 16 Reshape, 13 Conv2D, 11 FusedBatchNorm, 11 Maximum, \
10 ConcatV2, 6 Sigmoid, 6 MaxPool, 4 Tile, 4 Add, 4 Range, 3 RealDiv, 3 SplitV, 2 Pack, 2 Fill, \
2 Exp, 2 Sub, 2 BiasAdd, 1 Placeholder, 1 ResizeNearestNeighbor
To use with tensorflow/tools/benchmark:benchmark_model try these arguments:
bazel run tensorflow/tools/benchmark:benchmark_model -- \
--graph=/home/b920405/git/OpenVINO-YoloV3/pbmodels/frozen_tiny_yolo_v3.pb \
--show_flops \
--input_layer=inputs \
--input_layer_type=float \
--input_layer_shape=-1,416,416,3 \
--output_layer=output_boxes
#========================================================================================================
#Output = Tensor("detector/yolo-v3/detections:0", shape=(?, 10647, 85), dtype=float32)
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_yolo_v3.pb \
--output_dir lrmodels/YoloV3/FP32 \
--data_type FP32 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_changed.json
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_yolo_v3.pb \
--output_dir lrmodels/YoloV3/FP16 \
--data_type FP16 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_changed.json
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_tiny_yolo_v3.pb \
--output_dir lrmodels/tiny-YoloV3/FP32 \
--data_type FP32 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_tiny_changed.json
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_tiny_yolo_v3.pb \
--output_dir lrmodels/tiny-YoloV3/FP16 \
--data_type FP16 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_tiny_changed.json
cpp/object_detection_demo_yolov3_async \
-i cam1 \
-m lrmodels/tiny-YoloV3/FP16/frozen_tiny_yolo_v3.xml \
-d MYRIAD \
-t 0.2
cpp/object_detection_demo_yolov3_async \
-i data/input/testvideo2.mp4 \
-m lrmodels/tiny-YoloV3/FP16/frozen_tiny_yolo_v3.xml \
-d MYRIAD \
-t 0.2
cpp/object_detection_demo_yolov3_async \
-i data/input/testvideo2.mp4 \
-m lrmodels/tiny-YoloV3/FP32/frozen_tiny_yolo_v3.xml \
-d CPU \
-t 0.2