CV Popular CNN Architectures

An architecture is the blueprint of a neural network: how many layers it has, how they connect, and how big each layer grows. Researchers keep improving blueprints, and each famous design introduced an idea that later models borrowed. Knowing these designs helps you pick the right model for a project.

A Short Timeline

1998        2012        2014          2014         2015        2017         2019
LeNet  -->  AlexNet --> VGG      -->  Inception --> ResNet --> MobileNet --> EfficientNet
digits      deep wins   simple        parallel     skip        light        balanced
            ImageNet    3x3 stacks    filters      links       and fast     scaling

LeNet: The Pioneer

Yann LeCun built LeNet-5 to read handwritten digits on bank checks. The network used a few convolution layers followed by pooling and a small classifier. It proved the basic recipe that every later model follows.

AlexNet: The Breakthrough

AlexNet won the 2012 ImageNet contest by a wide margin and launched the deep learning boom. It trained on graphics processors, used ReLU activations for faster learning, and applied dropout to reduce overfitting.

VGG: Simple and Deep

VGG stacked many small 3x3 filters in place of large ones. Two 3x3 layers see the same area as one 5x5 layer while using fewer parameters. The design is easy to understand, though the models are heavy and slow.

Inception: Many Filters at Once

Inception modules run several filter sizes side by side and join the results. The network chooses useful scales on its own. Small 1x1 convolutions shrink the data first and keep computing costs low.

            Input
     +-----+-----+-----+
     |     |     |     |
   1x1   3x3   5x5   pool
     |     |     |     |
     +-----+-----+-----+
          Join outputs

ResNet: Skip Connections

Very deep networks used to get worse as layers increased, because training signals faded on the way back. ResNet fixed the issue with skip connections. A block adds its input to its output, so information has a shortcut around the layers.

 x ----------------------+
 |                       |
 v                       |
[Conv] -> [ReLU] -> [Conv]
                         |
                         v
                        (+) -> [ReLU] -> output

ResNet won the 2015 contest and made networks with 50, 101, and even 152 layers practical. Today ResNet-50 serves as a standard starting point.

MobileNet: Built for Phones

MobileNet splits a standard convolution into two cheaper steps. A depthwise step filters each channel alone, and a pointwise 1x1 step mixes channels afterward. Think of painting a fence: one worker handles each section, and a supervisor blends the results. The split cuts computing cost by roughly eight to nine times for 3x3 filters.

EfficientNet: Balanced Growth

Older designs grew by adding layers, widening layers, or feeding bigger images. EfficientNet scales depth, width, and image size together using a fixed ratio. The result delivers strong accuracy with fewer parameters.

Choosing an Architecture

Need                              Good Starting Point
--------------------------------  -------------------
Reliable all-round baseline       ResNet-50
Phone or embedded device          MobileNet
Best accuracy per computing cost  EfficientNet
Learning how CNNs work            VGG or LeNet

Loading a Pretrained Model

from torchvision import models

weights = models.ResNet50_Weights.DEFAULT
model = models.resnet50(weights=weights)
model.eval()

preprocess = weights.transforms()

Pretrained weights come from training on ImageNet. Transfer learning adapts them to a new task with far less data.

Key Takeaways

  • Skip connections made very deep networks trainable
  • Small filters and depthwise splits save computing power
  • Bigger models cost more memory and time
  • Match model size to the device and the accuracy target

Practice Exercise

Load ResNet-50 and MobileNet from the same library. Run both on ten photos from your phone. Record the prediction, the confidence score, and the time each model needs per image. Compare the results in a small table. The exercise shows the real trade-off between accuracy and speed.

Model          Top Guess      Confidence    Time per Image
ResNet-50      mountain bike  0.91          slower
MobileNet      mountain bike  0.86          faster

Reading Model Size Numbers

Model cards list parameters and FLOPs. Parameters count the learned numbers inside the network and decide memory use. FLOPs count the math operations for one image and decide speed. ResNet-50 holds about 25 million parameters, while MobileNet holds only a few million. A phone app that must respond in a blink needs a small number in both columns.

Practical Rule

Pick the smallest model that meets the accuracy goal. Larger models cost more electricity, more memory, and more waiting time for every user.