deep learning for vision analytics - sas institute€¦ · machine learning deep learning for...

30
Copyright © SAS Institute Inc. All rights reserved. Deep Learning For Vision Analytics SAS User Group Malaysia 3 rd May, 2018

Upload: others

Post on 29-May-2020

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 2: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 3: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

Preface

Page 4: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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.”

Page 5: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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.

Page 6: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

SAS® PlatformDiscovery - Basic

Page 7: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

SAS® PlatformDiscovery - Advanced

Page 8: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

What?Vision Analytics Use Cases in Oil & Gas

Page 9: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

Health, Safety & EnvironmentOil & Gas

Page 10: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

Health, Safety & EnvironmentOil & Gas

Page 11: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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.

Page 12: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

Workplace safety: Deep Learning on Sound

Page 13: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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.

Page 14: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

Workplace Safety Example: Hard hat image detection

Page 15: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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???

Page 16: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

How?

Page 17: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 18: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

Copyright © S AS Inst i tute Inc. A l l r i ghts reserved.

Types of CNN Architecture

• LeNet-5

• AlexNet

• VGG16

• Etc…

Page 19: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 20: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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/

Page 21: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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}

Page 22: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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/

Page 23: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 24: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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/

Page 25: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 26: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 27: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 28: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 29: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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

Page 30: Deep Learning For Vision Analytics - Sas Institute€¦ · Machine Learning Deep Learning For unstructured data such as: Strings of texts, images and sounds. For structured data:

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/