SlideShare a Scribd company logo
1 of 53
Download to read offline
Measuring Vegetation Health toMeasuring Vegetation Health to
Predict Natural HazardsPredict Natural Hazards
Suneel MarthiSuneel Marthi
June 18, 2019June 18, 2019
Berlin Buzzwords, Berlin, GermanyBerlin Buzzwords, Berlin, Germany
1
$WhoAmI$WhoAmI
Suneel MarthiSuneel Marthi
 @suneelmarthi@suneelmarthi
Member of Apache Software Foundation
Committer and PMC on Apache Mahout, Apache OpenNLP, Apache
Streams
2
AgendaAgenda
Introduction
Satellite Image Data Description
Satellites and Vegetation
What is NDVI ?
Feature Engineering
Cloud Classification
Vegetation Prediction
Apache Beam
Beam Inference Pipeline
Future Work
3
IntroductionIntroduction
Deep Learning has moved from Academia to IndustryDeep Learning has moved from Academia to Industry
Availability of Massive Cloud Computing PowerAvailability of Massive Cloud Computing Power
Combination of Compute Resources + Big Data withCombination of Compute Resources + Big Data with
Deep Learning models often produces useful andDeep Learning models often produces useful and
interesting applicationsinteresting applications
4
IntroductionIntroduction
Computer Vision for Satellite ImageryComputer Vision for Satellite Imagery
Availability of low cost satellite images for researchAvailability of low cost satellite images for research
Train a Deep Learning model to Determine VegetationTrain a Deep Learning model to Determine Vegetation
HealthHealth
5
Goal: Identify Vegetation Index from Landsat8Goal: Identify Vegetation Index from Landsat8
ImagesImages
6
Data: Landsat8Data: Landsat8
Earth observation mission from EOSEarth observation mission from EOS
10 spectral bands, from RGB to SWIR (Short Wave10 spectral bands, from RGB to SWIR (Short Wave
Infrared)Infrared)
Spatial resolution: 30m/px (Visible, NIR bands)Spatial resolution: 30m/px (Visible, NIR bands)
Free and open data, updated each dayFree and open data, updated each day
7
Landsat8 PayloadLandsat8 Payload
Operational Land Imager (OLI)Operational Land Imager (OLI)
Thermal Infrared Sensor (TIRS)Thermal Infrared Sensor (TIRS)
Resolution of 30m/pixel(visible, NIR, SWIR)Resolution of 30m/pixel(visible, NIR, SWIR)
8
Landsat8 BandsLandsat8 Bands
Band Range(nm) Resolution Spectrum
B1 435-451 30m Coastal
B2 452-512 30m Blue
B3 533-590 30m Green
B4 5636-673 30m Red
B5 851-879 30m NIR
B6 1566-1651 30m SWIR-1
B7 2107-2294 30m SWIR-2
9
How is this related to Vegetation?How is this related to Vegetation?
Photosynthetically Active Radiation (PAR) 400 - 700nmPhotosynthetically Active Radiation (PAR) 400 - 700nm
rangerange
Plants absorb solar radiation in PAR regionPlants absorb solar radiation in PAR region
Plants re-emit solar radiation in NIR regionPlants re-emit solar radiation in NIR region
Hence, plants appear bright in the NIR spectrumHence, plants appear bright in the NIR spectrum
https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture
10
How is this related to Vegetation? (Contd)How is this related to Vegetation? (Contd)
Plant Chlorophyll absorbs visible light (0.4 to 0.7µm)Plant Chlorophyll absorbs visible light (0.4 to 0.7µm)
Plant leaves reflect NIR (0.7 to 1.1µm)Plant leaves reflect NIR (0.7 to 1.1µm)
More plant leaves, greater the radiance emited fromMore plant leaves, greater the radiance emited from
plantsplants
https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture
11
Difference in plant reflectances can help determineDifference in plant reflectances can help determine
their distribution in satellite imagerytheir distribution in satellite imagery
https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture
12
How do we measure thisHow do we measure this
phenomenon?phenomenon?
13
Normalized Difference Vegetation Index (NDVI)Normalized Difference Vegetation Index (NDVI)
Used to monitor agriculture production, drought, hazardous fire zonesUsed to monitor agriculture production, drought, hazardous fire zones
Bands 5 and 4 in Landsat8 imagesBands 5 and 4 in Landsat8 images
NDVI Range: [-1,1]NDVI Range: [-1,1]
14
Dense Green Vegetation canopy is typically 0.3 - 0.8Dense Green Vegetation canopy is typically 0.3 - 0.8
Standing water like Deep Oceans (away from coast)Standing water like Deep Oceans (away from coast)
typically have -ve or small +ve valuestypically have -ve or small +ve values
Soil with a high NIR, tends to have a small positive valueSoil with a high NIR, tends to have a small positive value
< 0.2< 0.2
https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture
15
Cover Red NIR NDVI
Dense Vegetation 0.1 0.5 0.7
Dry Soil 0.269 0.283 0.025
Clouds 0.227 0.228 0.002
Snow and Ice 0.375 0.342 -0.046
Water 0.022 0.013 -0.257
https://grindgis.com/blog/vegetation-indices-arcgis#1https://grindgis.com/blog/vegetation-indices-arcgis#1
16
WorkflowWorkflow
17
Goal: Identify Vegetation Index from Landsat8Goal: Identify Vegetation Index from Landsat8
ImagesImages
18
Data AcquisitionData Acquisition
Images downloaded from AWS Earth (available as OpenImages downloaded from AWS Earth (available as Open
Data)Data)
Data refreshed continuallyData refreshed continually
aws s3 sync s3://landsat-pds/c1/L8/044/033 ~/Downloads/landsat-04
19
DataData
20
DataData
21
WorkflowWorkflow
22
Filter CloudsFilter Clouds
Need to remove cloud cover from images before furtherNeed to remove cloud cover from images before further
processingprocessing
Approach: Mask the clouds from all the feature bandsApproach: Mask the clouds from all the feature bands
Compute Median Cloud Masking Composite for the yearCompute Median Cloud Masking Composite for the year
23
Cloud Masking FunctionCloud Masking Function
/**
* Function to mask clouds based on the pixel band of Landsat 8 SR
* @param {Image} image input Landsat 8 SR image
* @return {Image} cloudmasked Landsat 8 image
*/
function maskL8sr(image) {
// Bits 3 and 5 are cloud shadow and cloud, respectively.
var cloudShadowBitMask = (1 << 3);
var cloudsBitMask = (1 << 5);
// Get the pixel QA band.
var qa = image.select('pixel_qa');
// Both flags should be set to zero, indicating clear condition
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
.and(qa.bitwiseAnd(cloudsBitMask).eq(0));
return image.updateMask(mask);
}
24
Example Results (B2, B3, B4 bands)Example Results (B2, B3, B4 bands)
25
Feature EngineeringFeature Engineering
Use Bands B2, B3, B4, B5, B6, B7 for training and
prediction
Apply the Cloud Masking function to each of the
bands
26
Feature Engineering (Contd)Feature Engineering (Contd)
Use Landsat8 Surface Reflectance data for computing
cloud mask
Result: Each pixel is classified as 1 of {Vegetation,
Barren, Snow/Ice, Water, Cloud}
Ignore the Cloud pixels
Compute NDVI from Bands B4 and B5, add to the
feature vector
27
Prediction LabelsPrediction Labels
28
WorkflowWorkflow
29
Model TrainingModel Training
Two Dense Layers with ReLU and Softmax activationsTwo Dense Layers with ReLU and Softmax activations
Dropout: 0.2Dropout: 0.2
Optimization: AdamOptimization: Adam
Loss Function: Cross EntropyLoss Function: Cross Entropy
One-Hot Encode the LabelsOne-Hot Encode the Labels
30
Model TrainingModel Training
31
Model Training - KerasModel Training - Keras
# Add the model layers
model = tf.keras.models.Sequential([
tf.keras.layers.Dense(64, activation=tf.nn.relu),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(nClasses, activation=tf.nn.softmax)
])
# Compile it with the optimizer and loss function
model.compile(optimizer=tf.train.AdamOptimizer(),
loss='categorical_crossentropy',
metrics=['accuracy'])
32
Paradise, CA - Landsat8, October 7, 2018Paradise, CA - Landsat8, October 7, 2018
NDVI: -0.23979NDVI: -0.23979
33
Paradise, CA - Landsat8, October 23, 2018Paradise, CA - Landsat8, October 23, 2018
NDVI: -0.2407NDVI: -0.2407
34
Paradise, CA - Landsat8, November 8, 2018Paradise, CA - Landsat8, November 8, 2018
NDVI: -0.23984151008195187NDVI: -0.23984151008195187
35
Paradise, CA - Landsat8, June 4, 2019Paradise, CA - Landsat8, June 4, 2019
NDVI: -0.24NDVI: -0.24
36
Scaling it all OutScaling it all Out
37
How to Scale - Batch or Stream ?How to Scale - Batch or Stream ?
"Batch is an extension of Streaming, except when"Batch is an extension of Streaming, except when
Streaming is an extension of Batch"Streaming is an extension of Batch"
-- Shannon Quinn, Apache Mahout-- Shannon Quinn, Apache Mahout
38
Spark or Flink ?Spark or Flink ?
"Spark Streaming is for people who want to operate on"Spark Streaming is for people who want to operate on
their streams using Batch idioms.their streams using Batch idioms.
Flink Batch is for people who want to operate on theirFlink Batch is for people who want to operate on their
batches using Streaming idioms."batches using Streaming idioms."
-- Joey Frazee, Apache NiFi-- Joey Frazee, Apache NiFi
39
Was ist Apache Beam?Was ist Apache Beam?
Agnostic (unified Batch + Stream) programming
model
Java, Python, Go SDKs
Runners for Dataflow
Apache Flink
Apache Spark
Google Cloud Dataflow
Local DataRunner
40
Warum Apache Beam?Warum Apache Beam?
Portierbar: Code abstraction that can be executed on
different backend runners
Vereinheitlicht: Unified Batch and Streaming API
Erweiterbare Modelle und SDK: Extensible API to
define custom sinks and sources
41
End Users: Create
pipelines in a familiar
language
SDK Writers: Make Beam
concepts available in
new languages
Runner Writers: Support
Beam pipelines in
distributed processing
environments
The Apache Beam VisionThe Apache Beam Vision
42
Portable Beam ArchitecturePortable Beam Architecture
OverviewOverview
43
Inference PipelineInference Pipeline
44
Beam Inference PipelineBeam Inference Pipeline
pipeline_options = PipelineOptions(pipeline_args)
pipeline_options.view_as(SetupOptions).save_main_session = True
pipeline_options.view_as(StandardOptions).streaming = True
with beam.Pipeline(options=pipeline_options) as p:
filtered_images = (p | "Read Images" >> beam.Create(glob.glob
| "Batch elements" >> beam.BatchElements(0, known_args.batchs
| "Apply Cloud Mask" >> beam.ParDo(CloudMaskFn.CloudMaskFn())
filtered_images | "Predict Land Use" >>
beam.ParDo(Prediction.PredictionFn(known_args.models,
45
ConclusionConclusion
Paradise, CA over 2018 had a consistent Dry VegetationParadise, CA over 2018 had a consistent Dry Vegetation
patterns with NDVI < 0patterns with NDVI < 0
Healthy Green Vegetation in the range [0.3, 1.0)Healthy Green Vegetation in the range [0.3, 1.0)
46
Future WorkFuture Work
47
Classify Rock FormationsClassify Rock Formations
Using Shortwave Infrared images (2.107 - 2.294 nm)Using Shortwave Infrared images (2.107 - 2.294 nm)
Radiant Energy reflected/transmitted per unit timeRadiant Energy reflected/transmitted per unit time
(Radiant Flux)(Radiant Flux)
Eg: Plants don't grow on rocksEg: Plants don't grow on rocks
https://en.wikipedia.org/wiki/Radiant_fluxhttps://en.wikipedia.org/wiki/Radiant_flux
48
Use images from Red bandUse images from Red band
Identify borders, regions without much details withIdentify borders, regions without much details with
naked eye - Wonder Why?naked eye - Wonder Why?
Images are in Red bandImages are in Red band
Unsupervised Learning - ClusteringUnsupervised Learning - Clustering
49
CreditsCredits
Jörn Kottmann (Apache OpenNLP)
Jose Contreras, Kellen Sunderland (Amazon - Berlin)
Apache Beam: Pablo Estrada, Ankur Goenka,
Maximilian Michels (Google)
50
LinksLinks
Earth on AWS: https://aws.amazon.com/earth/
Apache Beam: https://beam.apache.org
Apache Flink: https://flink.apache.org
Slides: https://smarthi.github.io/Berlin-
Buzzwords2019-Landsat
51
Fragen ???Fragen ???
52

More Related Content

What's hot

Digital radiography/cosmetic dentistry courses
Digital radiography/cosmetic dentistry coursesDigital radiography/cosmetic dentistry courses
Digital radiography/cosmetic dentistry coursesIndian dental academy
 
Chicago finance-big-data
Chicago finance-big-dataChicago finance-big-data
Chicago finance-big-dataTed Dunning
 
Save today nikon pro staff 3 9 x 40 silver riflescope bdc
Save today nikon pro staff 3 9 x 40 silver riflescope bdcSave today nikon pro staff 3 9 x 40 silver riflescope bdc
Save today nikon pro staff 3 9 x 40 silver riflescope bdcbest top electronic today
 
Conventional versus digital/ dental implant courses
Conventional versus digital/ dental implant coursesConventional versus digital/ dental implant courses
Conventional versus digital/ dental implant coursesIndian dental academy
 
Digital radiography testing
Digital radiography testingDigital radiography testing
Digital radiography testingmehrdad kehtari
 
2016 asprs track: overview and user perspective of usgs 3 dep lidar by john ...
2016 asprs track:  overview and user perspective of usgs 3 dep lidar by john ...2016 asprs track:  overview and user perspective of usgs 3 dep lidar by john ...
2016 asprs track: overview and user perspective of usgs 3 dep lidar by john ...GIS in the Rockies
 
DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...
DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...
DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...jantjournal
 
End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...
End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...
End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...Larry Smarr
 

What's hot (9)

Digital radiography/cosmetic dentistry courses
Digital radiography/cosmetic dentistry coursesDigital radiography/cosmetic dentistry courses
Digital radiography/cosmetic dentistry courses
 
Cr & dr
Cr & drCr & dr
Cr & dr
 
Chicago finance-big-data
Chicago finance-big-dataChicago finance-big-data
Chicago finance-big-data
 
Save today nikon pro staff 3 9 x 40 silver riflescope bdc
Save today nikon pro staff 3 9 x 40 silver riflescope bdcSave today nikon pro staff 3 9 x 40 silver riflescope bdc
Save today nikon pro staff 3 9 x 40 silver riflescope bdc
 
Conventional versus digital/ dental implant courses
Conventional versus digital/ dental implant coursesConventional versus digital/ dental implant courses
Conventional versus digital/ dental implant courses
 
Digital radiography testing
Digital radiography testingDigital radiography testing
Digital radiography testing
 
2016 asprs track: overview and user perspective of usgs 3 dep lidar by john ...
2016 asprs track:  overview and user perspective of usgs 3 dep lidar by john ...2016 asprs track:  overview and user perspective of usgs 3 dep lidar by john ...
2016 asprs track: overview and user perspective of usgs 3 dep lidar by john ...
 
DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...
DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...
DESIGN OF A YAGI-UDA ANTENNA WITH GAIN AND BANDWIDTH ENHANCEMENT FOR WI-FI AN...
 
End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...
End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...
End-to-end Optical Fiber Cyberinfrastructure for Data-Intensive Research: Imp...
 

Similar to Measuring vegetation health to predict natural hazards

Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagerySuneel Marthi
 
TechShanghai2016 - 赛普拉斯无电池能量收集解决方案
TechShanghai2016 - 赛普拉斯无电池能量收集解决方案TechShanghai2016 - 赛普拉斯无电池能量收集解决方案
TechShanghai2016 - 赛普拉斯无电池能量收集解决方案Hardway Hou
 
Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagerySuneel Marthi
 
Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...
Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...
Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...MohammedAlloulah
 
Landuse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep LearningLanduse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep LearningDataWorks Summit
 
Co-Registration of Small-Scale Satellite Data
Co-Registration of Small-Scale Satellite DataCo-Registration of Small-Scale Satellite Data
Co-Registration of Small-Scale Satellite DataNopphawanTamkuan
 
AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...
AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...
AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...Jui-Hsin (Larry) Lai
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...KAIST
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...KAIST
 
Index based built up index using satellite data
Index based built up index using satellite dataIndex based built up index using satellite data
Index based built up index using satellite dataGowtham Gollapalli
 
IRJET- Fish Recognition and Detection Based on Deep Learning
IRJET-  	  Fish Recognition and Detection Based on Deep LearningIRJET-  	  Fish Recognition and Detection Based on Deep Learning
IRJET- Fish Recognition and Detection Based on Deep LearningIRJET Journal
 
A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...
A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...
A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...IRJET Journal
 
IRJET- Security Efficiency of Transfering the Data for Wireless Sensor Ne...
IRJET-  	  Security Efficiency of Transfering the Data for Wireless Sensor Ne...IRJET-  	  Security Efficiency of Transfering the Data for Wireless Sensor Ne...
IRJET- Security Efficiency of Transfering the Data for Wireless Sensor Ne...IRJET Journal
 
Introducing SciaaS @ Sanger
Introducing SciaaS @ SangerIntroducing SciaaS @ Sanger
Introducing SciaaS @ SangerPeter Clapham
 
Customer Case Study: How Novel Compute Technology Transforms Medical and Life...
Customer Case Study: How Novel Compute Technology Transforms Medical and Life...Customer Case Study: How Novel Compute Technology Transforms Medical and Life...
Customer Case Study: How Novel Compute Technology Transforms Medical and Life...Amazon Web Services
 

Similar to Measuring vegetation health to predict natural hazards (20)

Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagery
 
20211118 AI+ Remote Sensing
20211118 AI+ Remote Sensing20211118 AI+ Remote Sensing
20211118 AI+ Remote Sensing
 
TechShanghai2016 - 赛普拉斯无电池能量收集解决方案
TechShanghai2016 - 赛普拉斯无电池能量收集解决方案TechShanghai2016 - 赛普拉斯无电池能量收集解决方案
TechShanghai2016 - 赛普拉斯无电池能量收集解决方案
 
Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagery
 
Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...
Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...
Look, Radiate, and Learn: Self-Supervised Localisation via Radio-Visual Corre...
 
Landuse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep LearningLanduse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep Learning
 
Co-Registration of Small-Scale Satellite Data
Co-Registration of Small-Scale Satellite DataCo-Registration of Small-Scale Satellite Data
Co-Registration of Small-Scale Satellite Data
 
Digitalradiography
Digitalradiography Digitalradiography
Digitalradiography
 
Digital Radiography
Digital RadiographyDigital Radiography
Digital Radiography
 
AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...
AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...
AI+ Remote Sensing: Applying Deep Learning to Image Enhancement, Analytics, a...
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
 
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
[AAAI2018] Multispectral Transfer Network: Unsupervised Depth Estimation for ...
 
Index based built up index using satellite data
Index based built up index using satellite dataIndex based built up index using satellite data
Index based built up index using satellite data
 
IRJET- Fish Recognition and Detection Based on Deep Learning
IRJET-  	  Fish Recognition and Detection Based on Deep LearningIRJET-  	  Fish Recognition and Detection Based on Deep Learning
IRJET- Fish Recognition and Detection Based on Deep Learning
 
Wcre08.ppt
Wcre08.pptWcre08.ppt
Wcre08.ppt
 
Ijetcas14 391
Ijetcas14 391Ijetcas14 391
Ijetcas14 391
 
A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...
A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...
A Predetermined Position-Wise Node Deployment for Optimizing Lifetime in Visu...
 
IRJET- Security Efficiency of Transfering the Data for Wireless Sensor Ne...
IRJET-  	  Security Efficiency of Transfering the Data for Wireless Sensor Ne...IRJET-  	  Security Efficiency of Transfering the Data for Wireless Sensor Ne...
IRJET- Security Efficiency of Transfering the Data for Wireless Sensor Ne...
 
Introducing SciaaS @ Sanger
Introducing SciaaS @ SangerIntroducing SciaaS @ Sanger
Introducing SciaaS @ Sanger
 
Customer Case Study: How Novel Compute Technology Transforms Medical and Life...
Customer Case Study: How Novel Compute Technology Transforms Medical and Life...Customer Case Study: How Novel Compute Technology Transforms Medical and Life...
Customer Case Study: How Novel Compute Technology Transforms Medical and Life...
 

More from Suneel Marthi

Streaming topic model training and inference
Streaming topic model training and inferenceStreaming topic model training and inference
Streaming topic model training and inferenceSuneel Marthi
 
Building streaming pipelines for neural machine translation
Building streaming pipelines for neural machine translationBuilding streaming pipelines for neural machine translation
Building streaming pipelines for neural machine translationSuneel Marthi
 
Moving beyond moving bytes
Moving beyond moving bytesMoving beyond moving bytes
Moving beyond moving bytesSuneel Marthi
 
Embracing diversity searching over multiple languages
Embracing diversity  searching over multiple languagesEmbracing diversity  searching over multiple languages
Embracing diversity searching over multiple languagesSuneel Marthi
 
Large Scale Text Processing
Large Scale Text ProcessingLarge Scale Text Processing
Large Scale Text ProcessingSuneel Marthi
 
Distributed Machine Learning with Apache Mahout
Distributed Machine Learning with Apache MahoutDistributed Machine Learning with Apache Mahout
Distributed Machine Learning with Apache MahoutSuneel Marthi
 
Apache Flink Stream Processing
Apache Flink Stream ProcessingApache Flink Stream Processing
Apache Flink Stream ProcessingSuneel Marthi
 

More from Suneel Marthi (7)

Streaming topic model training and inference
Streaming topic model training and inferenceStreaming topic model training and inference
Streaming topic model training and inference
 
Building streaming pipelines for neural machine translation
Building streaming pipelines for neural machine translationBuilding streaming pipelines for neural machine translation
Building streaming pipelines for neural machine translation
 
Moving beyond moving bytes
Moving beyond moving bytesMoving beyond moving bytes
Moving beyond moving bytes
 
Embracing diversity searching over multiple languages
Embracing diversity  searching over multiple languagesEmbracing diversity  searching over multiple languages
Embracing diversity searching over multiple languages
 
Large Scale Text Processing
Large Scale Text ProcessingLarge Scale Text Processing
Large Scale Text Processing
 
Distributed Machine Learning with Apache Mahout
Distributed Machine Learning with Apache MahoutDistributed Machine Learning with Apache Mahout
Distributed Machine Learning with Apache Mahout
 
Apache Flink Stream Processing
Apache Flink Stream ProcessingApache Flink Stream Processing
Apache Flink Stream Processing
 

Recently uploaded

Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 

Recently uploaded (20)

Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 

Measuring vegetation health to predict natural hazards

  • 1. Measuring Vegetation Health toMeasuring Vegetation Health to Predict Natural HazardsPredict Natural Hazards Suneel MarthiSuneel Marthi June 18, 2019June 18, 2019 Berlin Buzzwords, Berlin, GermanyBerlin Buzzwords, Berlin, Germany 1
  • 2. $WhoAmI$WhoAmI Suneel MarthiSuneel Marthi  @suneelmarthi@suneelmarthi Member of Apache Software Foundation Committer and PMC on Apache Mahout, Apache OpenNLP, Apache Streams 2
  • 3. AgendaAgenda Introduction Satellite Image Data Description Satellites and Vegetation What is NDVI ? Feature Engineering Cloud Classification Vegetation Prediction Apache Beam Beam Inference Pipeline Future Work 3
  • 4. IntroductionIntroduction Deep Learning has moved from Academia to IndustryDeep Learning has moved from Academia to Industry Availability of Massive Cloud Computing PowerAvailability of Massive Cloud Computing Power Combination of Compute Resources + Big Data withCombination of Compute Resources + Big Data with Deep Learning models often produces useful andDeep Learning models often produces useful and interesting applicationsinteresting applications 4
  • 5. IntroductionIntroduction Computer Vision for Satellite ImageryComputer Vision for Satellite Imagery Availability of low cost satellite images for researchAvailability of low cost satellite images for research Train a Deep Learning model to Determine VegetationTrain a Deep Learning model to Determine Vegetation HealthHealth 5
  • 6. Goal: Identify Vegetation Index from Landsat8Goal: Identify Vegetation Index from Landsat8 ImagesImages 6
  • 7. Data: Landsat8Data: Landsat8 Earth observation mission from EOSEarth observation mission from EOS 10 spectral bands, from RGB to SWIR (Short Wave10 spectral bands, from RGB to SWIR (Short Wave Infrared)Infrared) Spatial resolution: 30m/px (Visible, NIR bands)Spatial resolution: 30m/px (Visible, NIR bands) Free and open data, updated each dayFree and open data, updated each day 7
  • 8. Landsat8 PayloadLandsat8 Payload Operational Land Imager (OLI)Operational Land Imager (OLI) Thermal Infrared Sensor (TIRS)Thermal Infrared Sensor (TIRS) Resolution of 30m/pixel(visible, NIR, SWIR)Resolution of 30m/pixel(visible, NIR, SWIR) 8
  • 9. Landsat8 BandsLandsat8 Bands Band Range(nm) Resolution Spectrum B1 435-451 30m Coastal B2 452-512 30m Blue B3 533-590 30m Green B4 5636-673 30m Red B5 851-879 30m NIR B6 1566-1651 30m SWIR-1 B7 2107-2294 30m SWIR-2 9
  • 10. How is this related to Vegetation?How is this related to Vegetation? Photosynthetically Active Radiation (PAR) 400 - 700nmPhotosynthetically Active Radiation (PAR) 400 - 700nm rangerange Plants absorb solar radiation in PAR regionPlants absorb solar radiation in PAR region Plants re-emit solar radiation in NIR regionPlants re-emit solar radiation in NIR region Hence, plants appear bright in the NIR spectrumHence, plants appear bright in the NIR spectrum https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture 10
  • 11. How is this related to Vegetation? (Contd)How is this related to Vegetation? (Contd) Plant Chlorophyll absorbs visible light (0.4 to 0.7µm)Plant Chlorophyll absorbs visible light (0.4 to 0.7µm) Plant leaves reflect NIR (0.7 to 1.1µm)Plant leaves reflect NIR (0.7 to 1.1µm) More plant leaves, greater the radiance emited fromMore plant leaves, greater the radiance emited from plantsplants https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture 11
  • 12. Difference in plant reflectances can help determineDifference in plant reflectances can help determine their distribution in satellite imagerytheir distribution in satellite imagery https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture 12
  • 13. How do we measure thisHow do we measure this phenomenon?phenomenon? 13
  • 14. Normalized Difference Vegetation Index (NDVI)Normalized Difference Vegetation Index (NDVI) Used to monitor agriculture production, drought, hazardous fire zonesUsed to monitor agriculture production, drought, hazardous fire zones Bands 5 and 4 in Landsat8 imagesBands 5 and 4 in Landsat8 images NDVI Range: [-1,1]NDVI Range: [-1,1] 14
  • 15. Dense Green Vegetation canopy is typically 0.3 - 0.8Dense Green Vegetation canopy is typically 0.3 - 0.8 Standing water like Deep Oceans (away from coast)Standing water like Deep Oceans (away from coast) typically have -ve or small +ve valuestypically have -ve or small +ve values Soil with a high NIR, tends to have a small positive valueSoil with a high NIR, tends to have a small positive value < 0.2< 0.2 https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture 15
  • 16. Cover Red NIR NDVI Dense Vegetation 0.1 0.5 0.7 Dry Soil 0.269 0.283 0.025 Clouds 0.227 0.228 0.002 Snow and Ice 0.375 0.342 -0.046 Water 0.022 0.013 -0.257 https://grindgis.com/blog/vegetation-indices-arcgis#1https://grindgis.com/blog/vegetation-indices-arcgis#1 16
  • 18. Goal: Identify Vegetation Index from Landsat8Goal: Identify Vegetation Index from Landsat8 ImagesImages 18
  • 19. Data AcquisitionData Acquisition Images downloaded from AWS Earth (available as OpenImages downloaded from AWS Earth (available as Open Data)Data) Data refreshed continuallyData refreshed continually aws s3 sync s3://landsat-pds/c1/L8/044/033 ~/Downloads/landsat-04 19
  • 23. Filter CloudsFilter Clouds Need to remove cloud cover from images before furtherNeed to remove cloud cover from images before further processingprocessing Approach: Mask the clouds from all the feature bandsApproach: Mask the clouds from all the feature bands Compute Median Cloud Masking Composite for the yearCompute Median Cloud Masking Composite for the year 23
  • 24. Cloud Masking FunctionCloud Masking Function /** * Function to mask clouds based on the pixel band of Landsat 8 SR * @param {Image} image input Landsat 8 SR image * @return {Image} cloudmasked Landsat 8 image */ function maskL8sr(image) { // Bits 3 and 5 are cloud shadow and cloud, respectively. var cloudShadowBitMask = (1 << 3); var cloudsBitMask = (1 << 5); // Get the pixel QA band. var qa = image.select('pixel_qa'); // Both flags should be set to zero, indicating clear condition var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0) .and(qa.bitwiseAnd(cloudsBitMask).eq(0)); return image.updateMask(mask); } 24
  • 25. Example Results (B2, B3, B4 bands)Example Results (B2, B3, B4 bands) 25
  • 26. Feature EngineeringFeature Engineering Use Bands B2, B3, B4, B5, B6, B7 for training and prediction Apply the Cloud Masking function to each of the bands 26
  • 27. Feature Engineering (Contd)Feature Engineering (Contd) Use Landsat8 Surface Reflectance data for computing cloud mask Result: Each pixel is classified as 1 of {Vegetation, Barren, Snow/Ice, Water, Cloud} Ignore the Cloud pixels Compute NDVI from Bands B4 and B5, add to the feature vector 27
  • 30. Model TrainingModel Training Two Dense Layers with ReLU and Softmax activationsTwo Dense Layers with ReLU and Softmax activations Dropout: 0.2Dropout: 0.2 Optimization: AdamOptimization: Adam Loss Function: Cross EntropyLoss Function: Cross Entropy One-Hot Encode the LabelsOne-Hot Encode the Labels 30
  • 32. Model Training - KerasModel Training - Keras # Add the model layers model = tf.keras.models.Sequential([ tf.keras.layers.Dense(64, activation=tf.nn.relu), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(nClasses, activation=tf.nn.softmax) ]) # Compile it with the optimizer and loss function model.compile(optimizer=tf.train.AdamOptimizer(), loss='categorical_crossentropy', metrics=['accuracy']) 32
  • 33. Paradise, CA - Landsat8, October 7, 2018Paradise, CA - Landsat8, October 7, 2018 NDVI: -0.23979NDVI: -0.23979 33
  • 34. Paradise, CA - Landsat8, October 23, 2018Paradise, CA - Landsat8, October 23, 2018 NDVI: -0.2407NDVI: -0.2407 34
  • 35. Paradise, CA - Landsat8, November 8, 2018Paradise, CA - Landsat8, November 8, 2018 NDVI: -0.23984151008195187NDVI: -0.23984151008195187 35
  • 36. Paradise, CA - Landsat8, June 4, 2019Paradise, CA - Landsat8, June 4, 2019 NDVI: -0.24NDVI: -0.24 36
  • 37. Scaling it all OutScaling it all Out 37
  • 38. How to Scale - Batch or Stream ?How to Scale - Batch or Stream ? "Batch is an extension of Streaming, except when"Batch is an extension of Streaming, except when Streaming is an extension of Batch"Streaming is an extension of Batch" -- Shannon Quinn, Apache Mahout-- Shannon Quinn, Apache Mahout 38
  • 39. Spark or Flink ?Spark or Flink ? "Spark Streaming is for people who want to operate on"Spark Streaming is for people who want to operate on their streams using Batch idioms.their streams using Batch idioms. Flink Batch is for people who want to operate on theirFlink Batch is for people who want to operate on their batches using Streaming idioms."batches using Streaming idioms." -- Joey Frazee, Apache NiFi-- Joey Frazee, Apache NiFi 39
  • 40. Was ist Apache Beam?Was ist Apache Beam? Agnostic (unified Batch + Stream) programming model Java, Python, Go SDKs Runners for Dataflow Apache Flink Apache Spark Google Cloud Dataflow Local DataRunner 40
  • 41. Warum Apache Beam?Warum Apache Beam? Portierbar: Code abstraction that can be executed on different backend runners Vereinheitlicht: Unified Batch and Streaming API Erweiterbare Modelle und SDK: Extensible API to define custom sinks and sources 41
  • 42. End Users: Create pipelines in a familiar language SDK Writers: Make Beam concepts available in new languages Runner Writers: Support Beam pipelines in distributed processing environments The Apache Beam VisionThe Apache Beam Vision 42
  • 43. Portable Beam ArchitecturePortable Beam Architecture OverviewOverview
  • 44. 43
  • 46. Beam Inference PipelineBeam Inference Pipeline pipeline_options = PipelineOptions(pipeline_args) pipeline_options.view_as(SetupOptions).save_main_session = True pipeline_options.view_as(StandardOptions).streaming = True with beam.Pipeline(options=pipeline_options) as p: filtered_images = (p | "Read Images" >> beam.Create(glob.glob | "Batch elements" >> beam.BatchElements(0, known_args.batchs | "Apply Cloud Mask" >> beam.ParDo(CloudMaskFn.CloudMaskFn()) filtered_images | "Predict Land Use" >> beam.ParDo(Prediction.PredictionFn(known_args.models, 45
  • 47. ConclusionConclusion Paradise, CA over 2018 had a consistent Dry VegetationParadise, CA over 2018 had a consistent Dry Vegetation patterns with NDVI < 0patterns with NDVI < 0 Healthy Green Vegetation in the range [0.3, 1.0)Healthy Green Vegetation in the range [0.3, 1.0) 46
  • 49. Classify Rock FormationsClassify Rock Formations Using Shortwave Infrared images (2.107 - 2.294 nm)Using Shortwave Infrared images (2.107 - 2.294 nm) Radiant Energy reflected/transmitted per unit timeRadiant Energy reflected/transmitted per unit time (Radiant Flux)(Radiant Flux) Eg: Plants don't grow on rocksEg: Plants don't grow on rocks https://en.wikipedia.org/wiki/Radiant_fluxhttps://en.wikipedia.org/wiki/Radiant_flux 48
  • 50. Use images from Red bandUse images from Red band Identify borders, regions without much details withIdentify borders, regions without much details with naked eye - Wonder Why?naked eye - Wonder Why? Images are in Red bandImages are in Red band Unsupervised Learning - ClusteringUnsupervised Learning - Clustering 49
  • 51. CreditsCredits Jörn Kottmann (Apache OpenNLP) Jose Contreras, Kellen Sunderland (Amazon - Berlin) Apache Beam: Pablo Estrada, Ankur Goenka, Maximilian Michels (Google) 50
  • 52. LinksLinks Earth on AWS: https://aws.amazon.com/earth/ Apache Beam: https://beam.apache.org Apache Flink: https://flink.apache.org Slides: https://smarthi.github.io/Berlin- Buzzwords2019-Landsat 51