This is Official implementation for "Pose-guided Feature Disentangling for Occluded Person Re-Identification Based on Transformer" in AAAI2022

Overview

PFD:Pose-guided Feature Disentangling for Occluded Person Re-identification based on Transformer

Python >=3.6 PyTorch >=1.6

This repo is the official implementation of "Pose-guided Feature Disentangling for Occluded Person Re-identification based on Transformer(PFD), Tao Wang, Hong Liu, Pinghao Song, Tianyu Guo& Wei Shi" in PyTorch.

Pipeline

framework

Dependencies

  • timm==0.3.2

  • torch==1.6.0

  • numpy==1.20.2

  • yacs==0.1.8

  • opencv_python==4.5.2.54

  • torchvision==0.7.0

  • Pillow==8.4.0

Installation

pip install -r requirements.txt

If you find some packages are missing, please install them manually.

Prepare Datasets

mkdir data

Please download the dataset, and then rename and unzip them under the data

data
|--market1501
|
|--Occluded_Duke
|
|--Occluded_REID
|
|--MSMT17
|
|--dukemtmcreid

Prepare ViT Pre-trained and HRNet Pre-trained Models

mkdir data

The ViT Pre-trained model can be found in ViT_Base, The HRNet Pre-trained model can be found in HRNet, please download it and put in the './weights' dictory.

Training

We use One GeForce GTX 1080Ti GPU for Training Before train the model, please modify the parameters in config file, please refer to Arguments in TransReID

python occ_train.py --config_file {config_file path}
#example
python occ_train.py --config_file 'configs/OCC_Duke/skeleton_pfd.yml'

Test the model

First download the Occluded-Duke model:Occluded-Duke

To test on pretrained model on Occ-Duke: Modify the pre-trained model path (PRETRAIN_PATH:ViT_Base, POSE_WEIGHT:HRNet, WEIGHT:Occluded-Duke) in yml, and then run:

## OccDuke for example
python test.py --config_file 'configs/OCC_Duke/skeleton_pfd.yml'

Occluded-Duke Results

Model Image Size Rank-1 mAP
HOReID 256*128 55.1 43.8
PAT 256*128 64.5 53.6
TransReID 256*128 64.2 55.7
PFD 256*128 67.7 60.1
TransReID* 256*128 66.4 59.2
PFD* 256*128 69.5 61.8

$*$means the encoder is with a small step sliding-window setting

Occluded-REID Results

Model Image Size Rank-1 mAP
HOReID 256*128 80.3 70.2
PAT 256*128 81.6 72.1
PFD 256*128 79.8 81.3

Market-1501 Results

Model Image Size Rank-1 mAP
HOReID 256*128 80.3 70.2
PAT 256*128 95.4 88.0
TransReID 256*128 95.4 88.0
PFD 256*128 95.5 89.6

Citation

If you find our work useful in your research, please consider citing this paper! (preprint version will be available soon)

@inproceedings{wang2022pfd,
  Title= {Pose-guided Feature Disentangling for Occluded Person Re-identification based on Transformer},
  Author= {Tao Wang, Hong Liu, Pinhao Song, Tianyu Guo and Wei Shi},
  Booktitle= {AAAI},
  Year= {2022}
}

Acknowledgement

Our code is extended from the following repositories. We thank the authors for releasing the codes.

License

This project is licensed under the terms of the MIT license.

You might also like...
Official pytorch implementation of paper "Inception Convolution with Efficient Dilation Search" (CVPR 2021 Oral).

IC-Conv This repository is an official implementation of the paper Inception Convolution with Efficient Dilation Search. Getting Started Download Imag

Official PyTorch Implementation of Unsupervised Learning of Scene Flow Estimation Fusing with Local Rigidity
Official PyTorch Implementation of Unsupervised Learning of Scene Flow Estimation Fusing with Local Rigidity

UnRigidFlow This is the official PyTorch implementation of UnRigidFlow (IJCAI2019). Here are two sample results (~10MB gif for each) of our unsupervis

Official implementation of our paper
Official implementation of our paper "LLA: Loss-aware Label Assignment for Dense Pedestrian Detection" in Pytorch.

LLA: Loss-aware Label Assignment for Dense Pedestrian Detection This project provides an implementation for "LLA: Loss-aware Label Assignment for Dens

Official implementation of Self-supervised Graph Attention Networks (SuperGAT), ICLR 2021.

SuperGAT Official implementation of Self-supervised Graph Attention Networks (SuperGAT). This model is presented at How to Find Your Friendly Neighbor

An official implementation of
An official implementation of "SFNet: Learning Object-aware Semantic Correspondence" (CVPR 2019, TPAMI 2020) in PyTorch.

PyTorch implementation of SFNet This is the implementation of the paper "SFNet: Learning Object-aware Semantic Correspondence". For more information,

This project is the official implementation of our accepted ICLR 2021 paper BiPointNet: Binary Neural Network for Point Clouds.
This project is the official implementation of our accepted ICLR 2021 paper BiPointNet: Binary Neural Network for Point Clouds.

BiPointNet: Binary Neural Network for Point Clouds Created by Haotong Qin, Zhongang Cai, Mingyuan Zhang, Yifu Ding, Haiyu Zhao, Shuai Yi, Xianglong Li

Official code implementation for
Official code implementation for "Personalized Federated Learning using Hypernetworks"

Personalized Federated Learning using Hypernetworks This is an official implementation of Personalized Federated Learning using Hypernetworks paper. [

StyleGAN2 - Official TensorFlow Implementation
StyleGAN2 - Official TensorFlow Implementation

StyleGAN2 - Official TensorFlow Implementation

 Old Photo Restoration (Official PyTorch Implementation)
Old Photo Restoration (Official PyTorch Implementation)

Bringing Old Photo Back to Life (CVPR 2020 oral)

Comments
  • 精度达不到论文里面的数据

    精度达不到论文里面的数据

    作者您好,我在1501上测试了一下 就改了 /home/zqx_3090/PersonReID/PersonReID2/PFD_Net-master/configs/Market1501/skeleton_pfd.yml 这个文件,里面的参数并没有改动 改了权重的路径,和文件夹的路径 其他都没变,如何训练300轮次后 我选择最高300轮的 /home/zqx_3090/PersonReID/PersonReID2/PFD_Net-master/logs/Market/pfd_net/skeleton_transformer_300.pth 去测试 结果是 : 2021-12-28 18:23:39,417 PFDreid.test INFO: Validation Results 2021-12-28 18:23:39,417 PFDreid.test INFO: mAP: 88.2% 2021-12-28 18:23:39,418 PFDreid.test INFO: CMC curve, Rank-1 :94.8% 2021-12-28 18:23:39,418 PFDreid.test INFO: CMC curve, Rank-5 :98.3% 2021-12-28 18:23:39,418 PFDreid.test INFO: CMC curve, Rank-10 :99.0% 达不到论文的95.5 甚至不如TransReID的精度 ??? 您能看看是为什么嘛?

    MODEL: PRETRAIN_CHOICE: 'imagenet' PRETRAIN_PATH: '/home/zqx_3090/PersonReID/PersonReID2/PFD_Net-master/weights/jx_vit_base_p16_224-80ecf9dd.pth' METRIC_LOSS_TYPE: 'triplet' IF_LABELSMOOTH: 'on' IF_WITH_CENTER: 'no' NAME: 'skeleton_transformer' NO_MARGIN: True DEVICE_ID: ('2') TRANSFORMER_TYPE: 'vit_base_patch16_224_TransReID' STRIDE_SIZE: [16, 16]

    SIE_CAMERA: True SIE_COE: 3.0 JPM: True RE_ARRANGE: True NUM_HEAD: 8 DECODER_DROP_RATE: 0.1 DROP_FIRST: False NUM_DECODER_LAYER: 6 QUERY_NUM: 17 POSE_WEIGHT: '/home/zqx_3090/PersonReID/PersonReID2/PFD_Net-master/weights/pose_hrnet_w48_384x288.pth' SKT_THRES: 0.2

    INPUT: SIZE_TRAIN: [256, 128] SIZE_TEST: [256, 128] PROB: 0.5 # random horizontal flip RE_PROB: 0.5 # random erasing PADDING: 10 PIXEL_MEAN: [0.5, 0.5, 0.5] PIXEL_STD: [0.5, 0.5, 0.5]

    DATASETS: NAMES: ('market1501') ROOT_DIR: ('/home/zqx_3090/PersonReID/PersonReID2/PFD_Net-master/data/')

    DATALOADER: SAMPLER: 'softmax_triplet' NUM_INSTANCE: 4 NUM_WORKERS: 8

    SOLVER: OPTIMIZER_NAME: 'SGD' MAX_EPOCHS: 300 BASE_LR: 0.008 IMS_PER_BATCH: 64 WARMUP_METHOD: 'linear' LARGE_FC_LR: False CHECKPOINT_PERIOD: 60 LOG_PERIOD: 50 EVAL_PERIOD: 30 WEIGHT_DECAY: 1e-4 WEIGHT_DECAY_BIAS: 1e-4 BIAS_LR_FACTOR: 2

    TEST: EVAL: True IMS_PER_BATCH: 256 RE_RANKING: False WEIGHT: "/home/zqx_3090/PersonReID/PersonReID2/PFD_Net-master/logs/Market/pfd_net/skeleton_transformer_300.pth" #put your own pth NECK_FEAT: 'before' FEAT_NORM: 'yes'

    OUTPUT_DIR: 'logs/Market/pfd_net'

    opened by zqx951102 3
  • 使用您的Occluded-Duke的预训练模型达不到文中的结果

    使用您的Occluded-Duke的预训练模型达不到文中的结果

    作者您好: 感谢你做出如此优秀的工作,我按照reademe的要求在使用您的Occluded-Duke的预训练模型时,发现达不到文中所说的结果,下图是我测试的结果: image 跟论文中的结果大约相差2%,我使用的时pytorch1.7.1, cuda10.2, python3.7.13;所以我想知道这是什么原因造成的呢? 期待您的回复。

    opened by changshuowang 2
  • There is no Occlude-REID data loader

    There is no Occlude-REID data loader

    Good work! I respect your contributions!

    I want to testing Occluded-REID dataset in your code, but there is no loader. In your code, dataset.make_dataloader.py, line 14 "from .occ_reid import Occluded_REID"

    Would you share this code?

    thank you

    opened by intlabSeJun 4
Releases(V1.0.0)
Owner
Tao Wang
Tao Wang
Repository for "Improving evidential deep learning via multi-task learning," published in AAAI2022

Improving evidential deep learning via multi task learning It is a repository of AAAI2022 paper, “Improving evidential deep learning via multi-task le

deargen 11 Nov 19, 2022
The project is an official implementation of our CVPR2019 paper "Deep High-Resolution Representation Learning for Human Pose Estimation"

Deep High-Resolution Representation Learning for Human Pose Estimation (CVPR 2019) News [2020/07/05] A very nice blog from Towards Data Science introd

Leo Xiao 3.9k Jan 5, 2023
Official implementation of AAAI-21 paper "Label Confusion Learning to Enhance Text Classification Models"

Description: This is the official implementation of our AAAI-21 accepted paper Label Confusion Learning to Enhance Text Classification Models. The str

null 101 Nov 25, 2022
Official PyTorch implementation for paper Context Matters: Graph-based Self-supervised Representation Learning for Medical Images

Context Matters: Graph-based Self-supervised Representation Learning for Medical Images Official PyTorch implementation for paper Context Matters: Gra

null 49 Nov 23, 2022
The official implementation of NeMo: Neural Mesh Models of Contrastive Features for Robust 3D Pose Estimation [ICLR-2021]. https://arxiv.org/pdf/2101.12378.pdf

NeMo: Neural Mesh Models of Contrastive Features for Robust 3D Pose Estimation [ICLR-2021] Release Notes The offical PyTorch implementation of NeMo, p

Angtian Wang 76 Nov 23, 2022
StyleGAN2-ADA - Official PyTorch implementation

Abstract: Training generative adversarial networks (GAN) using too little data typically leads to discriminator overfitting, causing training to diverge. We propose an adaptive discriminator augmentation mechanism that significantly stabilizes training in limited data regimes.

NVIDIA Research Projects 3.2k Dec 30, 2022
Official implementation of the ICLR 2021 paper

You Only Need Adversarial Supervision for Semantic Image Synthesis Official PyTorch implementation of the ICLR 2021 paper "You Only Need Adversarial S

Bosch Research 272 Dec 28, 2022
Official PyTorch implementation of Joint Object Detection and Multi-Object Tracking with Graph Neural Networks

This is the official PyTorch implementation of our paper: "Joint Object Detection and Multi-Object Tracking with Graph Neural Networks". Our project website and video demos are here.

Richard Wang 443 Dec 6, 2022
Official implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis https://arxiv.org/abs/2011.13775

CIPS -- Official Pytorch Implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis Requirements pip install -r requi

Multimodal Lab @ Samsung AI Center Moscow 201 Dec 21, 2022
Official pytorch implementation of paper "Image-to-image Translation via Hierarchical Style Disentanglement".

HiSD: Image-to-image Translation via Hierarchical Style Disentanglement Official pytorch implementation of paper "Image-to-image Translation

null 364 Dec 14, 2022