
Image classification with Deep Learning (CNN)
A convolutional neural network trained to classify images, with data augmentation, dropout and normalization.
Completed
July 2026
Personal
Data / AI
Technologies
01The project
This is my very first Machine Learning project. More than a finished product, it's a project of exploration and learning. I was starting from scratch in AI, and I wanted to understand concretely what happens inside a neural network, by building one myself.
The chosen subject is a classic for beginners, teaching a program to recognize whether a photo shows a cat or a dog.
02What I learned along the way
- How a convolutional neural network (CNN) works, the type of network specialized in images
- How a network learns from its mistakes (backpropagation) and adjusts its settings
- Batch training, where the model learns from small groups of images at a time
- The differences between the main families of Machine Learning
03How the model works
- It looks at the image through 3 successive layers, which detect increasingly complex details (edges, then shapes, then ears or a snout)
- During training, the images are slightly modified (rotated, flipped...) so that the model learns to recognize the animal from every angle, instead of memorizing the photos by heart
- Part of the network is randomly switched off at each pass, which forces it not to rely too much on a few details
04The result
Once trained, I tested the model on photos it had never seen. It correctly identifies whether it's a cat or a dog in about 84% of cases, nearly 9 photos out of 10.
The training curves (in blue) and validation curves (in green) progress together, which shows that the model is really learning to recognize the animals, without simply memorizing the photos. Towards the end, the validation loss becomes irregular and stops decreasing, while the training loss keeps going down. This is the beginning of overfitting, which indicates that training longer would bring nothing more.
05The bug that taught me the most
At one point, the model completely stopped learning, and gave the same answer for every photo.
The cause was surprisingly simple. For a computer, each pixel of an image is a number between 0 and 255, representing its brightness. But a neural network learns much better with small numbers, between 0 and 1. I had forgotten this conversion. A single added line of code unblocked everything.
This bug taught me a habit I still keep today, always check your data before questioning the model.
06What I take away from it
This was my first step into Deep Learning, and I wanted to understand it from the inside rather than settle for a ready-made model. Building my network layer by layer forced me to understand every choice, and it's this understanding, much more than the score obtained, that serves me today.
Above all, I learned to read what a model is telling me. A curve that stalls or diverges isn't a failure, it's information, which tells you what to fix next. This way of reasoning, making a hypothesis, testing it, observing and adjusting, has become my working method on all my AI projects.
This project also showed me how much I still had to discover. With more data or a pre-trained model, the result could go much further, and that's exactly what I plan to explore during my Master's degree, especially in computer vision.
07Tech stack
Python and TensorFlow, developed in Jupyter notebooks in VS Code. A network with 3 convolutional layers, with data augmentation and dropout.