I created an image classification model using CNNs for 235 classes and I got 71% accuracy on the test set. My dataset contains some classes with more than 1000 images and others with 30 images. For example, in the classification report I can see that I have 98% accuracy for the classes that contains a lot of images but less than 20% accuracy for other classes with few images. I used data augmentation but it still not good. This influences the performance of my model, can anyone help me to improve it? Thank you
Asked
Active
Viewed 48 times
0
-
Try adding class weights [_Sample_](https://datascience.stackexchange.com/questions/13490/how-to-set-class-weights-for-imbalanced-classes-in-keras) – 10xAI Jul 05 '21 at 16:31
-
@10xAI I'm using ImageDataGenerator().flow_from_directory in order to have my training batches and test data. Do you have any idea how to use my training data in order to use the fit_resample ? fit_resample requires X,Y as parameters which are arrays. thank you – Lema Zaidi Jul 06 '21 at 14:43
-
I never heard of this method `fit_resample` in keras. Could you please share the link? – 10xAI Jul 08 '21 at 16:48