Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pet Breed Classifier (PyTorch, Transfer Learning)

Classify 37 cat and dog breeds from a photo, using transfer learning with a pretrained ResNet on the Oxford-IIIT Pet dataset. Trained on an NVIDIA RTX 4050 (6 GB) laptop GPU, with an interactive Gradio demo.

Goals

  • Build an image-classification pipeline in PyTorch (datasets, transforms, DataLoaders).
  • Use transfer learning (a pretrained ResNet) instead of training from scratch.
  • Train on the GPU, evaluate with accuracy and a confusion matrix.
  • Ship an interactive Gradio demo you can drop any pet photo into.

Project structure

pytorch-image-classifier/
├── data/             # Oxford-IIIT Pet, auto-downloaded (not committed)
├── models/           # trained checkpoints (not committed)
├── notebooks/
├── src/
│   ├── data.py       # transforms + DataLoaders
│   ├── check_gpu.py  # confirms CUDA/GPU is visible
│   └── ...
├── app/              # Gradio demo (Day 3)
├── requirements.txt
└── README.md

Setup (Python 3.14 + NVIDIA GPU)

# 1. Virtual environment
python -m venv venv
venv\Scripts\Activate.ps1

# 2. GPU-enabled PyTorch (CUDA 12.8 build)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128

# 3. Everything else
pip install -r requirements.txt

# 4. Confirm the GPU is visible
python src/check_gpu.py

Dataset

Oxford-IIIT Pet: 37 breeds, ~7,400 images. Auto-downloads through torchvision on first run into data/. No manual download needed.

Progress

  • Day 1: setup, GPU-enabled PyTorch, data pipeline
  • Day 2: transfer-learning model + training loop (on GPU)
  • Day 3: evaluation + Gradio demo

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages