WeightedDL for Multi Label

Hi, Is there a way that I can implement WeightedDL for Multi Label Image Classification. Any help would be greatly appreciated …

The implementation I guess is not very different to the Single Label Classification case. I just did one that you can check here: https://www.kaggle.com/dienhoa/healthy-lung-classification-spectrogram-fast-ai .

Now it depends on you that how you will weight an item. Because an item contains multiple labels, oversampling a class will lead to oversampling others, and it might not easy to guarantee you will have balance dataloader,

Hope it helps.

1 Like

I saw you notebook , there’s actually where I got the idea to try WeightedDL. It was really nice. I was implementing one one for the Plant Pathology Competition in Kaggle. I was successful in doing so, if I get good enough results I will release the code :slight_smile:

2 Likes

Great !! I’m very happy that my notebook is helpful. Hope to see your code then :slight_smile:

Did you manage to use the WeghtedDL for multi label classification? How did it go? What logic did you use for weighting multiple labels for one item? Any improvement in performance? How did you train the model? Did you started the training straight away on weighted data loaders or fine tuned you model on weighted data loaders in the last for a few epochs?

You can check Jermey Lecture 7 , around 37 minutes forward. He talk about Multi target classification , reasons one my want to try them? its logic and implementation.
Lecture 7 fastai part1 (2022)