project 13
ResNet50 & VGG19 Model Comparison
An analytical study training two classic convolutional architectures on the same dataset through transfer learning, then comparing them on accuracy, inference time and model size.
- Category
- AI
- Role
- Data science and model evaluation
- Year
- 2026
technologies used
- Python
- TensorFlow
- Keras
- CUDA
- Matplotlib
- Seaborn
problem
Problem
For a specific image classification problem, it was unknown which convolutional architecture struck the better balance across accuracy, inference time, model size and overfitting. The decision had to rest on measurement rather than intuition.
solution
Solution
Applying transfer learning principles, I optimised pretrained ResNet50 and VGG19 models on the same dataset, fine-tuning them with layer-wise weight freezing and custom classification heads. Using Matplotlib and Seaborn I built comparison scripts visualising loss/accuracy curves, the confusion matrix and inference latency metrics.
outcome
Outcome
The outcome is a thorough analysis laying out the strengths and weaknesses of both architectures statistically, providing a basis for hardware and model selection in future edge deployments.
key features
- 01Optimising pretrained ResNet50 and VGG19 models on the same dataset through transfer learning.
- 02Fine-tuning strategies with layer-wise weight freezing and custom classification heads.
- 03Comparison scripts visualising loss/accuracy curves, confusion matrices and inference latency.
- 04Architecture performance comparison across precision, recall and F1-score.
why these choices
Why do ResNet's residual connections matter?
In flat deep architectures like VGG, gradients vanish as layers are added, so the model learns worse despite being deeper. ResNet's skip connections solve this; the measurements experimentally showed higher accuracy and speed with fewer parameters.
Why transfer learning?
Training both architectures from scratch would have taken far longer, and the dataset size wasn't suited to it. Starting from pretrained weights and adapting the final layers kept the comparison fair and reproducible.