What is a convolutional neural network?
A convolutional neural network, or CNN, is a neural network built to understand images by scanning them in small patches instead of reading the whole picture at once. Its convolutional layers learn filters that respond to visual patterns: first simple marks such as edges and colour changes, then larger shapes, and finally objects or parts of objects. This layered approach mimics the way the human visual cortex processes what we see, building meaning from small visual signals.
How a convolutional layer reads an image
A digital image is a grid of pixel values. A convolutional layer moves a small filter across that grid and checks how strongly each patch matches the pattern the filter has learned.
You can think of a filter as a detector. One filter might respond when it finds a vertical edge. Another might respond to a curve, a texture, or a colour transition. As the filter moves across the image, it produces a new grid called a feature map. The feature map shows where that pattern appears.
The same filter is reused across the image. That matters because an eye, wheel, letter, or crack can appear in different places. A CNN does not need a separate detector for every position. It learns a pattern once and looks for it everywhere.
From simple patterns to complex objects
CNNs become useful because their layers build on each other. Early layers usually learn small, simple features: edges, corners, blobs of colour, and texture changes. Later layers combine those features into more meaningful shapes. A curve and a dark patch may become part of an eye. A set of edges may become part of a window, a leaf, or a road sign.
By the time information reaches the later parts of the network, the image is no longer treated as raw pixels. It has been turned into a set of learned visual clues. Those clues help the model decide what the image likely contains.
This is why CNNs work well for computer vision. They preserve the spatial structure of an image. Nearby pixels matter because they form local patterns, and local patterns matter because they combine into larger visual ideas.
Pooling, decisions, and training
Many CNNs use pooling layers between convolutional layers. Pooling reduces the size of feature maps while keeping the strongest or most useful signals. This makes the network lighter to process and can help it cope with small changes in position, such as an object shifting slightly within the frame.
After the convolutional and pooling stages, the network passes the learned features into decision-making layers. These layers might classify an image, mark where an object appears, or help separate one region of an image from another. The exact output depends on the task.
A CNN learns through training. It sees labelled examples, makes predictions, compares those predictions with the correct labels, and adjusts its filters to reduce future mistakes. The filters are not hand-written rules. They are learned from patterns in the training data.
Where CNNs are used
CNNs are used in image search, camera features, document reading, quality inspection, satellite imagery, medical image analysis, and many other computer vision tasks. Their strength is that they can learn visual structure directly from images instead of relying only on rules written by people.
They are not a general substitute for human judgement. A CNN can be accurate in one setting and weak in another if the training data, image quality, or task changes. The useful idea is narrower and powerful: scan the image, learn the patterns, combine them into higher-level features, and use those features to make a visual decision.