ResNet50 Fine-Tuned β CIFAR-10
π Overview
ResNet50 Fine-Tuned for CIFAR-10 is a high-performance image classification model built by adapting an ImageNet-pretrained ResNet50 to the CIFAR-10 dataset.
Instead of training from scratch, this model leverages pretrained visual representations and selectively fine-tunes higher layers, achieving strong accuracy with faster convergence and improved generalization.
This model represents a production-oriented baseline for small-image classification tasks.
π Architecture Summary
| Input (224Γ224) |
|---|
| ββ Pretrained ResNet50 Backbone |
| ββ Conv β BN β ReLU |
| ββ Residual Blocks (Frozen) |
| ββ Residual Blocks (Fine-tuned β layer4) |
| ββ Global Average Pool |
| ββ Custom FC Head |
| ββ Linear (2048 β 512) |
| ββ ReLU |
| ββ Dropout (0.5) |
| ββ Linear (512 β 10) |
π Performance
| Metric | Value |
|---|---|
| Validation Accuracy | 92.46% |
| Validation Loss | 0.257 |
| Training Epochs | 40 |
| Optimizer | AdamW |
| Learning Rate | 1e-4 |
| Weight Decay | 1e-4 |
This model outperforms all scratch-trained models by leveraging pretrained ImageNet features.
π¬ Training Details
- Dataset: CIFAR-10
- Input resolution: 224Γ224
- Normalization: ImageNet statistics
- Loss: CrossEntropyLoss
- Scheduler: Cosine Annealing
- Batch size: 64
- Hardware: NVIDIA GTX 1650
π Usage
Load model
import torch
from model import ResNet50FineTune
model = ResNet50FineTune(num_classes=10)
ckpt = torch.load("resnet50_finetune_cifar.pt", map_location="cpu")
model.load_state_dict(ckpt["state_dict"])
model.eval()
Input preprocessing
from torchvision import transforms
transform = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(
mean=(0.485, 0.456, 0.406),
std=(0.229, 0.224, 0.225)
)
])
π§ͺ Intended Use
- Production-ready CIFAR-10 classification
- Transfer learning benchmarks
- Fine-tuning experiments
- Educational demonstrations of pretrained CNN adaptation
β Limitations
- Input images must be resized to 224Γ224
- Depends on ImageNet-pretrained weights
- Less suitable for architecture research compared to scratch models
π Comparison with Scratch Model
| Model | Training | Val Acc |
|---|---|---|
| PreNormResNet v4 | From scratch | 89.29% |
| ResNet50 Fine-Tuned | Transfer learning | 92.46% |
Pretraining shifts the learning regime and provides a strong inductive bias, especially effective for small datasets like CIFAR-10.
π€ Author
AnjanSB
Built with PyTorch, MLflow, DVC, and Dagshub
π Experiment Repo: https://dagshub.com/AnjanSB/cifar-image-classification-modeling-dlops
π Live Demo (Custom Scratch Model): https://huggingface.co/spaces/AnjanSB/cifar10-prenorm-resnet-demo
π Final Note
This model represents a real-world deployment strategy, while the custom PreNormResNet v4 highlights architecture engineering and research depth. Together, they form a complete and well-rounded ML portfolio.
- Downloads last month
- 5