MATLAB 影像處理及擴展應用研討會 醫學影像、機器學習、物聯網(IoT)
Agenda
Time Topics
Welcome
13:30 - 14:30 MATLAB 於影像處理介紹
14:30 - 15:20 應用機器學習技法於影像處理領域
15:20 - 15:30 Coffee Break
15:30 - 16:30 MATLAB與物聯網: 連結至穿戴式裝置硬體之訊號處理
Q&A and Wrap UP
Applications: Image and Video Processing
▪ Medical imaging
▪ Surveillance
▪ Robotics
▪ Automotive safety
▪ Consumer electronics
▪ Geospatial computing
▪ Machine vision
▪ and more…
Different Aspects of Image Processing
▪ Importing, visualizing and investigating
▪ Enhancing images
▪ Aligning multiple images
▪ Segmenting images
▪ Detecting image features
▪ Classifying images
Technical Computing Workflow
Share Explore & Discover
Access
Image acquisition Image data in files
Reporting and Documentation
Outputs for Design
Deployment Visualization
tools
Application Development
Data/Image Analysis and
Modeling
Image Processing
Consider this image from the Centers for Disease Control:
Our goal:
To develop an algorithm to detect and quantify infection.
How many cells are in the image, and how many are infected?
Quantifying infection across multiple images…
…Despite widely varying image quality
Identify key challenges, consider strategies:
•
Challenges:
•
Differences in color
•
Differences in illumination
•
Contiguity of cells
•
Low resolution/poor quality
•
Strategies:
•
Using apps to explore images
•
Pre-processing
•
Watershed segmentation
•
Morphological segmentation
DEMO
In this session…
…we quantified rates of infection in heterogeneous images
What if we wanted to classify the type of infection,
differentiating several species of parasites?
Agenda
Time Topics
Welcome
13:30 - 14:30 MATLAB 於影像處理介紹
14:30 - 15:20 應用機器學習技法於影像處理領域
15:20 - 15:30 Coffee Break
15:30 - 16:30 MATLAB與物聯網: 連結至穿戴式裝置硬體之訊號處理
Q&A and Wrap UP
Machine Learning
A machine learning algorithm takes examples of inputs and outputs associated with a task and produces a program that can automatically differentiate them.
If brightness > 0.5 then ‘hat’
If edge_density < 4 and major_axis > 5
then “boat”
…
‘boats’
‘mugs’
‘hats’
Hand Written Program
Machine Learning
𝑚𝑜𝑑𝑒𝑙 = 𝑓𝑖𝑡𝑐svm(image_features, label)
‘boats’
‘mugs’
‘hats’
Computer Vision
Machine Learning Workflow Using Images
Training Data Feature Extraction, Encoding
Machine Learning
Classifier ‘babesiosis’
Input Image Feature Extraction,
Encoding Classification
‘babesiosis’ ‘plasmodium’ ‘chagas’
Bag of Words
Performimage processing, analysis, and algorithm development Image Processing Toolbox™ provides a comprehensive set of reference- standard algorithms, functions, and apps for image processing, analysis, visualization, and algorithm development. You can perform
image analysis,imagesegmentation,image enhancement, noise
reduction, geometric transformations, andimageregistration. Many toolbox functions support multicore processors, GPUs, and C-code generation.
Image Processing Toolbox supports a diverse set of
image
types, including high dynamic range, gigapixel resolution, embedded ICC profile, and tomographic. Visualization functions and apps let you exploreimages and videos, examine a region ofpixels, adjust color and contrast, create contours or histograms, and manipulate regions of interest (ROIs). The toolbox supports workflows forprocessing, displaying, and navigating large images.
Image Processing Toolbox
Bag: image processing, analysis , image, pixels, enhancement
Class / Label
Training Data
Vocabulary / Bag of Words
Bag of “Visual Words” ( features)
‘babesiosis
’
Class / Label
Training Data
Vocabulary / Bag of Features
What is a Classifier ?
Training Data
Features Classifier
Classification ‘babesiosis’
‘plasmodium’
‘chagas’
Class Membership
Machine Learning
Encoded images
So let’s give it a try…
Using Machine Learning for Computer Vision
▪ Image Processing Toolbox
• Provides 100s of validated functions
• Indispensable for image processing applications
▪ Computer Vision System Toolbox
• Provides tools to generate image features for training classifiers
• See doc for full list of provided image features
▪ Statistics and Machine Learning Toolbox
• Provides learning algorithms to train classifiers
Agenda
Time Topics
Welcome
13:30 - 14:30 MATLAB 於影像處理介紹
14:30 - 15:20 應用機器學習技法於影像處理領域
15:20 - 15:30 Coffee Break
15:30 - 16:30 MATLAB與物聯網: 連結至穿戴式裝置硬體之訊號處理
Q&A and Wrap UP
The Challenge of IoT
?
Devices Insight
What is the Internet of Things?
Smart Connected
Devices Exploratory Analysis
Data Aggregator
(Server or Cloud) Deploy analytics to cloud
Deploy algorithms to smart devices
Business Systems Integration
Look at the Pieces: Devices
▪ Sensors and Human Interaction
▪ May have strict energy budget
▪ Required embedded programming skills
▪ Bandwidth is expensive in power and dollars
▪ Goal for device is to do as much data reduction locally as possible
Smart, Connected Devices
• Communication
• Embedded Sensor Analytics
• Data Reduction
Data Aggregator
• Storage
• On-Line analytics
• Visualization & reporting
Look at the Pieces: Data Collection & Online Analytics
▪ Server or Cloud-based
▪ Log and analyze information across collection of devices
▪ Real-time information for situational awareness
▪ Requires cloud/web development skills and operations support
▪ Data Intake must be scalable and reliable
▪ True “Big Data”
Look at the Pieces: Exploratory Analysis
Exploratory Analysis
• Historical analytics
• Algorithm development
▪ Desktop-based
▪ Access historical device information
▪ Analyze past performance for predictive modeling and deep insight
▪ Requires data analysis / data science skills
▪ Heavy use of statistics and signal processing
techniques
▪ Deploy complex algorithms to both cloud and edge devices
IoT – Design challenges
• Embedded development is challenging
• Increasing algorithmic complexity
• Need connectivity to cloud resources
• Streaming data management and storage
• Online and real-time analytics
• Ability to visualize results and make decisions
• Advanced analysis algorithms
Business Systems
• Integrating
various software components
• Acquiring data from external sources
MathWorks Capabilities for IoT
Leveraging MATLAB Analytics and Model-Based Design
Overview
Smart Connected
Devices Exploratory Analysis
Data Aggregator
(Server or Cloud) Deploy analytics to cloud
Deploy algorithms to smart devices
Business Systems Integration
• Data storage
• Online analytics
• Visualization and reporting
• Embedded algorithms for sensing, data reduction, and control
• Models and simulation of system
• Historical analytics
• Algorithm development Monitor and control nodes/devices
Publish data to Cloud
Model Device Communication
Physical Component Modeling
• Electronic
• Mechanical
• Hydraulic, etc.
Communications Protocol Modeling
• LTE, Zigbee, 802.11, etc.
Automatic Code Generation
• Programmable chips (MCU, DSP, etc.)
• FPGAs
Verification/Validation and Process Support
• Model- and Code proving
• Lifecycle management tools
MATLAB & Simulink Capabilities for IoT
Deployment
• .NET, COM components
• Java components
• Multicore and GPU systems
• Spreadsheet plug-ins
• Database plug-ins
• Hadoop
• Cloud services (AWS)
• ThingSpeak Apps
• Smartphone/tablet integration
Analysis, Modeling, Design
• Data visualization
• Statistics
• Regression
• Machine learning (supervised &unsupervised)
• Neural networks
• Optimization (gradient-based & stochastic)
• Symbolic computing
• Image analysis
• Financial analysis
• Geospatial computing
• Object recognition
• Speech recognition Data Clean-up
• Filtering
• Image processing
• Signal processing
• Telemetry
• RF sampling
Real-Time Sources
• Sensors
• GPS
• Instrumentation
• Cameras
• Communication systems
• Machines:
• embedded systems
• fieldbus
• Financial datafeeds File I/O
• Text
• Spreadsheet
• XML
• CDF/HDF
• Image
• Audio
• Video
• Geospatial
• Web content
Repositories
• Databases (SQL)
• NoSQL
• Hadoop
Communication Protocols
• CAN
• DDS
• OPC
• XCP
Business and Transactional
Data Engineering,
Scientific, and Field Data
Analytics Design and Development
Deploy and integrate in Target to
embedded
MATLAB and Simulink are well positioned for:
A. Analytics that increasingly require both business and engineering data
B. Developing embedded systems which have increasing analytic content
C. Deploying the increasing number of analytic-rich applications that run on both traditional IT and embedded platforms
D. Enabling domain experts to do data science
Why MATLAB?
C D
A
B
Customer Case Study
Customer Study: iSonea
Cloud and Embedded Analytics
Opportunity
• Develop an acoustic respiratory monitoring system for wheeze detection and asthma management
Analytics in cloud and embedded
• Captures 30 seconds of windpipe sound and processes the data locally to clean up and reduce ambient noise
• Invokes spectral processing and pattern-detection analytics for wheeze detection on iSonea server in the cloud
• Provides feedback to the patient on their smartphone Benefit
• Eliminates error-prone self-reporting and visits to the doctor
Sensor Analytics for IoT
Signal analysis for classification Application examples
▪ Mobile sensing
▪ Structural health monitoring (SHM)
▪ Fault and event detection
▪ Automated trading
▪ Radar post-processing
▪ Advanced surveillance
▪ ...
Case Study: Human Activity Analysis and Classification
Classificatio n
Feature Extraction
Dataset courtesy of:
Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz.
Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine.
International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012 http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones
Machine Learning Signal
Processing
Sensor Data Analytics Workflow – the bigger picture
• Domain knowledge
• Open-ended problem
• Long discovery cycles
• Built-in algorithms
Machine Learning Connect and
Acquire
Signal Processing
Sensor Data Analytics Workflow – the bigger picture
• Different tools and environments
• Disconnect between hardware and analysis
• Inefficiencies in data sharing
• MATLAB Connects to DAQ interfaces and sensors directly. E.g.
• Android Sensor Support
• iPhone and iPad Sensor Support
Machine Learning Connect and
Acquire
Signal Processing
Embedded Implementation
Sensor Data Analytics Workflow – the bigger picture
• Signal analysis vs. on-line DSP
• From Machine Learning theory to pre-trained, low-footprint classifiers
• MATLAB vs. C/C++
• Streaming algorithms, data sources and
visualization for System modelling and simulation
Leverage Built-in Algorithms, Apps, and Technologies
▪ Signal Processing Toolbox™
Built-in algorithms and Apps to process and
analyse signals cheby2filter
rms
pwelch
periodogra m
xcov
findpeaks
…
Leverage Built-in Algorithms, Apps, and Technologies
▪ Signal Processing Toolbox™
▪ Parallel Computing Toolbox™
Accelerate computationally and data- intensive problems using multicore
processors, GPUs and computer clusters
parfor
Leverage Built-in Algorithms, Apps, and Technologies
▪ Signal Processing Toolbox™
▪ Parallel Computing Toolbox™
▪ Statistics and Machine Learning Toolbox™
Functions and apps to describe, analyze, and model data.
Regression, clustering and classification algorithms to draw inferences from data and build predictive models
>> classificationLearner
Leverage Built-in Algorithms, Apps and Technologies
▪ Signal Processing Toolbox™
▪ Parallel Computing Toolbox™
▪ Statistics and Machine Learning Toolbox™
▪ Neural Network Toolbox™
Functions and apps to design, train, visualize, and simulate neural
networks
>> nprtool
patternnet
Leverage Built-in Algorithms, Apps and Technologies
▪ Signal Processing Toolbox™
▪ Parallel Computing Toolbox™
▪ Statistics Toolbox™
▪ Neural Network Toolbox™
• DSP System Toolbox™
Streaming algorithms, data sources and visualization for system
modelling and simulation
BiquadFilter
MatFileReader
Autocorrelator
SpectrumEstimator
TimeScope
Leverage Built-in Algorithms, Apps and Technologies
▪ Signal Processing Toolbox™
▪ Parallel Computing Toolbox™
▪ Statistics Toolbox™
▪ Neural Network Toolbox™
▪ DSP System Toolbox™
▪ MATLAB Coder™
>> codegen
Signal Processing and Machine Learning Techniques for Sensor Data Analytics
Summary
▪ Extensive set of de-facto standard functions for signal processing and machine learning
▪ Environment accelerates insight and
automation: visualisation, apps, language, documentation
▪ Path to embedded products, from on-line simulation to automatic code generation