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

#250 Fruits Image Classification Project with Pytorch

This is the final project for the course "Zero To Gans with Pytorch" by jovian.ai with freecodecamp.

Here I implement an architecture for a convolutional neural network to predict the classification of fruits using the following kaggle dataset https://www.kaggle.com/moltean/fruits.

The images have a shape of 100x100 and there are 131 classes.

!pip install jovian --upgrade --quiet
|████████████████████████████████| 71kB 4.6MB/s eta 0:00:011 Building wheel for uuid (setup.py) ... done
project_name = "zerotogans-final-project"

First let's install and import pytorch, matplotlib and other usefull libraries

import torch
import torchvision
import numpy as np
import matplotlib.pyplot as plt
import torch.nn as nn
import torch.nn.functional as F
from torchvision.datasets import CIFAR10
from torchvision.transforms import ToTensor
from torchvision.utils import make_grid
from torch.utils.data.dataloader import DataLoader
from torch.utils.data import random_split
%matplotlib inline
import os
import time