You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demos/interactive_face_detection_demo/cpp_gapi/README.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,23 @@
1
1
# G-API Interactive Face Detection Demo
2
2
3
+

4
+
3
5
This demo showcases Object Detection task applied for face recognition using sequence of neural networks.
4
6
The pipeline is based on [G-API framework](https://docs.opencv.org/master/d0/d1e/gapi.html). This demo executes six [kernels](https://docs.opencv.org/master/d0/d25/gapi_kernel_api.html), five of them infer networks and another one is a postprocessing kernel.
5
-
This demo executes the Face Detection, Age/Gender Recognition, Head Pose Estimation, Emotions Recognition, and Facial Landmarks Detection networks. You can use a set of the following pre-trained models with the demo:
7
+
This demo executes the Face Detection, Age/Gender Recognition, Head Pose Estimation, Emotions Recognition, Facial Landmarks Detection and Antispoofing Classifier networks. You can use a set of the following pre-trained models with the demo:
6
8
7
9
*`face-detection-adas-0001`, which is a primary detection network for finding faces
8
10
*`age-gender-recognition-retail-0013`, which is executed on top of the results of the first model and reports estimated age and gender for each detected face
9
11
*`head-pose-estimation-adas-0001`, which is executed on top of the results of the first model and reports estimated head pose in Tait-Bryan angles
10
12
*`emotions-recognition-retail-0003`, which is executed on top of the results of the first model and reports an emotion for each detected face
11
13
*`facial-landmarks-35-adas-0002`, which is executed on top of the results of the first model and reports normed coordinates of estimated facial landmarks
14
+
*`anti-spoof-mn3`, which is executed on top of the results of the first model and reports estimated probability whether spoof or real face is shown
12
15
13
16
Other demo objectives are:
14
17
18
+
* Video as input support via OpenCV\*
15
19
* Visualization of the resulting face bounding boxes from Face Detection network
16
-
* Visualization of age/gender, head pose, emotion information, and facial landmarks positions for each detected face
20
+
* Visualization of age/gender, spoof/real, head pose, emotion information, and facial landmarks positions for each detected face
17
21
18
22
OpenCV is used to draw resulting bounding boxes, labels, and other information. You can copy and paste this code without pulling Inference Engine demo helpers into your application.
19
23
@@ -24,7 +28,7 @@ Engine.
24
28
2. G-API pipeline gets a video/image/camera like a source, using the OpenCV VideoCapture.
25
29
3. G-API pipeline performs inference on the Face Detection network.
26
30
4. G-API pipeline runs post processing kernel.
27
-
5. G-API pipeline performs four inferences, using the Age/Gender, Head Pose, Emotions, and Facial Landmarks detection networks if they are specified in the command line.
31
+
5. G-API pipeline performs four inferences, using the Age/Gender, Head Pose, Emotions, Facial Landmarks detection and Anti-spoof detection networks if they are specified in the command line.
28
32
6. The application displays the results.
29
33
30
34
> **NOTE**: By default, Open Model Zoo demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the demo application or reconvert your model using the Model Optimizer tool with the `--reverse_input_channels` argument specified. For more information about the argument, refer to **When to Reverse Input Channels** section of [Converting a Model Using General Conversion Parameters](https://docs.openvino.ai/latest/openvino_docs_MO_DG_prepare_model_convert_model_Converting_Model.html#general-conversion-parameters).
@@ -50,6 +54,7 @@ omz_converter --list models.lst
50
54
### Supported Models
51
55
52
56
* age-gender-recognition-retail-0013
57
+
* anti-spoof-mn3
53
58
* emotions-recognition-retail-0003
54
59
* face-detection-adas-0001
55
60
* face-detection-retail-0004
@@ -77,11 +82,13 @@ Options:
77
82
-m_hp "<path>" Optional. Path to an .xml file with a trained Head Pose Estimation model.
78
83
-m_em "<path>" Optional. Path to an .xml file with a trained Emotions Recognition model.
79
84
-m_lm "<path>" Optional. Path to an .xml file with a trained Facial Landmarks Estimation model.
85
+
-m_am "<path>" Optional. Path to an .xml file with a trained Antispoofing Classification model.
80
86
-d "<device>" Optional. Target device for Face Detection network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
81
87
-d_ag "<device>" Optional. Target device for Age/Gender Recognition network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
82
88
-d_hp "<device>" Optional. Target device for Head Pose Estimation network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
83
89
-d_em "<device>" Optional. Target device for Emotions Recognition network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
84
90
-d_lm "<device>" Optional. Target device for Facial Landmarks Estimation network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for device specified.
91
+
-d_am "<device>" Optional. Target device for Antispoofing Classification network (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. The demo will look for a suitable plugin for a specified device.
85
92
-no_show Optional. Don't show output.
86
93
-r Optional. Output inference results as raw values
87
94
-t Optional. Probability threshold for detections
@@ -106,7 +113,8 @@ For example, to do inference on a GPU with the OpenVINO™ toolkit pre-train
>**NOTE**: If you provide a single image as an input, the demo processes and renders it quickly, then exits. To continuously visualize inference results on the screen, apply the `loop` option, which enforces processing a single image in a loop.
Copy file name to clipboardExpand all lines: demos/interactive_face_detection_demo/cpp_gapi/interactive_face_detection_gapi.hpp
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ static const char age_gender_model_message[] = "Optional. Path to an .xml file w
16
16
staticconstchar head_pose_model_message[] = "Optional. Path to an .xml file with a trained Head Pose Estimation model.";
17
17
staticconstchar emotions_model_message[] = "Optional. Path to an .xml file with a trained Emotions Recognition model.";
18
18
staticconstchar facial_landmarks_model_message[] = "Optional. Path to an .xml file with a trained Facial Landmarks Estimation model.";
19
+
staticconstchar antispoofing_model_message[] = "Optional. Path to an .xml file with a trained Antispoofing Classification model.";
19
20
staticconstchar target_device_message[] = "Optional. Target device for Face Detection network (the list of available devices is shown below). "
20
21
"Default value is CPU. The demo will look for a suitable plugin for a specified device.";
21
22
staticconstchar target_device_message_ag[] = "Optional. Target device for Age/Gender Recognition network (the list of available devices is shown below). "
@@ -26,6 +27,9 @@ static const char target_device_message_em[] = "Optional. Target device for Emot
26
27
"Default value is CPU. The demo will look for a suitable plugin for a specified device.";
"(the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for device specified.";
30
+
staticconstchar target_device_message_am[] = "Optional. Target device for Antispoofing Classification network (the list of available devices is shown below). "
31
+
"Default value is CPU. Use \"-d HETERO:<comma-separated_devices_list>\" format to specify HETERO plugin. "
32
+
"The demo will look for a suitable plugin for a specified device.";
29
33
staticconstchar thresh_output_message[] = "Optional. Probability threshold for detections";
30
34
staticconstchar bb_enlarge_coef_output_message[] = "Optional. Coefficient to enlarge/reduce the size of the bounding box around the detected face";
31
35
staticconstchar raw_output_message[] = "Optional. Output inference results as raw values";
0 commit comments