Article ID: 000058964 Content Type: Error Messages Last Reviewed: 05/20/2022

Encountered Errors When Running Face_recognition_demo with OpenVINO™ 2021 Version

Environment

Windows 10

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Compatibility of face_recognition_demo with OpenVINO and steps to run it.

Description

Possible errors include:

  • Inference of face_recognition_demo with OpenVINO™ 2021 version throws error:
    Error:ImportError:DLL load failed while importing ie_api
     
  • Inference of face_recognition_demo with OpenVINO™ 2021 version and Intel® Neural Compute Stick 2 (Intel® NCS2) plugin throws error :
    AttributeError: 'openvino.inference_engine.ie_api.IENetwork' object has no attribute 'layers'
Resolution
  1. Download the following pre-trained models:
    • face-detection-retail-0004 and face-detection-adas-0001, to detect faces and predict their bounding boxes;
    • landmarks-regression-retail-0009, to predict face key points;
    • face-reidentification-retail-0095, to recognize persons
  2. Execute the face_recognition_demo.
    • Setup OpenVINO environment : cd <INSTALL_DIR>\openvino_2020.3.194\deployment_tools\bin\setupvars.bat
    • Navigate to the face recognition demo folder : cd <INSTALL_DIR>\openvino_2020.3.194\deployment_tools\open_model_zoo\demos\python_demos\face_recognition_demo
    • Run pip install -r requirement.txt
    • Run the demo : python./face_recognition_demo.py -m_fd "<INSTALL_DIR>\openvino_2020.3.194\deployment_tools\tools model_downloader\intel\face-detection-retails-0004\FP16\face-detection-retail-0004.xml" -m_lm "<INSTALL_DIR>\openvino_2020.3.194\deployment_tools\tools model_downloader\intel\landmarks-regression-retail-0009\FP16\landmarks-regression-retail-0009.xml" -m_reid "<INSTALL_DIR>\openvino_2020.3.194\deployment_tools\tools model_downloader\intel\face-reidentification-retail-0095\FP16\face-reidentification-retail-0095.xml" -i 0 -fg "<IMAGE_DIR>\Pictures\image_name"
Note

Make sure to download the models and execute the demo from the same environment as your OpenVINO™ version.

Additional information

The face_recognition_demo is only available until OpenVINO™ 2020.3 release. Refer to the Interactive Face Recognition Demo documentation for more details.

Related Products

This article applies to 2 products