/Image-Classification-Web-App-using-PyTorch-and-Streamlit

A simple web demo with minimal framework using PyTorch and Streamlit to showcase an image classification model

Primary LanguagePythonMIT LicenseMIT

Image Classification Web App

image

Table of Contents 📑

Overview

A simple web demo with minimal framework using PyTorch and Streamlit to showcase an image classification model

Steps to Use the Application

  • Clone the repository onto your own local machine

image

  • Open command prompt/terminal

image

  • Run pip install -r requirements.txt

image

  • Type ‘streamlit run steamlit_ui.py’ in the command prompt/terminal

  • A localhost address should automatically open in your web browser. If not, copy the local URL from the command prompt/terminal into your web browser.

image

  • Click 'Browse files' and upload an image file in jpg format

image

image

  • Now just wait for the results. 5 predictions should be outputted from highest probability to lowest probability.

image

Model Used

ResNet-101

ResNet-101 is a convolutional neural network that is 101 layers deep. You can load a pretrained version of the network trained on more than a million images from the ImageNet database. The pretrained network can classify images into 1000 object categories, such as keyboard, mouse, pencil, and many animals.

Installation

pip install -r requirements.txt

Code and Resources Used

  • Python: Version 3.7.4
  • Packages: PIL, torchvision, torch, streamlit