• Non ci sono risultati.

Deep Neural Networks

N/A
N/A
Protected

Academic year: 2021

Condividi "Deep Neural Networks"

Copied!
110
0
0

Testo completo

(1)

Marcello Pelillo

University of Venice, Italy

Artificial Intelligence

a.y. 2018/19

Deep Neural Networks

(2)

The Age of “Deep Learning”

(3)

The Deep Learning “Philosophy”

•  Learn a feature hierarchy all the way from pixels to classifier

•  Each layer extracts features from the output of previous layer

•  Train all layers jointly

(4)

Shallow vs Deep Networks

From. R. E. Turner

Shallow architectures are inefficient at representing deep functions

(5)

Performance Improves with More Data

(6)

Old Idea… Why Now?

1.  We have more data - from Lena to ImageNet.

2.  We have more computing power, GPUs are really good at this.

3.  Last but not least, we have new ideas

(7)

Image Classification

Predict a single label (or a distribution over labels as shown here to indicate our confidence) for a given image. Images are 3-dimensional arrays of integers from 0 to 255, of size Width x Height x 3. The 3 represents the three color channels Red, Green, Blue.

From: A. Karpathy

(8)

Challenges

From: A. Karpathy

(9)

The Data-Driven Approach

An example training set for four visual categories.

In practice we may have thousands of categories and

hundreds of thousands of images for each category. From: A. Karpathy

(10)

Inspiration from Biology

From. R. E. Turner

Biological vision is hierachically organized

(11)

Hierarchy of Visual Areas

From. D. Zoccolan

(12)

The Retina

(13)

The Retina

(14)

Receptive Fields

“The region of the visual field in which light stimuli evoke responses of a given neuron.”

(15)

Cellular Recordings

Kuffler, Hubel, Wiesel,

1953: Discharge patterns and functional

organization of mammalian retina

1959: Receptive fields of single neurones in the cat's striate cortex 1962: Receptive fields, binocular interaction and functional architecture in the cat's visual cortex 1968 ..

(16)

Retinal Ganglion Cell Response

(17)

Beyond the Retina

(18)

Simple Cells

Orientation selectivity: Most V1 neurons are orientation selective meaning that they respond strongly to lines, bars, or edges of a particular orientation (e.g., vertical) but not to the orthogonal orientation (e.g., horizontal).

(19)

Complex Cells

(20)

Hypercomplex Cells (end-stopping)

(21)

Take-Home Message:

Visual System as a Hierarchy of Feature Detectors

(22)

Convolution

(23)

Convolution

(24)

Mean Filters

(25)

Gaussian Filters

(26)

Gaussian Filters

(27)

The Effect of Gaussian Filters

(28)

The Effect of Gaussian Filters

(29)

Kernel Width Affects Scale

(30)

Edge detection

(31)

Edge detection

(32)

Using Convolution for Edge Detection

(33)

A Variety of Image Filters

Laplacian of Gaussians (LoG) (Marr 1982)

(34)

Gabor filters (directional) (Daugman 1985)

A Variety of Image Filters

(35)

From: M. Sebag

A Variety of Image Filters

(36)

From: M. Sebag

Traditional vs Deep Learning Approach

(37)

Convolutional Neural Networks (CNNs)

(LeCun 1998)

(Krizhevsky et al. 2012)

(38)

Fully- vs Locally-Connected Networks

From. M. A. Ranzato

Fully-connected: 400,000 hidden units = 16 billion parameters

Locally-connected: 400,000 hidden units 10 x 10 fields = 40 million parameters Local connections capture local dependencies

(39)

Weight Sharing

We can dramatically reduce the number of parameters by making one reasonable assumption: That if one feature is useful to compute at some spatial position (x1,y1), then it should also be useful to compute at a different position (x2,y2).

(40)
(41)

Using Several Trainable Filters

Normally, several filters are packed together and learnt automatically during training

(42)

Pooling

Max pooling is a way to simplify the network architecture, by downsampling the number of neurons resulting from filtering operations.

(43)

Combining Feature Extraction and Classification

(44)

AlexNet (2012)

•  8 layers total

•  Trained on Imagenet Dataset (1000 categories, 1.2M training images, 150k test images)

(45)

AlexNet Architecture

•  1st layer: 96 kernels (11 x 11 x 3)

•  Normalized, pooled

•  2nd layer: 256 kernels (5 x 5 x 48)

•  Normalized, pooled

•  3rd layer: 384 kernels (3 x 3 x 256)

•  4th layer: 384 kernels (3 x 3 x 192)

•  5th layer: 256 kernels (3 x 3 x 192)

•  Followed by 2 fully connected layers, 4096 neurons each

•  Followed by a 1000-way SoftMax layer

650,000 neurons 60 million parameters

(46)

Training on Multiple GPU’s

(47)

Output Layer:

Softmax

(48)

Rectified Linear Units (ReLU’s)

Problem: Sigmoid activation takes on values in (0,1). Propagating the gradient back to the initial layers, it tends to become 0 (vanishing gradient problem).

From a practical perspective, this slows down the training procedure of the initial layers of the network.

(49)

Rectified Linear Units (ReLU’s)

(50)

Mini-batch Stochastic Gradient Descent

Loop:

1. Sample a batch of data

2. Forward prop it through the graph, get loss 3. Backprop to calculate the gradients

4. Update the parameters using the gradient

(51)

Data Augmentation

The easiest and most common method to reduce overfitting on image data is to artificially enlarge the dataset using label-preserving transformations

AlexNet uses two forms of this data augmentation.

•  The first form consists of generating image translations and horizontal reflections.

•  The second form consists of altering the intensities of the RGB channels in training images.

(52)

Dropout

Set to zero the output of each hidden neuron with probability 0.5.

The neurons which are “dropped out” in this way do not contribute to the forward pass and do not participate in backpropagation.

So every time an input is presented, the neural network samples a different architecture, but all these architectures share weights.

Reduces complex co- adaptations of neurons, since a neuron cannot rely on the presence of particular other neurons.

(53)

ImageNet

(54)

ImageNet Challenges

(55)

ImageNet Challenge 2012

(56)

Revolution of Depth

(57)

A Hierarchy of Features

From: B. Biggio

(58)

Layer 1

Each 3x3 block shows the top 9 patches for one filter

(59)

Layer 2

(60)

Layer 3

(61)

Layer 3

(62)
(63)

•  A well-trained ConvNet is an excellent feature extractor.

•  Chop the network at desired layer and use the output as a feature

representation to train an SVM on some other dataset (Zeiler-Fergus 2013):

•  Improve further by taking a pre-trained ConvNet and re-training it on a different dataset (Fine tuning).

Feature Analysis

(64)
(65)
(66)

FCN for Semantic Segmentation

Long, Shelhamer, Darrell - Fully Convolutional Networks for Semantic Segmentation, CVPR 2015, PAMI 2016

(67)
(68)
(69)
(70)
(71)
(72)
(73)
(74)
(75)
(76)
(77)
(78)
(79)
(80)
(81)
(82)
(83)
(84)

Girshick, Donahue, Darrell, Malik - Rich feature hierarchies for

accurate object detection and

semantic segmentation, CVPR 2014

(85)
(86)
(87)
(88)
(89)
(90)
(91)
(92)
(93)
(94)
(95)
(96)
(97)
(98)

Mask R-CNN

He, Gkioxari, Dollar and Girshick - Mask R-CNN, ICCV 2017 (Marr Prize).

(99)
(100)
(101)

YOLO

Redmon, Divvala, Girshick, Farhadi - You Only Look Once, Real Time

Object Detection, CVPR 2016.

(102)

SSD

Liu, Anguelov, Erhan, Szegedy, Reed, Fu, Berg - SSD: Single Shot Box Detector, ECCV 2016.

(103)

Today deep learning, in its several manifestations, is being applied in a variety of different domains besides computer vision, such as:

•  Speech recognition

•  Optical character recognition

•  Natural language processing

•  Autonomous driving

•  Game playing (e.g., Google’s AlphaGo)

• 

Other Success Stories of Deep Learning

(104)

From Image to Text

(105)

From Image to Video

(106)

From Academy to the Market

(107)

WaveNet can generate speech that reproduces any human voice and sounds more natural than the best text-to- speech systems available, reducing the gap with human performance by more than 50%.

Machines that Talk

(108)

Machines that Listen

(109)

Machines that Translate

(110)

References

•  http://neuralnetworksanddeeplearning.com

•  http://deeplearning.stanford.edu/tutorial/

•  http://www.deeplearningbook.org/

•  http://deeplearning.net/

Platforms:

•  Theano

•  Torch

•  TensorFlow

• 

Riferimenti

Documenti correlati

Analogamente a quanto potrebbe avvenire in un caso rea- le, per supportare le attività di gestione dell’evento, sono so- praggiunte Polizia Locale di Busto Arsizio, Polizia di Stato e

In particular, we produced compound analogues containing: (i) the conserved Q residue at peptide N-terminus (compound P1); (ii) the conserved Q residue at peptide N-terminus plus

Artificial diets in sea urchin culture: Effects of dietary protein level and other additives on egg quality, larval morphometries, and larval survival in the green sea

a PCoA based on Bray-Curtis distances of genus-level relative abundance profiles of samples collected before HSCT from patients who did not develop aGvHD (green), who developed

In questo caso il sistema italiano risulta più semplice ma un apprendente arabofono può commettere degli errori usando anche in italiano le regole della sua

ricorda Romano Lazzeroni, Professore Emerito presso il Di- partimento di Filologia, Letteratura e Linguistica dell’Uni- versità di Pisa, a lungo docente di Glottologia e di Sanscrito,

Figura 2.11 – Valore di σ, adimensionalizzato secondo la massima pressione lineare, sulla lunghezza della retta di inclinazione θ, per vari valori della distanza della posizione

Ha operato per scoprire dimensioni educative inaspettate caratteristiche dei soggetti o dei gruppi, per trovare educazione in luoghi non previsti, dove essa non si fa