Personal2025
CNN Architecture Comparison
Benchmarked three CNN architectures on 120K+ food images, proving EfficientNetB0 matches ResNet-50 while being 5.9x smaller.
Jupyter NotebookPythonTensorFlowDeep Learning
Challenge
Determining whether lightweight CNNs can match heavy architectures for domain-specific image classification while minimizing compute cost.
Approach
Benchmarked three CNN architectures on 120K+ food images. EfficientNetB0 matched ResNet-50's 99.75% accuracy while being 5.9x smaller and 35% faster to train.
What it does
120K+ Image Pipeline
Merged three Kaggle sources with SHA-256 deduplication and stratified splitting.
99.75% Accuracy
EfficientNetB0 matched ResNet-50 via transfer learning on domain-specific data.
5.9x Model Compression
EfficientNetB0 achieved parity at 40 MB vs ResNet-50's 211 MB.
Class-Weighted Training
Maintained >0.98 F1 scores even on minority classes with 113:1 imbalance.
Model Performance Comparison
| Model | Test Accuracy | Parameters | Size | Training Time |
|---|---|---|---|---|
| Custom CNN | 97.97% | 4.96M | 56.9 MB | 14.8h |
| EfficientNetB0 | 99.75% | 4.07M | 40.0 MB | 6.7h |
| ResNet-50 | 99.76% | 24.13M | 211.0 MB | 10.3h |
Dataset Specifications
| Property | Value |
|---|---|
| Total Images | 120,842 (deduplicated) |
| Classes | 14 (Fruits & Vegetables) |
| Split (Train/Val/Test) | 84,582 / 18,119 / 18,141 |
| Resolution | 224×224 RGB |