Member-only story

How to make an image classification app

with PyTorch and Streamlit

Mori
6 min readJan 23, 2023

tl;dr

We will build an app, using deep learning, that can classify (ants and bees) images with an accuracy of 96%.

Full implementation is available below:

Table of contents

Introduction

In this tutorial, we deploy a deep learning model for image classification using transfer learning. The problem that we are going to solve is to classify images of ants and bees. For that, we use PyTorch to train the model and Streamlit to provide a UI to interact with the model.

Setup

import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import transforms
import matplotlib.pyplot as plt
import time…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Mori
Mori

Written by Mori

Date Scientist/Machine Learning Engineer | Passionate about solving real-world problems | PhD in Computer Science

Responses (1)

Write a response

Wow, what a beautifully written article! I hope to read more like it. Congratulations!