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
Small little script to scrape, parse and check for active tor nodes. Can be used as proxies.

TorScrape TorScrape is a small but useful script made in python that scrapes a website for active tor nodes, parse the html and then save the nodes in

5 Dec 04, 2022
Efficient Lottery Ticket Finding: Less Data is More

The lottery ticket hypothesis (LTH) reveals the existence of winning tickets (sparse but critical subnetworks) for dense networks, that can be trained in isolation from random initialization to match

VITA 20 Sep 04, 2022
Using PyTorch Perform intent classification using three different models to see which one is better for this task

Using PyTorch Perform intent classification using three different models to see which one is better for this task

Yoel Graumann 1 Feb 14, 2022
Pytorch implementation of Decoupled Spatial-Temporal Transformer for Video Inpainting

Decoupled Spatial-Temporal Transformer for Video Inpainting By Rui Liu, Hanming Deng, Yangyi Huang, Xiaoyu Shi, Lewei Lu, Wenxiu Sun, Xiaogang Wang, J

51 Dec 13, 2022
2 Jul 19, 2022
Learning Continuous Signed Distance Functions for Shape Representation

DeepSDF This is an implementation of the CVPR '19 paper "DeepSDF: Learning Continuous Signed Distance Functions for Shape Representation" by Park et a

Meta Research 1.1k Jan 01, 2023
SMPLpix: Neural Avatars from 3D Human Models

subject0_validation_poses.mp4 Left: SMPL-X human mesh registered with SMPLify-X, middle: SMPLpix render, right: ground truth video. SMPLpix: Neural Av

Sergey Prokudin 292 Dec 30, 2022
Official pytorch implementation of the AAAI 2021 paper Semantic Grouping Network for Video Captioning

Semantic Grouping Network for Video Captioning Hobin Ryu, Sunghun Kang, Haeyong Kang, and Chang D. Yoo. AAAI 2021. [arxiv] Environment Ubuntu 16.04 CU

Hobin Ryu 43 Nov 25, 2022
Official code for 'Robust Siamese Object Tracking for Unmanned Aerial Manipulator' and offical introduction to UAMT100 benchmark

SiamSA: Robust Siamese Object Tracking for Unmanned Aerial Manipulator Demo video 📹 Our video on Youtube and bilibili demonstrates the evaluation of

Intelligent Vision for Robotics in Complex Environment 12 Dec 18, 2022
CNN designed for pansharpening

PROGRESSIVE BAND-SEPARATED CONVOLUTIONAL NEURAL NETWORK FOR MULTISPECTRAL PANSHARPENING This repository contains main code for the paper PROGRESSIVE B

SerendipitysX 3 Dec 29, 2021
Malware Bypass Research using Reinforcement Learning

Malware Bypass Research using Reinforcement Learning

Bobby Filar 76 Dec 26, 2022
A minimal implementation of Gaussian process regression in PyTorch

pytorch-minimal-gaussian-process In search of truth, simplicity is needed. There exist heavy-weighted libraries, but as you know, we need to go bare b

Sangwoong Yoon 38 Nov 25, 2022
Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX

CQL-JAX This repository implements Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX (FLAX). Implementation is built on

Karush Suri 8 Nov 07, 2022
Framework for estimating the structures and parameters of Bayesian networks (DAGs) at per-sample resolution

Sample-specific Bayesian Networks A framework for estimating the structures and parameters of Bayesian networks (DAGs) at per-sample or per-patient re

Caleb Ellington 1 Sep 23, 2022
A simple rest api serving a deep learning model that classifies human gender based on their faces. (vgg16 transfare learning)

this is a simple rest api serving a deep learning model that classifies human gender based on their faces. (vgg16 transfare learning)

crispengari 5 Dec 09, 2021
I explore rock vs. mine prediction using a SONAR dataset

I explore rock vs. mine prediction using a SONAR dataset. Using a Logistic Regression Model for my prediction algorithm, I intend on predicting what an object is based on supervised learning.

Jeff Shen 1 Jan 11, 2022
Source code for our EMNLP'21 paper 《Raise a Child in Large Language Model: Towards Effective and Generalizable Fine-tuning》

Child-Tuning Source code for EMNLP 2021 Long paper: Raise a Child in Large Language Model: Towards Effective and Generalizable Fine-tuning. 1. Environ

46 Dec 12, 2022
This project is a loose implementation of paper "Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach"

Stock Market Buy/Sell/Hold prediction Using convolutional Neural Network This repo is an attempt to implement the research paper titled "Algorithmic F

Asutosh Nayak 136 Dec 28, 2022
[peer review] An Arbitrary Scale Super-Resolution Approach for 3D MR Images using Implicit Neural Representation

ArSSR This repository is the pytorch implementation of our manuscript "An Arbitrary Scale Super-Resolution Approach for 3-Dimensional Magnetic Resonan

Qing Wu 19 Dec 12, 2022
PyTorch implementation of paper: HPNet: Deep Primitive Segmentation Using Hybrid Representations.

HPNet This repository contains the PyTorch implementation of paper: HPNet: Deep Primitive Segmentation Using Hybrid Representations. Installation The

Siming Yan 42 Dec 07, 2022