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

Cats or Dog?!

#@title ➢ Importing all the lovelies
! [ -e /content ] && pip install -Uqq fastbook
import fastbook
!pip install nbdev
from fastbook import *
from import *
import nbdev
from import *
from pathlib import Path
import PIL

# Did not end up using these, but could be useful sometime
# !pip install -q jmd_imagescraper
# from jmd_imagescraper.core import * 
# from jmd_imagescraper.imagecleaner import *

➢ Downloading the images from the collection

path = untar_data(URLs.PETS)/'images'

➢ Function for labeling the images

This is essentially an "Is this a cat or not?" app. This function checks to see if the label on the training image is a cat label. All of the cat labels are upper case, and that is how they are differentiated.