Code Monkey home page Code Monkey logo

cofinal_aqa's Introduction

CoFInAl: Enhancing Action Quality Assessment with Coarse-to-Fine Instruction Alignment

Kanglei Zhou   Junlin LiRuizhi CaiLiyuan WangXingxing ZhangXiaohui Liang

CoFInAl is the implementation for Action Quality Assessment (AQA) based on the paper "CoFInAl: Enhancing Action Quality Assessment with Coarse-to-Fine Instruction Alignment", which has been accepted by IJCAI 2024.

Framework

Overview

CoFInAl aims to address challenges related to domain shift and overfitting, key issues in AQA. To this end, CoFInAl strategically aligns AQA objectives with broader tasks through a coarse-to-fine classification strategy. Inspired by the two-step assessment process used by judges, CoFInAl first identifies a coarse grade and then discerns variations within each grade, enhancing interpretability within the AQA framework.

Datasets

Here are the instructions for obtaining the features and videos for the Rhythmic Gymnastics and Fis-V datasets used in our experiments:

For VST features:

  • The VST features and label files of Rhythmic Gymnastics and Fis-V datasets can be download from the GDLT repository.

For I3D features:

  • The I3D features and label files for both datasets will be released soon.

For Rhythmic Gymnastics videos:

  • Download the videos from the ACTION-NET repository.

For Fis-V videos:

  • Download the videos from the MS_LSTM repository.

Please use the above public repositories to obtain the features and videos needed to reproduce our results. Let us know if you need any clarification or have trouble accessing the data.

After downloading the Rhythmic Gymnastics dataset features and videos from the referenced repositories, preprocess the data by using rg_swinx.py.

# Choose different head to extract features like load_model or load_model_I3d
data_path = 'Path/to/Video'

orig_save = 'Path/to/Save/swintx_orig_fps25_clip{}'.format(clip_len)
pool_save = 'Path/to/Save/swintx_avg_fps25_clip{}'.format(clip_len)

# Command
python rg_swintx.py

Installation

To get started, you will need to first clone this project and then install the required dependencies.

Environments

- RTX3090 - CUDA: 11.1 - Python: 3.8+ - PyTorch: 1.10.1 + cu111

Basic packages

Install the required packages:

pip install -r requirements.txt

This will install all the required packages listed in the requirements.txt file.

Training from scratch

Using the following command to train the model:

CUDA_VISIBLE_DEVICES={device ID} python main.py \
    --video-path {path}/swintx_avg_fps25_clip32 \
    --train-label-path {path}/train.txt \
    --test-label-path {path}/test.txt  \
    --model-name ${save_name} \
    --submodel-name ${sub_model_name} \
    --action-type Ball/{action type of RG or TES/PCS} \
    --lr 1e-2 --epoch 500 \
    --n_encoder 2 --n_decoder 4 --n_query 4 --alpha 0.5 --margin 1 --lr-decay cos --decay-rate 1e-2 --dropout 0.3 \
    --loss_align 1 --activate_regular_restrictions 3

For all hyper-parameters, see scripts/train_all.sh.

Testing

Using the following command to test the model:

CUDA_VISIBLE_DEVICES={device ID} python main.py --video-path {path}/swintx_avg_fps25_clip32 \
    --train-label-path {path}/train.txt \
    --test-label-path {path}/test.txt  \
    --n_decoder 2 --n_query 4 --dropout 0.3 --test \
    --model-name ${save_name} \
    --submodel-name ${sub_model_name} \
    --action-type Ball/{action type of RG or TES/PCS} \
    --ckpt {pkl file here}

For all hyper-parameters, see scripts/test_all.sh.

Citation

Please cite this work if you find it useful:

@inproceedings{zhou2024cofinal,
  title={CoFInAl: Enhancing Action Quality Assessment with Coarse-to-Fine Instruction Alignment},
  author={Zhou, Kanglei and Li, Junlin and Cai, Ruizhi and Wang, Liyuan and Zhang, Xinxgxing and Liang Xiaohui},
  booktitle={International Joint Conference on Artificial Intelligence (IJCAI)},
  year={2024}
}

Contact

If you have any specific questions or if there's anything else you'd like assistance with regarding the code, feel free to let me know.

cofinal_aqa's People

Contributors

zhoukanglei avatar aoxipo avatar

Stargazers

 avatar Crazy avatar  avatar  avatar

Watchers

 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.