I am using a pre-trained mobilenetv2 model running experiments for 30 epochs with a cosine annealing learning rate scheduler and these hyperparameters:
learning rate = 0.001
weight decay = 4e-5
momentum = 0.9
batch size = 64
optimizer = SGD
dropout = 0.2
My data augmentation techniques include:
train_transform = transforms.Compose([
transforms.RandomResizedCrop(224,scale = (0.2,1.0)),
#transforms.RandomRotation(15), # rotate +/- 10 degrees
transforms.RandomHorizontalFlip(), # reverse 50% of images
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406],
[0.229, 0.224, 0.225])
])
test_transform = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406],
[0.229, 0.224, 0.225])
])
I am using class_weights combined with a data sampler( see here: https://github.com/ufoym/imbalanced-dataset-sampler ) since my dataset is imbalanced and the formula for determining each weight is minority class size/class size. I am getting good results as my confusion report is showing that each class is generating accuracies in the 80s and 90s. How can I push my model’s performance to be in the high 90s?.
What I have tried so far:
Adjusting the class weights
Changing the initial learning rate