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
PyToch implementation of A Novel Self-supervised Learning Task Designed for Anomaly Segmentation

Self-Supervised Anomaly Segmentation Intorduction This is a PyToch implementation of A Novel Self-supervised Learning Task Designed for Anomaly Segmen

WuFan 2 Jan 27, 2022
AITUS - An atomatic notr maker for CYTUS

AITUS an automatic note maker for CYTUS. 利用AI根据指定乐曲生成CYTUS游戏谱面。 效果展示:https://www

GradiusTwinbee 6 Feb 24, 2022
Official page of Patchwork (RA-L'21 w/ IROS'21)

Patchwork Official page of "Patchwork: Concentric Zone-based Region-wise Ground Segmentation with Ground Likelihood Estimation Using a 3D LiDAR Sensor

Hyungtae Lim 254 Jan 05, 2023
Quickly comparing your image classification models with the state-of-the-art models (such as DenseNet, ResNet, ...)

Image Classification Project Killer in PyTorch This repo is designed for those who want to start their experiments two days before the deadline and ki

349 Dec 08, 2022
Face Recognition and Emotion Detector Device

Face Recognition and Emotion Detector Device Orange PI 1 Python 3.10.0 + Django 3.2.9 Project's file explanation Django manage.py Django commands hand

BootyAss 2 Dec 21, 2021
Source code of "Hold me tight! Influence of discriminative features on deep network boundaries"

Hold me tight! Influence of discriminative features on deep network boundaries This is the source code to reproduce the experiments of the NeurIPS 202

EPFL LTS4 19 Dec 10, 2021
The official homepage of the COCO-Stuff dataset.

The COCO-Stuff dataset Holger Caesar, Jasper Uijlings, Vittorio Ferrari Welcome to official homepage of the COCO-Stuff [1] dataset. COCO-Stuff augment

Holger Caesar 715 Dec 31, 2022
SpecAugmentPyTorch - A Pytorch (support batch and channel) implementation of GoogleBrain's SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition

SpecAugment An implementation of SpecAugment for Pytorch How to use Install pytorch, version=1.9.0 (new feature (torch.Tensor.take_along_dim) is used

IMLHF 3 Oct 11, 2022
Temporal-Relational CrossTransformers

Temporal-Relational Cross-Transformers (TRX) This repo contains code for the method introduced in the paper: Temporal-Relational CrossTransformers for

83 Dec 12, 2022
Commonsense Ability Tests

CATS Commonsense Ability Tests Dataset and script for paper Evaluating Commonsense in Pre-trained Language Models Use making_sense.py to run the exper

XUHUI ZHOU 28 Oct 19, 2022
Shared Attention for Multi-label Zero-shot Learning

Shared Attention for Multi-label Zero-shot Learning Overview This repository contains the implementation of Shared Attention for Multi-label Zero-shot

dathuynh 26 Dec 14, 2022
《Fst Lerning of Temporl Action Proposl vi Dense Boundry Genertor》(AAAI 2020)

Update 2020.03.13: Release tensorflow-version and pytorch-version DBG complete code. 2019.11.12: Release tensorflow-version DBG inference code. 2019.1

Tencent 338 Dec 16, 2022
sequitur is a library that lets you create and train an autoencoder for sequential data in just two lines of code

sequitur sequitur is a library that lets you create and train an autoencoder for sequential data in just two lines of code. It implements three differ

Jonathan Shobrook 305 Dec 21, 2022
The Ludii general game system, developed as part of the ERC-funded Digital Ludeme Project.

The Ludii General Game System Ludii is a general game system being developed as part of the ERC-funded Digital Ludeme Project (DLP). This repository h

Digital Ludeme Project 50 Jan 04, 2023
PyTorchMemTracer - Depict GPU memory footprint during DNN training of PyTorch

A Memory Tracer For PyTorch OOM is a nightmare for PyTorch users. However, most

Jiarui Fang 9 Nov 14, 2022
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research

Welcome to AirSim AirSim is a simulator for drones, cars and more, built on Unreal Engine (we now also have an experimental Unity release). It is open

Microsoft 13.8k Jan 05, 2023
Code for "Learning Canonical Representations for Scene Graph to Image Generation", Herzig & Bar et al., ECCV2020

Learning Canonical Representations for Scene Graph to Image Generation (ECCV 2020) Roei Herzig*, Amir Bar*, Huijuan Xu, Gal Chechik, Trevor Darrell, A

roei_herzig 24 Jul 07, 2022
The dataset and source code for our paper: "Did You Ask a Good Question? A Cross-Domain Question IntentionClassification Benchmark for Text-to-SQL"

TriageSQL The dataset and source code for our paper: "Did You Ask a Good Question? A Cross-Domain Question Intention Classification Benchmark for Text

Yusen Zhang 22 Nov 09, 2022
TensorFlow implementation of Barlow Twins (Barlow Twins: Self-Supervised Learning via Redundancy Reduction)

Barlow-Twins-TF This repository implements Barlow Twins (Barlow Twins: Self-Supervised Learning via Redundancy Reduction) in TensorFlow and demonstrat

Sayak Paul 36 Sep 14, 2022
UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation

UnivNet UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation. Training python train.py --c

Rishikesh (ऋषिकेश) 55 Dec 26, 2022