SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
1© 2017 The MathWorks, Inc.
Developing and Deploying Deep Learning Based
Computer Vision Systems
Alka Nair
Application Engineer
2
Alexnet Vehicle Detection
People detection
Lane detection
~30 Fps
(Tegra X1)
~66 Fps
(Tegra X1)
~20 Fps
(K40c)
~130 Fps
(K40c)
3
Deep Learning Applications in Computer Vision
HIGHWAY_SCENE
Classification
Semantic SegmentationRain Detection and Removal
Human Aware Navigation for Robots
4
Lane Detection on a Tesla K40 GPU
5
End-to-End Application: Lane Detection
Transfer Learning
AlexNet – 1000 class classification
Lane detection
CNN
Post-processing
(find left/right lane
points)
Image
Parabolic lane
coefficients in
world coordinates
Left lane co-efficients
Right lane co-efficients
Output of CNN is lane parabola coefficients according to: y = ax^2 + bx + c
MATLAB : A SINGLE PLATFORM FOR DEEP LEARNING TRAINING & DEPLOYMENT
6
Deep Learning Challenges
Big Data
▪ Handling large amounts of data
▪ Labeling thousands of images & videos
Training and Testing Deep Neural Networks
▪ Accessing reference models from research
▪ Understanding network behavior
▪ Tuning hyperparameters and refining architectures
▪ Training takes hours-days
Seamless Deployment onto embedded hardware
Real world systems use more than deep
learning
Deep learning frameworks do not
include “classical” computer vision
Not a deep learning expert
7
Access Large Sets of Images
Handle Large Sets of Images
Easily manage large sets of images
- Single line of code to access images
- Operates on disk, database, big-data file system
imageData =
imageDataStore(‘vehicles’)
Easily manage large sets of images
- Single line of code to access images
- Operates on disk, database, big-data file
system
Organize Images in Folders
(~ 10,000 images , 5 folders)
8
Handle big image collection without big changes
Images in local directory
Images on HDFS
9
Accelerating Ground Truth Labeling
10
Generate Training Data from Labeled Images
Labeled Lane Boundaries in
Image Coordinates
Correspond to coefficients of parabola representing left and right lane (a,b,c).
Ground Truth Exported from
Ground Truth Labeler App
Parabolic Lane Boundary
Modeling
>> findparabolicLaneBoundaries
Lane Boundary Models
in World Coordinates
11
End-to-End Application: Lane Detection
Transfer Learning
AlexNet – 1000 class classification
Lane detection
CNN
Post-processing
(find left/right lane
points)
Image
Parabolic lane
coefficients in
vehicle coordinates
Left lane co-efficients
Right lane co-efficients
Output of CNN is lane parabola coefficients according to: y = ax^2 + bx + c
MATLAB : A SINGLE PLATFORM FOR DEEP LEARNING TRAINING & DEPLOYMENT
12
Deep Learning Challenges
Big Data
▪ Handling large amounts of data
▪ Labeling thousands of images & videos
Training and Testing Deep Neural Networks
▪ Accessing reference models from research
▪ Understanding network behavior
▪ Tuning hyperparameters and refining architectures
▪ Training takes hours-days
Seamless Deployment onto embedded hardware
Real world systems use more than deep
learning
Deep learning frameworks do not
include “classical” computer vision
Not a deep learning expert
13
Transfer Learning Workflow
Early layers Last layers
1 million images
1000s classes
Load pretrained network
Fewer classes
Learn faster
New layers
Replace final layers
100s images
10s classes
Training options
Train network
Trained
Network
Predict and assess
network accuracy
14
Import Pre-Trained Models and Network Architectures
Pretrained Models
▪ AlexNet
▪ VGG-16
▪ VGG-19
▪ GoogLeNet
▪ Resnet50
▪ InceptionV3
▪ ResNet - 101
Import Models from Frameworks
▪ Caffe Model Importer
(including Caffe Model Zoo)
– importCaffeLayers
– importCaffeNetwork
▪ TensorFlow-Keras Model Importer
– importKerasLayers
– importKerasNetwork
Download from within MATLAB
net = alexnet;
net = vgg16;
net = vgg19;
net = googlenet;
net = resnet50;
net = inceptionv3;
net = resnet101;
15
Visualizations for Understanding Network Behavior
▪ Custom visualizations
– Example: Class Activation Maps
Filters
…
Activations
Deep Dream
http://cnnlocalization.csail.mit.edu/Zhou_Learning_Deep_Features_CVPR_2016_paper.pdf
16
Augment Training Images
imageAugmenter = imageDataAugmenter('RandRotation',[-180 180])
Rotation
Reflection
Scaling
Shearing
Translation
Colour pre-processing
Resize / Random crop / Centre crop
17
Transfer Learning Workflow
Early layers Last layers
1 million images
1000s classes
Load pretrained network
Fewer classes
Learn faster
New layers
Replace final layers
100s images
10s classes
Training options
Train network
Trained
Network
Predict and assess
network accuracy
18
Transfer Learning Workflow
Early layers Last layers
1 million images
1000s classes
Load pretrained network
Fewer classes
Learn faster
New layers
Replace final layers
100s images
10s classes
Training options
Train network
Trained
Network
Predict and assess
network accuracy
19
Transfer Learning Workflow
Early layers Last layers
1 million images
1000s classes
Load pretrained network
Fewer classes
Learn faster
New layers
Replace final layers
100s images
10s classes
Training options
Train network
Trained
Network
Predict and assess
network accuracy
20
Training Deep Neural Networks
trainingOptions
▪ Plot training metrics
– Training accuracy, smoothed training
accuracy, validation accuracy
– Training loss, smoothed training loss,
and validation loss
▪ Debug training
– Stop and check current state
– Save / load checkpoint networks
– Custom output function (stopping
condition, visualization, etc.)
▪ Bayesian optimization for
hyperparameter tuning Learn More
21
Transfer Learning Workflow
Early layers Last layers
1 million images
1000s classes
Load pretrained network
Fewer classes
Learn faster
New layers
Replace final layers
100s images
10s classes
Training options
Train network
Trained
Network
Predict and assess
network accuracy
MATLAB Provides Evaluation Frameworks for Different Classes of Deep Learning Problems
22
Lane Detection
23
Deep learning on CPU, GPU, multi-GPU and clusters
Single CPU Single CPU
Single GPU
Single CPU
Multiple GPUs
On-prem server with
GPUs
Cloud GPUs
(AWS, Azure, etc.)
Deep Learning on
Cloud Whitepaper
24
Training in MATLAB is fast
MATLAB is more than 4x
faster than TensorFlow
AlexNet CNN architecture trained on the ImageNet dataset, using batch size of 32, on a Windows 10 desktop with single
NVIDIA GPU (Titan Xp). TensorFlow version 1.2.0.
25
Deep Learning Challenges
Big Data
▪ Handling large amounts of data
▪ Labeling thousands of images & videos
Training and Testing Deep Neural Networks
▪ Accessing reference models from research
▪ Understanding network behavior
▪ Tuning hyperparameters and refining architectures
▪ Training takes hours-days
Seamless Deployment onto embedded hardware
Real world systems use more than deep
learning
Deep learning frameworks do not
include “classical” computer vision
Not a deep learning expert
26
Algorithm Design to Embedded Deployment Workflow
Conventional Approach
Desktop GPU
High-level language
Deep learning framework
Large, complex software stack
1
Desktop GPU
C++
C/C++
Low-level APIs
Application-specific libraries
2
C++
Embedded GPU
C/C++
Target-optimized libraries
Optimize for memory & speed
3
Challenges
• Integrating multiple libraries and
packages
• Verifying and maintaining multiple
implementations
• Algorithm & vendor lock-in
27
GPU Coder for Deployment: New Product in R2017b
Neural Networks
Deep Learning, machine learning
Image Processing and
Computer Vision
Image filtering, feature detection/extraction
Signal Processing and
Communications
FFT, filtering, cross correlation,
7x faster than state-of-art 700x faster than CPUs
for feature extraction
20x faster than
CPUs for FFTs
GPU Coder
Accelerated implementation of
parallel algorithms on GPUs
28
Algorithm Design to Embedded Deployment Workflow
with GPU Coder
MATLAB algorithm
(functional reference)
Functional test1 Deployment
unit-test
2
Desktop
GPU
C++
Deployment
integration-test
3
Desktop
GPU
C++
Real-time test4
Embedded GPU
.mex .lib Cross-compiled
.lib
Build type
Call CUDA
from MATLAB
directly
Call CUDA from
(C++) hand-
coded main()
Call CUDA from (C++)
hand-coded main().
29
CUDA Code Generation from GPU Coder
30
31
End-to-End Application: Lane Detection
Transfer Learning
AlexNet – 1000 class classification
Lane detection
CNN
Post-processing
(find left/right lane
points)
Image
Parabolic lane
coefficients in
world coordinates
Left lane co-efficients
Right lane co-efficients
Output of CNN is lane parabola coefficients according to: y = ax^2 + bx + c
MATLAB : A SINGLE PLATFORM FOR DEEP LEARNING TRAINING & DEPLOYMENT
https://tinyurl.com/ybaxnxjg
32
Alexnet Inference on Intel CPUs
MATLAB
(R2017b Release 2)
TensorFlow
MXNet
Caffe2
33
Alexnet Inference on NVIDIA Titan Xp
MATLAB GPU Coder
(R2017b)
TensorFlow (1.2.0)
Caffe2 (0.8.1)
Framespersecond
Batch Size
CPU Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
GPU Pascal Titan Xp
cuDNN v5
Testing platform
MXNet (0.10)
MATLAB (R2017b)
2x 7x5x
34
Alexnet inference on NVIDIA GPUs
0
1
2
3
4
5
6
7
8
9 CPU resident memory
GPU peak memory (nvidia-smi)
Memoryusage(GB)
Batch Size1 16 32 64
CPU Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50 GHz
GPU Tesla K40c
Py-Caffe
GPUCoder
TensorFlow
MATLABw/PCT
C++-Caffe
35
Design Deep Neural Networks in MATLAB and Deploy with GPU
Coder
Design Deep Learning &
Vision Algorithms
Highlights
▪ Manage large image sets
▪ Easy access to models like AlexNet, GoogleNet
▪ Pre-built training frameworks
▪ Automate ground truth labeling apps
Highlights
▪ Automate optimized CUDA code
generation with GPU Coder
▪ Deployed models upto 4.5x faster
than Caffe2 and 7x faster than
Tensor
High Performance Deployment
36
Deep Learning Onramp
Free Introductory Course
Available Here
37
Visit MathWorks Booth to Learn More
HIGHWAY_SCENE
Classification
Car Car CarDetection
Lane Lane
Regression
Semantic
Segmentation

Weitere ähnliche Inhalte

Was ist angesagt?

Continuous integration
Continuous integrationContinuous integration
Continuous integration
Lior Tal
 
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
Ching-Hwa Yu
 
Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012
Sri Kanth
 

Was ist angesagt? (20)

Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
 
ONAP on Vagrant
ONAP on VagrantONAP on Vagrant
ONAP on Vagrant
 
Architecture Sustaining LINE Sticker services
Architecture Sustaining LINE Sticker servicesArchitecture Sustaining LINE Sticker services
Architecture Sustaining LINE Sticker services
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 
Javantura v4 - FreeMarker in Spring web - Marin Kalapać
Javantura v4 - FreeMarker in Spring web - Marin KalapaćJavantura v4 - FreeMarker in Spring web - Marin Kalapać
Javantura v4 - FreeMarker in Spring web - Marin Kalapać
 
Reactive programming intro
Reactive programming introReactive programming intro
Reactive programming intro
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Sigmoid akka stream
Sigmoid akka streamSigmoid akka stream
Sigmoid akka stream
 
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
 
Will ServerLess kill containers and Operations
Will ServerLess kill containers and OperationsWill ServerLess kill containers and Operations
Will ServerLess kill containers and Operations
 
How to deploy your Apps in serverless-way using App Engine.pptx
How to deploy your Apps in serverless-way using App Engine.pptxHow to deploy your Apps in serverless-way using App Engine.pptx
How to deploy your Apps in serverless-way using App Engine.pptx
 
Neuro4j Workflow Overview
Neuro4j Workflow OverviewNeuro4j Workflow Overview
Neuro4j Workflow Overview
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
 
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
 
Automatic Forecasting using Prophet, Databricks, Delta Lake and MLflow
Automatic Forecasting using Prophet, Databricks, Delta Lake and MLflowAutomatic Forecasting using Prophet, Databricks, Delta Lake and MLflow
Automatic Forecasting using Prophet, Databricks, Delta Lake and MLflow
 
4. introduction to Asp.Net MVC - Part II
4. introduction to Asp.Net MVC - Part II4. introduction to Asp.Net MVC - Part II
4. introduction to Asp.Net MVC - Part II
 
Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012
 
A SOA approximation on symfony
A SOA approximation on symfonyA SOA approximation on symfony
A SOA approximation on symfony
 
Reactive programming with rx java
Reactive programming with rx javaReactive programming with rx java
Reactive programming with rx java
 

Ähnlich wie Developing and Deploying Deep Learning Based Computer Vision Systems - Alka Nair - MathWorks

Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
PyData
 
Marek Suplata Projects
Marek Suplata ProjectsMarek Suplata Projects
Marek Suplata Projects
guest14f12f
 
Computer Vision for Beginners
Computer Vision for BeginnersComputer Vision for Beginners
Computer Vision for Beginners
Sanghamitra Deb
 
OpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation finalOpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation final
Junli Gu
 
Deep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesDeep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep Features
Turi, Inc.
 
"Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ...
"Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ..."Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ...
"Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ...
Edge AI and Vision Alliance
 

Ähnlich wie Developing and Deploying Deep Learning Based Computer Vision Systems - Alka Nair - MathWorks (20)

Deep-learning-for-computer-vision-applications-using-matlab.pdf
Deep-learning-for-computer-vision-applications-using-matlab.pdfDeep-learning-for-computer-vision-applications-using-matlab.pdf
Deep-learning-for-computer-vision-applications-using-matlab.pdf
 
Biomedical Signal and Image Analytics using MATLAB
Biomedical Signal and Image Analytics using MATLABBiomedical Signal and Image Analytics using MATLAB
Biomedical Signal and Image Analytics using MATLAB
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
 
Introduction to computer vision
Introduction to computer visionIntroduction to computer vision
Introduction to computer vision
 
Introduction to computer vision with Convoluted Neural Networks
Introduction to computer vision with Convoluted Neural NetworksIntroduction to computer vision with Convoluted Neural Networks
Introduction to computer vision with Convoluted Neural Networks
 
Marek Suplata Projects
Marek Suplata ProjectsMarek Suplata Projects
Marek Suplata Projects
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用
 
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
Deep learning and streaming in Apache Spark 2.2 by Matei ZahariaDeep learning and streaming in Apache Spark 2.2 by Matei Zaharia
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
 
Computer Vision for Beginners
Computer Vision for BeginnersComputer Vision for Beginners
Computer Vision for Beginners
 
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI ProjectsDiscovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
 
Introducing Deep learning with Matlab
Introducing Deep learning with MatlabIntroducing Deep learning with Matlab
Introducing Deep learning with Matlab
 
OpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation finalOpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation final
 
Gömülü Sistemlerde Derin Öğrenme Uygulamaları
Gömülü Sistemlerde Derin Öğrenme UygulamalarıGömülü Sistemlerde Derin Öğrenme Uygulamaları
Gömülü Sistemlerde Derin Öğrenme Uygulamaları
 
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
 
Convolutional Neural Network for pixel-wise skyline detection
Convolutional Neural Network for pixel-wise skyline detectionConvolutional Neural Network for pixel-wise skyline detection
Convolutional Neural Network for pixel-wise skyline detection
 
Deep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesDeep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep Features
 
On-the-fly Visual Category Search in Web-scale Image Collections
On-the-fly Visual Category Search in Web-scale Image CollectionsOn-the-fly Visual Category Search in Web-scale Image Collections
On-the-fly Visual Category Search in Web-scale Image Collections
 
"Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ...
"Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ..."Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ...
"Deep Learning and Vision Algorithm Development in MATLAB Targeting Embedded ...
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNet
 

Mehr von CodeOps Technologies LLP

Mehr von CodeOps Technologies LLP (20)

AWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupAWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetup
 
Understanding azure batch service
Understanding azure batch serviceUnderstanding azure batch service
Understanding azure batch service
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
 
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONSSERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
 
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSBUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
 
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESAPPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
 
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaTraining And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
 
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
 
YAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareYAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra Khare
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
 
Jet brains space intro presentation
Jet brains space intro presentationJet brains space intro presentation
Jet brains space intro presentation
 
Functional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsFunctional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and Streams
 
Distributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationDistributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps Foundation
 
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire  "Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Developing and Deploying Deep Learning Based Computer Vision Systems - Alka Nair - MathWorks

  • 1. 1© 2017 The MathWorks, Inc. Developing and Deploying Deep Learning Based Computer Vision Systems Alka Nair Application Engineer
  • 2. 2 Alexnet Vehicle Detection People detection Lane detection ~30 Fps (Tegra X1) ~66 Fps (Tegra X1) ~20 Fps (K40c) ~130 Fps (K40c)
  • 3. 3 Deep Learning Applications in Computer Vision HIGHWAY_SCENE Classification Semantic SegmentationRain Detection and Removal Human Aware Navigation for Robots
  • 4. 4 Lane Detection on a Tesla K40 GPU
  • 5. 5 End-to-End Application: Lane Detection Transfer Learning AlexNet – 1000 class classification Lane detection CNN Post-processing (find left/right lane points) Image Parabolic lane coefficients in world coordinates Left lane co-efficients Right lane co-efficients Output of CNN is lane parabola coefficients according to: y = ax^2 + bx + c MATLAB : A SINGLE PLATFORM FOR DEEP LEARNING TRAINING & DEPLOYMENT
  • 6. 6 Deep Learning Challenges Big Data ▪ Handling large amounts of data ▪ Labeling thousands of images & videos Training and Testing Deep Neural Networks ▪ Accessing reference models from research ▪ Understanding network behavior ▪ Tuning hyperparameters and refining architectures ▪ Training takes hours-days Seamless Deployment onto embedded hardware Real world systems use more than deep learning Deep learning frameworks do not include “classical” computer vision Not a deep learning expert
  • 7. 7 Access Large Sets of Images Handle Large Sets of Images Easily manage large sets of images - Single line of code to access images - Operates on disk, database, big-data file system imageData = imageDataStore(‘vehicles’) Easily manage large sets of images - Single line of code to access images - Operates on disk, database, big-data file system Organize Images in Folders (~ 10,000 images , 5 folders)
  • 8. 8 Handle big image collection without big changes Images in local directory Images on HDFS
  • 10. 10 Generate Training Data from Labeled Images Labeled Lane Boundaries in Image Coordinates Correspond to coefficients of parabola representing left and right lane (a,b,c). Ground Truth Exported from Ground Truth Labeler App Parabolic Lane Boundary Modeling >> findparabolicLaneBoundaries Lane Boundary Models in World Coordinates
  • 11. 11 End-to-End Application: Lane Detection Transfer Learning AlexNet – 1000 class classification Lane detection CNN Post-processing (find left/right lane points) Image Parabolic lane coefficients in vehicle coordinates Left lane co-efficients Right lane co-efficients Output of CNN is lane parabola coefficients according to: y = ax^2 + bx + c MATLAB : A SINGLE PLATFORM FOR DEEP LEARNING TRAINING & DEPLOYMENT
  • 12. 12 Deep Learning Challenges Big Data ▪ Handling large amounts of data ▪ Labeling thousands of images & videos Training and Testing Deep Neural Networks ▪ Accessing reference models from research ▪ Understanding network behavior ▪ Tuning hyperparameters and refining architectures ▪ Training takes hours-days Seamless Deployment onto embedded hardware Real world systems use more than deep learning Deep learning frameworks do not include “classical” computer vision Not a deep learning expert
  • 13. 13 Transfer Learning Workflow Early layers Last layers 1 million images 1000s classes Load pretrained network Fewer classes Learn faster New layers Replace final layers 100s images 10s classes Training options Train network Trained Network Predict and assess network accuracy
  • 14. 14 Import Pre-Trained Models and Network Architectures Pretrained Models ▪ AlexNet ▪ VGG-16 ▪ VGG-19 ▪ GoogLeNet ▪ Resnet50 ▪ InceptionV3 ▪ ResNet - 101 Import Models from Frameworks ▪ Caffe Model Importer (including Caffe Model Zoo) – importCaffeLayers – importCaffeNetwork ▪ TensorFlow-Keras Model Importer – importKerasLayers – importKerasNetwork Download from within MATLAB net = alexnet; net = vgg16; net = vgg19; net = googlenet; net = resnet50; net = inceptionv3; net = resnet101;
  • 15. 15 Visualizations for Understanding Network Behavior ▪ Custom visualizations – Example: Class Activation Maps Filters … Activations Deep Dream http://cnnlocalization.csail.mit.edu/Zhou_Learning_Deep_Features_CVPR_2016_paper.pdf
  • 16. 16 Augment Training Images imageAugmenter = imageDataAugmenter('RandRotation',[-180 180]) Rotation Reflection Scaling Shearing Translation Colour pre-processing Resize / Random crop / Centre crop
  • 17. 17 Transfer Learning Workflow Early layers Last layers 1 million images 1000s classes Load pretrained network Fewer classes Learn faster New layers Replace final layers 100s images 10s classes Training options Train network Trained Network Predict and assess network accuracy
  • 18. 18 Transfer Learning Workflow Early layers Last layers 1 million images 1000s classes Load pretrained network Fewer classes Learn faster New layers Replace final layers 100s images 10s classes Training options Train network Trained Network Predict and assess network accuracy
  • 19. 19 Transfer Learning Workflow Early layers Last layers 1 million images 1000s classes Load pretrained network Fewer classes Learn faster New layers Replace final layers 100s images 10s classes Training options Train network Trained Network Predict and assess network accuracy
  • 20. 20 Training Deep Neural Networks trainingOptions ▪ Plot training metrics – Training accuracy, smoothed training accuracy, validation accuracy – Training loss, smoothed training loss, and validation loss ▪ Debug training – Stop and check current state – Save / load checkpoint networks – Custom output function (stopping condition, visualization, etc.) ▪ Bayesian optimization for hyperparameter tuning Learn More
  • 21. 21 Transfer Learning Workflow Early layers Last layers 1 million images 1000s classes Load pretrained network Fewer classes Learn faster New layers Replace final layers 100s images 10s classes Training options Train network Trained Network Predict and assess network accuracy MATLAB Provides Evaluation Frameworks for Different Classes of Deep Learning Problems
  • 23. 23 Deep learning on CPU, GPU, multi-GPU and clusters Single CPU Single CPU Single GPU Single CPU Multiple GPUs On-prem server with GPUs Cloud GPUs (AWS, Azure, etc.) Deep Learning on Cloud Whitepaper
  • 24. 24 Training in MATLAB is fast MATLAB is more than 4x faster than TensorFlow AlexNet CNN architecture trained on the ImageNet dataset, using batch size of 32, on a Windows 10 desktop with single NVIDIA GPU (Titan Xp). TensorFlow version 1.2.0.
  • 25. 25 Deep Learning Challenges Big Data ▪ Handling large amounts of data ▪ Labeling thousands of images & videos Training and Testing Deep Neural Networks ▪ Accessing reference models from research ▪ Understanding network behavior ▪ Tuning hyperparameters and refining architectures ▪ Training takes hours-days Seamless Deployment onto embedded hardware Real world systems use more than deep learning Deep learning frameworks do not include “classical” computer vision Not a deep learning expert
  • 26. 26 Algorithm Design to Embedded Deployment Workflow Conventional Approach Desktop GPU High-level language Deep learning framework Large, complex software stack 1 Desktop GPU C++ C/C++ Low-level APIs Application-specific libraries 2 C++ Embedded GPU C/C++ Target-optimized libraries Optimize for memory & speed 3 Challenges • Integrating multiple libraries and packages • Verifying and maintaining multiple implementations • Algorithm & vendor lock-in
  • 27. 27 GPU Coder for Deployment: New Product in R2017b Neural Networks Deep Learning, machine learning Image Processing and Computer Vision Image filtering, feature detection/extraction Signal Processing and Communications FFT, filtering, cross correlation, 7x faster than state-of-art 700x faster than CPUs for feature extraction 20x faster than CPUs for FFTs GPU Coder Accelerated implementation of parallel algorithms on GPUs
  • 28. 28 Algorithm Design to Embedded Deployment Workflow with GPU Coder MATLAB algorithm (functional reference) Functional test1 Deployment unit-test 2 Desktop GPU C++ Deployment integration-test 3 Desktop GPU C++ Real-time test4 Embedded GPU .mex .lib Cross-compiled .lib Build type Call CUDA from MATLAB directly Call CUDA from (C++) hand- coded main() Call CUDA from (C++) hand-coded main().
  • 29. 29 CUDA Code Generation from GPU Coder
  • 30. 30
  • 31. 31 End-to-End Application: Lane Detection Transfer Learning AlexNet – 1000 class classification Lane detection CNN Post-processing (find left/right lane points) Image Parabolic lane coefficients in world coordinates Left lane co-efficients Right lane co-efficients Output of CNN is lane parabola coefficients according to: y = ax^2 + bx + c MATLAB : A SINGLE PLATFORM FOR DEEP LEARNING TRAINING & DEPLOYMENT https://tinyurl.com/ybaxnxjg
  • 32. 32 Alexnet Inference on Intel CPUs MATLAB (R2017b Release 2) TensorFlow MXNet Caffe2
  • 33. 33 Alexnet Inference on NVIDIA Titan Xp MATLAB GPU Coder (R2017b) TensorFlow (1.2.0) Caffe2 (0.8.1) Framespersecond Batch Size CPU Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz GPU Pascal Titan Xp cuDNN v5 Testing platform MXNet (0.10) MATLAB (R2017b) 2x 7x5x
  • 34. 34 Alexnet inference on NVIDIA GPUs 0 1 2 3 4 5 6 7 8 9 CPU resident memory GPU peak memory (nvidia-smi) Memoryusage(GB) Batch Size1 16 32 64 CPU Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50 GHz GPU Tesla K40c Py-Caffe GPUCoder TensorFlow MATLABw/PCT C++-Caffe
  • 35. 35 Design Deep Neural Networks in MATLAB and Deploy with GPU Coder Design Deep Learning & Vision Algorithms Highlights ▪ Manage large image sets ▪ Easy access to models like AlexNet, GoogleNet ▪ Pre-built training frameworks ▪ Automate ground truth labeling apps Highlights ▪ Automate optimized CUDA code generation with GPU Coder ▪ Deployed models upto 4.5x faster than Caffe2 and 7x faster than Tensor High Performance Deployment
  • 36. 36 Deep Learning Onramp Free Introductory Course Available Here
  • 37. 37 Visit MathWorks Booth to Learn More HIGHWAY_SCENE Classification Car Car CarDetection Lane Lane Regression Semantic Segmentation