av-savchenko / face-emotion-recognition

Efficient face emotion recognition in photos and videos
Apache License 2.0
692 stars 127 forks source link

Request for help in the Training Script for enet_b0_8_best_afew.onnx model #45

Closed gd1925 closed 1 year ago

gd1925 commented 1 year ago

Hello,

I'm reaching out to seek guidance regarding the enet_b0_8_best_afew.onnx model. I'm interested in utilizing this model, but I'm encountering challenges in locating the relevant training script to generate this particular model.

While searching, I came across these scripts: GitHub Link. Additionally, I found that the model is placed under the affectnet folder: GitHub Link.

My understanding is that the model has been trained with EfficientNet B0 using the VGAF dataset, based on the code VGAF_train.ipynb. However, I am unsure if this is the correct procedure or if there are additional steps involved.

Could someone please provide me with more information or guidance on how to properly train and obtain the enet_b0_8_best_afew.onnx model? Any assistance you could offer would be greatly appreciated.

Thank you for your time and support.

av-savchenko commented 1 year ago

Hello! All onnx models are simply converted from pytorch using convert_pt_to_onnx.py script. All PyTorch models including enet_b0_8_best_afew.pt are trained on AffectNet dataset using train_faces_torch.ipynb. The models enet_b0_8_best_afew.pt and enet_b0_8_best_vgaf.pt are essentially the same EfficientNet-B0 models trained with the same notebook twice using absolutely the same procedure. You should know that repeating the training will lead to different models. I added suffixes afew and vgaf to distinguish models that extracts features that are more accurate on VGAF and AFEW datasets, see train_emotions-pytorch-afew-vgaf.ipynb for details how to extract features and classify them for these video datasets. To summarize. Just run the train_faces_torch.ipynb or train_affectnet_march2021_pytorch.ipynb for EfficientNet-B0, and you will get something similar models to my networks

gd1925 commented 1 year ago

Hi @HSE-asavchenko, that's great!! Thank you for your detailed explanation on my query. Really appreciate it!