All projects
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

ModelTest AccuracyParametersSizeTraining Time
Custom CNN97.97%4.96M56.9 MB14.8h
EfficientNetB099.75%4.07M40.0 MB6.7h
ResNet-5099.76%24.13M211.0 MB10.3h

Dataset Specifications

PropertyValue
Total Images120,842 (deduplicated)
Classes14 (Fruits & Vegetables)
Split (Train/Val/Test)84,582 / 18,119 / 18,141
Resolution224×224 RGB