Skip to content

A web app made using Flask that loads a trained PyTorch model and classifies dog/human images as the most resembling dog breed.

License

Notifications You must be signed in to change notification settings

frank-chris/dog-classifier-web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dog Breed Classifier Web App using Flask

Instructions

1. Download the folder named myapp

2. Install the following Python libraries:

  1. Flask

pip install Flask

  1. Werkzeug

pip install Werkzeug

  1. PyTorch

pip install torch torchvision

  1. OpenCV

pip install opencv-python

  1. Matplotlib

pip install matplotlib

  1. Pillow

pip install Pillow

Note: The web app also uses the following preinstalled libraries:

  1. os
  2. shutil
  3. atexit

3. Open a terminal in the folder myapp

4. Run the python script named routes.py

python3 routes.py

5. Open a web browser and navigate to the specified URL.

Video

Here is a link to a Demo video of the web app

Description of files/folders in myapp folder

1. __pycache__

Folder containing cache.

2. haarcascades

Folder containing OpenCV's Haar cascades based classifier.

3. static

Folder required by the Flask web app to store static content like images.

4. templates

Folder required by the Flask web app to store the HTML files of the webpages.

5. model_transfer.pt(needs to be downloaded from this link and placed in the same directory as routes.py)

Trained PyTorch model(transfer learning).

6. routes.py

Python script with code for the web app. The code is mostly the same as the Jupyter Notebook, except for a few Flask functions at the end.

7. routes.pyc

Just a compiled file of routes.py

Important Note

These instructions were written for a Linux OS.

Datasets

Dog Images Dataset
Human Images Dataset

About

A web app made using Flask that loads a trained PyTorch model and classifies dog/human images as the most resembling dog breed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published