Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.55 KB

README.md

File metadata and controls

49 lines (31 loc) · 1.55 KB

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 .