COMPUTER
VISION
Ngô Anh Tuấn - 521H0379
Ngô Mộng Hoàn - 521H0231
TS. Pham Van
Huy
CNN (Convolutional Neural Network)
CNN is an advanced Deep Learning model that enables the construction of
intelligent systems with high accuracy. CNNs are especially effective in object
recognition tasks and play a crucial role in many modern technology
applications.
1. Convolutional Layer
• The core layer of CNNs – performs convolution to
extract features.
• A filter scans across the image to produce a feature
map.
• Stride: the step size of the filter movement.
• Padding: adding zeros to maintain spatial dimensions.
2. ReLU Layer (Activation Function)
• Helps the network learn non-linear
relationships.
• ReLU is widely used due to its
simplicity and effectiveness.
• Other options include:
Tanh, Leaky ReLU, etc.
Sigmoid,
3. Pooling Layer
• Reduces the size of the feature map and
the number of parameters.
• Helps prevent overfitting.
• Common types: Max Pooling and Average
Pooling.
4. Fully Connected Layer
• Connects all
prediction.
learned
features
to
make
a
• Acts like the "brain" of the network, synthesizing
information before decision-making.
Importance of CNNs
CNNs are widely used in:
• Image-based sentiment analysis
• Object detection
• Medical image diagnostics
• Autonomous vehicles
Their ability to automatically learn
from and process unstructured data
makes CNNs a key technology in AI
and computer vision.
Famous CNN Architectures
LeNet – The Classic CNN
• Developed by Yann LeCun (1998)
– one of the first CNNs.
• Structure:
⚬ 2 Convolution + Pooling layers
⚬ 2 Fully Connected layers
⚬ Softmax output
• Optimized for handwritten digit
recognition (MNIST) with ~99%
accuracy.
AlexNet – CNN Revolution (2012)
• Winner of ImageNet 2012, reducing
error to 15.3% (from 26.2%).
• About 60 million parameters,
much larger than LeNet.
• Trained for 5–6 days on two GTX
580 GPUs.
Famous CNN Architectures
VGGNet – Deeper and Simpler (2014)
• Outperformed AlexNet in ILSVRC 2014.
• Two versions: VGG16 and VGG19
(number of layers).
• Key features:
⚬ More depth by stacking multiple
Conv layers before Pooling.
⚬ Uses uniform 3×3 kernels – simple
yet powerful.
⚬ Requires more computation, but
modern GPUs handle it efficiently.
GoogleNet (Inception) – Efficient and
Smart (2014)
• Developed by Google, ILSVRC 2014
winner with 6.7% error (vs VGG’s 7.3%).
• Only 5 million parameters – much
lighter than AlexNet (60 million).
• 12× faster than AlexNet.
Famous CNN Architectures
ResNet – Deep Learning without Fear of
Depth (2015)
• Developed by Microsoft, ILSVRC 2015
winner with 3.57% error.
• Similar to VGG in structure but much
deeper (e.g., 34, 50, 101, 152 layers).
DenseNet – Densely Connected CNN
(2016)
• Designed for object recognition tasks.
• Structure: multiple Dense Blocks
connected by Transition Layers.
• Dense Block: each layer connects to
all previous layers.
• Transition Layer: reduces size after
each dense block.
Difference from ResNet:
• DenseNet has L(L+1)/2 connections vs.
L connections in traditional CNNs →
improves learning efficiency.
The Role of CNNs in Deep Learning
• LeNet: First architecture, pioneer in
image recognition.
• GoogleNet: Inception module, better
performance with fewer parameters.
• AlexNet: Deeper CNN with ReLU and
dropout, revolutionized ImageNet.
• ResNet: Residual connections to solve
vanishing gradients.
• VGGNet: Deeper, smaller
simple but effective design.
• DenseNet: Dense connections improve
accuracy without large parameter
growth.
kernels,
Residual Networks(ResNet)–Deep Learning
• After the first CNN-based architecture (AlexNet) that win the ImageNet 2012
competition.
• This works for less number of layers, but when we increase the number of layers,
there is a common problem in deep learning associated with that called the
Vanishing/Exploding gradient.
In order to solve the
problem of the
vanishing/exploding
gradient.
ResNet architecture
appear.
ResNet Architecture Overview
• Built with stacked Residual Blocks.
• Depth: Variants from 18 to 152
layers.
• Flow: Input → Convolutional Layers
→ Residual Blocks → Fully
Connected → Output.
This architecture introduced the
concept called Residual Blocks.
In this network, use a technique
called skip connections.
The Power of Residual Blocks
• Each block: 2-3 convolutional layers + Skip
Connection.
• Formula: H(x)=F(x)+x
⚬ F(x): Learned function from conv layers.
⚬ x: Original input (identity).
• Benefit: Solves vanishing gradient problem, enables
deep networks.
Bottleneck in ResNet
The bottleneck block has three convolutional layers
instead of the usual two:
• The first 1x1 convolution reduces the number of channels
(called compression).
• The 3x3 convolution does the main processing with fewer
channels.
• The last 1x1 convolution increases the channels back to
the original size (called decompression).
Advantages
✅ Reduces computation and parameters
✅ Enables deeper architectures
✅ Maintains model accuracy
✅ Works well with residual connections to avoid
vanishing gradients
ADVANTAGES
Exploring ResNet Variants
• ResNet-18 & ResNet-34: Basic blocks (2 conv layers), simpler tasks.
• ResNet-50, ResNet-101, ResNet-152: Bottleneck blocks (1x1, 3x3, 1x1),
more efficient.
Thank You!