This demo project is used to detect the person and used for person re-identification with age and gender recognition. It can export the images of detected person and also export csv file with image id and corrosponding age and gender.
Synchronous version takes around 88 sec time and Asynchronous version takes around 58 sec time for prediction on 30 sec demo video. So asynchronous version is much faster than synchronous version.
- You need to install openvino successfully.
See this guide for installing openvino.
Clone the repository:- https://github.com/denilDG/person-recognition-reidentification-age-gender-classification
Initialize the openVINO environment:-
source /opt/intel/openvino/bin/setupvars.sh -pyver 3.5
Open a new terminal in project directory and run the following commands:
- Initialize the openVINO environment:-
source /opt/intel/openvino/bin/setupvars.sh -pyver 3.5
- Run the app:-
For running the synchronous version:
python main.py -i media/sample2.mp4 -image_dir images -is_export_csv=True
For running the asynchronous version:
python main_async.py -i media/sample2.mp4 -image_dir images -is_export_csv=True
- Person Detection Model
- Person Re-identification Model
- Face Detection Model
- Age and Gender Recognition Model
Following are commanda line arguments that can use for while running the main.py file python main.py
:-
- -h : Get the information about all the command line arguments
- -i (required) : Specify the path of input video file or enter cam for taking input video from webcam
- -d (optional) : Specify the target device to infer the video file on the model. Suppoerted devices are: CPU, GPU, FPGA (For running on FPGA used HETERO:FPGA,CPU), MYRIAD(For VPU).
- -l (optional) : Specify the absolute path of cpu extension if some layers of models are not supported on the device.
- -pt (optional) : Specify the probability threshold for person detection and face detection model to detect the face accurately from video frame.
- -image_dir (optional) : Specify the path of a directory if you want to save detected person's image.
- -is_export_csv (optional) : Specify False if you don't want to export the csv file of the predicted data and default value is true.