martinoywa / digit-recognizer-webapp

MNIST digit classifier web app running a Pytorch model.

Home Page:https://digit-class.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

digit classifier web application

Flask web application for deploying a digit classifier model built using
PyTorch.

Only works for digits from 0 - 9.

run locally

$ pip3 install -r requirements.txt
$ python3 run.py

model's accuracy on each digit

Test Accuracy of 0: 99%

Test Accuracy of 1: 99%

Test Accuracy of 2: 99%

Test Accuracy of 3: 99%

Test Accuracy of 4: 99%

Test Accuracy of 5: 99%

Test Accuracy of 6: 98%

Test Accuracy of 7: 98%

Test Accuracy of 8: 99%

Test Accuracy of 9: 98%

overall test tccuracy

Test Accuracy : 99%

home page and predictions page

Upload Image Page
upload page

Uploaded Image
uploaded image

Predicted Label
sample prediction

unique files in the project

architecture.py
Contains the classifier model's architecture class necessary when
loading the model's checkpoint.
Also contains two methods, get_model() , which loads and returns the model,
and get_tensor() method with takes as a parameter image bytes
from uploaded image, transforms the image's size and color to grayscale,
then returns a tensor.

inference.py
Contains the get_image_label() method which passes image bytes through
the get_tensor() method, the returned tensor through the model and
returns the predicted label .

About

MNIST digit classifier web app running a Pytorch model.

https://digit-class.herokuapp.com/


Languages

Language:Python 67.1%Language:HTML 32.9%