This repository contains the notebooks and models for
- distillation information from BERT to a Video Model.
- contrastive learning model for Emotion Recognition
use pip install -e . to install the repo and then check the notebooks on the how to use the models. More description on the models below.
Language models work better for emotion recognition than video models so the idea is to use the BERT model finetuned on the MELD dataset to distil a video model for the same dataset.
- Check the
finetune_bert.ipynb - The model used is
BERTbut any other model can be used
- Check the
finetune_video_mae.ipynbfor the implementation - The
Video MAEmodel was used because it shows the best performance for encoding the video information.
- A custom wrapper is written around the hugging face trainer class and
KL Divergance lossbetween the embeddings of teacher model (BERT) and the student model (Video MAE) is used to train the model. - Check the
distillation.ipynbnotebook for details.
The idea is to use videos that depict similar emotions to have a similar to that of SimCLR. So same emotions embeddings are closer to one another compared to different others in the embedding space.
- Check the
contrastive.ipynbfor the details of implementation.