I am doing the image classification with 3 classes using Transfer Learning(Resnet-18). The issue with my dataset is I have a fair imbalance dataset, in a way, that the number of positive samples is very less as compared to the other 2 classes. So , there are 3 questions:
- Should I use weighted Random Sampler to oversample the minority class(the positive one) and undersample the rest 2 classes? (For instance, in my case, I have around 500 images of class 1 and >2k images of class 2 and class 3), so in the very beginning , should I select the fairly equal samples like 500 odd of each class. I am rather doubtful over this, because I am using transfer learning, and it may lead to overfitting.
2). So, if I goes with the case that I select 500 images of class 1 and the rest(>2k) images of other classes, then along with weighted random sampling, should I also augment the images for all 3 classes in transform sequence .