Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Deep Learning For Vision AnalyticsSAS User Group Malaysia
3rd May, 2018
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Agenda
Preface
• Machine Learning vs Deep Learning
• Create/train/score Machine Learning model using SAS VDMML
Deep Learning
• What?
• Use cases
• How?
• Image classification
• Basic CNN architecture
• Layer explanation (convolution/pooling/fully connected)
• Deploy
• Create/train/score/deploy Deep Learning model using Jupyter Notebook
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Preface
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Machine Learning
Deep LearningFor unstructured
data such as: Strings of texts,
images and sounds.
For structureddata:
Information with high degree of
organization.
Machine Learning vs Deep Learning
“Most experts agree that structured data accounts for about 20% of the data that is out there.”
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
SAS® PlatformVisual Data Mining & Machine Learning (VDMML)
• Interactive programming in a web-based development environment.
• Highly scalable, distributed in-memory analytical processing.
• Model development with modern machine learning algorithms.• Random forests, gradient boosting, neural
networks, support vector machines, factorization machines, Bayesian networks.
• Automatic intelligent tuning.
• Analytical data preparation.• Data exploration, feature binning and
dimension reduction.
• Integrated text analytics.
• Model assessment.• Model scoring.
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
SAS® PlatformDiscovery - Basic
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
SAS® PlatformDiscovery - Advanced
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
What?Vision Analytics Use Cases in Oil & Gas
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Health, Safety & EnvironmentOil & Gas
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Health, Safety & EnvironmentOil & Gas
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Workplace SafetyLeveraging on cameras placed around workplace
• Identify employee by name and authorization.
• Where is the power drill?
• Is the employee certified to handle a power drill?
• Is the power drill stored safely at the original location?
• Is employee equipped with the necessary PPE?
• Monitor if employee is trespassing.
• Early warning for incidents and hazardous situations.
• Monitor integrity of assets.
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Workplace safety: Deep Learning on Sound
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Vision Analytics Use CasesOil & Gas
UpstreamAnalyze seabed for oil seeps,
which may serve as an indicator of hydrocarbon presence and for
the purpose of protecting the ecosystem.
MidstreamMonitor hard-to-reach
pipelines using bots for early signs which indicates the need
for maintenance or replacements.
DownstreamSmarter retail experience for
increased customer satisfaction.
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Workplace Safety Example: Hard hat image detection
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Image Classification
• For us, identifying whether someone is wearing a hard hat or not is effortless
• How do we create and train a machine to do the same???
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
How?
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Image Classification using Deep LearningConvolutional Neural Network (CNN)
• Convolutional neural network to analyse images.
• Why?• Powerful (analyse and classify
images very well)
• Efficient (less parameters than previous methods)
• CNN takes image (volume of pixels of varying values) and outputs probabilitySource: http://sww.sas.com/saspedia/Future_documentation_of_deep_learning
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Types of CNN Architecture
• LeNet-5
• AlexNet
• VGG16
• Etc…
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Example CNN architectureConvolution Layer
Source: https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781788397872/6/ch06lvl1sec69/common-cnn-architecture---lenet
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Convolution LayerEnables parameter sharing in a CNN
https://www.analyticsvidhya.com/blog/2017/06/architecture-of-convolutional-neural-networks-simplified-demystified/
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Convolution LayerHow is it done?
Source: https://hackernoon.com/visualizing-parts-of-convolutional-neural-networks-using-keras-and-cats-5cc01b214e59
SWAT.deeplearn.addlayer(layer={‘type’:’convo’,‘nfilters’:1,‘height’:3,‘width’:3,‘stride’:1}
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Feature ‘Detector’ & Feature Maps
Video example: https://www.youtube.com/watch?v=Gu0MkmynWkw
Source: https://adeshpande3.github.io/adeshpande3.github.io/A-Beginner's-Guide-To-Understanding-Convolutional-Neural-Networks/
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Example CNN architecturePooling Layer
Source: https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781788397872/6/ch06lvl1sec69/common-cnn-architecture---lenet
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Pooling LayerReduces the number of trainable parameters in a CNN
https://www.analyticsvidhya.com/blog/2017/06/architecture-of-convolutional-neural-networks-simplified-demystified/
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Pooling LayerHow is it done?
Video example: https://www.youtube.com/watch?v=mW3KyFZDNIQ
SWAT.deeplearn.addlayer(layer={‘type’:’pool’,‘height’:2,‘width’:2,‘stride’:2,‘pool’:’MAX’}
Source: https://en.wikipedia.org/wiki/Convolutional_neural_network
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Example CNN architectureFully Connected Layer
Source: https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781788397872/6/ch06lvl1sec69/common-cnn-architecture---lenet
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Fully Connected LayerEnables high-level reasoning
• Neurons in a fully connected layer have connections to all activations in the previous layer(s), as seen in regular neural networks.
• Information flows through a neural network in 2 ways:
• Normal (Feedforward)
• Learning (Backpropogation)
https://www.youtube.com/watch?v=aircAruvnKk
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Deployment
SAS VDMML(Model studio)
SAS ESP(Event streaming)
Training
Operational
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Creating/training/scoring/deploying a CNNUsing deepLearn action sets in Jupyter Notebook on SAS Viya 3.3
Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.
Useful Links
• What’s New In SAS Deep Learning (Documentation)
http://go.documentation.sas.com/?docsetId=casdlpg&docsetTarget=p0uhs7ywfs6e4kn160kru9w97fyz.htm&docsetVersion=8.2&locale=en
• Understanding Convolutional Neural Networks
https://adeshpande3.github.io/A-Beginner%27s-Guide-To-Understanding-Convolutional-Neural-Networks/
• CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Top Related