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.
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.
-
git pull https://github.com/harvestingmoon/PersonReID.git
-
pip install -r requirements.txt
-
Configure the path to your image queries via
config.yaml
-
Download
market1501_resnet50_256_128_epoch_120.ckpt
and place it under/logs
as well asresnet50-19c8e357.pth
and place it undermodels
-
Place your blacklist and whitelist image queries under
/data
folder. -
Run
main.py
There are mainly 3 files which I have created that made this possibleyolo_engine.py
,reid_engine.py
andmain.py
ResNet-50: https://download.pytorch.org/models/resnet50-19c8e357.pth
Trained Model weights for CTL benchmark: https://drive.google.com/drive/folders/1NWD2Q0JGasGm9HTcOy4ZqsIqK4-IfknK
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