Imagenet class prediction, only using pretrained resnet weights

Hej!

I’ve been struggling with predicting the class of an image only using a pretrained network, using the fast.ai library.

I want to predict an image from an imagenet class using the pretrained resnet54 (or VGG, or any pretrained model frankly) in fast.ai.

However, I don’t understand how to do it, because all learners need to load data (learn = ConvLearner() needs path to own data for instance), in this case, I just want to test the prediction on one random image as input, solely using the pretrained imagenet weights and not my own dataset.

Is this even possible using fast.ai?
Huge thank you for this amazing course!

2 Likes

have a look at the folderstructure for catsdogs (simplest) or cifar10 or mnist