Code Monkey home page Code Monkey logo

hiclr's Introduction

HiCLR

This is an official PyTorch implementation of "Hierarchical Consistent Contrastive Learning for Skeleton-Based Action Recognition with Growing Augmentations" in AAAI 2023.

Requirements

Python >=3.6 PyTorch >=1.6

Data Preparation

  • Download the raw data of NTU RGB+D and PKU-MMD.
  • For NTU RGB+D dataset, preprocess data with tools/ntu_gendata.py. For PKU-MMD dataset, preprocess data with tools/pku_part1_gendata.py.
  • Then downsample the data to 50 frames with feeder/preprocess_ntu.py and feeder/preprocess_pku.py.

Train the Model

See the run_cs.sh for the detailed instructions.

You can change the settings in the corresponding .yaml file.

# train on NTU RGB+D xsub joint stream
$ python main.py pretrain_hiclr --config config/release/gcn_ntu60/pretext/pretext_hiclr_xsub_joint.yaml
#linear evaluation on NTU RGB+D xsub joint stream
$ python main.py linear_evaluation --config config/release/gcn_ntu60/linear_eval/linear_eval_hiclr_xsub_joint.yaml

#finetune on NTU RGB+D xsub joint stream
$ python main.py finetune_evaluation --config config/release/gcn_ntu60/finetune/xsub_joint.yaml

Similarly, set the config as the .yaml file in config/transformer_ntu60/ if you want to train a Transformaer-based model.

Results and Pre-trained Models

For three-streams results, we use the code in ensemble_xxx.py to obtain the fusion results. The performance of the released repo is slightly better than that reported in the paper. You can find the pre-trained model weights here (for GCN).

Model NTU 60 xsub (%)
HiCLR-joint 77.30
HiCLR-motion 70.29
HiCLR-bone 75.59
3s-HiCLR 80.94

Citation

If you find this repository useful, please consider citing our paper:

@article{zhang2022s,
    title={Hierarchical Consistent Contrastive Learning for Skeleton-Based Action Recognition with Growing Augmentations},
    author={Zhang, Jiahang and Lin, Lilang and Liu, Jiaying},
    journal={arXiv preprint arXiv:2211.13466},
    year={2022},
}

Acknowledgement

We sincerely thank the authors for releasing the code of their valuable works. Our code is built based on the following repos.

  • The code of our framework is heavily based on AimCLR.
  • The code of encoder is based on ST-GCN and DSTA-Net.

Licence

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

hiclr's People

Contributors

jhang2020 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.