Computer Vision Lab Lessons Notable CNN architectures

Notable CNN architectures

From LeNet and AlexNet to VGG and ResNet: what each architecture added.

Intermediate35 minConvolutional neural networksImage classification

This content was prepared automatically from documented sources and its human scientific review is not yet complete. If you find an error, let us know.

Introduction

The history of architectures is a history of solutions to specific problems: depth, gradients and efficiency.

Learning objectives

  • Get to know LeNet, AlexNet, VGG and ResNet.
  • Understand the degradation problem with depth.
  • Understand residual connections.

Prerequisites

CNN structure.

Scientific explanation

LeNet (1998) proved the idea on digits. AlexNet (2012) used ReLU, dropout and GPUs and won ImageNet. VGG showed the power of stacking 3×3 kernels deeply. ResNet solved the difficulty of training very deep networks with residual connections y = F(x) + x, which let the gradient flow through.

In-depth explanation

A short timeline

YearArchitectureKey idea
1998LeNet-5Convolution + subsampling + shared weights
2012AlexNetReLU, Dropout, GPU and data augmentation
2014VGGDepth with 3×3 filters only
2014GoogLeNetMulti-branch Inception module and 1×1 to reduce channels
2015ResNetResidual connections: 152 layers
2017DenseNet / ResNeXt / SENetDense connectivity, grouped convolution, channel attention
2017–2019MobileNet / EfficientNetEfficiency: depthwise separable, compound scaling
2020–2022ViT / Swin / ConvNeXtTransformers, and convolutional networks “modernised” with transformer design

Lessons learned

  • Depth matters, but optimisation must be made easier: VGG showed the benefit of depth, and ResNet made it possible with almost no practical limit.
  • 1×1 convolution is a powerful tool: it mixes and reduces channels at a small cost (Inception, the ResNet bottleneck).
  • Normalisation is essential: Batch Normalization made training deep networks stable.
  • Balancing the dimensions: EfficientNet showed that scaling depth, width and resolution together is better than scaling one of them.
  • Training matters as much as the architecture: work such as ConvNeXt retrained old architectures with modern recipes, and they improved a lot.

Comparison in numbers (torchvision)

ModelParametersAcc@1 on ImageNet
AlexNet61.1M56.5%
VGG-16138.4M71.6%
GoogLeNet6.6M69.8%
ResNet-50 (V1)25.6M76.1%
DenseNet-1218.0M74.4%
ConvNeXt-Tiny28.6M82.5%

The numbers come from the torchvision weights pages; note that newer weights for the same architecture (such as ResNet-50 V2 with a new training recipe) reach higher accuracy, so always compare with the same recipe.

How do you choose a backbone today?

  • Limited device or browser: MobileNetV3 or EfficientNet-B0.
  • A solid general baseline: ResNet-50 or ConvNeXt-Tiny.
  • Lots of data or strong pre-training: ViT or Swin, or DINOv2 encoders.
  • Little medical data: a pre-trained model + fine-tuning, with cross-validation.

Review questions

  1. Which problem did ResNet solve exactly?
  2. Why does Inception use 1×1 convolutions before 3×3 and 5×5?
  3. Why is comparing the accuracy of two models from two different papers not enough?

Mathematical equations

A residual block: y = F(x, W) + x.

Practical example

ResNet-18 and ResNet-50 are available in the lab (optional model pack), and you can compare them on the same image.

Implementation steps

  1. Open the model comparison lab.
  2. Choose ResNet-18 and MobileNetV2.
  3. Compare the time and the predictions.

Expected results

The larger model is slower in the browser, and the two models may agree or disagree on a single image.

Common mistakes

Judging an architecture by its accuracy on a single image.

Practical applications

The basis of most modern systems and of transfer learning.

References

  1. Y. LeCun, L. Bottou, Y. Bengio, P. Haffner (1998).Gradient-based learning applied to document recognition. Proceedings of the IEEE 86(11). doi:10.1109/5.726791
  2. A. Krizhevsky, I. Sutskever, G. E. Hinton (2017).ImageNet classification with deep convolutional neural networks. Communications of the ACM 60(6) (NeurIPS 2012). doi:10.1145/3065386
  3. K. Simonyan, A. Zisserman (2014).Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv:1409.1556 (ICLR 2015). doi:10.48550/arXiv.1409.1556
  4. K. He, X. Zhang, S. Ren, J. Sun (2016).Deep Residual Learning for Image Recognition. CVPR 2016. doi:10.1109/CVPR.2016.90

Related algorithms

Try in image classification