Skip to content

kodamap/person_reidentification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Person Re-identification with OpenVINO

What's this

This is Person Identification Test App using Intel OpenVINO Person Re-Identification Model.

  • Person Detection
  • Person Re-Identification

Person re-identifiction - Tracking - (YouTube Link)

TownCentre

Person re-identifiction - Tracking - (YouTube Link)

mall2

Reference

OpenVINO Toolkit and Flask Video streaming

OpenVINO Intel Model

Tested Environment

  • Python 3.9.13
  • Windows 11 22H2
  • OpenVINO Toolkit 2022.1 ~ 2022.3

Models

[MODELS]
# Don't add a trailing slash
model_path = model/intel
model_det = person-detection-retail-0013
model_reid = person-reidentification-retail-0031

You can download models which you like.

See OpenVINO User Guide: Model Downloader

Required Python packages

pip install -r requirements.txt

How to use

python app.py -h
usage: app.py [-h] -i INPUT [-d {CPU,GPU,FPGA,MYRIAD}]
              [-d_reid {CPU,GPU,FPGA,MYRIAD}] [--v4l] [-g GRID] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Path to video file or image. 'cam' for capturing video
                        stream from camera
  -d {CPU,GPU,FPGA,MYRIAD}, --device {CPU,GPU,FPGA,MYRIAD}
                        Specify the target device for Person Detection to
                        infer on; CPU, GPU, FPGA or MYRIAD is acceptable.
  -d_reid {CPU,GPU,FPGA,MYRIAD}, --device_reidentification {CPU,GPU,FPGA,MYRIAD}
                        Specify the target device for person re-identificaiton
                        to infer on; CPU, GPU, FPGA or MYRIAD is acceptable.
  --v4l                 cv2.VideoCapture with cv2.CAP_V4L
  -g GRID, --grid GRID  Specify how many grid to divide frame. This is used to
                        define boundary area when the tracker counts person. 0
                        ~ 2 means not counting person. (range: 3 < max_grid)
  -v, --verbose         set logging level Debug

Run app

example1. camera streaming without person counter

python app.py -i cam

example2 Specify video file with person counter

python app.py -i video\TownCentreXVID.mp4

Access the url bellow on your browser

http://127.0.0.1:5000/

The log (app.log) is output to the current directory.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published