This app does facial detection and age/gender inference using the Intel Neural Compute Stick 2.
The example does face detection on a camera frame using face-detection-retail.0004, crops the detected faces, then does age and gender inference using the age-gender network. When running, the app shows the realtime camera preview while overlaying, a box around faces (color coded for gender), and an estimated age. All models can be found on the Open Model Zoo. This sample uses pre-compiled IRs, so the model optimizer is not utilized.
To run the example code do the following :
- Open a terminal and change directory to the sample base directory
- Type the following command in the terminal:
make all
After building the example you can run the example code by doing the following :
- Open a terminal and change directory to the sample base directory
- Type the following command in the terminal:
make run
When the application runs normally, another window should pop up and show the feed from the webcam/usb cam. The program should perform inferences on faces on frames taken from the webcam/usb cam.
This program requires:
- 1 NCS1/NCS2 device
- OpenVINO 2020.1 Toolkit
- A webcam (laptop or USB)
*It may run with older versions but you may see some glitches such as the GUI Window not closing when you click the X in the title bar, and other key binding issues.
Note: All development and testing has been done on Ubuntu 16.04 on an x86-64 machine.
Provided Makefile has various targets that help with the above mentioned tasks.
Runs the sample application.
Shows available targets.
Builds and/or gathers all the required files needed to run the application.
Gathers all of the required data need to run the sample.
Builds all of the dependencies needed to run the sample.
Compiles an IR file from a default model to be used when running the sample.
Checks required packages that aren't installed as part of the OpenVINO installation.
Uninstalls requirements that were installed by the sample program.
Removes all the temporary files that are created by the Makefile.