Skip to content

A demo project which uses openvino for person detection, re-identification and age gender classification and also exports detected person as images and predicted data as csv files.

Notifications You must be signed in to change notification settings

denilgabani/person-recognition-reidentification-age-gender-classification

Repository files navigation

person-recognition-reidentification-age-gender-classification

Introduction

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.

Demo

Demo video of Synchronous version:

Demo video sync

Demo video of Asynchronous version:

Demo video Async

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.

Project Set Up and Installation

Setup

Prerequisites

  • You need to install openvino successfully.
    See this guide for installing openvino.

Step 1

Clone the repository:- https://github.com/denilDG/person-recognition-reidentification-age-gender-classification

Step 2

Initialize the openVINO environment:-

source /opt/intel/openvino/bin/setupvars.sh -pyver 3.5

Step 3

Open a new terminal in project directory and run the following commands:

  1. Initialize the openVINO environment:-
source /opt/intel/openvino/bin/setupvars.sh -pyver 3.5
  1. 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

Documentation

Documentation of used models

  1. Person Detection Model
  2. Person Re-identification Model
  3. Face Detection Model
  4. Age and Gender Recognition Model

Command Line Arguments for Running the app

Following are commanda line arguments that can use for while running the main.py file python main.py:-

  1. -h : Get the information about all the command line arguments
  2. -i (required) : Specify the path of input video file or enter cam for taking input video from webcam
  3. -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).
  4. -l (optional) : Specify the absolute path of cpu extension if some layers of models are not supported on the device.
  5. -pt (optional) : Specify the probability threshold for person detection and face detection model to detect the face accurately from video frame.
  6. -image_dir (optional) : Specify the path of a directory if you want to save detected person's image.
  7. -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.

About

A demo project which uses openvino for person detection, re-identification and age gender classification and also exports detected person as images and predicted data as csv files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages