Deep Learning In MATLAB - MathWorks

Transcription

Deep Learning in MATLAB:A Brief OverviewBrett Shoelson, PhDPrincipal Application Engineer 2018 The MathWorks, Inc.1

What is can Deep Learning do for us?(An example)2

Example 1: Object recognition using deep learning3

Object recognition using deep learningTraining(GPU)Millions of images from 1000different categoriesPredictionReal-time object recognition usinga webcam connected to a laptop4

WhatLearning?Whatis isMachineDeep Learning?5

Machine Learning vs Deep LearningWe specify the natureof the features we wantto extract and the type of modelwe want to build.Machine Learning6

Machine Learning vs Deep LearningWe need only specifythe architecture of themodel Deep Learning7

Deep learning is a type of machine learning in which a model learns toperform tasks like classification – directly from images, texts, or signals.Deep learning performs end-to-end learning, and is usuallyimplemented using a neural network architecture.Deep learning algorithms also scale with data – traditional machinelearning saturates.8

Why is Deep Learning So Popular Now?AlexNetHumanAccuracySource: ILSVRC Top-5 Error on ImageNet9

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

Pains In Deep LearningExpertiseTime to TrainData11

Example: Vehicle recognition using deep transfer learningCarsTrucksSUVsBig Trucks5 CategoryClassifierVans12

Import the Latest Models for Transfer LearningPretrained Models* AlexNet VGG-16 VGG-19 GoogLeNet Inception-v3 ResNet50 ResNet-101 Inception-resnet-v2 SqueezeNet MobileNet(coming soon)Import Models from Frameworks Caffe Model Importer TensorFlow-Keras Model Importer Onnx - Importer/ Exporter (Coming ffeGoogLeNetIMPORTERPRETRAINEDMODEL* single line of code to access modelResNet-50ResNet-101PRETRAINED MODELPRETRAINED MODELTensorFlowKerasInception-v3IMPORTERMODELS13

Detection and localization using deep learningRegions with Convolutional Neural Network Features (R-CNN)14

What is semantic segmentation?15

Localization using deep learningOriginal ImageROI detectionPixel classification16

Semantic Segmentation NetworkBoatAirplaneOther classes17

Semantic Segmentation Network18

Semantic Segmentation DemoCamVid Dataset1.2.Segmentation and Recognition Using Structure from Motion Point Clouds, ECCV 2008Semantic Object Classes in Video: A High-Definition Ground Truth Database ,Pattern Recognition Letters19

Semantic SegmentationCamVid Dataset1.2.Segmentation and Recognition Using Structure from Motion Point Clouds, ECCV 2008Semantic Object Classes in Video: A High-Definition Ground Truth Database ,Pattern Recognition Letters20

“I love to label andpreprocess my data” Said no engineer, ever.21

Ground truth Labeling“How do I labelmy data?”New App forGround TruthLabelingLabel pixelsand regions forsemanticsegmentationData22

Attributes and SublabelsNEW in23

Types of DatasetsNumericDataTime Series/Text DataML or LSTMLSTM or CNNImageDataCNN24

Analyzing signal data using deep learningSignal Classification using LSTMsSpeech Recognition using CNNs25

Deep learning features overview ClassificationRegressionSemantic segmentationObject detectionScalability– Multiple GPUs– Cluster or cloud – Bayesian optimization PythonMATLAB interfaceLSTM networks– Time series, signals, audio Custom labeling– API for ground-truth labelingautomation– SuperpixelsCustom network layersImport models– Caffe– Keras/TensorFlowData augmentationHyperparameter tuning Data validation– Training and testing26

Prediction Performance: Fast with GPU CoderImages/SecWhy is GPU Coder so fast?– Analyzes and optimizesnetwork architecture– Invested 15 years in codegenerationTensorFlowMATLABMXNetGPU CoderAlexNetResNet-50VGG-16Using CUDA v9and cuDNN v727

Overview of deep learning deployment options“How do I deploymy model?” Create Desktop AppsGPU Coder Run Enterprise SolutionIntroducing:GPU CoderConvert toNVIDIA CUDAcodeDeploy / Share Generate C and C Code Target GPUs Generate C and C Code28

GPU Coder Fills a Gap in Our Deep Learning SolutionTrainingInferenceAccess DataPreprocessSelect NetworkTrainDeployImage rVision29

Deploying to CPUsIntelMKL-DNNLibraryGPUCoderNVIDIATensorRT &cuDNNLibrariesDeep LearningNetworksARMComputeLibrary30

MATLAB products for deep learningRequired products Neural Network ToolboxParallel Computing ToolboxImage Processing ToolboxComputer Vision System ToolboxRecommended products Statistics and Machine LearningToolboxMATLAB CoderGPU CoderAutomated Driving SystemToolbox31

Deep learning features overview ClassificationRegression *Semantic segmentationObject detection *Scalability *– Multiple GPUs– Cluster or cloud – Bayesian optimization PythonMATLAB interface *LSTM networks *– Time series, signals, audio Custom labeling *– API for ground-truth labelingautomation– SuperpixelsCustom network layers *Import models *– Caffe– Keras/TensorFlowData augmentation *Hyperparameter tuning * Data validation *– Training and testing* We can cover in more detail outside this presentation32

Thank you!33

Deep learning inautomated driving 34

Deep Learning Onramp Get started using deep learningmethods to perform image recognition.Free access for everyoneInteractive exercises and short videodemonstrationsWork on real-life image recognitionproblemsTopics include:––––Convolutional neural networksWorking with pre-trained networksTransfer learningEvaluating network performance35

Convolutional Neural Networks (CNN)EdgesShapesObjects36

Regions with Convolutional Neural Network Features (R-CNN) 15 What is semantic segmentation? 16 Original Image ROI detection Pixel classification Localization using deep learning. 17 Semantic Segmentation Network