forked from VIAME/VIAME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multi_cnn_detector.pipe
165 lines (130 loc) · 4.63 KB
/
multi_cnn_detector.pipe
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Multi-Detector CNN Pipeline
#
# Runs multiple CNN-based object detectors in the VIAME framework:
#
# (a) Faster R-CNN
# (b) YOLOv1
# (c) YOLOv2
# (d) Scallop-TK
# ===================== GLOBAL PROPERTIES ========================
# global pipeline config
#
config _pipeline:_edge
:capacity 5
# ====================== INPUT FRAME LIST ========================
process input
:: frame_list_input
:image_list_file input_list.txt
:frame_time .03333
:image_reader:type vxl
# ========================== YOLO v1 =============================
#process yolo_v1
# :: image_object_detector
# :detector:type darknet
# # Network config, weights, and names
# :detector:darknet:net_config models/model1.cfg
# :detector:darknet:weight_file models/model1_v1.weights
# :detector:darknet:class_names models/yolo_ids.lbl
# # Detector parameters
# :detector:darknet:thresh 0.001
# :detector:darknet:hier_thresh 0.001
# :detector:darknet:gpu_index 0
#process yolo_v1_writer
# :: detected_object_output
# :file_name output/yolo_v1_detections.kw18
# :writer:type kw18
#connect from input.image
# to yolo_v1.image
#connect from yolo_v1.detected_object_set
# to yolo_v1_writer.detected_object_set
#connect from input.image_file_name
# to yolo_v1_writer.image_file_name
# =========================== YOLO v2 ============================
process yolo_v2
:: image_object_detector
:detector:type darknet
# Network config, weights, and names
:detector:darknet:net_config models/model2.cfg
:detector:darknet:weight_file models/model2.weights
:detector:darknet:class_names models/yolo_ids.lbl
# Detector parameters
:detector:darknet:thresh 0.001
:detector:darknet:hier_thresh 0.001
:detector:darknet:gpu_index 0
process yolo_v2_writer
:: detected_object_output
# Type of file to output
:file_name output/yolo_v2_detections.kw18
:writer:type kw18
# Write out FSO classifications alongside tracks
:writer:kw18:write_tot true
:writer:kw18:tot_field1_ids fish
:writer:kw18:tot_field2_ids scallop
connect from input.image
to yolo_v2.image
connect from yolo_v2.detected_object_set
to yolo_v2_writer.detected_object_set
connect from input.image_file_name
to yolo_v2_writer.image_file_name
# ========================== Scallop-TK ==========================
#process scallop_tk
# :: image_object_detector
# :detector:type scallop_tk
# :detector:scallop_tk:config_file models/SYSTEM_SETTINGS
#
#process scallop_tk_writer
# :: detected_object_output
# :file_name output/scallop_tk_detections.kw18
# :writer:type kw18
#
#connect from input.image
# to scallop_tk.image
#
#connect from scallop_tk.detected_object_set
# to scallop_tk_writer.detected_object_set
#
#connect from input.image_file_name
# to scallop_tk_writer.image_file_name
# ======================== FASTER R-CNN ==========================
process faster_rcnn
:: image_object_detector
:detector:type faster_rcnn
# Network config, weights, and names
:detector:faster_rcnn:prototxt models/frcnn.prototxt
:detector:faster_rcnn:caffe_model models/frcnn.caffemodel
:detector:faster_rcnn:class_file models/frcnn_ids.lbl
# Other settings
:detector:faster_rcnn:use_gpu true
:detector:faster_rcnn:chip_image false
:detector:faster_rcnn:chip_width 544
:detector:faster_rcnn:chip_height 544
:detector:faster_rcnn:stride 544
:detector:faster_rcnn:target_size 544
# Output layers to use for BBOX formulation
:detector:faster_rcnn:roi_layer_str rois
:detector:faster_rcnn:cls_layer_str cls_prob
:detector:faster_rcnn:bbox_layer_str bbox_pred_b
process faster_rcnn_filter
:: detected_object_filter
:filter:type class_probablity_filter
:filter:class_probablity_filter:threshold 0.001
:filter:class_probablity_filter:keep_all_classes false
:filter:class_probablity_filter:keep_classes fish;scallop
process faster_rcnn_writer
:: detected_object_output
# Type of file to output
:file_name output/faster_rcnn_detections.kw18
:writer:type kw18
# Write out FSO classifications alongside tracks
:writer:kw18:write_tot true
:writer:kw18:tot_field1_ids fish
:writer:kw18:tot_field2_ids scallop
connect from input.image
to faster_rcnn.image
connect from faster_rcnn.detected_object_set
to faster_rcnn_filter.detected_object_set
connect from faster_rcnn_filter.detected_object_set
to faster_rcnn_writer.detected_object_set
connect from input.image_file_name
to faster_rcnn_writer.image_file_name
# -- end of file --