Convolutional Neural Networks

Slides:



Advertisements
Similar presentations
Face Recognition: A Convolutional Neural Network Approach
Advertisements

ImageNet Classification with Deep Convolutional Neural Networks
Lecture 14 – Neural Networks
Aula 5 Alguns Exemplos PMR5406 Redes Neurais e Lógica Fuzzy.
Spatial Pyramid Pooling in Deep Convolutional
Overview of Back Propagation Algorithm
Face Recognition Using Neural Networks Presented By: Hadis Mohseni Leila Taghavi Atefeh Mirsafian.
Convolutional Neural Networks for Image Processing with Applications in Mobile Robotics By, Sruthi Moola.
ECE 6504: Deep Learning for Perception Dhruv Batra Virginia Tech Topics: –(Finish) Backprop –Convolutional Neural Nets.
ShiDianNao: Shifting Vision Processing Closer to the Sensor
Deep Convolutional Nets
CSC321: 2011 Introduction to Neural Networks and Machine Learning Lecture 6: Applying backpropagation to shape recognition Geoffrey Hinton.
Convolutional Neural Network
1 Convolutional neural networks Abin - Roozgard. 2  Introduction  Drawbacks of previous neural networks  Convolutional neural networks  LeNet 5 
Deep Learning Overview Sources: workshop-tutorial-final.pdf
Lecture 3a Analysis of training of NN
Combining Models Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya.
Deep Learning and Its Application to Signal and Image Processing and Analysis Class III - Fall 2016 Tammy Riklin Raviv, Electrical and Computer Engineering.
Convolutional Sequence to Sequence Learning
Demo.
Convolutional Neural Network
ECE 417 Lecture 1: Multimedia Signal Processing
CS 6501: 3D Reconstruction and Understanding Convolutional Neural Networks Connelly Barnes.
Deep Learning Amin Sobhani.
Data Mining, Neural Network and Genetic Programming
Data Mining, Neural Network and Genetic Programming
Computer Science and Engineering, Seoul National University
Convolutional Neural Fabrics by Shreyas Saxena, Jakob Verbeek
COMP24111: Machine Learning and Optimisation
Goodfellow: Chapter 9 Convolutional Networks
ICS 491 Big Data Analytics Fall 2017 Deep Learning
Intelligent Information System Lab
Supervised Training of Deep Networks
Lecture 5 Smaller Network: CNN
Neural Networks 2 CS446 Machine Learning.
Convolution Neural Networks
Training Techniques for Deep Neural Networks
Convolutional Networks
Machine Learning: The Connectionist
Prof. Carolina Ruiz Department of Computer Science
Computer Vision James Hays
Introduction to Neural Networks
Tensorflow in Deep Learning
Deep learning Introduction Classes of Deep Learning Networks
Very Deep Convolutional Networks for Large-Scale Image Recognition
Smart Robots, Drones, IoT
network of simple neuron-like computing elements
Convolutional neural networks Abin - Roozgard.
CSC 578 Neural Networks and Deep Learning
A Proposal Defense On Deep Residual Network For Face Recognition Presented By SAGAR MISHRA MECE
LECTURE 35: Introduction to EEG Processing
Neural Networks Geoff Hulten.
On Convolutional Neural Network
LECTURE 33: Alternative OPTIMIZERS
Forward and Backward Max Pooling
Analysis of Trained CNN (Receptive Field & Weights of Network)
实习生汇报 ——北邮 张安迪.
Neural networks (3) Regularization Autoencoder
Convolution Layer Optimization
Face Recognition: A Convolutional Neural Network Approach
Deep Learning Authors: Yann LeCun, Yoshua Bengio, Geoffrey Hinton
CSC 578 Neural Networks and Deep Learning
Automatic Handwriting Generation
VERY DEEP CONVOLUTIONAL NETWORKS FOR LARGE-SCALE IMAGE RECOGNITION
Image recognition.
Debasis Bhattacharya, JD, DBA University of Hawaii Maui College
Example of training and deployment of deep convolutional neural networks. Example of training and deployment of deep convolutional neural networks. During.
CSC 578 Neural Networks and Deep Learning
Week 7 Presentation Ngoc Ta Aidean Sharghi
Prof. Carolina Ruiz Department of Computer Science
Presentation transcript:

Convolutional Neural Networks ECE408/CS483/CSE408 Fall 2017 Convolutional Neural Networks Carl Pearson pearson@Illinois.edu

Deep Learning in Computer Vision

MLP for an Image Consider a 250 x 250 image Vectorize the 2D image to a 1D vector as input feature Each hidden node would requires 250x250 weights ~ 62,500 How about multiple hidden layer? Bigger image? Too many weights, computational and memory expensive Traditional feature detection in image processing Filters  Convolution kernels Can we use it in neural networks?

Y 2-D Convolution 1 2 3 4 5 2 3 4 5 6 X 3 4 321 6 7 1 2 3 4 5 6 7 4 5 6 7 8 2 3 4 5 6 7 8 5 6 7 8 5 3 4 5 6 7 8 9 4 5 6 7 8 5 6 5 6 7 8 5 6 7 1 4 9 8 5 6 7 8 9 1 2 7 8 9 1 2 3 4 9 16 15 12 W 9 16 25 24 21 1 2 3 2 1 2 3 4 3 2 8 15 24 21 16 3 4 5 4 3 5 12 21 16 5 2 3 4 3 2 1 2 3 2 1

Convolution vs Fully-Connected + + b … W0 W5 W1 w0,0 w1,0 w0,1 … … … … x0,0 x1,0 x0,1 … x0 x5 x1 … … …

Applicability of Convolution Fixed-size inputs Variably-sized inputs Varying observations of the same kind of thing Audio recording of different lengths Image with more/fewer pixels

Example Convolution Inputs Single-channel Multi-channel 1-D Audio waveform Skeleton animation data: 1-D joint angles for each join 2-D Fourier-transformed audio data Convolve frequency axis: invariant to frequency shifts Convolve time axis: invariant to shifts in time Color image data: 2-D data for R,G,B channels 3-D Volumetric data, e.g. medical imaging Color video: 2-D data across 1-D time for R,G,B channels Deeplearningbook.org, ch 9, p 355

LeNet-5:CNN for hand-written digit recognition

Anatomy of a Convolution Layer Input features/channels C=2 inputs (N1 × N2) Convolution Layer M=3 filters (K1 × K2) Implies C × M kernels Output Features/channels M=3 outputs (N1 – K1/2) × (N2 – K2/2) sum contributions

Aside: 2-D Pooling A subsampling layer Sometimes with bias and non-linearity built in Common types: max, average, L2 norm, weighted average Helps make representation invariant to small translations in the input

Why Convolution (1) Sparse interactions Meaningful features in small spatial regions Need fewer parameters (less storage, better statistical characteristics, faster training) Need multiple layers for wide receptive field

Why Convolution (2) Parameter sharing Equivariant Representations Output Channel Parameter sharing Kernel is reused when computing layer output Equivariant Representations If input is translated, output is translated the same way Map of where features appear in input … y0,0 y1,0 y0,1 + + Kernel contribution to output channel w0,0 w1,0 w0,1 … x0,0 x1,0 x0,1 Input channel

Convolution Fully-Connected 2-D Matrix Y = W ⊗ X Kernel smaller than input: smaller receptive field Fewer weights to store and train Fully-Connected Vector Y = W • x + b Maximum receptive field More weights to store and train

Forward Propagation

Example of the Forward Path of a Convolution Layer

Sequential Code: Forward Convolutional Layer void convLayer_forward(int B, int M, int C, int H, int W, int K, float *X, float *W, float *Y) { int H_out = H – K + 1; int W_out = W – K + 1; for (int b = 0; b < B; ++b) // for each image in batch for(int m = 0; m < M; m++) // for each output feature map for(int h = 0; h < H_out; h++) // for each output element for(int w = 0; w < W_out; w++) { Y[b, m, h, w] = 0; for(int c = 0; c < C; c++) // sum over all input feature maps for(int p = 0; p < K; p++) // KxK filter for(int q = 0; q < K; q++) Y[b, m, h, w] += X[b, c, h + p, w + q] * W[m, c, p, q]; }

Sequential Code: Forward Pooling Layer void poolingLayer_forward(int B, int M, int H, int W, int K, float *Y, float *S) { for (int b = 0; b < B; ++b) // for each image in batch for (int m = 0; m < M; ++m) // for each output feature maps for (int x = 0; x < H/K; ++x) // for each output element for (int y = 0; y < W/K; ++y) { S[b, m, x, y] = 0.; for (int p = 0; p < K; ++p) // loop over KxK input samples for (int q = 0; q < K; ++q) S[b, m, h, w] += Y[b, m, K*x + p, K*y + q] /(K*K); } S[b, m, h, w] = sigmoid(S[b, m, h, w] + b[m]) // non-linearity, bias

Backpropagation

Calculating dE/dX void convLayer_backward_dgrad(int B, int M, int C, int H, int W, int K, float *dE_dY, float *W, float *dE_dX) { int H_out = H – K + 1; int W_out = W – K + 1; for (int b = 0; b < B; ++b) { for (int c = 0; c < C; ++c) for (int h = 0; h < H; ++h) for (int w = 0; w < W; ++w) dE_dX[b, c, h, w] = 0;   for (int m = 0; m < M; ++m) for (int h = 0; h < H_out; ++h) for (int w = 0; w < W_out; ++w) for (int p = 0; p < K; ++p) for (int q = 0; q < K; ++q) dE_dX[b, c, h + p, w + q] += dE_dY[b, m, h, w] * W[m, c, p, q]; }

Backpropagation

Calculating dE/dW void convLayer_backward_wgrad(int B, int M, int C, int H, int W, int K, float *dE_dY, float *X, float *dE_dW) { const int H_out = H – K + 1; const int W_out = W – K + 1; for(int m = 0; m < M; ++m) for(int c = 0; c < C; ++c) for(int p = 0; p < K; ++p) for(int q = 0; q < K; ++q) dE_dW[m, c, p, q] = 0; for (int b = 0; b < B; ++b) { for(int m = 0; m < M; ++m) for(int h = 0; h < H_out; ++h) for(int w = 0; w < W_out; ++w) for(int c = 0; c < C; ++c) dE_dW[m, c, p, q] += X[b, c, h + p, w + q] * dE_dY[b, m, c, h, w]; } No batch index: all images in batch contribute to dE_dW update