CNN - Convolutional Neural Network
CNN - Convolutional Neural Network
Lecture 6
CNN – Convolutional Neural Network
Images/videos are just matrix with numbers
What do we want to do?
How to categorize images?
• Use features
• Occlusion
• Blocking partially
• Different illumination
• Amount of light/brightness change
• Scale variation/deformation
• Viewpoint variation
How can we use machine to learn features?
Implementation so far
cat dog ……
Convolution
Max Pooling
Can repeat
Fully Connected many
Feedforward network
Convolution times
Max Pooling
Flattened
Max Pooling
1 -1 -1 -1 1 -1
-1 1 -1 Filter 1 -1 1 -1 Filter 2
-1 -1 1 -1 1 -1
3 -1 -3 -1 -1 -1 -1 -1
-3 1 0 -3 -1 -1 -2 1
-3 -3 0 1 -1 -1 -2 1
3 -2 -2 -1 -1 0 -4 3
Why Pooling
• Subsampling pixels will not change the object
bird
bird
Subsampling
New image
1 0 0 0 0 1 but smaller
0 1 0 0 1 0 Conv
0 0 1 1 0 0 3 0
-1 1
1 0 0 0 1 0
0 1 0 0 1 0
0 0 1 0 1 0 Max 30 13
Pooling
2 x 2 image
6 x 6 image
Each filter
is a channel
The whole CNN
3 0
-1 1 Convolution
3 1
0 3
Max Pooling
Can repeat
A new image
many
Convolution times
Smaller than the original
image
The number of channels Max Pooling
Max Pooling
Max Pooling
1
3 0
-1 1 3
3 1 -1
0 3 Flattened
1 Fully Connected
Feedforward network
3
Convolusion representation using volumes
In summary CNN composed of two networks
Training CNN
• Learn weights for convolutional filters and fully connected layers using
backpropagation and the log loss (cross-entropy loss) function
CNN Application: Self driving cars/drones