av-savchenko / face-emotion-recognition

Efficient face emotion recognition in photos and videos
Apache License 2.0
654 stars 124 forks source link

Why is multi-task learning one head? #31

Closed saeu5407 closed 1 year ago

saeu5407 commented 1 year ago

Thank you for your wonderful code sharing.

I'm looking at a multi-task learning code train_emotion-pytorch.ipynb.

I know why you used FER, Valence, and Arousal in one head without dividing the head.

Thank you.

av-savchenko commented 1 year ago

Hello! Thanks for your question and sorry for delay in answering it. It is just an engineering trick. It was easier for me to extend the EfficientNet model from timm package by using only one output layer with 10 units (8 facial expressions and Valence-Arousal). In such case, it is not necessary to extend the model and implement custom forward() pass. It is enough to create custom loss function and process the outputs of the model in evaluation and inference steps.

av-savchenko commented 1 year ago

Closing due to inactivity