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

Related tags

Deep LearningPFD_Net
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
The implementation of DeBERTa

DeBERTa: Decoding-enhanced BERT with Disentangled Attention This repository is the official implementation of DeBERTa: Decoding-enhanced BERT with Dis

Microsoft 1.2k Jan 06, 2023
FFTNet vocoder implementation

Unofficial Implementation of FFTNet vocode paper. implement the model. implement tests. overfit on a single batch (sanity check). linearize weights fo

Eren Gölge 81 Dec 08, 2022
DFM: A Performance Baseline for Deep Feature Matching

DFM: A Performance Baseline for Deep Feature Matching Python (Pytorch) and Matlab (MatConvNet) implementations of our paper DFM: A Performance Baselin

143 Jan 02, 2023
Hcaptcha-challenger - Gracefully face hCaptcha challenge with Yolov5(ONNX) embedded solution

hCaptcha Challenger 🚀 Gracefully face hCaptcha challenge with Yolov5(ONNX) embe

593 Jan 03, 2023
CLUES: Few-Shot Learning Evaluation in Natural Language Understanding

CLUES: Few-Shot Learning Evaluation in Natural Language Understanding This repo contains the data and source code for baseline models in the NeurIPS 2

Microsoft 29 Dec 29, 2022
Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks

Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks This repository contains a TensorFlow implementation of "

Jingwei Zheng 5 Jan 08, 2023
Boosting Monocular Depth Estimation Models to High-Resolution via Content-Adaptive Multi-Resolution Merging

Boosting Monocular Depth Estimation Models to High-Resolution via Content-Adaptive Multi-Resolution Merging This repository contains an implementation

Computational Photography Lab @ SFU 1.1k Jan 02, 2023
GAN-STEM-Conv2MultiSlice - Exploring Generative Adversarial Networks for Image-to-Image Translation in STEM Simulation

GAN-STEM-Conv2MultiSlice GAN method to help covert lower resolution STEM images generated by convolution methods to higher resolution STEM images gene

UW-Madison Computational Materials Group 2 Feb 10, 2021
The implementation of 'Image synthesis via semantic composition'.

Image synthesis via semantic synthesis [Project Page] by Yi Wang, Lu Qi, Ying-Cong Chen, Xiangyu Zhang, Jiaya Jia. Introduction This repository gives

DV Lab 71 Jan 06, 2023
SphereFace: Deep Hypersphere Embedding for Face Recognition

SphereFace: Deep Hypersphere Embedding for Face Recognition By Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj and Le Song License SphereFa

Weiyang Liu 1.5k Dec 29, 2022
A library for researching neural networks compression and acceleration methods.

A library for researching neural networks compression and acceleration methods.

Intel Labs 100 Dec 29, 2022
No-reference Image Quality Assessment(NIQA) Algorithms (BRISQUE, NIQE, PIQE, RankIQA, MetaIQA)

No-Reference Image Quality Assessment Algorithms No-reference Image Quality Assessment(NIQA) is a task of evaluating an image without a reference imag

Dae-Young Song 26 Jan 04, 2023
VQGAN+CLIP Colab Notebook with user-friendly interface.

VQGAN+CLIP and other image generation system VQGAN+CLIP Colab Notebook with user-friendly interface. Latest Notebook: Mse regulized zquantize Notebook

Justin John 227 Jan 05, 2023
AutoDeeplab / auto-deeplab / AutoML for semantic segmentation, implemented in Pytorch

AutoML for Image Semantic Segmentation Currently this repo contains the only working open-source implementation of Auto-Deeplab which, by the way out-

AI Necromancer 299 Dec 17, 2022
AgeGuesser: deep learning based age estimation system. Powered by EfficientNet and Yolov5

AgeGuesser AgeGuesser is an end-to-end, deep-learning based Age Estimation system, presented at the CAIP 2021 conference. You can find the related pap

5 Nov 10, 2022
Unsupervised Attributed Multiplex Network Embedding (AAAI 2020)

Unsupervised Attributed Multiplex Network Embedding (DMGI) Overview Nodes in a multiplex network are connected by multiple types of relations. However

Chanyoung Park 114 Dec 06, 2022
JittorVis - Visual understanding of deep learning models

JittorVis: Visual understanding of deep learning model JittorVis is an open-source library for understanding the inner workings of Jittor models by vi

thu-vis 182 Jan 06, 2023
Official Implementation of Domain-Aware Universal Style Transfer

Domain Aware Universal Style Transfer Official Pytorch Implementation of 'Domain Aware Universal Style Transfer' (ICCV 2021) Domain Aware Universal St

KibeomHong 80 Dec 30, 2022
MEAL V2: Boosting Vanilla ResNet-50 to 80%+ Top-1 Accuracy on ImageNet without Tricks

MEAL-V2 This is the official pytorch implementation of our paper: "MEAL V2: Boosting Vanilla ResNet-50 to 80%+ Top-1 Accuracy on ImageNet without Tric

Zhiqiang Shen 653 Dec 19, 2022