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

Before we get started:

We are setting up our google colab notebook to directly download,extract and load a kaggle dataset!

We are going to use the Stanford Car Dataset by Classes to Identify Car Models (being a Car Enthusiast obviously!)

!pip install kaggle
!pip install torch
Requirement already satisfied: kaggle in /usr/local/lib/python3.7/dist-packages (1.5.12) Requirement already satisfied: six>=1.10 in /usr/local/lib/python3.7/dist-packages (from kaggle) (1.15.0) Requirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from kaggle) (2020.12.5) Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from kaggle) (2.8.1) Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from kaggle) (4.41.1) Requirement already satisfied: python-slugify in /usr/local/lib/python3.7/dist-packages (from kaggle) (5.0.2) Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from kaggle) (2.23.0) Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/dist-packages (from kaggle) (1.24.3) Requirement already satisfied: text-unidecode>=1.3 in /usr/local/lib/python3.7/dist-packages (from python-slugify->kaggle) (1.3) Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->kaggle) (2.10) Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->kaggle) (3.0.4) Requirement already satisfied: torch in /usr/local/lib/python3.7/dist-packages (1.8.1+cu101) Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch) (3.7.4.3) Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from torch) (1.19.5)
!mkdir -p ~/.kaggle
!cp kaggle.json ~/.kaggle/
!chmod 600 ~/.kaggle/kaggle.json
!kaggle datasets download -d jutrera/stanford-car-dataset-by-classes-folder
Downloading stanford-car-dataset-by-classes-folder.zip to /content 100% 1.82G/1.83G [00:20<00:00, 79.9MB/s] 100% 1.83G/1.83G [00:20<00:00, 95.5MB/s]
import zipfile
zip_ref = zipfile.ZipFile("/content/stanford-car-dataset-by-classes-folder.zip", "r")
zip_ref.extractall("car_dataset")
zip_ref.close()