Ayush Thakur
  • About Me
  • Authoring
    • DeepFaceDrawing: An Overview
    • Rewriting a Deep Generative Model: An Overview
    • Unsupervised Visual Representation Learning with SwAV
    • In-Domain GAN Inversion for Real Image Editing
    • Metric Learning for Image Search
    • Object Localization with Keras and W&B
    • Image Segmentation Using Keras and W&B
    • Understanding the Effectivity of Ensembles in DL
    • Modern Data Augmentation Techniques for CV
    • Adversarial Latent Autoencoders
    • Towards Deep Generative Modeling with W&B
    • Interpretability in Deep Learning - CAM and GradCAM
    • Introduction to image inpainting with deep learning
    • Simple Ways to Tackle Class Imbalance
    • Debugging Neural Networks with PyTorch
    • Generating Digital Painting Lighting Effects
    • Multi Task Learning with W&B
    • Translate American Sign Language Using CNN
    • Converting FC Layers to Conv Layers
  • Projects
    • Smart Traffic Management Using Reinforcement Learning
    • Sign Language Translator
Powered by GitBook
On this page
  • 🔥 Check out the report here.
  • 💪 Check out Colab Notebook here.

Was this helpful?

  1. Authoring

Simple Ways to Tackle Class Imbalance

PreviousIntroduction to image inpainting with deep learningNextDebugging Neural Networks with PyTorch

Last updated 4 years ago

Was this helpful?

In this report, we explore various methods used to counter class imbalance in image classification problems. To make the study more intuitive, we delve into the realms of binary classification. Instead of using a standard dataset with inherent class imbalance, we built a “synthetic” (not to confuse with GAN generated) dataset out of CIFAR-10 with two classes. We chose car and plane as the two classes. There is no particular reason for the choice, other than we being lazy 😴 and those two turning out to be the first two classes in the dataset.

In the CIFAR-10 dataset, each class consists of 5000 samples in the training set. We will call our dataset, the one with only two classes, the CIFAR-2 dataset for obvious reasons. The CIFAR-2 needs to have a stark data imbalance.

We opted to have the following data distribution – plane: 5000 samples (majority) and car: 50 samples (minority).

Here’s a quick overview of the methods that we have used to counter class imbalance:

  • Class Weighting

  • Over Sampling

  • Under Sampling

  • Two-Phase Learning(Experimental Trial) – Oversampling and Undersampling

🔥 Check out the report .

💪 Check out Colab Notebook .

This was co-written and implemented with .

here
here
Aritra