Interactive face detection demo

The OpenVINO toolkit installation also provides various demo and sample applications. Just to test the installation, let's see whether we can run the interactive face detection demo.

First, we will move to the samples directory in the deployment_tools/inference_engine folder. You will find the various demo applications here, such as image classification and inference pipeline.

The interactive face detection demo takes in video as input and performs face detection coupled with age, gender, head-pose, emotion, and facial landmark detection. Depending on the kind of detection you want to perform, you can use a model from the list of the following pre-trained models:

  • You can perform face detection only with face-detection-adas-0001.
  • For face detection along with other operations, you can use the following:
    • Age and gender recognition: age-gender-recognition-retail-0013
    • Head-pose estimation: head-pose-estimation-adas-0001
    • Emotion recognition: emotions-recognition-retail-0003
    • Facial landmark detection: facial-landmarks-35-adas-0002

But the list doesn't end here. We can also use our own trained model provided that we have converted it into the Inference Engine format (.xml and .bin files) using Model Optimizer. That's something to remember whenever you want to obtain the maximum speedup from OpenVINO. Your model has to be converted into the Inference Engine format. The amazing news is that there is an ever-growing collection of pre-trained models that are compatible with OpenVINO. This collection is referred to as Open Model Zoo (https://github.com/opencv/open_model_zoo/blob/master/demos/README.md). 

Coming back to the demo, this one, just like the other samples and demo applications provided along with the OpenVINO toolkit, can be called directly from the Terminal or Command Prompt as follows:

./interactive_face_detection_demo -i inputVideo.mp4 -m face-detection-adas-0001.xml -m_ag age-gender-recognition-retail-0013.xml -m_hp head-pose-estimation-adas-0001.xml -m_em emotions-recognition-retail-0003.xml -m_lm facial-landmarks-35-adas-0002.xml

If we look carefully at the preceding command, we can figure out what the various arguments stand for:

  • -i: Input video
  • -m: Model for face detection
  • -m_ag: Model for age/gender recognition
  • -m_hp: Model for head-pose estimation
  • -m_em: Model for emotion recognition
  • -m_lm: Model for facial landmark detection

There is a list of other arguments as well. You can check it out on the documentation page (https://docs.openvinotoolkit.org/latest/_inference_engine_samples_interactive_face_detection_demo_README.html) for the sample. You can also have a look at the sample output at https://docs.openvinotoolkit.org/latest/_intel_models_face_detection_adas_0001_description_face_detection_adas_0001.html. Not only this, you can also refer to the other models related to face detection, for example, face-detection-adas-0001 (https://docs.openvinotoolkit.org/latest/_intel_models_face_detection_adas_0001_description_face_detection_adas_0001.html), which is the standard model; face-detection-retail-0004 (https://docs.openvinotoolkit.org/latest/_intel_models_face_detection_retail_0004_description_face_detection_retail_0004.html), which is the enhanced model; and then some other models, such as person-detection-retail-0002 (https://docs.openvinotoolkit.org/latest/person-detection-retail-0002.html) for pedestrian detection.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset