Giter Site home page Giter Site logo

praveena2j / recurrentjointattentionwithlstms Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 255 KB

ICASSP 2023: "Recursive Joint Attention for Audio-Visual Fusion in Regression Based Emotion Recognition"

Python 99.16% Shell 0.84%
affective-computing attention-model audio-visual-learning emotion-recognition multimodal-learning

recurrentjointattentionwithlstms's Introduction

Recursive Joint Attention of Audio-Visual Fusion for Dimensional Emotion Recognition

Code for our paper "Recursive Joint Attention for Audio-Visual Fusion in Regression Based Emotion Recognition" accepted to ICASSP 2023. Our paper can be found here https://ieeexplore.ieee.org/abstract/document/10095234.

Citation

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

@INPROCEEDINGS{10095234,
  author={Praveen, R Gnana and Granger, Eric and Cardinal, Patrick},
  booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)}, 
  title={Recursive Joint Attention for Audio-Visual Fusion in Regression Based Emotion Recognition}, 
  year={2023},
}

This code uses the Affwild2 dataset to validate the proposed approach for Dimensional Emotion Recognition. There are three major blocks in this repository to reproduce the results of our paper. This code uses Mixed Precision Training (torch.cuda.amp). The dependencies and packages required to reproduce the environment of this repository can be found in the environment.yml file.

Creating the environment

Create an environment using the environment.yml file

conda env create -f environment.yml

Models

The pre-trained models of audio and visual backbones are obtained here

The fusion models trained using our fusion approach can be found here

recursivejointattention.pt:  Fusion model trained using our approach on the Affwild2 dataset

Table of contents

Preprocessing

Return to Table of Content

Step One: Download the dataset

Return to Table of Content Please download the following.

  • The dataset for the valence-arousal track can be downloaded here

Step Two: Preprocess the visual modality

Return to Table of Content

  • The cropped-aligned images are necessary. They are used to form the visual input. They are already provided by the dataset organizers. Otherwise, you may choose to use OpenFace toolkit to extract the cropped-aligned images. However, the per-frame success rate is lower compared to the database-provided version.

Step Three: Preprocess the audio modality

Return to Table of Content

  • The audio files are extracted and segmented to generate the corresponding audio files in alignment with the visual files using mkvextract. To generate these audio files, you can use the file Preprocessing/audio_preprocess.py.

Step Four: Preprocess the annotations

Return to Table of Content

  • The annotations provided by the dataset organizers are preprocessed to obtain the labels of aligned audio and visual files. To generate these audio files, you can use the file Preprocessing/preprocess_labels.py.

Training

Return to Table of Content

  • After obtaining the preprocessed audio and visual files along with annotations, we can train the model using the proposed fusion approach using the main.py script.

Inference

Return to Table of Content

  • The results of the proposed model can be reproduced using the trained model. In order to obtain the predictions on the test set using our proposed model, we can use the test.py.

πŸ‘ Acknowledgments

Our code is based on TSAV and Recursive-joint-co-attention

recurrentjointattentionwithlstms's People

Contributors

praveena2j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

recurrentjointattentionwithlstms's Issues

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.