av-savchenko / face-emotion-recognition

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

How to prepare the AffectNet dataset? #14

Closed nandish21594 closed 2 years ago

nandish21594 commented 2 years ago

I have downloaded the AffectNet dataset. It consists of npy files in the below folder format.

images ---> 0.jpg annotations --> 0_exp.npy 0_aro.npy 0_val.npy 0_lnd.npy

I'm trying to create a csv file with same columns mentioned in the https://github.com/HSE-asavchenko/face-emotion-recognition/blob/main/src/train_emotions.ipynb

['subDirectory_filePath', 'face_x', 'face_y', 'face_width','face_height', 'facial_landmarks', 'expression', 'valence', 'arousal']

However, I can't seem to find any information in the dataset concerning face x, face y, or face width.

  1. Do I need to calculate them? If so, could you please upload the dataset preparation file?
  2. Is 'facial_landmarks' an array of size 136?
av-savchenko commented 2 years ago

I downloaded official AffectNet dataset several years ago. At that moment, it contained folder Manually_Annotated_Images and csv files training.csv and validation.csv with the following columns: "subDirectory_filePath,face_x,face_y,face_width,face_height,facial_landmarks,expression,valence,arousal". At least someone in the closed issues of my github downloaded the dataset in the same format as me, so they can use my code from train_emotions.ipynb. But it is possible that the author of the dataset decided to change the format. Anyway, I believe he lets everyone to crop the faces or provide already cropped faces, so you could preprocess the dataset by yourself.

av-savchenko commented 2 years ago

Closing the issue due to inactivity