/Emotion-Recognition-in-Conversations

User Emotion Recognition and Response Generation in Dialogue Text

Primary LanguagePython

Emotion Recognition in Conversations

The project is designed to recognize the emotion in conversations(IEMOCAP Dataset), and it is also my graduation thesis.
Use DialogueRNN, DialogueGCN, BERT_BASE and RGAT.

Performance

Model Experimental F1 Score Reported F1 Score in paper
DialogueRNN 62.15 62.75
DialogueGCN 64.08 64.18
BERT_BASE 53.72 53.31
RGAT(with position encodings) 62.18 65.22

Since the optimal parameters are not given in the paper and the experiment has a certain degree of randomness, there is a gap between the reproduced model and the score reported in the paper.

Paper

DialogueRNN
DialogueGCN
BERT_BASE
RGAT

Dataset

IEMOCAP is an audiovisual database consisting of recordings of ten speakers in dyadic conversations. The utterances are annotated with one of six emotional labels: happy, sad, neutral, angry, excited, or frustrated.
If you want to know more about IEMOCAP, please refer to IEMOCAP.
If you want to run the programs of DialogueRNN and DialogueGCN, please refer to DialogueGCN/IEMOCAP_features and DialogueRNN/DialogueRNN_features.zip.

RGAT

RGAT use position encodings. If you want to use different type of PE, you can change the variable called encoding in main.py. Relation Position Encodings is proved to be the best position encoding.

Environment

You need to install these packages:
Pytorch, Transformers, PyTorch Geometric

Run

To run the program, you can download the folder of the model you want to test and the data file, then type in the terminal

python main.py

Statistic

I also analyzed the IEMOCAP dataset, see the folder called statistic for details.(Please download IEMOCAP_features_bert.pkl)