0

I want to generate new augmented images only for specific labels. For example data base FER2013:

emotion_label_to_text_mapper = {0: "Angry", 2: "Fear-Disgust", 3: "Happy", 4: "Sad", 5: "Surprise"}

df = pd.read_csv('/FER2013Plus-5-emotions.csv')
    
df.emotion.unique()
sns.countplot(df.emotion)
pyplot.show()

enter image description here

So, I get this number of pictures for every emotion.

Is it possible to set a ImageDataGenerator to generate for every class specific number of augmented pictures?

Example: to generate in the learning process new augmented data only for classes 0 or 1, add more 1000 pictures to every class.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
prilia
  • 996
  • 5
  • 18
  • 41

1 Answers1

0

Here is a good exploration how to train cnn with imbalanced data:

https://www.tensorflow.org/tutorials/structured_data/imbalanced_data

need to use with class_weight parameter with training process.

prilia
  • 996
  • 5
  • 18
  • 41