Home

Awesome

Python >=3.5 PyTorch >=1.6

Multi-Level Graph Encoding with Structural-Collaborative Relation Learning for Skeleton-Based Person Re-Identification

By Haocong Rao, Shihao Xu, Xiping Hu, Jun Cheng, Bin Hu. In IJCAI 2021.

Introduction

This is the official implementation of MG-SCR model presented by "Multi-Level Graph Encoding with Structural-Collaborative Relation Learning for Skeleton-Based Person Re-Identification". The codes are used to reproduce experimental results in the paper.

image

Abstract: Skeleton-based person re-identification (Re-ID) is an emerging open topic providing great value for safety-critical applications. Existing methods typically extract hand-crafted features or model skeleton dynamics from the trajectory of body joints, while they rarely explore valuable relation information contained in body structure or motion. To fully explore body relations, we construct graphs to model human skeletons from different levels, and for the first time propose a Multi-level Graph encoding approach with Structural-Collaborative Relation learning (MG-SCR) to encode discriminative graph features for person Re-ID. Specifically, considering that structurally-connected body components are highly correlated in a skeleton, we first propose a multi-head structural relation layer to learn different relations of neighbor body-component nodes in graphs, which helps aggregate key correlative features for effective node representations. Second, inspired by the fact that body-component collaboration in walking usually carries recognizable patterns, we propose a cross-level collaborative relation layer to infer collaboration between different level components, so as to capture more discriminative skeleton graph features. Finally, to enhance graph dynamics encoding, we propose a novel self-supervised sparse sequential prediction task for model pre-training, which facilitates encoding high-level graph semantics for person Re-ID. MG-SCR outperforms state-of-the-art skeleton-based methods, and it can achieve superior performance to many multi-modal methods that utilize extra RGB or depth information.

Requirements

Datasets and Models

We provide three already pre-processed datasets (BIWI, IAS, KGBD) with various sequence lengths on <br/> https://pan.baidu.com/s/1fHMbYZ8H3hZYqrtENupBmA       password:  jtof <br/>

All the best models reported in our paper can be acquired on <br/> https://pan.baidu.com/s/1EhPWg6pJ0Vl4xOh0swQSDQ       password:  e7oq <br/> Please download the pre-processed datasets Datasets/ and model files trained_models/ into the current directory. <br/>

The original datasets can be downloaded here: BIWI and IAS-Lab, KGBD, KS20. <br/>

Note: The access to the Vislab Multi-view KS20 dataset is available upon request. If you have signed the license agreement and been granted the right to use it, please contact me and I will share the pre-processed KS20 data.

Usage

To (1) pre-train the MG-SCR model by sparse sequential prediction (SSP) and (2) fine-tune the model for person Re-ID on a specific dataset, simply run the following command:

python train.py --dataset BIWI

# Default options: --dataset BIWI --split '' --length 6 --c_lambda 0.3 --task pre --gpu 0
# --dataset [BIWI, IAS, KGBD, KS20]
# --split ['A' (for IAS-A), 'B' (for IAS-B)] 
# --length [4, 6, 8, 10] 
# --task ['pre' (use SSP pre-training), 'none' (no pre-training)]
# --gpu [0, 1, ...]

Please see train.py for more details.

To print evaluation results (Re-ID Confusion Matrix / Rank-n Accuracy / Rank-1 Accuracy / nAUC) of the trained model, run:

python evaluate.py --dataset BIWI --model_dir trained_models/xx/xx

# Default options: --dataset BIWI --model_dir best --length 6 --gpu 0
# --dataset [BIWI, IAS, KGBD, KS20] 
# --model_dir [best (load the best models), trained_models/xx/xx (directory of model files, e.g., trained_models/best_models/KS20_87.3_95.5)] 

Please see evaluate.py for more details.

Application to Model-Estimated Skeleton Data

To extend our model to a large RGB-based gait dataset (CASIA B), we exploit pose estimation methods to extract 3D skeletons from RGB videos of CASIA B as follows:

We provide already pre-processed skeleton data of CASIA B for Cross-View Evaluation (CVE) (f=20/30/40) on       https://pan.baidu.com/s/1gDekBzf-3bBVdd0MGL0CvA       password:  x3e5 <br/> Please download the pre-processed datasets into the directory Datasets/. <br/>

Usage

To (1) pre-train the MG-SCR model by sparse sequential prediction (SSP) and (2) fine-tune the model for person Re-ID on CASIA B under CVE setup, simply run the following command:

python train-CASIA.py --view 0

# Default options: --dataset CASIA_B --split '' --length 20 --c_lambda 0.3 --task pre --gpu 0
# --length [20, 30, 40] 
# --view [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 
# --task ['pre' (use SSP pre-training), 'none' (no pre-training)]
# --gpu [0, 1, ...]

Please see train-CASIA.py for more details. <br/>

Results

ModelsRank-1nAUC
BIWIIAS-AIAS-BKS20KGBDBIWIIAS-AIAS-BKS20KGBD
Gait Energy Image21.425.615.973.272.166.0
3D CNN + Average Pooling27.833.439.184.081.482.8
Gait Energy Volume25.720.413.783.266.264.8
3D LSTM27.031.033.883.377.678.0
Size-Shape Descriptors + SVM20.587.2
Size-Shape Descriptors + LDA22.188.5
DVCov + SKL21.446.645.9
ED + SKL30.052.363.3
CNN-LSTM with RTA50.0
D-13 Descriptors + KNN39.333.840.558.346.964.363.671.178.090.0
Single-layer LSTM15.820.019.180.939.865.865.968.492.387.2
Multi-layer LSTM36.134.430.981.646.275.672.171.994.289.8
D-16 Descriptors + Adaboost41.827.439.259.869.974.165.578.278.890.6
PoseGait33.341.437.170.590.681.879.974.894.097.8
Attention Gait Encodings59.156.158.286.987.786.581.785.394.796.3
MG-SCR (Ours)61.656.565.987.396.391.987.093.195.599.9
<!-- ![results](img/MG-SCR-results.png) -->

Model Size & Computational Complexity

Methods# ParamsGFLOPs
PoseGait26.80M364.8
AGE7.15M37.4
CAGE8.47M7.5
MG-SCR (Ours)1.04M19.8

Citation

If you find this code useful for your research, please cite our paper

@article{rao2021multi,
  title={Multi-Level Graph Encoding with Structural-Collaborative Relation Learning for Skeleton-Based Person Re-Identification},
  author={Rao, Haocong and Xu, Shihao and Hu, Xiping and Cheng, Jun and Hu, Bin},
  journal={arXiv preprint arXiv:2106.03069},
  year={2021}
}
@inproceedings{ijcai2021-0135,
  title     = {Multi-Level Graph Encoding with Structural-Collaborative Relation Learning for Skeleton-Based Person Re-Identification},
  author    = {Rao, Haocong and Xu, Shihao and Hu, Xiping and Cheng, Jun and Hu, Bin},
  booktitle = {Proceedings of the Thirtieth International Joint Conference on
               Artificial Intelligence, {IJCAI-21}},
  publisher = {International Joint Conferences on Artificial Intelligence Organization},
  editor    = {Zhi-Hua Zhou},
  pages     = {973--980},
  year      = {2021},
  month     = {8},
  note      = {Main Track}
  doi       = {10.24963/ijcai.2021/135},
  url       = {https://doi.org/10.24963/ijcai.2021/135},
}

More awesome skeleton-based models are collected in our Awesome-Skeleton-Based-Models.

Acknowledgements

Thanks to Veličković et al. for opening source of their excellent works GAT.

License

MG-SCR is released under the MIT License.