Practical Applications of Deep Learning

Similar documents
System Implementation for SemEval-2017 Task 4 Subtask A Based on Interpolated Deep Neural Networks

A Simple VQA Model with a Few Tricks and Image Features from Bottom-up Attention

Semantic Segmentation with Histological Image Data: Cancer Cell vs. Stroma

Python Machine Learning

Deep search. Enhancing a search bar using machine learning. Ilgün Ilgün & Cedric Reichenbach

Word Segmentation of Off-line Handwritten Documents

Training a Neural Network to Answer 8th Grade Science Questions Steven Hewitt, An Ju, Katherine Stasaski

arxiv: v1 [cs.cv] 10 May 2017

HIERARCHICAL DEEP LEARNING ARCHITECTURE FOR 10K OBJECTS CLASSIFICATION

Lecture 1: Machine Learning Basics

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

arxiv: v1 [cs.lg] 15 Jun 2015

Generative models and adversarial training

Using Deep Convolutional Neural Networks in Monte Carlo Tree Search

Forget catastrophic forgetting: AI that learns after deployment

A Compact DNN: Approaching GoogLeNet-Level Accuracy of Classification and Domain Adaptation

QuickStroke: An Incremental On-line Chinese Handwriting Recognition System

FUZZY EXPERT. Dr. Kasim M. Al-Aubidy. Philadelphia University. Computer Eng. Dept February 2002 University of Damascus-Syria

Human Emotion Recognition From Speech

THE enormous growth of unstructured data, including

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

Circuit Simulators: A Revolutionary E-Learning Platform

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Lip Reading in Profile

Notetaking Directions

A Review: Speech Recognition with Deep Learning Methods

Testing A Moving Target: How Do We Test Machine Learning Systems? Peter Varhol Technology Strategy Research, USA

Speech Emotion Recognition Using Support Vector Machine

ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY DOWNLOAD EBOOK : ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY PDF

arxiv: v4 [cs.cl] 28 Mar 2016

Taxonomy-Regularized Semantic Deep Convolutional Neural Networks

Reducing Features to Improve Bug Prediction

Unsupervised Learning of Word Semantic Embedding using the Deep Structured Semantic Model

arxiv: v2 [cs.ro] 3 Mar 2017

Rule Learning With Negation: Issues Regarding Effectiveness

Autoregressive product of multi-frame predictions can improve the accuracy of hybrid models

Modeling user preferences and norms in context-aware systems

Cultivating DNN Diversity for Large Scale Video Labelling

Calibration of Confidence Measures in Speech Recognition

Android App Development for Beginners

arxiv: v1 [cs.lg] 7 Apr 2015

TRANSFER LEARNING OF WEAKLY LABELLED AUDIO. Aleksandr Diment, Tuomas Virtanen

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

Rule Learning with Negation: Issues Regarding Effectiveness

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Artificial Neural Networks written examination

GRAPHIC DESIGN TECHNOLOGY Associate in Applied Science: 91 Credit Hours

Multisensor Data Fusion: From Algorithms And Architectural Design To Applications (Devices, Circuits, And Systems)

arxiv:submit/ [cs.cv] 2 Aug 2017

Dual-Memory Deep Learning Architectures for Lifelong Learning of Everyday Human Behaviors

A study of speaker adaptation for DNN-based speech synthesis

SARDNET: A Self-Organizing Feature Map for Sequences

Longest Common Subsequence: A Method for Automatic Evaluation of Handwritten Essays

arxiv: v2 [cs.cv] 30 Mar 2017

A Coding System for Dynamic Topic Analysis: A Computer-Mediated Discourse Analysis Technique

Offline Writer Identification Using Convolutional Neural Network Activation Features

(Sub)Gradient Descent

Software Maintenance

Enduring Understandings: Students will understand that

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

Assignment 1: Predicting Amazon Review Ratings

A Case Study: News Classification Based on Term Frequency

INPE São José dos Campos

Connect Communicate Collaborate. Transform your organisation with Promethean s interactive collaboration solutions

Modeling function word errors in DNN-HMM based LVCSR systems

Twitter Sentiment Classification on Sanders Data using Hybrid Approach

ENME 605 Advanced Control Systems, Fall 2015 Department of Mechanical Engineering

On the Combined Behavior of Autonomous Resource Management Agents

AGENDA LEARNING THEORIES LEARNING THEORIES. Advanced Learning Theories 2/22/2016

A Deep Bag-of-Features Model for Music Auto-Tagging

arxiv: v2 [cs.ir] 22 Aug 2016

Knowledge Transfer in Deep Convolutional Neural Nets

Model Ensemble for Click Prediction in Bing Search Ads

PREDICTING SPEECH RECOGNITION CONFIDENCE USING DEEP LEARNING WITH WORD IDENTITY AND SCORE FEATURES

SORT: Second-Order Response Transform for Visual Recognition

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

AUTOMATIC DETECTION OF PROLONGED FRICATIVE PHONEMES WITH THE HIDDEN MARKOV MODELS APPROACH 1. INTRODUCTION

Experiments with SMS Translation and Stochastic Gradient Descent in Spanish Text Author Profiling

Control Tutorials for MATLAB and Simulink

Semi-Supervised GMM and DNN Acoustic Model Training with Multi-system Combination and Confidence Re-calibration

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

The University of Amsterdam s Concept Detection System at ImageCLEF 2011

Create Quiz Questions

Intel-powered Classmate PC. SMART Response* Training Foils. Version 2.0

A Latent Semantic Model with Convolutional-Pooling Structure for Information Retrieval

Learning Methods for Fuzzy Systems

WE GAVE A LAWYER BASIC MATH SKILLS, AND YOU WON T BELIEVE WHAT HAPPENED NEXT

Computer Software Evaluation Form

Predicting Student Attrition in MOOCs using Sentiment Analysis and Neural Networks

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

EVERYTHING DiSC WORKPLACE LEADER S GUIDE

Lip reading: Japanese vowel recognition by tracking temporal changes of lip shape

Exposé for a Master s Thesis

Sample Problems for MATH 5001, University of Georgia

Modeling function word errors in DNN-HMM based LVCSR systems

Evolutive Neural Net Fuzzy Filtering: Basic Description

Custom Program Title. Leader s Guide. Understanding Other Styles. Discovering Your DiSC Style. Building More Effective Relationships

Grade 2: Using a Number Line to Order and Compare Numbers Place Value Horizontal Content Strand

Product Feature-based Ratings foropinionsummarization of E-Commerce Feedback Comments

Pre-AP Geometry Course Syllabus Page 1

Transcription:

Practical Applications of Deep Learning A hands-on MATLAB workshop Pitambar Dayal Abhijit Bhattacharjee Product Marketing Manager Application Engineer The MathWorks, Inc.

Agenda Introduction Exercise : Deep learning in lines of code Deep learning fundamentals Exercises and : Exploring pretrained networks/classifying handwritten digits Transfer learning Exercise : Creating a food classifier Deploying deep neural networks Conclusion

Deep Learning Applications Voice assistants (speech to text) Teaching character to beat video game Automatically coloring black and white images

What is Deep Learning?

What is Deep Learning? Subset of machine learning with automatic feature extraction Learns features and tasks directly from data More Data = better model Machine Learning Deep Learning Deep Learning

DL Applications include image classification, speech recognition, autonomous driving, etc. Detection of cars and road in autonomous driving systems Rain Detection and Removal Iris Recognition.% accuracy. Deep Joint Rain Detection and Removal from a Single Image" Wenhan Yang, Robby T. Tan, Jiashi Feng, Jiaying Liu, Zongming Guo, and Shuicheng Yan. Source: An experimental study of deep convolutional features for iris recognition Signal Processing in Medicine and Biology Symposium (SPMB), IEEE Shervin Minaee ; Amirali Abdolrashidiy ; Yao Wang; An experimental study of deep convolutional features for iris recognition

Deep Learning Models can Surpass Human Accuracy. Human Accuracy Source: ILSVRC Top- Error on ImageNet

Deep Learning Enablers Increased GPU acceleration Labeled public datasets World-class models AlexNet PRETRAINED MODEL ResNet PRETRAINED MODEL VGG-/ PRETRAINED MODEL GoogLeNet PRETRAINED MODEL Caffe MODEL IMPORTER TensorFlow-Keras MODEL IMPORTER

Deep Learning Datatypes Image Signal Numeric Text

Let s try it out! Open: DeepLearningInLines.mlx in folder -DeepLearningInLines

Deep learning is not complicated. It can be easy!

Deep Learning Uses a Neural Network Architecture Input Layer Hidden Layers (n) Output Layer

Thinking about Layers Layers are like blocks Stack on top of each other Replace one block with a different one Each hidden layer processes the information from the previous layer

Thinking about Layers Layers are like blocks Stack on top of each other Replace one block with a different one Each hidden layer processes the information from the previous layer Layers can be ordered in different ways

Convolutional Neural Networks (CNNs) Special layer combinations that make them great for image classification Convolution Layer Max Pooling Layer ReLU Layer

Convolution Layers Search for Patterns These patterns would be common in the number

All patterns are compared to the patterns on a new image. Pattern starts at left corner Perform comparison Slide over one pixel Reach end of image Repeat for next pattern

Convolution Layers Search for Patterns These patterns would be common in the number

Good pattern matching in convolution improves chances that object will classify properly This image would not match well against the patterns for the number zero It would only do very well against this pattern

Max Pooling is a down-sampling operation Shrink large images while preserving important information x filters Stride Length =

Rectified Linear Units Layer (ReLU) Typically converts negative numbers to zero - - - - - -

CNNs typically end with Layers Fully Connected Layer Looks at which high-level features correspond to a specific category Calculates scores for each category (highest score wins) Softmax Layer Turns scores into probabilities. Classification Layer Categorizes image into one of the classes that the network is trained on

Deep Learning Workflow Preprocess Data Repeat these steps until network reaches desired level of accuracy Define Layers Set training options Train the network Test/deploy trained network

Pretrained Networks Researchers created network architecture for classifying hundreds of objects MATLAB makes it easy to import these networks AlexNet, GoogLeNet, ResNet, VGG, Caffe models, TensorFlow-Keras models This is what we did for the peppers example! (AlexNet) AlexNet PRETRAINED MODEL ResNet PRETRAINED MODEL VGG-/ PRETRAINED MODEL GoogLeNet PRETRAINED MODEL Caffe MODEL IMPORTER TensorFlow-Keras MODEL IMPORTER

Import Models from Keras-Tensorflow and Caffe

Questions?

Let s try it out! Exercise: Work_ExploringPretrainedNetworks.mlx in folder -PretrainedModelExercise Exercise: MNIST_HandwritingRecognition.mlx in folder -MNISTExercise

Takeaways Pre-trained networks have a pre-determined layer order that makes them effective for classifying images Typically trained to classify lots of images Different networks yield different results Great starting point, but not consistently accurate We ll fix this later with transfer learning!

Takeaways Deep learning for image classification uses CNNs CNNs can have different combinations of initial layers but usually end with: Fully Connected Layer Softmax Layer Classification Layer Important factors that affect accuracy and training time Network architecture Initial learning rate

Two Approaches for Deep Learning. Train a Deep Neural Network from Scratch. Fine-tune a pre-trained model (transfer learning)

Transfer Learning Workflow Load pretrained network Early layers that learned low-level features (edges, blobs, colors) Last layers that learned task specific features Replace final layers New layers to learn features specific to your data Train network Training images Training options Predict and assess network accuracy Test images Deploy results Probability Boat Plane Car Train Trained Network million images s classes Fewer classes Learn faster s images s classes

Transfer Learning Workflow Step Load pretrained network Early layers learn lowlevel features (edges, blobs, colors) Last layers learn taskspecific features million images s classes

Transfer Learning Workflow Step Replace final layers New layers learn features specific to your data Load pretrained network Early layers that learned low-level features (edges, blobs, colors) Last layers that learned task specific features Fewer classes Learn faster million images s classes

Transfer Learning Workflow Step Train network Training images Training options Load pretrained network Early layers that learned low-level features (edges, blobs, colors) Last layers that learned task specific features Replace final layers New layers to learn features specific to your data s images s classes million images s classes Fewer classes Learn faster

Transfer Learning Workflow Step Predict and assess network accuracy Test images Load pretrained network Early layers that learned low-level features (edges, blobs, colors) Last layers that learned task specific features Replace final layers New layers to learn features specific to your data Train network Training images Training options Trained Network million images s classes Fewer classes Learn faster s images s classes

Transfer Learning Workflow Step Predict Deploy and results assess network accuracy Probability Test images Boat Load pretrained network Early layers that learned low-level features (edges, blobs, colors) Last layers that learned task specific features Replace final layers New layers to learn features specific to your data Train network Trained Network Plane Car Training images Train Training options Predict and assess network accuracy Test images million images s classes Fewer classes Learn faster s images s classes Trained Network

Transfer Learning Workflow Load pretrained network Early layers that learned low-level features (edges, blobs, colors) Last layers that learned task specific features Replace final layers New layers to learn features specific to your data Train network Training images Training options Predict and assess network accuracy Test images Deploy results Probability Boat Plane Car Train Trained Network million images s classes Fewer classes Learn faster s images s classes

Let s try it out! Exercise: Work_SeeFoodTransferLearning.mlx in folder -TransferLearningExercise

Takeaways Transfer Learning Replace last layers with our own layers Efficient way to modify pre-trained models to our needs Use an Image datastore when working with lots of images MATLAB lets you visualize activations in a network

Deep Learning Workflow Extends Beyond Training LABEL AND PREPROCESS DATA DEVELOP PREDICTIVE MODELS INTEGRATE MODELS WITH SYSTEMS Data Augmentation/ Transformation Hardware-Accelerated Training Desktop Apps Labeling Automation Hyperparameter Tuning Enterprise Scale Systems Import Reference Models Network Visualization Embedded Devices and Hardware

Automated Object Detection

Labeling Data Image Labeler App Object Detection Pixel Labeling Ground-truth Labeler App Videos for automated driving applications D Point Cloud Labeling with Semantic Segmentation Labeling Big Images

One Step Left Deployment! Access Data Preprocess Select Network Train Deploy Image Acquisition Image Processing Neural Network Parallel Computing GPU Coder Computer Vision System

GPU Coder Automatically generates CUDA Code from MATLAB Code can be used on NVIDIA GPUs

How fast is GPU Coder? Vision Algorithms compared to C on CPU Fog removal x speedup Frangi filter x speedup Distance transform x speedup Ray tracing x speedup SURF feature extraction x speedup

GPU Coder Demo Deploying our deep network on a GPU Open: GenerateGPUCode.mlx in folder -GPUCoder

Takeaways GPU Coder MATLAB supports entire deep learning workflow Generate code for various targets from MATLAB code GPU Coder+TensorRT fastest for series networks GPU Coder very fast for DAG networks

Deep Learning OnRamp https://matlabacademy.mathworks.com/ Self-paced FREE course Hands-on experience Everything done in the browser

Resources Web Documentation Community File Exchange/GitHub Deep Learning OnRamp https://www.mathworks.com/solutions/deep-learning.html

POP QUIZ Results will be reported to your manager

What is the difference between Machine Learning and Deep Learning? A. Deep learning is machine learning done really far underground. B. I don t know, I didn t pay attention, I actually don t even work here, I just show up to these things. C. Machine learning requires manual feature extraction while deep learning automatically extracts features making it end-to-end learning

What is the difference between Machine Learning and Deep Learning? A. Deep learning is machine learning done really far underground. B. I don t know, I didn t pay attention, I actually don t even work here, I just show up to these things. C. Machine learning requires manual feature extraction while deep learning automatically extracts features making it end-to-end learning

Which of the following is not an application of deep learning? A. Image classification B. Speech recognition C. Automated driving D. Filtering applications like rain removal E. Recognizing people s faces on your phone s photo app F. Building a hotdog/not-hotdog classifier G. None of the above

Which of the following is not an application of deep learning? A. Image classification B. Speech recognition C. Automated driving D. Filtering applications like rain removal E. Recognizing people s faces on your phone s photo app F. Building a hotdog/not-hotdog classifier G. None of the above

Which of the following is NOT a layer in deep networks? A. Fully Connected Layer B. Softmax Layer C. Classification Layer D. Convolution Layer E. ReLu Layer F. MaxPooling Layer G. Banana Layer (classifies all objects as Banana)

Which of the following is NOT a layer in deep networks? A. Fully Connected Layer B. Softmax Layer C. Classification Layer D. Convolution Layer E. ReLu Layer F. MaxPooling Layer G. Banana Layer (classifies all objects as Banana)

What does the Fully Connected Layer do? A. Calculates a score for each category B. Plays a full game of Connect Four C. Saves you % or more on car insurance

What does the Fully Connected Layer do? A. Calculates a score for each category B. Ensures your layered sandwiches stay Fully Connected C. Saves you % or more on car insurance

How do we perform transfer learning? A. Change every other layer of our network to a softmax layer B. Transfer all data from the CPU to the GPU C. Load in a pre-trained network, modify the last few layers, and train it on our data.

How do we perform transfer learning? A. Change every other layer of our network to a softmax layer B. Transfer all data from the CPU to the GPU C. Load in a pre-trained network, modify the last few layers, and train it on our data.

What are three hyperparameters that have a major impact on training time and accuracy? A. Network Architecture B. Mini Batch Size C. Learning Rate D. Flux Capacitor

What are three hyperparameters that have a major impact on training time and accuracy? A. Network Architecture B. Mini Batch Size C. Learning Rate D. Flux Capacitor

What is loss? A. The opposite of a win B. The state or feeling of grief when deprived of someone or something of value C. A measurement of error between predicted labels and actual labels. Loss has an inverse relationship with score, and our goal is to minimize loss. D. All of the above

What is loss? A. The opposite of a win B. The state or feeling of grief when deprived of someone or something of value C. A measurement of error between predicted labels and actual labels. Loss has an inverse relationship with score, and our goal is to minimize loss. D. All of the above

Which of the following statements is false? A. MATLAB makes it easy to import pre-trained models through add-ons and model importers B. MATLAB supports the entire deep learning workflow including labeling, training, and deployment C. MATLAB has visual training plots that allow you to see accuracy and loss during training D. We do a great job of subtly marketing MATLAB s deep learning capabilities

Which of the following statements is false? A. MATLAB makes it easy to import pre-trained models through add-ons and model importers B. MATLAB supports the entire deep learning workflow including labeling, training, and deployment C. MATLAB has visual training plots that allow you to see accuracy and loss during training D. We do a great job of subtly marketing MATLAB s deep learning capabilities

Free Seminar: ADAS and Automated Driving Development Using MATLAB and Simulink

Questions?

Convolution Layer Core building block of a CNN Convolve the filters sliding them across the input, computing the dot product dot W sum dot W Intuition: learn filters that activate when they see some specific feature

Rectified Linear Unit (ReLU) Layer Frequently used in combination with Convolution layers Do not add complexity to the network Most popular choice: f x = max, x, activation is thresholded at

Pooling Layer Perform a downsampling operation across the spatial dimensions Goal: progressively decrease the size of the layers Max pooling and average pooling methods Popular choice: Max pooling with x filters, Stride = Max pooling Average pooling

Convolution - - - - - - - - - - - - - - - - - - - - - -

Convolution - - - - - - - - - - - - - - - - - - - - - - -

- - Convolution - - - - - - - - - - - - - - - - - - - - - - -

- - - - - Convolution - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Convolution - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Convolution

Activation - - - - - - - - - - - - - - - - - - - - - - - - - ReLU - - - - - - - - - - - - - - - - - - - - - - - - -

Activation - - - - - - - - - - - - - - - - - - - - - - - - - ReLU - - - - - - - - - - - - - - - - - - - - - - - - -

Activation - - - - - - - - - - - - - - - - - - - - - - - - - ReLU

Activation - - - - - - - - - - - - - - - - - - - - - - - - - ReLU

Pooling

Pooling

Pooling

Pooling

Pooling