The biggest issue i’ve had was to format the data correctly. So i modified the data to model the imagenet-style folder structure. Then i used ImageDataBunch.from_folder method
No @harinsa. I tried but couldn’t find a solution. I searched the docs but in the docs, there was a predict function which takes a single image as input. But as we have this many images in the test set, I don’t think that’ll be the best way to do it. Do share here if you find any other solution.
Here’s a link to the predict function in the docs. https://docs.fast.ai/vision.learner.html#Get-predictions
Even I am getting an accuracy of 83% using Rest Net 50. May be if I train it for few more epochs I will be able to squeeze in accuracy of 85%. Below is my kernel. Any help will he appreciated.
Pardon me, but as of my actual understanding of Fast.ai library (not good not terrible) that’s impossible. pretrained=False means random initialization of the model’s weights (instead of using the ones obtained with several days of training of ImageNet) so it’s totally unrealistc that such a network can converge in just one epoch.
I’m writing this because, no matter what I try, I can’t go past 90% accuracy with a ResNet-50. So your strategy lured me (and I admit it could also pay off if done properly) but not in one epoch. Moreover in your notebook you train for one epoch (with size=128 and bs=16) and then you do an unfreeze() on an already unfrozen model (because of the pretrained=False) and then train again for just two epochs with a very low max_lr. So it’s totally impossible that the notebook you linked yields 96% accuracy, sorry. I’m writing this also to prevent other people from wasting time on this.
I’m sorry to have pointed this out, but I spent a lot of time on this problem and not being able to replicate your results drove me crazy. Until I realized what was wrong…