Built to order

Dog Breed Identification from Photos using CNN

This project identifies dog breeds from photos using transfer learning — a ResNet-50 backbone pre-trained on ImageNet with a retrained 120-class head, trained on the Stanford Dogs dataset (20,580 images, 120 breeds). Fine-grained classification like this separates breeds on subtle cues (ear set, muzzle, coat), and the project reports measured top-1/top-5 accuracy with a per-breed error analysis. Suitable for B.E./B.Tech final-year projects in Computer Science, Information Technology and AI/ML.

AI & Machine Learning GitResNet-50 transfer learningStanford Dogs datasetPython 3.10 · PyTorch/KerasImage augmentation pipelineFlask demo backendHTML · CSS · JavaScriptSoftware
Dog Breed Identification from Photos using CNN — project thumbnail preview
More project photos (3)

The problem

Telling a Beagle from a Foxhound is far harder than telling a dog from a cat: fine-grained classes differ only in subtle cues like ear set, muzzle shape and coat texture. Training a deep network from scratch for 120 such classes would need enormous data and compute. Transfer learning is the professional answer — reuse visual features learned from ImageNet and retrain only the classifier head. The Stanford Dogs dataset (Khosla et al., Stanford Vision Lab) provides 20,580 annotated images across 120 breeds with a standard train/test split, making it the established benchmark. This project implements the full pipeline: preprocessing, two-stage fine-tuning, augmentation for per-breed data scarcity, honest test-split evaluation, and a photo-upload demo showing top-3 breeds with breed facts.

SYSTEM FLOW

3 components 3 connections

Live flow
Drag to explore
100%
userUser

Uploads a dog photo in the web demo.

Follow the working sequence

How it works

  1. The photo is resized to 224x224 and normalized with ImageNet mean/std statistics.
  2. The frozen ResNet-50 backbone converts it into a 2048-dimensional feature vector of fur texture, ear geometry and proportions.
  3. The classification head (global average pooling → Dense(512) → dropout → Dense(120)) maps features to breed logits.
  4. Softmax converts logits to 120 probabilities; the demo reports the top three.
  5. Stage-one training fits only the head (Adam, lr 1e-3); stage two fine-tunes the last block at lr 1e-5.
  6. Final evaluation runs once on the held-out test split for top-1/top-5 accuracy.

Tech stack:

  • Python 3.10, PyTorch or TensorFlow/Keras
  • ResNet-50 (ImageNet pre-trained)
  • Stanford Dogs dataset (Khosla et al.)
  • Albumentations / torchvision transforms
  • Flask (demo backend)
  • HTML/CSS/JavaScript (demo UI)
  • Git

Dataset & Model Details

  • Dataset: Stanford Dogs — 20,580 images, 120 breeds (~150 per breed), with bounding-box annotations; source: Aditya Khosla et al., Stanford Vision Lab. Standard split: 12,000 train / 8,580 test.
  • Model input: 224x224x3 normalized image. Output: 120-way softmax (breed probabilities).
  • Architecture: ResNet-50 backbone (ImageNet init) → GlobalAvgPool → Dense(512) → Dropout → Dense(120).
  • Metric: top-1 / top-5 accuracy on the test split, measured after training; per-breed precision analysis included. No accuracy figure is claimed before the training run.
Parameter Value
Classes 120 dog breeds
Input 224x224 RGB photo
Backbone ResNet-50, ImageNet pre-trained
Fine-tune Head + last residual block
Inference Under 1 s per photo on CPU (design target)
Demo Photo upload + top-3 breed cards

Project features

  • [120-breed classifier] ResNet-50 backbone with a retrained classification head covering all 120 Stanford Dogs breeds.
  • [Two-stage fine-tuning] Head-only training first, then the last residual block unfrozen at a low learning rate with cosine decay.
  • [Top-3 predictions with breed cards] Each prediction shows probabilities plus group, size, coat and temperament notes per breed.
  • [Augmentation pipeline] Random crop, flip, color jitter and ±15° rotation counter the small per-breed sample sizes.
  • [Per-breed error analysis] Confusion analysis highlights commonly confused pairs (e.g. Malamute vs. Husky) with measured numbers.
  • [Photo-upload web demo] Upload any dog photo; get breed probabilities in under a second on CPU.
  • [Honest evaluation] Top-1/top-5 accuracy measured once on the 8,580-image held-out test split — reported as measured.

What is included

  • Python training notebook (two-stage transfer learning, augmentation, evaluation)
  • Fine-tuned model weights
  • Test-split evaluation: top-1/top-5 accuracy + per-breed error analysis from the actual run
  • Photo-upload web demo with breed information cards
  • Project report PDF (methodology, ablations, measured results)
  • PPT presentation for final review
  • Viva Q&A preparation document

Limitations & prerequisites

  • Classifies single-breed photos best; mixed-breed dogs get the closest single label, not a mix breakdown.
  • Needs a reasonably clear, front-facing photo; heavy occlusion or tiny distant dogs degrade accuracy.
  • Rare breeds with the fewest training images score lower — the per-breed analysis shows exactly which.
  • Fine-tuning benefits from a GPU; CPU-only training works but takes considerably longer.
  • Breed facts in the demo are reference notes, not veterinary advice.

Frequently Asked Questions

Why transfer learning instead of training from scratch?

With ~150 images per breed, from-scratch training overfits badly. ImageNet features already encode fur, ears and faces; retraining just the head reaches strong accuracy in a fraction of the time — the notebook includes the comparison.

What dataset is used?

Stanford Dogs: 20,580 images across 120 breeds with a standard 12,000/8,580 train/test split, from the Stanford Vision Lab. Results are reproducible against a known benchmark.

Can it identify mixed breeds?

Not reliably — it outputs the single closest breed. Multi-label mixed-breed prediction is listed as future scope in the report.

How accurate is it?

The notebook measures top-1 and top-5 accuracy on the held-out test split and reports the measured numbers with a per-breed breakdown. Nothing is claimed before training.

Do I need a GPU?

Recommended for fine-tuning (much faster), but the pipeline runs on CPU end to end, and demo inference is CPU-friendly.

Is this project suitable for a final-year project?

Yes — for Computer Science, IT and AI/ML programs. It demonstrates transfer learning, fine-grained classification, augmentation strategy and honest evaluation on a real benchmark. Suitable for B.E./B.Tech final-year projects in Computer Science, Information Technology and AI/ML.

Components & software requirements
  • Python 3.10, PyTorch or TensorFlow/Keras
  • ResNet-50 (ImageNet pre-trained)
  • Stanford Dogs dataset (Khosla et al.)
  • Albumentations / torchvision transforms
  • Flask (demo backend)
  • HTML/CSS/JavaScript (demo UI)
  • Git

Dataset & Model Details

  • Dataset: Stanford Dogs — 20,580 images, 120 breeds (~150 per breed), with bounding-box annotations; source: Aditya Khosla et al., Stanford Vision Lab. Standard split: 12,000 train / 8,580 test.
  • Model input: 224x224x3 normalized image. Output: 120-way softmax (breed probabilities).
  • Architecture: ResNet-50 backbone (ImageNet init) → GlobalAvgPool → Dense(512) → Dropout → Dense(120).
  • Metric: top-1 / top-5 accuracy on the test split, measured after training; per-breed precision analysis included. No accuracy figure is claimed before the training run.
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Related guides

All guides

CNN Transfer Learning for Students: Fine-Tuning ResNet and MobileNet in PyTorch

Train image classifiers on small datasets with transfer learning: load an ImageNet-pretrained backbone, freeze its early layers, replace the classification head for your classes, train the head first, then unfreeze late layers with a small learning rate for fine-tuning. This guide covers backbone choice (ResNet vs MobileNet vs EfficientNet), the exact PyTorch workflow, freezing strategy, data needs per class, and the errors that waste the most time.

Read guide

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide

YOLO Object Detection for Final-Year Projects: Datasets, Colab Training, mAP and Deployment

How do you build a YOLO object detection project for your final year? Start with a labelled dataset in YOLO format (300-500+ images per class with real variation), train a small pretrained model on Google Colab with early stopping, evaluate with mAP@0.5 and mAP@0.5:0.95 on a held-out test set, and deploy the exported model on your demo hardware. This guide covers the full pipeline - version choice, labelling discipline, Colab training, honest evaluation, common errors, and deployment - with the decision tables and checklists your report needs.

Read guide
Get a quotation