Skip to content

thanit456/AdaptiveReID

 
 

Repository files navigation

AdaptiveReID: Adaptive L2 Regularization in Person Re-Identification

PWC

PWC

PWC

Overview

We introduce an adaptive L2 regularization mechanism termed AdaptiveReID, in the setting of person re-identification. In the literature, it is common practice to utilize hand-picked regularization factors which remain constant throughout the training procedure. Unlike existing approaches, the regularization factors in our proposed method are updated adaptively through backpropagation. This is achieved by incorporating trainable scalar variables as the regularization factors, which are further fed into a scaled hard sigmoid function. Extensive experiments on the Market-1501, DukeMTMC-reID and MSMT17 datasets validate the effectiveness of our framework. Most notably, we obtain state-of-the-art performance on MSMT17, which is the largest dataset for person re-identification.

Environment

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
conda config --set auto_activate_base false
conda create --yes --name TensorFlow2.2 python=3.7
conda activate TensorFlow2.2
conda install --yes cudatoolkit=10.1 cudnn=7.6
conda install --yes cython matplotlib pandas pydot scikit-learn
pip install tensorflow==2.2.0
pip install opencv-python
pip install albumentations

Training

python3 -u solution.py --dataset_name "Market1501" --backbone_model_name "ResNet50"
  • To train on other datasets, replace "Market1501" with "DukeMTMC_reID" or "MSMT17".
  • To train with deeper backbones, replace "ResNet50" with "ResNet101" or "ResNet152".
  • To evaluate on a subset of the complete test set, append --testing_size 0.5 to the command. Alternatively, you may turn this feature off by using --testing_size 0.0.

Evaluation

python3 -u solution.py --dataset_name "Market1501" --backbone_model_name "ResNet50" --pretrained_model_file_path "?.h5" --output_folder_path "evaluation_only" --evaluation_only --freeze_backbone_for_N_epochs 0 --testing_size 1.0 --evaluate_testing_every_N_epochs 1
  • Fill in the pretrained_model_file_path argument using the h5 file obtained during training.
  • To use the re-ranking method, append --use_re_ranking to the command.
  • You need to run this separate evaluation procedure only if testing_size is not set to 1.0 during training.

Model Zoo

Dataset Backbone mAP Weights
Market1501 ResNet50 88.3 Link
DukeMTMC_reID ResNet50 79.9 Link
MSMT17 ResNet50 59.4 Link
MSMT17 ResNet152 62.2 Link

Acknowledgements

Citation

Please consider citing AdaptiveReID if it helps your research.

@article{ni2020adaptivereid,
  title={AdaptiveReID: Adaptive L2 Regularization in Person Re-Identification},
  author={Ni, Xingyang and Fang, Liang and Huttunen, Heikki},
  journal={arXiv preprint arXiv:2007.07875},
  year={2020}
}

About

AdaptiveReID: Adaptive L2 Regularization in Person Re-Identification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%