Skip to content

aka-vm/Dog-Breed-App

Repository files navigation

Dog-Breed-App

Docker Pulls Docker Image Size Docker Image Size

This Repository contains a Web App along with the model nb that can be used to predict the breed of a dog based on the image uploaded.

It is still under development for Decker Image and other optimizations but it works.

Model

This Notebook trains the model on Stanford Dogs Dataset. This Repo contains the original code, but some modifications are made to make it better.

Web App

The server uses FastAPI.
I've hosted the app on Azure and DigitalOcean, and it works fine. But I recommend using ngrok for quick testing. The Docker image is also available on Docker Hub.

Running the app

Two ways to run the app, If you want a quick test, I recommend using Docker. It'll work on arm64 and amd64.

Using Regular Python

  1. Clone the repo.
  2. create a virtual environment and install the requirements from requirements.py.
  3. Download the model from Google Drive or releases and place it in the model-binaries folder.
  4. Download The static files from Google Drive and place them inside repo.
  5. Run the app using python backend/main.py. The app will be hosted on port 8000.
# clone
git clone https://github.com/aka-vm/Dog-Breed-App
cd Dog-Breed-App

# Dependencies and environment
pip install virtualenv
virtualenv --python=python3.9.12 venv
source venv/bin/activate
pip install -r requirements.txt

# Download The model and paste it in the model-binaries folder
wget -O model-binaries/InceptionResNetV2.h5 https://github.com/aka-vm/Dog-Breed-App/releases/download/Classification-Model/InceptionResNetV2.h5
#! Download The Static Files from Here
#https://drive.google.com/file/d/1IP_i9OXzK5jSo9dm_1rvrHIIr6kozOiE/view?usp=share_link
# Run server
python backend/main.py
# for web testing I recommend using ngrok

Using Docker

# Previsouly I built two images for arm64 and amd64, but now I'm using multi-arch build
docker pull akavm/dog-breed-app:0.1.1
docker run -p 8000:8000 akavm/dog-breed-app:0.1.1

Mobile View:


PC View: