The 3rd Place Submission to AICity Challenge 2020 Track2
No Data
This repository contains our source code of Track2 in the NVIDIA AI City Challenge at CVPR 2020 Workshop. Our paper
Detailed information of NVIDIA AI City Challenge 2020 can be found here.
The code is modified from reid_strong baseline and personreidtiny_baseline.
cdto folder where you want to download this repo
Run
git clone https://github.com/heshuting555/AICITY2020_DMT_VehicleReID.git
Install dependencies:
We use cuda 9.0/python 3.6.7/torch 1.2.0/torchvision 0.4.0 for training and testing.
AIC20_track2/AIC20_ReID/train_label.xmlas below:
into
bash run.sh
Note: you can download our trained model and Distance matrix in the AICITY2020 here
# you need to train a model in a Multi-Domain Datasets first.(E.g: you can add simulation datasets to aic and then test on the aic)python train.py --config_file='configs/baseline_aic_finetune.yml' MODEL.PRETRAIN_PATH "('your path for trained checkpoints')" MODEL.DEVICE_ID "('your device id')" OUTPUT_DIR "('your path to save checkpoints and logs')"
# First, genereate the selected query idspython test_mining.py --config_file='configs/test_identity_mining.yml' TEST.WEIGHT "('your path for trained checkpoints')" OUTPUT_DIR "('your path to save selected query id')" --thresh 0.49
Note: The quality of the query id depends on the performance of TEST.WEIGHT. And you can change the value of thresh to get more or less query ids.
# Then, train the model with trainset and testset(selected by the above selected query id)python train_IM.py --config_file='configs/baseline_aic.yml' --config_file_test='configs/test_train_IM.yml' OUTPUT_DIR "('your path to save checkpoints and logs')" MODEL.THRESH "(0.23)"
Note: you can change the value of MODEL.THRESH which determines how many test sets added to the train sets.
If you want to generate crop images please refer to cropdatasetgenerate directory for detail.
You can visualize the result given a track2.txt result (AICITY required submission format).
python vis_txt_result.py --base_dir ('your path to the datasets') --result ('result file (txt format) path')
python train.py --config_file='configs/baseline_veri_r50.yml' MODEL.DEVICE_ID "('your device id')" OUTPUT_DIR "('your path to save checkpoints and logs')"
| Model | AICITY2020 | | -------------------------- | ----------- | | Resnet101ibna (baseline) | 59.73/69.30 | | + Multi-Domain Learning | 65.25/71.96 | | + Identity Mining | 68.54/74.81 | | + Ensemble | 73.22/80.42 |
| Backbone (baseline) | VeRi | download | | -------------------------- | ---------------------------------------------- | ------------------------------------------------------------ | | ResNet50 (batch 48) | 79.8/95.0 | model | log | | Resnet50ibna (batch 48) | 81.4/96.5 | model | log | | Resnet101ibna (batch 48) | 82.8/97.1 | model | log |
If you find our work useful in your research, please consider citing:
@inproceedings{he2020multi, title={Multi-Domain Learning and Identity Mining for Vehicle Re-Identification}, author={He, Shuting and Luo, Hao and Chen, Weihua and Zhang, Miao and Zhang, Yuqi and Wang, Fan and Li, Hao and Jiang, Wei}, booktitle={Proc. CVPR Workshops}, year={2020} }