Building a classifier using custom data


I was wondering how I can take my FastAI experience further by using custom images datasets that I have constructed myself i.e. using satellite imagery. It’s very similar to the Bear Classifier example, but I’m not downloading the images from Google.

Firstly, I’ve selected my images and labelled them using the PyQt annotation tool.

If I store the different labelled images in separate folders on my C:, how do I then upload them to the FastAI API?

The attached images show the code that I’ve been using for the Bears Classifier. Any suggestions on which I need to change and which is obsolete, please?

Much appreciated.

If your data is already in folders already, you should be able to use the ‘factory method’ from_folder (see docs here). The example shown is for mnist_tiny, with folders train and valid, each containing the folders of labels (only 3 and 7 in this case).


1 Like

Great, thanks. I’ll take a look :slight_smile: