fast-reid
fast-reid copied to clipboard
Add the code for GPU-Reranking
Hi, Xingyu! I integrate the re-ranking into fast-reid. As suggested, the modified code can make users use the GPU-reranking by changing config. I have tested the code in Market1501 with market_sbs_R101-ibn.pth and the result is all right as shown below.
07/31 15:10:57 fastreid.evaluation.reid_evaluation]: Test with gpu real-time rerank setting
[07/31 15:11:05 fastreid.engine.defaults]: Evaluation results for Market1501 in csv format:
[07/31 15:11:05 fastreid.evaluation.testing]: Evaluation results in csv format:
| Dataset | Rank-1 | Rank-5 | Rank-10 | mAP | mINP | metric |
|:-----------|:---------|:---------|:----------|:------|:-------|:---------|
| Market1501 | 96.35 | 98.43 | 98.84 | 95.23 | 90.53 | 95.79 |
The method is as follows.
- Compile the code of gpu re-ranking .
cd fastreid/evaluation/extension; sh make.sh - When evaluating, we can use GPU-reranking by changing config.
python3 tools/train_net.py --config-file ./configs/Market1501/bagtricks_R50.yml --eval-only \
TEST.GPU_RERANK.ENABLED True MODEL.WEIGHTS /path/to/checkpoint_file MODEL.DEVICE "cuda:0"
Thanks for your great work! I will check it later.