fast-reid icon indicating copy to clipboard operation
fast-reid copied to clipboard

Add the code for GPU-Reranking

Open Xuanmeng-Zhang opened this issue 4 years ago • 1 comments

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.

  1. Compile the code of gpu re-ranking . cd fastreid/evaluation/extension; sh make.sh
  2. 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"

Xuanmeng-Zhang avatar Jul 31 '21 07:07 Xuanmeng-Zhang

Thanks for your great work! I will check it later.

L1aoXingyu avatar Aug 01 '21 14:08 L1aoXingyu