Skip to main content
EDGE AI · DEEP LEARNING

What Is a Convolutional Neural Network (CNN)?

A convolutional neural network (CNN) is a deep learning model designed for grid-shaped data such as images. Its layers slide small learned filters across the input to pick out edges, textures and shapes, then combine them to classify an image, detect objects or label pixels. CNNs remain the most widely deployed vision models on edge hardware.

01

What a convolutional neural network is

A convolutional neural network, or CNN, is a type of deep neural network built to learn from data arranged in a grid, which in practice usually means images and video frames. Instead of connecting every input pixel to every neuron, a CNN uses small filters that scan across the image and respond wherever a pattern appears. Stacking many of these layers lets the network build up from simple edges to whole objects.

The idea dates back to Yann LeCun’s LeNet-5, published in 1998, which read handwritten digits on cheques. CNNs moved to the centre of AI in 2012 when AlexNet, trained on two NVIDIA GPUs, won the ImageNet classification challenge with a much lower error rate than earlier methods. Since then, CNNs have powered most image classification, object detection and segmentation in production.

In machine learning terms, a CNN is usually trained with supervised learning: it sees thousands of labeled images, compares its predictions with the labels and adjusts its filter weights by backpropagation until the errors fall.

02

How a CNN works, layer by layer

A typical CNN passes an image through a repeating set of layers, then hands the result to a task-specific head. Each layer type has a distinct job.

  • //
    Convolutional layers. Small filters, often 3×3 pixels, slide across the image. Each filter multiplies its weights with the pixels under it and writes the result to a feature map, which shows where that filter’s pattern appears. Stride sets how far the filter moves each step, and padding keeps the edges of the image in play.
  • //
    Activation functions. A non-linear function such as ReLU follows each convolution, so the network can model shapes that are not simple sums of pixels.
  • //
    Pooling layers. Pooling shrinks each feature map, commonly by keeping the maximum value in each small window. This cuts computation and makes the network less sensitive to small shifts in position.
  • //
    Normalization layers. Batch normalization rescales activations during training, which makes deep networks train faster and more reliably.
  • //
    Fully connected or task head. The final layers turn the learned features into an answer: class scores for classification, boxes for detection or a per-pixel map for segmentation.
03

What a CNN learns

The filters are not programmed by hand; they are learned from data. Early layers end up detecting edges, color blobs and simple textures. Middle layers combine these into parts such as corners, wheels or screw heads. Deep layers respond to whole objects or defects. Because the same filter is reused at every position, a CNN needs far fewer weights than a fully connected network and can find a feature wherever it sits in the frame.

That built-in assumption, that nearby pixels belong together and that a pattern means the same thing anywhere in the image, is why CNNs learn well from modest datasets and why they run efficiently on GPUs and AI accelerators.

04

Common CNN architectures

Dozens of CNN designs exist. These are the ones you will meet most often, and many are still used as the backbone inside newer detectors.

Architecture Year Known for Typical use today
LeNet-5 1998 First widely used CNN, digit recognition Teaching and history
AlexNet 2012 Won ImageNet using GPU training Historical benchmark
VGG-16 2014 Deep stacks of 3×3 filters Simple feature extractor
ResNet 2015 Residual skip connections, 18 to 152 layers Classification and detector backbones
U-Net 2015 Encoder-decoder with skip links Segmentation of defects and medical images
YOLO 2016 onwards Single-pass, real-time detection Video object detection at the edge
MobileNet 2017 Depthwise separable convolutions Low-power and embedded devices
EfficientNet 2019 Balanced scaling of depth, width and resolution Accurate classification per watt

Dates are those of the original papers. YOLO has many later versions from different authors, so check the license and export support of the version you choose.

05

CNNs vs vision transformers

Vision transformers (ViT), introduced by Google researchers in 2020, split an image into patches and use self-attention to relate every patch to every other. With very large training sets they can match or beat CNNs, and they are the usual image encoder inside vision language models. CNNs have answered with modernized designs such as ConvNeXt, and many current detectors mix convolution and attention.

For deployed industrial vision, CNNs keep some practical advantages. They tend to need less training data, they quantise well to INT8, and inference tools have optimized them for years. Transformers often need more memory per frame. The right choice depends on the task, the dataset and the hardware, so it is worth benchmarking both on your own images.

06

Running a CNN on edge hardware

Most CNNs are trained in PyTorch or TensorFlow on GPU servers, then exported for deployment, often through the ONNX model format. An inference engine then fuses layers, picks fast kernels and usually converts weights to lower precision. INT8 quantisation typically cuts memory and latency substantially for a small loss in accuracy, which is why it is standard for edge vision.

A single detection CNN on one or two cameras is a good fit for Jetson Orin Nano computers. Multi-camera pipelines move up to Orin NX, AGX Orin or an x86 GPU system, and Hailo AI accelerator systems run quantised CNNs at low power alongside an Intel or Arm processor.

FAQ · 01
How does TensorRT speed up a CNN?
TensorRT is NVIDIA’s inference optimizer and runtime. It takes a trained network, fuses layers, selects the fastest GPU kernels and can run the model in FP16 or INT8, which usually gives much higher frame rates than running the original framework model on the same Jetson or GPU.
Read the full FAQ —
07

Quick answers on CNNs

Convolutional neural networks: common questions

What is CNN in machine learning?

A neural network for images. In machine learning, CNN stands for convolutional neural network: a deep learning model that learns visual features with sliding filters. It has nothing to do with the news channel.

Is a CNN deep learning?

Yes. A CNN is a deep learning model because it stacks many layers, often dozens, each learning features from the output of the one before.

Why are CNNs good for images?

They exploit local patterns. Filters look at small neighbourhoods of pixels and reuse the same weights everywhere, so the network learns efficiently and finds a feature wherever it appears.

What is pooling in a CNN?

Downsampling. A pooling layer shrinks each feature map, usually by keeping the largest value in each small window, which reduces computation and adds tolerance to small shifts.

Is a CNN supervised or unsupervised?

Usually supervised. Most CNNs are trained on labeled images. They can also be pre-trained with self-supervised methods and then fine-tuned on a smaller labeled set.

We supply Jetson, GPU and Hailo-based edge AI computers for CNN inference with the accelerator, camera inputs and operating system image fitted and tested as standard. Tell us your model, input resolution and frame rate, and we will recommend the hardware.