av-savchenko / face-emotion-recognition

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

Time of training #35

Closed huda1197 closed 1 year ago

huda1197 commented 1 year ago

Hello. I would like to know how much time did it take you to train all affentnet? and what type of GPU did you choose, and how many GPUs did you choose?

av-savchenko commented 1 year ago

Hi! Thanks for your interest in my project. I used one RTX2080Ti to train the models. If I started the training on AffectNet from pre-trained face ID models, it needs several hours (3-5, I do not remember exact numbers) to run the two phases of training, see the call of train() function in train_affectnet_march2021_pytorch.ipynb for details. For sure, pre-training of the models on VGGFace2 took much more time (approximately a week on the same hardware), as this dataset is an order of magnitude larger when compared to AffectNet

huda1197 commented 1 year ago

thank you for your answers. I have a question did you used the annotations in csv file format because I received it in .npy format?

av-savchenko commented 1 year ago

Hello! I do not know the current format of AffectNet dataset. Several years ago, when I downloaded it, all information is stored in training.csv and validation.csv. Their pre-processing is described here. Thanks to another contributor who worked with new format, another ipynb file appeared in my repository. As I'm not the author of AffectNet, I cannot adapt to the change in its structure. However, as far as I know, the images are more or less the same, and only the format of annotations is changing. You could implement the preprocessing by your own if evaluate_affectnet_march2021_pytorch.ipynb does not work for you.

HudaKouli commented 1 year ago

Thank you for your answers. I want to make sure of my conclusion. if I want to use the data in csv file format I should use .train_emotion to preprocessing and train_emotion_pytorch for training the data and further more operations. But if I want to use the data in .npy format I should use evaluate_affectnet_march2021_pytorch.ipynb for preprocessing and train_affectnet_march2021_pytorch for training the data and more. If my conclusion is wrong could you tell me why do we use train_affectnet_march2021_pytorch.

av-savchenko commented 1 year ago

You're correct about training.csv and validation.csv files Speaking about npy annotations, I believe it is possible to just run train_affectnet_march2021_pytorch.ipynb. However, I have not run them personally as I do not have these annotations, so you need to check it by yourself

huda1197 commented 1 year ago

thank you for your quick responses. I will try it by myself.

HudaKouli commented 1 year ago

Hello, is it necessary to download hsemotion,hsemotion-onnx packages if I'm working on affectnet dataset with train_affectnet_march2021_pytorch.ipynb notebook? if so I didn't find there uses in this code so why we're using them?

av-savchenko commented 1 year ago

You do not need to install this packages to run the training. I even cannot find where it was written that they are needed...

av-savchenko commented 1 year ago

Closing due to inactivity