How cat-like is your dog? How dog-like is your cat?
Upload an image to instantly find out whether it's more cat or more dog with visualized decision boundaries and model confidence scores.
This project is a full-stack image classifier web app that:
- Lets users upload images of cats and dogs
- Uses pretrained ResNet50 embeddings with KNN and Logistic Regression classifiers
- Shows prediction results + a 2D visual of the model's decision space
All models and EDA are built in this repo: Cat vs Dog Image Analysis – EDA & Model Selection
Requires Docker to be installed on your machine
docker pull mooogy/catdog-ai
docker run -p 8000:8000 mooogy/catdog-ai # launches at http://localhost:8000With Make
git clone https://github.com/mooogy/catdog-ai.git
cd catdog-ai
make run # launches at http://localhost:8000Without Make
git clone https://github.com/mooogy/catdog-ai.git
cd catdog-ai
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload # launches at http://localhost:8000- Open your browser and go to http://localhost:8000
- Upload an image of a cat or dog
- View the prediction, model probabilities, and decision boundary
- Use the reset button to try a new image
- HTML, CSS, Javascript - Frontend UI/UX, responsive layout, file upload preview
- Python – Backend and machine learning
- Docker – Cross-platform deployment
- Makefile - Easy virtual environment setup and development
- Torch (Torch, TorchVision) - Used for loading the pretrained ResNet model and extracting image embeddings
- Scikit-learn - Handles PCA dimensionality reduction, classification models (KNN, Logistic Regression)
- FastAPI – Backend API for handling image uploads and returning model predictions
- Pillow - Processes and resizes uploaded images
- Plotly - Generates decision boundary graph for the frontend
This project is licensed under the MIT License.

