@@ -22,31 +22,39 @@ The gaze estimation model used requires three inputs:
22
22
To get these inputs, use the three other OpenVino models model below:
23
23
24
24
- [ Face Detection] ( https://docs.openvinotoolkit.org/latest/_models_intel_face_detection_adas_binary_0001_description_face_detection_adas_binary_0001.html )
25
- - [ Head Pose Estimation] ( https://docs.openvinotoolkit.org/latest/_models_intel_head_pose_estimation_adas_0001_description_head_pose_estimation_adas_0001.html )
25
+
26
+ Implementation: https://github.com/mmphego/computer-pointer-controller/blob/bb5f13c6d2567c0856407db6c35b3fa6345f97c2/src/model.py#L156
27
+
28
+ ![ face_Detection] ( https://user-images.githubusercontent.com/7910856/87830444-4a3bf080-c881-11ea-993a-7f76c979449f.gif )
29
+
26
30
- [ Facial Landmarks Detection] ( https://docs.openvinotoolkit.org/latest/_models_intel_landmarks_regression_retail_0009_description_landmarks_regression_retail_0009.html ) .
31
+ Implementation: https://github.com/mmphego/computer-pointer-controller/blob/bb5f13c6d2567c0856407db6c35b3fa6345f97c2/src/model.py#L239
27
32
28
- ### Project Pipeline
29
- Coordinate the flow of data from the input, and then amongst the different models and finally to the mouse controller. The flow of data looks like this:
33
+ ![ facial_landmarks] ( https://user-images.githubusercontent.com/7910856/87830446-4c05b400-c881-11ea-90a5-d1b80d984f01.gif )
30
34
31
- ![ image ] ( https://user-images.githubusercontent.com/7910856/87787550-1db1b580-c83c-11ea-9f21-5048c803bf5c.png )
35
+ - [ Head Pose Estimation ] ( https://docs.openvinotoolkit.org/latest/_models_intel_head_pose_estimation_adas_0001_description_head_pose_estimation_adas_0001.html )
32
36
33
- ## Demo
37
+ Implementation: https://github.com/mmphego/computer-pointer-controller/blob/bb5f13c6d2567c0856407db6c35b3fa6345f97c2/src/model.py#L305
34
38
35
- ![ vide-demo ] ( https://user-images.githubusercontent.com/7910856/87830451-50ca6800 -c881-11ea-87cf-3943795a76e8 .gif )
39
+ ![ head_pose ] ( https://user-images.githubusercontent.com/7910856/87830450-4f00a480 -c881-11ea-9d0b-4b43316456a2 .gif )
36
40
41
+ - [ Gaze Estimation] ( https://docs.openvinotoolkit.org/latest/_models_intel_gaze_estimation_adas_0002_description_gaze_estimation_adas_0002.html )
37
42
38
- ### Gaze Estimates
43
+ Using the above outputs as inputs.
44
+ Implementation: https://github.com/mmphego/computer-pointer-controller/blob/bb5f13c6d2567c0856407db6c35b3fa6345f97c2/src/model.py#L422
39
45
40
46
![ all] ( https://user-images.githubusercontent.com/7910856/87830436-47d99680-c881-11ea-8c22-6a0a7e17c78d.gif )
41
47
42
- ### Face Detection
43
- ![ face_Detection] ( https://user-images.githubusercontent.com/7910856/87830444-4a3bf080-c881-11ea-993a-7f76c979449f.gif )
48
+ ### Project Pipeline
49
+ Coordinate the flow of data from the input, and then amongst the different models and finally to the mouse controller. The flow of data looks like this:
50
+
51
+ ![ image] ( https://user-images.githubusercontent.com/7910856/87787550-1db1b580-c83c-11ea-9f21-5048c803bf5c.png )
52
+
53
+ ## Demo
54
+
55
+ ![ vide-demo] ( https://user-images.githubusercontent.com/7910856/87830451-50ca6800-c881-11ea-87cf-3943795a76e8.gif )
44
56
45
- ### Facial Landmark Estimates
46
- ![ facial_landmarks] ( https://user-images.githubusercontent.com/7910856/87830446-4c05b400-c881-11ea-90a5-d1b80d984f01.gif )
47
57
48
- ### Head Pose Estimates
49
- ![ head_pose] ( https://user-images.githubusercontent.com/7910856/87830450-4f00a480-c881-11ea-9d0b-4b43316456a2.gif )
50
58
51
59
## Project Set Up and Installation
52
60
@@ -119,8 +127,8 @@ $ python main.py -h
119
127
usage: main.py [-h] -fm FACE_MODEL -hp HEAD_POSE_MODEL -fl
120
128
FACIAL_LANDMARKS_MODEL -gm GAZE_MODEL [-d DEVICE]
121
129
[-pt PROB_THRESHOLD] -i INPUT [--out] [-mp [{high,low,medium}]]
122
- [-ms [{fast,slow,medium}]] [--enable-mouse] [--debug ]
123
- [--show-bbox ]
130
+ [-ms [{fast,slow,medium}]] [--enable-mouse] [--show-bbox ]
131
+ [--debug] [--stats ]
124
132
125
133
optional arguments:
126
134
-h, --help show this help message and exit
@@ -136,12 +144,12 @@ optional arguments:
136
144
-d DEVICE, --device DEVICE
137
145
Specify the target device to infer on: CPU, GPU, FPGA
138
146
or MYRIAD is acceptable. Sample will look for a
139
- suitable plugin for device specified (CPU by default )
147
+ suitable plugin for device specified (Default: CPU )
140
148
-pt PROB_THRESHOLD, --prob_threshold PROB_THRESHOLD
141
- Probability threshold for detections filtering(0.8 by
142
- default )
149
+ Probability threshold for detections
150
+ filtering(Default: 0.8 )
143
151
-i INPUT, --input INPUT
144
- Path to image or video file or 'cam' for Webcam.
152
+ Path to image, video file or 'cam' for Webcam.
145
153
--out Write video to file.
146
154
-mp [{high,low,medium}], --mouse-precision [{high,low,medium}]
147
155
The precision for mouse movement (how much the mouse
@@ -150,14 +158,16 @@ optional arguments:
150
158
The speed (how fast it moves) by changing [Default:
151
159
fast]
152
160
--enable-mouse Enable Mouse Movement
153
- --debug Show output on screen [debugging].
154
161
--show-bbox Show bounding box and stats on screen [debugging].
162
+ --debug Show output on screen [debugging].
163
+ --stats Verbose OpenVINO layer performance stats [debugging].
155
164
` ` `
156
165
157
166
158
167
# ## Example
159
168
` ` ` shell
160
- xvfb-run docker run --rm -ti \
169
+ xhost +;
170
+ docker run --rm -ti \
161
171
--volume "$PWD ":/app \
162
172
--env DISPLAY=$DISPLAY \
163
173
--volume=$HOME /.Xauthority:/root/.Xauthority \
@@ -198,6 +208,29 @@ mmphego/intel-openvino bash -c "\
198
208
199
209
` ` `
200
210
211
+ # # OpenVino API for Layer Analysis
212
+ Queries performance measures per layer to get feedback of what is the most time consuming layer: [Read docs.](https://docs.openvinotoolkit.org/latest/ie_python_api/classie__api_1_1InferRequest.html#a2194bc8c557868822bbfd260e8ef1a08)
213
+
214
+ ` ` ` shell
215
+ xhost +;
216
+ docker run --rm -ti \
217
+ --volume "$PWD ":/app \
218
+ --env DISPLAY=$DISPLAY \
219
+ --volume=$HOME /.Xauthority:/root/.Xauthority \
220
+ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
221
+ --device /dev/video0 \
222
+ mmphego/intel-openvino \
223
+ bash -c "\
224
+ source /opt/intel/openvino/bin/setupvars.sh && \
225
+ python main.py \
226
+ --face-model models/face-detection-adas-binary-0001 \
227
+ --head-pose-model models/head-pose-estimation-adas-0001 \
228
+ --facial-landmarks-model models/landmarks-regression-retail-0009 \
229
+ --gaze-model models/gaze-estimation-adas-0002 \
230
+ --input resources/demo.mp4 \
231
+ --stat"
232
+ ` ` `
233
+
201
234
# # Edge Cases
202
235
- Multiple People Scenario: If we encounter multiple people in the video frame, it will always use and give results one face even though multiple people detected,
203
236
- No Head Detection: it will skip the frame and inform the user
0 commit comments