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

#About the dataset

Food-101 dataset consists of 101 categories of food. Each category contains over 1000 images of food. The sizes of the dataset are different. The images are not split into train and test folders. Instead, two json files are provided indicating which files will belong to train and test sets respectively. The dataset contains a mix of RGB and black-and-white images.

Upon inspection, it is found that there are 3 black-and-white images in the entire dataset and they are removed.

Moreover, I have used only 20 of the 101 categories for this project because of GPU memory restrictions. In future, I will be working with the entire dataset and improve its performance as well.

# Jovian Commit Essentials
# Please retain and execute this cell without modifying the contents for `jovian.commit` to work
!pip install jovian --upgrade -q
import jovian
!pip install jovian --upgrade --quiet
from google.colab import drive
drive.mount('/content/drive')
Mounted at /content/drive
import os
import torch
import torchvision
import tarfile
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
import torchvision.transforms as tt
from torchvision.utils import make_grid
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline

matplotlib.rcParams['figure.facecolor'] = '#ffffff'