How do we use our model against a specific image?

Another possibility is to make a test folder and put your image there. Here is an example on how to use a “test_name”

data = ImageClassifierData.from_csv(path, img_folder, csv_fname, bs, tfms, val_idxs, suffix=".png",
                            test_name="test", continuous=True)

Then you can predict

test_preds = learn.predict(is_test=True)

Here is how you get a list of the test files ordered.

test_files = data.test_dl.dataset.fnames
5 Likes