wAIpoint
Italiano

Convolutional networks

Level: Intermediate

What it is

A convolutional neural network (CNN) is a network built for images and other grid-like data. It slides small filters over the image to detect simple patterns such as edges, then combines them layer after layer into more complex ones such as eyes or wheels.

What it is for

Classifying photos, detecting objects, reading handwriting, analysing medical images, and acting as the vision part of larger systems. A pre-trained CNN can be reused on your own images even when you have little data.

How to do it

The process, step by step. Libraries and tools change; these steps stay.

  1. Collect labelled images (for example one folder per class) and resize them all to the same size.
  2. Start from a pre-trained CNN, such as a ResNet, instead of training from scratch.
  3. Replace its last layer with one that has your number of classes.
  4. Train (fine-tune) on your images, adding random flips and crops (augmentation) so it does not just memorise them.
  5. Evaluate on images it has never seen and study the mistakes: they usually show what is missing in the data.

Timeline

  1. 1998Gradient-based learning applied to document recognition (LeCun, Bottou, Bengio, Haffner). source
  2. 2015ResNet: residual learning makes much deeper networks easier to train (He et al.). source

Sources