All Projects → Qidian213 → Ranked_Person_ReID

Qidian213 / Ranked_Person_ReID

Licence: MIT license
Person reID

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ranked Person ReID

HiCMD
[CVPR2020] Hi-CMD: Hierarchical Cross-Modality Disentanglement for Visible-Infrared Person Re-Identification
Stars: ✭ 64 (-29.67%)
Mutual labels:  reid, person-reid
MetaBIN
[CVPR2021] Meta Batch-Instance Normalization for Generalizable Person Re-Identification
Stars: ✭ 58 (-36.26%)
Mutual labels:  person-reid
SphereReID
My implementation of paper: SphereReID: Deep Hypersphere Manifold Embedding for Person Re-Identification
Stars: ✭ 39 (-57.14%)
Mutual labels:  person-reid
CM-NAS
CM-NAS: Cross-Modality Neural Architecture Search for Visible-Infrared Person Re-Identification (ICCV2021)
Stars: ✭ 39 (-57.14%)
Mutual labels:  reid
Attentive-WaveBlock
[TIP 2022] Pytorch implementation of "Attentive WaveBlock: Complementarity-enhanced Mutual Networks for Unsupervised Domain Adaptation in Person Re-identification and Beyond"
Stars: ✭ 17 (-81.32%)
Mutual labels:  person-reid
capture reid
可基于摄像头实时监控或录制的视频或静态图片进行行人检测(lffd)/跟踪(deep sort)和行人重识别(reid)。
Stars: ✭ 87 (-4.4%)
Mutual labels:  reid
understand videobased reid
关于video_reid代码的注释,原始代码地址
Stars: ✭ 50 (-45.05%)
Mutual labels:  reid
triplet-reid-pytorch
My implementation of the paper [In Defense of the Triplet Loss for Person Re-Identification]
Stars: ✭ 95 (+4.4%)
Mutual labels:  reid
reid baseline gluon
SOTA results for reid baseline model (Gluon implementation)
Stars: ✭ 14 (-84.62%)
Mutual labels:  reid
Person reid baseline pytorch
Pytorch ReID: A tiny, friendly, strong pytorch implement of object re-identification baseline. Tutorial 👉https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial
Stars: ✭ 2,963 (+3156.04%)
Mutual labels:  person-reid
Fast Reid
SOTA Re-identification Methods and Toolbox
Stars: ✭ 2,287 (+2413.19%)
Mutual labels:  person-reid
Gluon Cv
Gluon CV Toolkit
Stars: ✭ 5,001 (+5395.6%)
Mutual labels:  person-reid
AOS4ReID
Adversarially Occluded Samples for Person Re-identification, CVPR 2018
Stars: ✭ 32 (-64.84%)
Mutual labels:  person-reid
Cloth Change Person reID Paper List
Paper collection for cloth variation based person re-identification
Stars: ✭ 77 (-15.38%)
Mutual labels:  person-reid

QQ group: 姿态检测&跟踪 781184396

Person ReID

The codes are expanded on a ReID-baseline

Bag of tricks

  • Warm up learning rate
  • Random erasing augmentation
  • Label smoothing
  • Last stride

Loss function

  1. "ranked_loss", SoftMax(LS) + w*RLL, results as "Results". For RLL I use Ranked List Loss for Deep Metric Learning, and made some modifications.

  2. "cranked_loss", SoftMax(LS) + w*RLL(kmeans), before compute RLL i use kemeans to cluster features to help find hard samples. Now I can only get same performance to ranked_loss, so not report results.

Pipeline

Results

models

NOTE: For the the limitations of the device (GTX1060 6G), while training Se_ResNet50 and Se_ResNext50 i can only set batchsize = 48, others is 64.

Get Started

  1. cd to folder where you want to download this repo

  2. Run git clone https://github.com/Qidian213/Ranked_Person_ReID

  3. Install dependencies:

  4. 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.

    You can create a directory to store reid datasets under this repo via

    cd data

    (1)Market1501

    data
        market1501 # this folder contains 6 files.
            bounding_box_test/
            bounding_box_train/
            ......

    (2)DukeMTMC-reID

    data
        dukemtmc-reid
        	DukeMTMC-reID # this folder contains 8 files.
            	bounding_box_test/
            	bounding_box_train/
            	......
  5. Prepare pretrained model if you don't have

    (1)ResNet

    from torchvision import models
    models.resnet50(pretrained=True)

    (2)Senet

    import torch.utils.model_zoo as model_zoo
    model_zoo.load_url('the pth you want to download (specific urls are listed in  ./modeling/backbones/senet.py)')

    Then it will automatically download model in ~/.torch/models/, you should set this path in config/defaults.py for all training or set in every single training config file in configs/ or set in every single command.

    (3)ResNet_IBN_a , faster implementation

    You can download from here [link]

    (4)Load your self-trained model If you want to continue your train process based on your self-trained model, you can change the configuration PRETRAIN_CHOICE from 'imagenet' to 'self' and set the PRETRAIN_PATH to your self-trained model.

  6. 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

  1. Market1501
python tools/train.py --config_file='configs/softmax_ranked.yml' DATASETS.NAMES "('market1501')" 
  1. DukeMTMC-reID
python tools/train.py --config_file='configs/softmax_ranked.yml' DATASETS.NAMES "('dukemtmc')" 

Test

python tools/test.py --config_file='configs/softmax_ranked.yml' MODEL.DEVICE_ID "('your device id')" DATASETS.NAMES "('market1501')" TEST.FEAT_NORM "('yes')" TEST.RE_RANKING "('no')" MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('your path to trained checkpoints')"

Using and Compute threshold of negative and postive samples

  1. DukeMTMC-reID
  1. Market1501

Using

python tools/demo.py 

Compute threshold , to compute threshold i use the hardest samples of negative and postive samples in a batchsizes.

python tools/compute_threshold.py --config_file='configs/softmax_ranked.yml' MODEL.PRETRAIN_CHOICE "('self')"  DATASETS.NAMES "('market1501')" TEST.WEIGHT "('models/resnet50_ibn_a/mar_resnet50_ibn_a_model.pth')"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].