Skip to content

Personal Project To detect POI using YOLO-NAS & CTL

Notifications You must be signed in to change notification settings

jiangsheng/PersonReID

 
 

Repository files navigation

Person Re-Identification

Personal project for person reidentification. It uses YOLO-NAS for person detection while Centroid ReID for Person reidentification. The 2048 embeddings produced by Centroid ReID are then compared via Cosine Similarity.

Currently, Centroid ReID achieves SOTA performance on the Market1501 benchmark.

YOLO-NAS also outperforms YOLO-V6 & V8 in terms of mAP.

Video Feed

Image_1

Based on the image queries, you can place them in either blacklist or whitelist under data. Then, run main.py to run the program.

The script is designed to be multithreaded. I have also created a switch-key. Press a if you would like to disable ReID on the feed.

How To Run

  1. git pull https://github.com/harvestingmoon/PersonReID.git

  2. pip install -r requirements.txt

  3. Configure the logs and blacklist/whitelist paths to your image queries via config.yaml and add a line

reid: true

to the end.

  1. Download market1501_resnet50_256_128_epoch_120.ckpt and place it under /logs as well as resnet50-19c8e357.pth and place it under the models subfolder of the repository

  2. Place your blacklist and whitelist image queries under /data folder.

  3. Run main.py There are mainly 3 files which I have created that made this possible yolo_engine.py , reid_engine.py and main.py

If you see network errors downloading from sghub.deci.ai, it is because it is down. You can download the files manually or modify python3.8.20/dist-packages/super_gradients/training/pretrained_models.py and python3.8.20/dist-packages/super_gradients/training/utils/checkpoint_utils.py, see Deci-AI/super-gradients#2057 for details.

Links to weights

ResNet-50: https://download.pytorch.org/models/resnet50-19c8e357.pth

Trained Model weights for CTL benchmark: https://drive.google.com/drive/folders/1NWD2Q0JGasGm9HTcOy4ZqsIqK4-IfknK

Acknowledgements

Special thank you to the researchers for making the code open source.Below are the links to the original source code as well.

YOLO-NAS/ SuperGradients : https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md

CTL/ Centroids-REID: https://github.com/mikwieczorek/centroids-reid

About

Personal Project To detect POI using YOLO-NAS & CTL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%