[Pedestrian re-identification] TransReID recurrence (market1501 as an example)

Code reference: https://github.com/heshuting555/TransReID

Paper reference: https://arxiv.org/abs/2102.04378

1. Environment

ubuntu16.04
python3.6
cuda110

torch==1.7.0+cu110
torchvision==0.8.0

timm
yacs
opencv-python==4.1.0.25

2. Model preparation

https://www.kaggle.com/abhinand05/vit-base-models-pretrained-pytorch

3. Modify

Modify the following path to your own path:

1) Pre-training model path

2) Data path

3) Model save path

Modify the configs/Market/vit_transreid.yml file and change it to your own (the last one is because the model is saved in the upper-level directory of TransReID):

MODEL:  
  PRETRAIN_PATH: '/home/***/.cache/torch/checkpoints/jx_vit_base_p16_224-80ecf9dd.pth'

DATASETS:
  NAMES: ('market1501')
  ROOT_DIR: ('/root/datasets/')

TEST:
  EVAL: True
  IMS_PER_BATCH: 256
  RE_RANKING: False
  WEIGHT: './logs/market_vit_transreid/transformer_120.pth'

OUTPUT_DIR: './logs/market_vit_transreid'

4. Training

python train.py --config_file configs/Market/vit_transreid.yml MODEL.DEVICE_ID "('0')"

 

Guess you like

Origin blog.csdn.net/qq_35975447/article/details/115342576