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.
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.
DialogueRNN
DialogueGCN
BERT_BASE
RGAT
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 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.
You need to install these packages:
Pytorch, Transformers, PyTorch Geometric
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
I also analyzed the IEMOCAP dataset, see the folder called statistic for details.(Please download IEMOCAP_features_bert.pkl)