This is a repository for vehicle Re-ID.
This repo keeps updating.
2020-4-22: append apex support for saving GPU memory.
- Linux
- CUDA 8.0 or higher
- Python3
- Pytorch 1.1+
- Clone the open-VehicleReID repository.
git clone https://github.com/BravoLu/open-VehicleReID.git
- Install the dependencies.
cd open-VehicleReID
pip -r install requirements.txt
python main.py -c <path_to_config_file> \\
-d <path_to_data> \\
--gpu <gpu_ids> \\
--log <path_to_log_file> \\
--save <path_to_save_checkpoint_file> \\
--seed <seed_number>
(e.g.)
python main.py -c configs/baseline.yml -d /home/share/zhihui/VeRi/ --log logs/veri/baseline --save ckpts/veri/baseline --gpu 0,1 --seed 0
- Test
python main.py -c <path_to_config_file> \\
-d <path_to_data> \\
--ckpt <path_to_load_checkpoint_file> \\
--gpu <gpu_ids> \\
--seed <seed_number> \\
-t
(e.g.)
python main.py -c configs/baseline.yml -d /home/share/zhihui/VeRi/ --ckpt ckpts/baseline/checkpoint.pth --gpu 0,1 --seed 0
- We visualize the ranking list in Windows 10 (Now only support VeRi, will support other dataset in the future).
- Generate the ranking list pickle file.
python main.py -c <path_to_config_file> \\
-d <path_to_data> \\
--ckpt <path_to_load_checkpoint_file> \\
--gpu <gpu_ids> \\
--seed <seed_number> \\
--vis <path_to_save_visualization_file> \\
-t
- Visualize the ranking list according to the .pkl file generated in step 1.
cd visualization
python visualization.py --data <path_to_data>
Input the file name (without extension) on the entry of Rank File(.pkl).
- (Green denotes same ids, red denotes different ids.)
More details see https://github.com/BravoLu/reid-visual-system
- VehicleID
Model | scale | Small | Median | Large | ||||||
Rank 1 | Rank 5 | Rank 10 | Rank 1 | Rank 5 | Rank 10 | Rank 1 | Rank 5 | Rank 10 | ||
Basline | 224x224 | 76.4% | 89.2% | 92.9% | 74.5% | 86.5% | 90.2% | 71.5% | 83.6% | 87.7% |
Basline(RR) | 224x224 | 77.3% | 89.4% | 93.4% | 74.5% | 86.3$ | 90.7% | 72.2% | 83.6% | 87.8% |
Basline | 384x384 | 78.9% | 91.3% | 94.9% | 76.5% | 89.0% | 92.9% | 74.0% | 86.1% | 90.4% |
Basline(RR) | 384x384 | 78.9% | 91.6% | 95.3% | 76.3% | 88.4% | 92.8% | 74.4% | 85.7% | 90.0% |
- VeRi776
Model | scale | mAP | Rank 1 | Rank 5 | Rank 10 |
---|---|---|---|---|---|
Baseline | 224x224 | 74.7% | 94.8% | 98.3% | 99.2% |
Baseline(RR) | 224x224 | 79.8% | 95.7% | 97.1% | 98.4% |
Baseline | 384x384 | 79.5% | 95.9% | 98.5% | 99.0% |
Baseline(RR) | 384x384 | 84.2% | 96.7% | 98.4% | 98.9% |
- VeRi_Wild
Model | scale | Small | Median | Large | |||||||||
mAP | Rank1 | Rank5 | Rank10 | mAP | Rank1 | Rank5 | Rank10 | mAP | Rank1 | Rank5 | Rank10 | ||
Baseline | 224x224 | 66.7% | 80.6% | 94.0% | 97.3% | 58.3% | 73.0% | 90.0% | 95.0% | 47.6% | 64.8% | 84.4% | 90.8% |
Baseline(RR) | 224x224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Baseline | 384x384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Baseline(RR) | 384x384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
* RR denotes reranking.
- Some code is borrowed from open-reid