Fast.ai Image Classification
Quickly import *.udt.csv files into fast.ai for image classification.
Example Dataset
We're going to use udt-dataset-cats-and-dogs, a dataset of labeled images of cats and dogs created from COCO. For this guide you don't need to download it directly, because we'll load it in right from our notebook.
Don't like cats and dogs? You can also use any classification from the Common Objects in Context with the Import COCO button! Maybe try to classify bears vs cats!
Import CSV Into Pandas Dataframe
We can begin by importing the fastai library, pandas, and our udt.csv file.
You can use the udt.json format too, tables are just a nice way to visualize the data!
Download Images
UDT Datasets just have links to images, so we'll need to download the actual images. Let's do that using the fast.ai download_images function.
Create an ImageDataBunch
From here, everything should should seem pretty normal. We can create an ImageDataBunch from our images
directory.
Train a Model
We can now train a model! This is just a simple one, don't forget to fine tune!
Last updated