Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
!pip install jovian --upgrade --quiet
project_name = 'course_project'
jovian.commit(project = project_name)
[jovian] Detected Colab notebook...
[jovian] Uploading colab notebook to Jovian...
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ai/abdallahsamy774/image-classification-imagewoof-practice-improved
import os
import torch
import torchvision
import tarfile
from torchvision.datasets.utils import download_url
from torch.utils.data import random_split
import torchvision.transforms as tt
from torchvision.datasets import ImageFolder
#download the dataset
dataset_url = "https://s3.amazonaws.com/fast-ai-imageclas/imagewoof-160.tgz"
download_url(dataset_url, '.')
# extract the archive
with tarfile.open('./imagewoof-160.tgz', 'r:gz') as tar: #read file in r mode
tar.extractall(path = './data') #extract all folders from zip file and store under folder named data
Using downloaded and verified file: ./imagewoof-160.tgz