/MPL-MV

Primary LanguagePython

Python >=3.6 PyTorch >=1.1

Mutual prediction learning and mixed viewpoints for unsupervised-domain adaptation person re-identification on blockchain

The official repository for [Mutual prediction learning and mixed viewpoints for unsupervised-domain adaptation person re-identification on blockchai].

Pipeline

framework

Requirements

Installation

(we use /torch >=1.1 / 11G  RTX2080Ti for training and evaluation.)

Prepare Datasets

mkdir data

Download the person datasets Market-1501, MSMT17, DukeMTMC-reID, MSMT17-New ,Market1501-NewDuke-New.

Then unzip them and rename them under the directory like.

data
├── market1501
│   └── bounding_box_train_s1 ..(S1)
│   └── bounding_box_train ..
│   └── bounding_box_test ..
│   └── query ..
├── dukemtmcreid
│   └── bounding_box_train_s1 ..(S1)
│   └── bounding_box_train ..
│   └── bounding_box_test ..
│   └── query ..
└── MSMT17
│   └── modify ..(S2)
│       └── list_gallery.txt
│       └── list_query.txt
│       └── list_train.txt
│       └── list_val.txt
│   └── train ..
│   └── test ..
│   └── list_gallery.txt
│   └── list_query.txt
│   └── list_train.txt
│   └── list_val.txt

Train

We utilize 1 RTX-2080Ti GPU for training.

task: duke2market

python main.py   --train_task 'duke_market' --s_camera_num 8 --t_camera_num 6 --pid_num 702 --steps 1033  --steps_domain 800 --base_learning_rate 0.0002 --m_2k_learn_rate 0.00012 --d_domain_learn_rate 0.0003

task: market to duke

python main.py   --train_task 'market_duke' --s_camera_num 6 --t_camera_num 8 --pid_num 751 --steps 809  --steps_domain 1000 --base_learning_rate 0.0002 --m_2k_learn_rate 0.0002 --d_domain_learn_rate 0.0002

task: market to msmt17

python main.py   --train_task 'market_msmt' --s_camera_num 6 --t_camera_num 15 --pid_num 751 --steps 809  --steps_domain 2000 --base_learning_rate 0.0002 --m_2k_learn_rate 0.0002 --d_domain_learn_rate 0.0002

task: msmt17 to market

python main.py   --train_task 'msmt_market' --s_camera_num 15 --t_camera_num 6 --pid_num 1041 --steps 2039  --steps_domain 800 --base_learning_rate 0.0002 --m_2k_learn_rate 0.0002 --d_domain_learn_rate 0.0002

task: duke to msmt17

python main.py   --train_task 'duke_msmt' --s_camera_num 8 --t_camera_num 15 --pid_num 702 --steps 1033  --steps_domain 2000 --base_learning_rate 0.0002 --m_2k_learn_rate 0.00012 --d_domain_learn_rate 0.0003

task: msmt17 to duke

python main.py   --train_task 'msmt_duke' --s_camera_num 15 --t_camera_num 8 --pid_num 1041 --steps 2039  --steps_domain 1000 --base_learning_rate 0.0002 --m_2k_learn_rate 0.0002 --d_domain_learn_rate 0.0002

task: market to duke(s1)

python main.py   --train_task 'market_duke' --s_camera_num 6 --t_camera_num 8 --pid_num 751 --steps 809  --steps_domain 300 --base_learning_rate 0.0002 --m_2k_learn_rate 0.0002 --d_domain_learn_rate 0.0002 --target_modify True

task: duke to market(s1)

python main.py   --train_task 'duke_market' --s_camera_num 8 --t_camera_num 6 --pid_num 702 --steps 1033  --steps_domain 200 --base_learning_rate 0.0002 --m_2k_learn_rate 0.00012 --d_domain_learn_rate 0.0003 --target_modify True

task: market to msmt17(s2)

python main.py   --train_task 'market_msmt' --s_camera_num 6 --t_camera_num 15 --pid_num 751 --steps 809  --steps_domain 900 --base_learning_rate 0.0002 --m_2k_learn_rate 0.0002 --d_domain_learn_rate 0.0002  --target_modify True

task: duke to msmt17(s2)

python main.py   --train_task 'duke_msmt' --s_camera_num 8 --t_camera_num 15 --pid_num 702 --steps 1033  --steps_domain 900 --base_learning_rate 0.0002 --m_2k_learn_rate 0.00012 --d_domain_learn_rate 0.0003 --target_modify True

Evaluation

python test.py   --train_task 'duke_market'  --resume_test_model 'path'
python test.py   --train_task 'duke_msmt'  --resume_test_model 'path'  --target_modify True

Contact

If you have any questions, please feel free to contact me.(shuangli936@gmail.com) .

Acknowledgement

Our code is based on light-reid .

Citation

@article{li2022mutual,
  title={Mutual prediction learning and mixed viewpoints for unsupervised-domain adaptation person re-identification on blockchain},
  author={Li, Shuang and Li, Fan and Wang, Kunpeng and Qi, Guanqiu and Li, Huafeng},
  journal={Simulation Modelling Practice and Theory},
  volume={119},
  pages={102568},
  year={2022},
  publisher={Elsevier}
}