Implementation for the paper (ICIP 2021). The paper has been accepted, its full-text will be shared after publication.
Hybrid Fusion Based Approach for Multimodal Emotion Recognition with Insufficient Labeled Data
Puneet Kumar, Vedanti Khokher, Yukti Gupta, and Balasubramanian Raman
- Install Anaconda or Miniconda distribution and create a conda environment with Python 3.8+.
- Install the requirements using the following command:
pip install -r Requirements.txt
- Download the BT4SA dataset and keep in
data_t4sa
folder. - Download glove.twitter.27B.200d.txt and keep in
data_files
folder. - Rest of the data files are already provided in the
data_files
folder.
- Text Emotion Recognition Phase:
RunTER.ipynb
in Jupyter Notebook
OR
RunTER.py
in the terminal/command-line using the following command:
python TER.py --epoch=100
Reference: The code from TER phase has been referred from here.
- Image Emotion Recognition Phase:
RunIER.ipynb
in Jupyter Notebook
OR
RunIER.py
in the terminal/command-line using the following command:
python IER.py --epoch=100
Reference: This code served as an inspiration for building the code for the IER phase.
- Intermediate Fusion Phase:
RunIntermediate_fusion.ipynb
in Jupyter Notebook
OR
RunIntermediate_fusion.py
in the terminal/command-line using the following command:
python Intermediate_fusion.py --epoch=100
- Late Fusion Phase:
RunLate_fusion.ipynb
ORpython Late_fusion.py
.
By default, the code saves the model checkpoints in the model_checkpoints
folder. Troubleshooting: Sometimes the 'Kernel dead' error is caused if the model checkpoints are not properly saved or loaded.
The tensorboard log files are saved in the tb_logs
folder for IER, TER and Intermediate_fusion. These files can be accessed using the following command:
tensorboard --logdir "/tb_logs"
Access to the ‘IIT Roorkee Text and Image Emotion Recognition (IIT-R TIER) dataset’ can be obtained by through Access Form - IIT-R TIER Dataset.pdf
. The dataset is compiled by Puneet Kumar, Yukti Gupta, and Vedanti Khokher at Machine Intelligence Lab, IIT Roorkee under the supervision of Prof. Balasubramanian Raman. It contains 97,170 images and corresponding text labeled with Emotion class, i.e., Happy, Sad, Hate, and Anger.