Face Recognition demo with OpenVINO™ Toolkit
-
Install OpenVINO Toolkit - Linux installation guide
-
Create virtual python environment:
mkvirtualenv fr --python=python3- Install dependencies:
pip install -r requirements.txt- Initialize OpenVINO environment:
source /opt/intel/computer_vision_sdk/bin/setupvars.sh- Set up
PATH_TO_GALLERYvariable to point to folder with gallery images (faces to be recognized):
export PATH_TO_GALLERY=/path/to/gallery/with/images/- For using OpenVINO pretrained models, please specify
IR_MODELS_ROOT, otherwise you need to modify running command.
export IR_MODELS_ROOT=$INTEL_CVSDK_DIR/deployment_tools/intel_models/- If you are running from pure console, you need to specify
PYTHONPATHvariable:
export PYTHONPATH=`pwd`:$PYTHONPATH- Run Face Recognition demo:
python demo/run_demo.py --path_to_gallery $PATH_TO_GALLERY --cam_id 0 \
--fd_model $IR_MODELS_ROOT/face-detection-retail-0004/FP32/face-detection-retail-0004.xml \
--fr_model $IR_MODELS_ROOT/face-reidentification-retail-0095/FP32/face-reidentification-retail-0095.xml \
--ld_model $IR_MODELS_ROOT/landmarks-regression-retail-0009/FP32/landmarks-regression-retail-0009.xml \
-l libcpu_extension_avx2.soNote: libcpu_extension_avx2.so is located at the $INTEL_CVSDK_DIR/inference_engine/lib/<system_name>/intel64/ folder.
Here the <system_name> is a name detected by the OpenVINO. It can be for example ubuntu_16.04 if you are running the demo under Ubuntu 16.04 system. The folder with CPU extensions is already in LD_LIBRARY_PATH after initialization of the OpenVINO environment, that's why it can be omitted in the launch command.
