How to deal with class imbalance?

dodugepkd report abuse

Hello! I am training my own classification system for very specific objects for my job project. Me and colleagues have gathered our own picture dataset. But we have a significant class imbalance: there are several thousand images in some classes, but three of them include less than a percent of the full dataset. Our model works well with large classes, but what can we do to achieve sufficient performance for the smallest classes?


orisKon report abuse

Maybe you should train several models for different classes?

dodugepkd report abuse

@orisKon In production, the runtime should be really short. We have more than 25 classes, and it would be impractical to use such a number of models.

taylor1027 report abuse

@dodugepkd How many images do you have in the smallest class? Maybe the problem is not in the balance, but in the number of examples per se. You can try to train individual models not to use them, but to evaluate the accuracy and compare it with the accuracy of the main model. Thus, you can understand where the problem comes from.

dodugepkd report abuse

Thank you, I should try this.

CarBOn report abuse

I would use data augmentation for these classes to make them comparable.

mark000 report abuse

I think you do not need to google it, just ask experts for help as I did when I didn't know how to write a reaction paper

Add Answer

Need support?

Just drop us an email to ... Show more