Nicole M. Fortin Department of Economics and CIFAR University of British Columbia June 2008
Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images....
Transcript of Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images....
![Page 1: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/1.jpg)
Convolutional Neural Networks
Amin MirMohammad Javadi
1
![Page 2: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/2.jpg)
Application
• Image recognition
• Completely dominated the machine vision space
• One of the hottest topics in AI today
• Tricky to understand
2
![Page 3: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/3.jpg)
Why not Regular Neural Nets
• They don't scale well to full images.
• In CIFAR-10
๏ Images of size 32⨉32⨉3 ⟹ 3072 weights per neuron
• Larger images
๏ 200⨉200⨉3 ⟹ 120,000 weights
3
![Page 4: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/4.jpg)
Why not Regular Neural Nets
• Input consists of images
• Neurons in layers arranged in three dimension:
๏ Width, height, depth
4
![Page 5: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/5.jpg)
Why not Regular Neural Nets
5
![Page 6: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/6.jpg)
Historical Overview• CNN’s are inspired by organization of animals visual cortex
• In 1998, Yann LeCun et al. presented first CNN
• Between 10 thousands of images, it gave only 82 case errors
6
![Page 7: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/7.jpg)
ImageNet Challenge
• ImageNet Large Scale Visual Recognition challenge(ILSVRC)
• As of 2016, over ten million of images have been hand-annotated
• Every year error rates fell to a few precent(25%,16% …)
7
![Page 8: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/8.jpg)
ConvNet Architecture• Convolution Layer
• ReLU Layer
• Pooling Layer
• Fully-Connected Layer
• Softmax
8
![Page 9: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/9.jpg)
Convolution Layer• Neurons are not fully-connected
• Compute dot product
9
![Page 10: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/10.jpg)
Convolution Layer
10
![Page 11: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/11.jpg)
Convolution Layer• Several filters
11
![Page 12: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/12.jpg)
Convolution Layer• Weights ⟹ Learnable Filter
12
![Page 13: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/13.jpg)
Convolution Layer• Slide the filter over the width and height
• Like Convolution Operation
• Produces a 2-dimensional activation map
13
![Page 14: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/14.jpg)
Convolution Layer• Example
14
![Page 15: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/15.jpg)
Convolution Layer
15
![Page 16: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/16.jpg)
Convolution Layer
16
![Page 17: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/17.jpg)
ReLU
• Rectified linear unit
• Applies an element-wise activation function
๏ y = max(0, X)
17
![Page 18: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/18.jpg)
Pooling Layer• Performs a downsampling operation
• Progressively reduces the spatial size of activation maps
๏ Shrinks the number of parameters & computation
๏ Control overfitting
• Max pool with filters of size 2 and stride of 2
๏ reduces the spatial extent by half
18
![Page 19: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/19.jpg)
Pooling Layer
19
![Page 20: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/20.jpg)
Fully-Connected Layer• Fully-Connected
• No parameter sharing
• Using ReLU activation function instead of Sigmoid is common
20
![Page 21: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/21.jpg)
Fully-Connected Layer
21
![Page 22: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/22.jpg)
Softmax• Normalized exponential function
• Generalization of the logistic function
22
![Page 23: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/23.jpg)
CNN Architecture• Stack Conv/ReLU
• Periodically use Pool layers
23
![Page 24: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/24.jpg)
CNN in Practice
24
![Page 25: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/25.jpg)
VGGNet• VGGNet (Simonyan and
Zisserman 2014)
• 3⨉3 filters
• zero-padding of 1
• stride of 2
• 2⨉2 MAX POOLING with stride of 2
• 7.3% top five error
25
![Page 26: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/26.jpg)
VGGNet
26
![Page 27: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/27.jpg)
LeNet• 5 x 5 filter with stride of 1
• 2⨉2 MAX POOLING with stride of 2
27
![Page 28: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/28.jpg)
Other Examples
• GoogleNet
• MSRA(Microsoft Research Asia)
• SqueezeNet
• And …
28
![Page 29: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/29.jpg)
Toolbox and frameworks• Caffe
• Tensorflow
• CNTK(Microsoft)
• Theano
• and …
29
![Page 30: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/30.jpg)
Showtime
• http://cs.stanford.edu/people/karpathy/convnetjs/demo/cifar10.html
• http://demo.caffe.berkeleyvision.org/
30
![Page 31: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/31.jpg)
DenseCap• Fei-Fei Li
• Andrej Karpathy
• Justin Johnson
• Dense Captioning
• a Convolutional Network
• a dense localization layer
• Recurrent Neural Network language
31
![Page 32: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/32.jpg)
DenseCap❝We introduce the dense captioning task, which requires a computer vision system to both localize and describe salient regions in images in natural language.❞
32
![Page 33: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/33.jpg)
33
![Page 34: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/34.jpg)
Other Researches and Applications
• FaceApp
• JibJab
• Soccer Activity Recognition
• and …
34
![Page 35: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/35.jpg)
Thanks everyone!
35
![Page 36: Convolutional Neural NetworksWhy not Regular Neural Nets • They don't scale well to full images. • In CIFAR-10 ๏ Images of size 32⨉32⨉3 3072 weights per neuron • Larger](https://reader034.fdocuments.us/reader034/viewer/2022042300/5ecb2e0f135db918ed05c1a4/html5/thumbnails/36.jpg)
Any Question??!!
36