23
Lecture 10.3 Introduction to deep learning (CNN) Idar Dyrdal

Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

  • Upload
    others

  • View
    23

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Lecture 10.3 Introduction to deep learning (CNN)

Idar Dyrdal

Page 2: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Deep Learning

• Computational models composed of multiple processing layers (non-linear transformations)

• Used to learn representations of data with multiple levels of abstraction: • Learning a hierarchy of feature extractors • Each level in the hierarchy extracts features from the output

of the previous layer (pixels —> classes) • Deep learning has dramatically improved state-of-the-art in:

• Speech and character recognition • Visual object detection and recognition

• Convolutional neural nets for processing of images, video, speech and signals (time series) in general

• Recurrent neural nets for processing of sequential data (speech, text).

2

Level 3

Level 2

Level 1

Raw data (images, video, signals)

Labels

Page 3: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Deep Learning for Object Recognition

«Ship»

Millions of images Millions of parameters Thousands of classes

(AlexNet)

Page 4: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Traditional supervised learning

4

Training images

Feature extraction

Classifier training Classifier

Class labels

Page 5: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Deep learning

5

Training images

Feature extraction

Classifier training Classifier

Class labels

• Learning of weights in the processing layers

• Supervised, unsupervised (or semi-supervised) learning

Page 6: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Semi-supervised learning

6

Labeled samples and (trained) linear decision boundary

Labeled and unlabeled samples and non- linear decision boundary

Page 7: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Artificial Neural Network (ANN) Used in Machine Learning and Pattern Recognition:

• Regression • Classification • Clustering • …

Applications:

• Speech recognition • Recognition of handwritten text • Image classification • …

Network types:

• Feed-forward neural networks • Recurrent neural networks (RNN) • …

7

Feed-forward ANN (non-linear classifier)

Page 8: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Mark 1 Perceptron (Rosenblatt, 1957-59)

8

Cornell Aeronautical Laboratory

Page 9: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Activation functions

Sigmoid (logistic function): Hyperbolic tangent: Rectified linear unit (ReLU):

9

(Quasar Jarosz, English Wikipedia)

Biological neuron:

Page 10: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Feed-forward neural network

10

i

j

k

l

Page 11: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Back-propagation

11

i

j

k

l

Page 12: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional Neural Network (CNN)

Used in Signal and Image Analysis: • Speech Recognition • Image Recognition • Video Recognition • Image Segmentation • …

Convolutional neural network: • Multi-layer feed-forward ANN • Combinations of convolutional and fully connected layers • Convolutional layers with local connectivity • Shared weights across spatial positions • Local or global pooling layers

12

(A. Karpathy)

Page 13: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Typical CNN

13

(Aphex34)

Learned features

Page 14: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional neural net

14

Convolution (learned)

Input image

Feature map

Non-linearity

Spatial pooling

Normalisation

Input image

credit: S. Lazebnik

Page 15: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional neural net

15

Convolution (learned)

Input image

Feature map

Non-linearity

Spatial pooling

Normalisation

Input Feature Map

.

.

.

credit: S. Lazebnik

Page 16: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional neural net

16

Convolution (learned)

Input image

Feature map

Non-linearity

Spatial pooling

Normalisation Rectified Linear Unit (ReLU)

credit: S. Lazebnik

Page 17: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional neural net

17

Convolution (learned)

Input image

Feature map

Non-linearity

Spatial pooling

Normalisation Max pooling

credit: S. Lazebnik

Max-pooling: a non-linear down-sampling Provide translation invariance

Page 18: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional neural net

18

Convolution (learned)

Input image

Feature map

Non-linearity

Spatial pooling

Normalisation

Feature Maps Feature Maps After Contrast Normalization

credit: S. Lazebnik

Page 19: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Convolutional neural net

19

Convolution (learned)

Input image

Feature map

Non-linearity

Spatial pooling

Normalisation

Feature maps after contrast normalization

credit: S. Lazebnik

Page 20: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Example - Caffe Demos

20

Page 21: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

21

Page 22: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

22

Page 23: Lecture 10.3 Introduction to deep learning (CNN) · Introduction to deep learning (CNN) Idar Dyrdal . Deep Learning • Computational models composed of multiple processing layers

Summary

Topics covered: • Deep learning • Artificial neural networks • Convolutional neural networks.

Further reading: • Szeliski, chapter 14 • Yann LeCun ,Yoshua Bengio & Geoffrey Hinton, “Deep learning”, Nature, Vol 521, 28. May

2015.

Software: • Caffe • MatConvNet (Matlab) • …

23