Skip to content
NR
07/Case Study

ML Image Classification

ResNet-50 Fine-Tuning & Interpretability

RoleML Engineer
Timeline2024
StackPython, TensorFlow, ResNet-50
StatusShipped
Impact

Improved model accuracy from 81% to 94.2% through systematic fine-tuning and data augmentation.

Overview

Context

This project demonstrates core machine learning engineering discipline — systematic experimentation, interpretability through Grad-CAM visualizations, and measurable improvement through principled model optimization.

Challenge

The problem

Baseline model accuracy was 81%, insufficient for production use. The challenge was improving accuracy through principled techniques while maintaining interpretability — understanding not just whether the model was right, but why.

Approach

How I built it

01

Implemented targeted data augmentation based on failure analysis of misclassified samples

02

Applied cosine learning-rate scheduling for stable convergence

03

Used class-weighted loss to handle class imbalance without oversampling

04

Added strategic dropout regularization to prevent overfitting

05

Built Grad-CAM visualization pipeline for model interpretability and failure diagnosis

Technical Decisions

Why these choices

Grad-CAM for interpretability

Accuracy metrics alone don't reveal whether a model is learning meaningful features. Grad-CAM visualizations showed where the model was attending, enabling targeted improvements.

Transfer learning with selective unfreezing

Full fine-tuning risks catastrophic forgetting on small datasets. Selective unfreezing of later layers preserved learned features while adapting to the target domain.

Outcomes

What shipped

Accuracy improvement from 81% to 94.2%
Grad-CAM visualizations for model interpretability
Systematic failure analysis and targeted data augmentation
Reproducible training pipeline with documented experiments
Takeaways

What I learned

Interpretability tools like Grad-CAM should be part of every computer vision workflow — they reveal what metrics can't
Targeted augmentation based on failure analysis outperforms generic augmentation strategies