Skip to content

NIRVANALAN/magnifiernet_reid

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Magnifier: Towards Semantic Adversary and Fusion for Person Re-identification

This repo is expanded on Bag of Tricks and A Strong ReID Baseline

Results (rank1/mAP)

Model CUHK03-L DukeMTMC-reID
Standard baseline 69.8(67.4) 82.7(70.8)
+ Mask Branch 71.3(69.0) 83.9(72.9)
+ SAB 76.6(74.6) 87.1(76.7)
+ SFB 77.4(75.9) 86.7(75.2)
+ All Modules 82.4(79.6) 90.0(80.7)
+ Reranking 87.3(89.1) 91.8(90.6)

refer to our paper for more experiments comparision.

  1. Prepare dataset

    Create a directory to store reid datasets under this repo or outside this repo. Remember to set your path to the root of the dataset in config/defaults.py for all training and testing or set in every single config file in configs/ or set in every single command.

  1. If you want to know the detailed configurations and their meaning, please refer to config/defaults.py. If you want to set your own parameters, you can follow our method: create a new yml file, then set your own parameters. Add --config_file='configs/your yml file' int the commands described below, then our code will merge your configuration. automatically.

Train

You can run these commands in .sh files for training different datasets of differernt loss. You can also directly run code sh *.sh to run our demo after your custom modification.


1. Market1501, cross entropy loss + triplet loss

```bash
python3 tools/train.py --config_file='configs/softmax_triplet.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" OUTPUT_DIR "('your path to save checkpoints and logs')"
  1. DukeMTMC-reID, cross entropy loss + triplet loss + center loss
python3 tools/train.py --config_file='configs/softmax_triplet_with_center.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('dukemtmc')" OUTPUT_DIR "('your path to save checkpoints and logs')"

Cite our paper if you are interested

@article{lanmagnifiernet,
  title={MagnifierNet: Towards Semantic Adversary and Fusion for Person Re-identification},
  author={Lan, Yushi and Liu, Yuan and Zhou, Xinchi and Tian, Maoqing and Zhang, Xuesen and Yi, Shuai and Li, Hongsheng}
}

About

pytorch code for MagnifierNet, BMVC2020

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published