LogoPilou
HOMEABOUTPROJECTS
Pierre-Louis © 2026
Back to Projects

IA Data Hackathon (French Ministry of Armed Forces)

A computer vision challenge focused on vehicle classification using Transfer Learning (ResNet-18) and model explainability.

PythonPyTorchResNet-18Grad-CAMTransfer LearningMatplotlib
Completed in April 2024 - took 2 days to be built
5
View on GitHub

About the Project

Participated in the 'Projet 6milarite' hackathon organized by the French Ministry of Armed Forces.
Our team of 5 was tasked with training a model to classify 196 distinct car models from the Stanford Cars Dataset (16k images). We handled significant class imbalance by implementing data augmentation and strategic train/test splitting (70/30).
We fine-tuned a pre-trained ResNet-18 model, achieving 86% accuracy with a loss of 0.03. To meet the 'explainability' requirement, we generated Grad-CAM heatmaps, specifically analyzing false positive predictions to visualize exactly where the model's attention failed.

Step 1 - Data Preparation

Loading the Stanford Cars dataset (16k images), splitting into train/test sets (70/30), and applying augmentation (resize, crop, flip, normalize) before feeding into PyTorch DataLoaders. 

1 / 4

Motivation

I wanted to push beyond simple accuracy metrics and understand the 'why' behind AI decisions. This project allowed me to apply deep learning theory to a messy, real-world dataset while learning visualization tools for model diagnostics.

Challenges Overcome

  • •Tackling fine-grained classification where inter-class visual differences are minimal and easily confused by the model
  • •Managing GPU memory constraints while processing high-resolution heatmaps for thousands of validation images
  • •Justifying the trade-off between model complexity and interpretability to the jury

What I Learned

  • •Implementing Transfer Learning by freezing initial layers of a ResNet-18 model pre-trained on ImageNet
  • •Diagnosing model performance using Confusion Matrices and F1-scores/Recall analysis per class
  • •Developing a pipeline to automatically overlay Grad-CAM heatmaps on misclassified images for debugging
  • •Optimizing data pipelines with PyTorch DataLoaders and custom transformations (CenterCrop, Normalize)