This repository is built using some part of code from here. The original paper is linked here
7 expressions used in FER task in general:
0: Surprised
1: Fear
2: Disgust
3: Happy
4: Sad
5: Angry
6: Neutral
- This code supports only ResNet-18/50 backbones and is validated using only ResNet50.
- Datasets supported:
- Source: 'RAF', 'RAF_2class' (use 'RAF' for 7class, 'RAF_2class' for 2class)
- Target: 'AISIN', 'JAFFE', 'CK+'
- To use other backbones/ datasets refer AGRA official code
Classes: Happy(Class 0), Neutral(Class 1)
Place data and ckpts in this folder structure
+ da-fer
+ Dataset
+ RAF
+ Train
+ Anger
+ Disgust
+ Fear
+ Happy
+ Neutral
+ Sad
+ Surprised
+ Test
+ Anger
.
.
+ annotations
+ train_annotations.json
+ test_annotations.json
+ AISIN
+ Train
+ Happy
+ Neutral
+ Test
+ Happy
+ Neutral
+ annotations
+ train_annotations.json
+ test_annotations.json
+ pretrained_ckpts
+ backbone_ir50_ms1m_epoch120.pth
Organize as above and run this to get annotation with bbox and landmarks.
cd Dataset/AISIN
python get_crops.py
Refer training