Fast.ai Image Classification
Quickly import *.udt.csv files into fast.ai for image classification.
Last updated
Quickly import *.udt.csv files into fast.ai for image classification.
Last updated
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!
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!
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.
From here, everything should should seem pretty normal. We can create an ImageDataBunch from our images
directory.
We can now train a model! This is just a simple one, don't forget to fine tune!