basics for convolutional neural network...image classification 28 x 28 = [28]2 cu du cu [28] 2[14]...
TRANSCRIPT
![Page 1: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/1.jpg)
Basics for
Convolutional Neural
NetworkCSE 455
Beibin Li
2020-05-26
![Page 2: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/2.jpg)
CNN
![Page 3: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/3.jpg)
Convolution OperationNowadays, we learn kernels from the data.
![Page 4: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/4.jpg)
Learning
● Details:
● https://www.slideshare.net/EdwinEfranJimnezLepe/example-feedforward-backpropagation
● https://medium.com/@2017csm1006/forward-and-backpropagation-in-convolutional-neural-network-4dfa96d7b37e
![Page 5: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/5.jpg)
Pooling
e.g. kernel size = 2, stride = 2 for both
width and height.
The kernel size for pooling can be an
even number.
![Page 6: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/6.jpg)
CNN StructuresImage Classification
![Page 7: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/7.jpg)
Image Classification
28 x 28 = [28]2
CU DU CU
[28]2 [14]2 [14]2
DU CU
[7]2 [7]2
GAP FC
[1]2
Cat
CU
DU GAP
FCConvolutional
Unit
Down-sampling Unit
Fully-connectedOr Linear Layer
Global Avg.Pooling
![Page 8: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/8.jpg)
Convolutional Unit (CU) - VGG
3x3 Conv Layer
3x3 Conv Layer
Image Source (Inception): Szegedy, Christian, et al. "Rethinking theinception architecture for computer vision." CVPR. 2016.
![Page 9: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/9.jpg)
Basic Block in ResNet
3x3 Conv Layer
3x3 Conv Layer
ResNet: He, Kaiming, et al. "Deep residual learningfor image recognition." CVPR. 2016.
• Residual Connection• Element-wise addition of input and output• Improves gradient flow and accuracy• In ResNet-18 and ResNet-34• Still computationally expensive
• Hard to train very deep networks (> 100 layers)
![Page 10: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/10.jpg)
Bottleneck in ResNet
3x3 Depth-Conv Layer
1x1 Conv Layer
• Used in ResNet-50, ResNet-101, ResNet-152, etc...• Computationally Efficient
Influence:• Bottleneck unit with Depth-wise convs
• MobileNetv2• ShuffleNetv2
• MobileNetv2: Sandler, Mark, et al. "Mobilenetv2: Inverted residuals andlinear bottlenecks." CVPR, 2018.
• ShuffleNetv2: Ma, Ningning, et al. "Shufflenet v2: Practical guidelines forefficient cnn architecture design." ECCV, 2018.
1x1 Conv Layer
![Page 11: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/11.jpg)
CNN StructuresSemantic Segmentation
![Page 12: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/12.jpg)
![Page 13: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/13.jpg)
Encoder-Decoder
![Page 14: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/14.jpg)
Encoder-Decoder in Semantic Segmentation
CU DU CU DU CU
UUCUUUCU
CU DU GAPFCConvolutional
UnitDown-sampling
UnitFully-connectedOr Linear Layer
Global Avg.Pooling
UUUp-sampling
Unit
![Page 15: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/15.jpg)
U-Net
CU DU GAPFCConvolutional
UnitDown-sampling
UnitFully-connectedOr Linear Layer
Global Avg.Pooling
UUUp-sampling
Unit
CU DU CU DU CU
UUCUUUCU
![Page 16: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/16.jpg)
Deep Learning Libraries
![Page 17: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/17.jpg)
Homework 6
![Page 18: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/18.jpg)
Homework 6
Convolutional Neural Networks
In PyTorch(Optional Homework)
Due: June/4
![Page 19: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/19.jpg)
Neural Network (Q1)
![Page 20: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/20.jpg)
Convolutional Neural Network (Q2)
Conv
Pool
FC
Cross Entropy
![Page 21: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/21.jpg)
Yellow or Blue?
![Page 22: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/22.jpg)
Color Normalization (Q3)
![Page 23: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/23.jpg)
Deep Convolutional Neural Network (Q4)
![Page 24: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/24.jpg)
Make the Design More Flexible
Input:
[8, 16, 32, "pool"]
![Page 25: Basics for Convolutional Neural Network...Image Classification 28 x 28 = [28]2 CU DU CU [28] 2[14] [14] 2 DU CU [7] [7] 2 GAP FC [1] Cat CU DU GAP Convolutional FC Unit Down-sampling](https://reader036.vdocument.in/reader036/viewer/2022070920/5fb9844326e64b6419327cd9/html5/thumbnails/25.jpg)
Data Augmentation (Q5)
Random Affine Transformation