IT Vizag
← Computer Vision in Practice

▶ Sign up free for the video, slides & prompts

The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.

Checking…

Computer Vision in Practice · Lesson 4 of 15 · 2 min read · 6 min video

CNNs: from edges to objects

How stacked convolution and pooling layers build up to recognising objects.

📄 Download slides (PDF)· free sign-up

One convolution finds edges. Stack many, and the network builds up from edges to textures, to parts, to whole objects. That stack is a convolutional neural network (CNN).

The building blocks

  • Convolution layer: many filters, each producing a feature map
  • Activation (ReLU): sets negative values to zero, adding the bends that let the network learn complex patterns
  • Pooling: shrinks each feature map, usually keeping the largest value in each 2 × 2 block (max pooling). This makes the network faster and less sensitive to small shifts
  • Fully connected layers at the end: turn the final features into a score for each class

How features build up

  • Early layers: edges and colour blobs
  • Middle layers: textures and simple shapes: stripes, circles, corners
  • Deep layers: object parts: wheels, eyes, windows
  • Final layer: whole objects: "auto-rickshaw", "bus", "bike"

Each layer looks at a bigger area of the original image than the one before, which is called its receptive field.

A small CNN in PyTorch

🔒 Code example: sign up free (above) to unlock it.

Famous architectures

  • ResNet: added skip connections so very deep networks (50–150 layers) could still be trained
  • MobileNet and EfficientNet: designed to be small and fast, ideal for phones
  • ConvNeXt: a modern CNN that competes with transformers

You'll rarely design your own. You'll pick one of these and adapt it, as the transfer learning lesson shows.

Tip: When accuracy is poor, check the data before the architecture. A cleaner dataset beats a fancier network almost every time.

In one line

A CNN stacks convolution, activation and pooling layers so features grow from edges to textures to parts to whole objects, ending in a score for each class.

Saved on this device. Sign in to keep progress everywhere.

Share with a friend