idea from the paper
Used the category classification proposed by Machajdik and Hanbury and the model was trained on dataset proposed by You et al.(2016).
The final categories is divided into 8 categories, and contained amusement
, anger
, awe
, contentment
, disgust
, excitement
, fear
, and sadness
.
It is usually considered that amusement, awe, contentment and excitement are positive emotion, and the others are negative.
The structure are shown below
- Download the dataset mentioned above
- Store images in
data
folder group by emotion classes. - Split data with
'split_data.py'
- Run
object_det.py
andplaces_det.py
(Change directory totraining_models
folder) - Run
late_fusion2.py
(Change directory totraining_models
folder)
- Download FI pretrained weights, Store them in
pretrained_models
folder - Store test images in
data/test
folder. - Run
late_fusion2.py
The code for preview on web also available.
Run on streamlit could use the command streamlit run demo_str.py
Run on Gradio could use the command python demo_gra.py