35
1 © 2015 The MathWorks, Inc. Matthias Sommer AI Techniques in MATLAB for Signal, Time-Series, and Text Data

MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

1© 2015 The MathWorks, Inc.

Matthias Sommer

AI Techniques in MATLAB for

Signal, Time-Series, and Text Data

Page 2: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

2

AI and Deep Learning for Signals in the News

Page 3: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

3

Communications devices,

security

Aerospace, Defense and Communications Consumer Electronics and Digital Health

Condition monitoring

Multi-standard communications

receivers, drone recognition

Automotive

Voice control enabled

Infotainment

Voice assistants

Sensor processing,

automated driving

Digital health

Industrial Automation

Predictive maintenance

The Use of Deep Learning is Growing Across Industries

Page 4: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

4

Application Examples Using MATLAB – Audio and Speech

Speech Command Recognition

(a.k.a. "Keyword Spotting")

https://www.mathworks.com/help/deeplearning/e

xamples/deep-learning-speech-recognition.html

Music Genre Classification

https://www.mathworks.com/help/audio/examples/music-

genre-classification-using-wavelet-time-scattering.html

Page 5: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

5

Application Examples Using MATLAB – Industrial and Radar

sensors

ECG Signal Classification

https://www.mathworks.com/help/signal/examples/classify-

ecg-signals-using-long-short-term-memory-networks.html

Modulation Classification

http://www.mathworks.com/help/comm/examples/

modulation-classification-with-deep-learning.html

Page 6: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

6

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

▪ Conclusions

Page 7: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

7

Deep learning is a type of machine learning in which a model learns from examples.

What is Deep Learning?

Page 8: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

8

Common Network Architectures - Signal Processing

Feature Engineering

Time-Frequency Transformation

Convolutional Neural Networks (CNN)

Long Short Term Memory (LSTM) Networks

Page 9: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

9

Deep Learning Workflow

Data sources

Data Labeling

CREATE AND ACCESS

DATASETS

DEVELOP PREDICTIVE

MODELS

PREPROCESS AND

TRANSFORM DATA

Feature extraction

ACCELERATE AND

DEPLOY

Embedded Devices and

Hardware

Simulation and

augmentation

Analyze and tune

hyperparameters

Import Reference Models/

Design from scratch

Transformation Hardware-Accelerated

Training

Pre-Processing Desktop Apps

Enterprise Scale Systems

Page 10: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

10

Deep Learning Workflow Challenges – Signals and Time Series

Data Labeling

Deep learning models only as

good as

training data

Limited Data

Availabiliy

Domain-specific data

processing desirable

Limited reference

research

Deployment and

Scaling to various

platforms

Page 11: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

11

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

– Data

– Processing and transformation

– Model design and optimization

– Acceleration, prototyping, and deployment

▪ Conclusions

Page 12: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

12

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

– Data

– Processing and transformation

– Model design and optimization

– Acceleration, prototyping, and deployment

▪ Conclusions

Page 13: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

13

Current Investments – Models vs. Data

From "Troubleshooting deep neural networks" (Josh Tobin et al., Jan 2019)

Research

Models andAlgorithms

Datasets

Industry

Page 14: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

14

What does a large dataset look like?

How to navigate, index, read (aka "ingest") a large dataset?

How to...

▪ Build a list of all data and labels?

▪ Review basic statistics about available data?

▪ Select data subsets without nested for

loops, dir, ls, what, ... aplenty?

▪ Jointly read data and labels?

▪ Automatically distribute computations?

audioDatastore

fileDatastore

imageDatastore

Custom Datastores

Page 15: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

15

Use appropriate tools to help you label signals

▪ Programmatically… ▪ … or via Apps

Page 16: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

16

What if available data isn't enough?

Original

Original

Dataset

Augmented

Dataset

N times as

much data

Data augmentation allows building

more complex and more robust models

Pitch shift

Page 17: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

17

Simulation is key if recording and labelling real-world data is

impractical or unreasonable – Communications Signals

Page 18: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

18

Simulation is key if recording and labelling real-world data is

impractical or unreasonable – Radar Signals

Micro-Doppler AnalysisRadar Target Simulation

Page 19: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

19

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

– Data

– Processing and transformation

– Model design and optimization

– Acceleration, prototyping, and deployment

▪ Conclusions

Page 20: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

20

Common types of network architectures used in signal processing

and text analytics applications

Feature Engineering

Time-Frequency Transformation

Convolutional Neural Networks (CNN)

Long Short Term Memory (LSTM) Networks

Page 21: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

21

Time-Frequency Transformations

Time (samples) Time (frame #)

freq

ue

nc

y (

bin

#)

Tim

e (

sa

mp

les

)

Time (frame #)

Reframe

(e.g. Buffer)

To frequency

(e.g. FFT)

Wavelet scalogram Constant Q transformBasic spectrogram Perceptually-spaced (e.g.

Mel, Bark) Spectrogram

Easiest to

understand and

implement

More compact for

speech & audio

applications

Best resolution, for

non-periodic

signals

Better resolution at

low frequencies

...

Page 22: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

22

Extracting Features from Signals: Application-Agnostic Examples

BW measurements Spectral statistics Harmonic analysis Octave spectrum

Frequency domain

Time domain

Page 23: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

24

Automated Feature Extraction: Wavelet Scattering

▪ Can relieve requirements on amount of data and model complexity

– Featured in leader-boards a number of research competitions

▪ Framework for extracting features [1]

Wa

ve

let

Co

nvo

luti

on

No

nli

ne

ari

ty

Ave

rag

ing

Wa

ve

let

Co

nvo

luti

on

No

nli

ne

ari

ty

Ave

rag

ing

Wa

ve

let

Co

nvo

luti

on

No

nli

ne

ari

ty

Ave

rag

ing

Fixed Fixed Fixed

[1] Joan Bruna, and Stephane Mallat, P. 2013. Invariant Scattering Convolution Networks. IEEE Transactions on Pattern Analysis

and Machine Intelligence, Vol. 35, No. 8, pp. 1872-1886.

Cla

ss

ifie

r

Deep Feature Extraction

Page 24: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

25

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

– Data

– Processing and transformation

– Model design and optimization

– Acceleration, prototyping, and deployment

▪ Conclusions

Page 25: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

26

Developing Deep Learning Models

Design

Train

Optimize

Design Network

Pre-trained Networks

Accelerate Training

Bayesian

Hyperparameter

Optimization

MATLAB as a

container on NGC

Model Exchange

Page 26: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

27

Exchange Models With Deep Learning Frameworks

ONNX

PyTorch

MATLABMXNet

TensorFlow

ChainerCore ML

ONNX = Open Neural Network Exchange Format

TensorFlow-

Keras

Caffe

Page 27: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

28

Exchange Models With Deep Learning Frameworks

ONNX

PyTorch

MATLABMXNet

TensorFlow

ChainerCore ML

ONNX = Open Neural Network Exchange Format

TensorFlow-

Keras

Caffe

Keras

importer

Caffe

importer

Deployment

Augmentation

and

Optimization

Visualization

and

Debugging

Page 28: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

29

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

– Data

– Processing and transformation

– Model design and optimization

– Acceleration, prototyping, and deployment

▪ Conclusions

Page 29: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

30

Deployment and Scaling for A.I.

Embedded Devices Enterprise Systems

MATLAB

Page 30: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

31

Deploying Deep Learning Models for Inference

Code

Generation

NVIDIA

TensorRT &

cuDNN

Libraries

ARM

Compute

Library

Intel

MKL-DNN

Library

Application

logic

Auto-generated

Code

(C/C++/CUDA)

Page 31: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

32

Enterprise Deployment

Deployment to the cloud with MATLAB Compiler and MATLAB Production Server

Page 32: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

33

Agenda

▪ Deep Learning – Basic ideas

▪ Deep Learning Model Development for Signals, Time Series, and Text

– Data

– Processing and transformation

– Model design and optimization

– Acceleration, prototyping, and deployment

▪ Conclusions

Page 33: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

34

Deep Learning Workflow

Data Labeling

Deep learning models only

as good as

training data

Limited data

availability

Domain-specific data

processing desirable

Limited reference

researchApplication-specific algorithms and tools

Deployment and

Scaling to various

platforms

Data-labeling Apps

and Examples

Augmentation and

simulation algorithms

Collaboration

in the AI

ecosystem

Challenges – Signals and Time Series

Page 34: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

35

Demo Station

Find out more:

Deep Learning from Idea to

Embedded Hardware

Matthias Sommer

Technology Showcase

Page 35: MATLAB EXPO 2019 - MathWorks - AI Techniques in MATLAB for ...€¦ · receivers, drone recognition Automotive Voice control enabled Infotainment Voice assistants Sensor processing,

36

Related Trainings

▪ Time series analysis

– Signal Preprocessing and Feature Extraction for Data Analytics with MATLAB

▪ Deep-learning (including non-vision applications)

– Deep Learning with MATLAB

https://nl.mathworks.com/services/training.html