The pre-trained model's data augmentation and hyperparameter settings were referenced from this repository: https://github.com/LetheSec/Fer2013-Facial-Emotion-Recognition-Pytorch.
We greatly appreciate it.
Please refer to the PreTrain folder for more details.
This repository contains One-Class Classification for Facial Expression Recognition.
FER2013:https://www.kaggle.com/datasets/deadskull7/fer2013
AffectNet:https://www.kaggle.com/datasets/arafatshovon/affectnet
Download these two datasets and place them in thedata/directory.
Fer2013:checkpoint/Fer2013/best_checkpoint.tar
AffectNet: checkpoint/AffectNet/best_checkpoint.tar
To train a single-class model, please modify the target_classin theparamers.pyfile.
python train_fer2013.py
For AffectNet, note that the target_class is the folder name; directly modify it in the train_affect.py script:
python train_affect.py