Does torchvision.transforms or albumentations 1 provide some means to make use of the class weights calculated for the training data?
There are several arguments against using class weights in loss functions and performing data augmentation at the same time. Mostly the same reason is stated that

the augmentation process changes the original class distribution

This made me look for ways to force the augmentation process to consider minority class samples more often than the majority class samples.
What if class weights are computed on the fly for an augmented batch of training examples (as opposed to the traditional way of calculating for the whole training data)? This way both techniques may work together.
Your experiences with the data augmentation to counter the class imbalance problem will be highly appreciated