Learn practical skills, build real-world projects, and advance your career

Transfer Learning for Image Classification in PyTorch

How a CNN learns (source):

cnn-learning

Layer visualization (source):

cnn-learning

Downloading the Dataset

We'll use the Oxford-IIIT Pets dataset from https://course.fast.ai/datasets . It is 37 category (breeds) pet dataset with roughly 200 images for each class. The images have a large variations in scale, pose and lighting.

!pip install jovian --upgrade --quiet
from torchvision.datasets.utils import download_url
download_url('https://s3.amazonaws.com/fast-ai-imageclas/oxford-iiit-pet.tgz', '.')
Using downloaded and verified file: ./oxford-iiit-pet.tgz