-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathexample-pipeline.yml
173 lines (132 loc) · 4.43 KB
/
example-pipeline.yml
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
166
167
168
169
170
171
172
173
# A pipeline describes the list of detector and recognizer components to run on
# input files. A pipeline can have any number of
# - deep detectors, which use YOLO for multiple object detection. Each
# deep detector can specify its own convolutional neural network configuration and
# model obtained by training it on different datasets such as Pascal VOC, COCO, ImageNet, etc.
#
# - simple detectors, which use traditional cascade of weak classifiers
#
# - simple recognizers, which use Eigen faces, Fischer faces or LBPH recognition
#
# All the component outputs for one input file - be it image or video - are saved in a single JSON report. Each input
# generated its own separate report file.
#
# Every component which is configured to output images outputs only its own relevant annotations
# in an image. So there may be multiple annotated image outputs for each input. A video input is considered
# as a sequence of frames and each frame results in separate output images. Output frames of a video can be combined back into
# a video.
---
pipeline:
# A name for this pipeline component
- name: coco-detector
# type can be one of [deepdetector, simpledetector, recognizer]
type: deepdetector
# "files" is a special keyword, meaning the inputs for this detector
# are the raw photo or video files. If this is the name of another pipeline component
# then the component uses the outputs of that component instead of the
# raw source files.
inputs:
- files
# Parameters for the component
params:
model: /root/darkflow/cfg/yolo.cfg
weights: /root/darkflow/cfg/yolo.weights
- name: human-face-detector-haar
type: simpledetector
inputs:
- coco-detector
params:
model: /root/data/haarcascades/haarcascade_frontalface_default.xml
outputlabel: humanface
# triggerlabels: The list of labels to filter on. Only ROIs with one of these
# labels are considered for detection.
triggerlabels:
- person
- name: cat-face-detector-lbp
type: simpledetector
inputs:
- coco-detector
params:
model: /root/data/lbpcascades/lbpcascade_frontalcatface.xml
# Label to give to ROIs of this detector.
outputlabel: catface
# Detection is run only on ROIs which match these labels.
triggerlabels:
- cat
# Optional params for cascade classifier to adjust false positive and false negative
# rates.
scaledown_factor: 1.1
min_neighbors: 3
- name: cat-face-recognizer
type: recognizer
inputs:
- cat-face-detector-lbp
params:
# The model directory where model files were generated during training.
model: /root/models/mycats/
triggerlabels:
- catface
# strategies: list of recognizers to run. one or more of [eigen, fischer, lbp]
strategies:
- eigen
- fischer
- lbp
# output : which labels to output. Can be one of [all, mostvotes, <strategies>] where
#
# "all" means outputs of all strategies
# "mostvotes" means single output which has most votes from multiple strategies. If there'
# no clear majority, it'll output all.
# "<strategies>" means output of one or more of the strategies above.
# For example,
# output:
# - lbp
# - eigen
# means include only outputs of lbp and eigen in the outputs.
outputlabel:
- mostvotes
# If recognizer was trained with histogram equalization enabled, you
# should enable it during recognition too.
equalizehist: false
- name: combinedreporter
type: jsonreportwriter
inputs:
- coco-detector
- human-face-detector-haar
- cat-face-detector-lbp
- cat-face-recognizer
- name: combinedvideowriter
type: videowriter
inputs:
- coco-detector
- human-face-detector-haar
- cat-face-detector-lbp
- cat-face-recognizer
params:
format: mp4
size:
width: 640
height: 480
- name: combinedannotatedphotowriter
type: photowriter
inputs:
- coco-detector
- human-face-detector-haar
- cat-face-detector-lbp
- cat-face-recognizer
params:
format: jpg
size:
width: 640
height: 480
- name: combinedannotatedframewriter
type: framewriter
inputs:
- coco-detector
- human-face-detector-haar
- cat-face-detector-lbp
- cat-face-recognizer
params:
format: jpg
size:
width: 128
height: 96