How to use the trained model on brand new data?

I’ve just trained a model to classify images and it’s working nicely. What I want to do now is use that model for brand new, unlabelled, images. Not in the train, test or val data sets but brand new images.

I can’t figure out how to do this - do I need to load them into an ImageDataBunch? Because that will then require splitting them up into test/train sets, which I don’t want to do. Ideally what I’d like to do is model.predict(filepath) and it just spits out its prediction for the image but that doesn’t seem possible?

Check out the “Putting your model into production” section of the lesson 2 notebook.

whoops don’t know how I missed that!! Worked perfectly, thank you :slight_smile:

1 Like