SlideShare a Scribd company logo
Large Scale LanduseLarge Scale Landuse
Classification of SatelliteClassification of Satellite
ImageryImagery
Suneel MarthiSuneel Marthi
Jose Luis ContrerasJose Luis Contreras
June 11, 2018June 11, 2018
Berlin Buzzwords, Berlin, GermanyBerlin Buzzwords, Berlin, Germany
1
AgendaAgenda
Introduction
Satellite Image Data Description
Cloud Classification
Segmentation
Apache Beam
Beam Inference Pipeline
Demo
Future Work
2
Goal: Identify Tulip fields from Sentinel-2Goal: Identify Tulip fields from Sentinel-2
satellite imagessatellite images
3
WorkflowWorkflow
4
Data: Sentinel-2Data: Sentinel-2
Earth observation mission from ESAEarth observation mission from ESA
13 spectral bands, from RGB to SWIR (Short Wave13 spectral bands, from RGB to SWIR (Short Wave
Infrared)Infrared)
Spatial resolution: 10m/px (RGB bands)Spatial resolution: 10m/px (RGB bands)
5 day revisit time5 day revisit time
Free and open data policyFree and open data policy
5
Data acquisitionData acquisition
Images downloaded using Sentinel Hub’s WMS (webImages downloaded using Sentinel Hub’s WMS (web
mapping service)mapping service)
Download tool from Matthieu Guillaumin (@mguillau)Download tool from Matthieu Guillaumin (@mguillau)
6
DataData
256 x 256 px images, RGB256 x 256 px images, RGB
7
WorkflowWorkflow
8
Filter CloudsFilter Clouds
Need to remove cloudy images before segmentingNeed to remove cloudy images before segmenting
Approach: train a Neural Network to classify images asApproach: train a Neural Network to classify images as
clear or cloudyclear or cloudy
CNN Architectures: ResNet50 and ResNet101CNN Architectures: ResNet50 and ResNet101
9
ResNet building blockResNet building block
10
Filter Clouds: training dataFilter Clouds: training data
‘Planet: Understanding the Amazon from Space’ Kaggle‘Planet: Understanding the Amazon from Space’ Kaggle
competitioncompetition
40K images labeled as clear, hazy, partly cloudy or40K images labeled as clear, hazy, partly cloudy or
cloudycloudy
11
Filter Clouds: Training data(2)Filter Clouds: Training data(2)
Origin No. of
Images
Cloudy
Images
Kaggle Competition 40000 30%
Sentinel-2(hand
labelled)
5000 50%
Total 45000 32%
Only two classes: clear and cloudy (cloudy = haze +Only two classes: clear and cloudy (cloudy = haze +
partly cloudy + cloudy)partly cloudy + cloudy)
12
Training data splitTraining data split
13
ResultsResults
Model Accuracy F1 Epochs (train +
finetune)
ResNet50 0.983 0.986 23 + 7
ResNet101 0.978 0.982 43 + 9
Choose ResNet50 for filtering cloudy imagesChoose ResNet50 for filtering cloudy images
14
Example ResultsExample Results
15
Data AugmentationData Augmentation
import Augmentor
p = Augmentor.Pipeline(img_dir)
p.skew(probability=0.5, magnitude=0.5)
p.shear(probability=0.3, max_shear=15)
p.flip_left_right(probability=0.5)
p.flip_top_bottom(probability=0.5)
p.rotate_random_90(probability=0.75)
p.rotate(probability=0.75, max_rotation=20)
16
Example Data AugmentationExample Data Augmentation
17
WorkflowWorkflow
18
Segmentation GoalsSegmentation Goals
19
Approach U-NetApproach U-Net
State of the Art CNN for Image Segmentation
Commonly used with biomedical images
Best Architecture for tasks like this
O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. arxiv:1505.04597, 2015O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. arxiv:1505.04597, 2015
20
U-Net ArchitectureU-Net Architecture
21
U-Net Building BlocksU-Net Building Blocks
def conv_block(channels, kernel_size):
out = nn.HybridSequential()
out.add(
nn.Conv2D(channels, kernel_size, padding=1, use_bias=False
nn.BatchNorm(),
nn.Activation('relu')
)
return out
def down_block(channels):
out = nn.HybridSequential()
out.add(
conv_block(channels, 3),
conv_block(channels, 3)
)
return out
22
U-Net Building Blocks (2)U-Net Building Blocks (2)
class up_block(nn.HybridBlock):
def __init__(self, channels, shrink=True, **kwargs):
super(up_block, self).__init__(**kwargs)
self.upsampler = nn.Conv2DTranspose(channels=channels, ker
strides=2, padding=1,
self.conv1 = conv_block(channels, 1)
self.conv3_0 = conv_block(channels, 3)
if shrink:
self.conv3_1 = conv_block(int(channels/2), 3)
else:
self.conv3_1 = conv_block(channels, 3)
def hybrid_forward(self, F, x, s):
x = self.upsampler(x)
x = self.conv1(x)
x = F.relu(x)
x = F.Crop(*[x,s], center crop=True)
23
U-Net: Training dataU-Net: Training data
Ground truth: tulip fields in the
Netherlands
Provided by Geopedia, from
Sinergise
24
Loss function: Soft Dice Coefficient lossLoss function: Soft Dice Coefficient loss
Prediction = Probability of each pixel belonging to aPrediction = Probability of each pixel belonging to a
Tulip Field (Softmax output)Tulip Field (Softmax output)
ε serves to prevent division by zeroε serves to prevent division by zero
25
Evaluation Metric: Intersection Over Union(IoU)Evaluation Metric: Intersection Over Union(IoU)
AkaAka Jaccard IndexJaccard Index
Similar to Dice coefficient, standard metric for imageSimilar to Dice coefficient, standard metric for image
segmentationsegmentation
26
ResultsResults
IoU = 0.73 after 23 training epochs
Related results: DSTL Kaggle competition
IoU = 0.84 on crop vs building/road/water/etc
segmentation
https://www.kaggle.com/c/dstl-satellite-imagery-feature-detection/discussion/29790https://www.kaggle.com/c/dstl-satellite-imagery-feature-detection/discussion/29790
27
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
28
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
29
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
Die Apache Beam VisionDie Apache Beam Vision
30
Inference PipelineInference Pipeline
31
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
| "Filter Cloudy images" >> beam.ParDo(FilterCloudyFn.FilterC
filtered_images | "Segment for Land use" >>
beam.ParDo(UNetInference.UNetInferenceFn(known_args.m
32
Cloud Classifier DoFnCloud Classifier DoFn
class FilterCloudyFn(apache_beam.DoFn):
def process(self, element):
"""
Returns clear images after filtering the cloudy ones
:param element:
:return:
"""
clear_images = []
batch = self.load_batch(element)
batch = batch.as_in_context(self.ctx)
preds = mx.nd.argmax(self.net(batch), axis=1)
idxs = np.arange(len(element))[preds.asnumpy() == 0]
clear_images.extend([element[i] for i in idxs])
yield clear_images
33
U-Net Segmentation DoFnU-Net Segmentation DoFn
class UNetInferenceFn(apache_beam.DoFn):
def save_batch(self, filenames, predictions):
for idx, fn in enumerate(filenames):
base, ext = os.path.splitext(os.path.basename(fn))
mask_name = base + "_predicted_mask" + ext
imsave(os.path.join(self.output, mask_name) , predict
34
DemoDemo
35
No Tulip FieldsNo Tulip Fields
36
Large Tulip FieldsLarge Tulip Fields
37
Small Tulips FieldsSmall Tulips Fields
38
Future WorkFuture Work
39
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
40
Measure Crop HealthMeasure Crop Health
Using Near-Infrared (NIR) radiationUsing Near-Infrared (NIR) radiation
Emitted by plant Chlorophyll and MesophyllEmitted by plant Chlorophyll and Mesophyll
Chlorophyll content differs between plants and plantChlorophyll content differs between plants and plant
stagesstages
Good measure to identify different plants and theirGood measure to identify different plants and their
healthhealth
https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture
41
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 RedbandImages are in Redband
Unsupervised Learning - ClusteringUnsupervised Learning - Clustering
42
CreditsCredits
Jose Contreras, Matthieu Guillaumin, Kellen
Sunderland (Amazon - Berlin)
Ali Abbas (HERE - Frankfurt)
Apache Beam: Pablo Estrada, Lukasz Cwik, Sergei
Sokolenko (Google)
Pascal Hahn, Jed Sundvall (Amazon - Germany)
Apache OpenNLP: Bruno Kinoshita, Joern Kottmann
Stevo Slavic (SAP - Munich)
43
LinksLinks
Earth on AWS: https://aws.amazon.com/earth/
Semantic Segmentation - U-Net:
https://medium.com/@keremturgutlu/semantic-
segmentation-u-net-part-1-d8d6f6005066
ResNet: https://arxiv.org/pdf/1512.03385.pdf
U-Net: https://arxiv.org/pdf/1505.04597.pdf
44
Links (contd)Links (contd)
Apache Beam: https://beam.apache.org
Slides: https://smarthi.github.io/BBuzz18-Satellite-
image-classification-for-landuse
Code: https://github.com/smarthi/satellite-images
45
Fragen ???Fragen ???
46

More Related Content

What's hot

Remote Sensing: Image Classification
Remote Sensing: Image ClassificationRemote Sensing: Image Classification
Remote Sensing: Image Classification
Kamlesh Kumar
 

What's hot (20)

Coordinate systems
Coordinate systemsCoordinate systems
Coordinate systems
 
Remote Sensing: Image Classification
Remote Sensing: Image ClassificationRemote Sensing: Image Classification
Remote Sensing: Image Classification
 
Digital Image Classification.pptx
Digital Image Classification.pptxDigital Image Classification.pptx
Digital Image Classification.pptx
 
Land use/land cover classification using machine learning models
Land use/land cover classification using machine learning  modelsLand use/land cover classification using machine learning  models
Land use/land cover classification using machine learning models
 
georeference
georeferencegeoreference
georeference
 
GIS and Decision Making, Literature Review
GIS and Decision Making, Literature ReviewGIS and Decision Making, Literature Review
GIS and Decision Making, Literature Review
 
Geographic information system
Geographic information systemGeographic information system
Geographic information system
 
GIS for Defence
GIS for DefenceGIS for Defence
GIS for Defence
 
Digital Elevation Models
Digital Elevation ModelsDigital Elevation Models
Digital Elevation Models
 
Data compression
Data compressionData compression
Data compression
 
Geodatabases
GeodatabasesGeodatabases
Geodatabases
 
07 Image classification.pptx
07 Image classification.pptx07 Image classification.pptx
07 Image classification.pptx
 
Gis functions
Gis functionsGis functions
Gis functions
 
Land use land cover
Land use land coverLand use land cover
Land use land cover
 
Spatial data for GIS
Spatial data for GISSpatial data for GIS
Spatial data for GIS
 
Digital image classification
Digital image classificationDigital image classification
Digital image classification
 
Resampling- GIS
Resampling- GISResampling- GIS
Resampling- GIS
 
Land cover and Land Use
Land cover and Land UseLand cover and Land Use
Land cover and Land Use
 
Supervised and unsupervised classification techniques for satellite imagery i...
Supervised and unsupervised classification techniques for satellite imagery i...Supervised and unsupervised classification techniques for satellite imagery i...
Supervised and unsupervised classification techniques for satellite imagery i...
 
Network analysis in gis
Network analysis in gisNetwork analysis in gis
Network analysis in gis
 

Similar to Landuse Classification from Satellite Imagery using Deep Learning

Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...
Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...
Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...
inside-BigData.com
 
Application of recursive perturbation approach for multimodal optimization
Application of recursive perturbation approach for multimodal optimizationApplication of recursive perturbation approach for multimodal optimization
Application of recursive perturbation approach for multimodal optimization
Pranamesh Chakraborty
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 

Similar to Landuse Classification from Satellite Imagery using Deep Learning (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
 
Automatic Classification Satellite images for weather Monitoring
Automatic Classification Satellite images for weather MonitoringAutomatic Classification Satellite images for weather Monitoring
Automatic Classification Satellite images for weather Monitoring
 
GoogleSky Status at Google
GoogleSky Status at GoogleGoogleSky Status at Google
GoogleSky Status at Google
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_i
 
Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...
Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...
Scratch to Supercomputers: Bottoms-up Build of Large-scale Computational Lens...
 
Implementation and performance evaluation of
Implementation and performance evaluation ofImplementation and performance evaluation of
Implementation and performance evaluation of
 
Application of recursive perturbation approach for multimodal optimization
Application of recursive perturbation approach for multimodal optimizationApplication of recursive perturbation approach for multimodal optimization
Application of recursive perturbation approach for multimodal optimization
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Introduction to OpenCV
Introduction to OpenCVIntroduction to OpenCV
Introduction to OpenCV
 
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
 
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
 
BMC 2012 - Invited Talk
BMC 2012 - Invited TalkBMC 2012 - Invited Talk
BMC 2012 - Invited Talk
 
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
 
Visual Object Tracking: Action-Decision Networks (ADNets)
Visual Object Tracking: Action-Decision Networks (ADNets)Visual Object Tracking: Action-Decision Networks (ADNets)
Visual Object Tracking: Action-Decision Networks (ADNets)
 
NIPS2017 Few-shot Learning and Graph Convolution
NIPS2017 Few-shot Learning and Graph ConvolutionNIPS2017 Few-shot Learning and Graph Convolution
NIPS2017 Few-shot Learning and Graph Convolution
 
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGESAUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
 
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGESAUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
AUTOMATIC THRESHOLDING TECHNIQUES FOR SAR IMAGES
 
[CVPRW 2020]Real world Super-Resolution via Kernel Estimation and Noise Injec...
[CVPRW 2020]Real world Super-Resolution via Kernel Estimation and Noise Injec...[CVPRW 2020]Real world Super-Resolution via Kernel Estimation and Noise Injec...
[CVPRW 2020]Real world Super-Resolution via Kernel Estimation and Noise Injec...
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
 
Lausanne 2019 #2
Lausanne 2019 #2Lausanne 2019 #2
Lausanne 2019 #2
 

More from DataWorks Summit

HBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at UberHBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at Uber
DataWorks Summit
 
Security Framework for Multitenant Architecture
Security Framework for Multitenant ArchitectureSecurity Framework for Multitenant Architecture
Security Framework for Multitenant Architecture
DataWorks Summit
 
Computer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near YouComputer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near You
DataWorks Summit
 

More from DataWorks Summit (20)

Data Science Crash Course
Data Science Crash CourseData Science Crash Course
Data Science Crash Course
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisFloating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
 
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFiTracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
 
HBase Tales From the Trenches - Short stories about most common HBase operati...
HBase Tales From the Trenches - Short stories about most common HBase operati...HBase Tales From the Trenches - Short stories about most common HBase operati...
HBase Tales From the Trenches - Short stories about most common HBase operati...
 
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
 
Managing the Dewey Decimal System
Managing the Dewey Decimal SystemManaging the Dewey Decimal System
Managing the Dewey Decimal System
 
Practical NoSQL: Accumulo's dirlist Example
Practical NoSQL: Accumulo's dirlist ExamplePractical NoSQL: Accumulo's dirlist Example
Practical NoSQL: Accumulo's dirlist Example
 
HBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at UberHBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at Uber
 
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
Scaling Cloud-Scale Translytics Workloads with Omid and PhoenixScaling Cloud-Scale Translytics Workloads with Omid and Phoenix
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
 
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFiBuilding the High Speed Cybersecurity Data Pipeline Using Apache NiFi
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
 
Supporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsSupporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability Improvements
 
Security Framework for Multitenant Architecture
Security Framework for Multitenant ArchitectureSecurity Framework for Multitenant Architecture
Security Framework for Multitenant Architecture
 
Presto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything EnginePresto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything Engine
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
 
Extending Twitter's Data Platform to Google Cloud
Extending Twitter's Data Platform to Google CloudExtending Twitter's Data Platform to Google Cloud
Extending Twitter's Data Platform to Google Cloud
 
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
Event-Driven Messaging and Actions using Apache Flink and Apache NiFiEvent-Driven Messaging and Actions using Apache Flink and Apache NiFi
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
 
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
Securing Data in Hybrid on-premise and Cloud Environments using Apache RangerSecuring Data in Hybrid on-premise and Cloud Environments using Apache Ranger
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
 
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
 
Computer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near YouComputer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near You
 
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
Big Data Genomics: Clustering Billions of DNA Sequences with Apache SparkBig Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 

Landuse Classification from Satellite Imagery using Deep Learning

  • 1. Large Scale LanduseLarge Scale Landuse Classification of SatelliteClassification of Satellite ImageryImagery Suneel MarthiSuneel Marthi Jose Luis ContrerasJose Luis Contreras June 11, 2018June 11, 2018 Berlin Buzzwords, Berlin, GermanyBerlin Buzzwords, Berlin, Germany 1
  • 2. AgendaAgenda Introduction Satellite Image Data Description Cloud Classification Segmentation Apache Beam Beam Inference Pipeline Demo Future Work 2
  • 3. Goal: Identify Tulip fields from Sentinel-2Goal: Identify Tulip fields from Sentinel-2 satellite imagessatellite images 3
  • 5. Data: Sentinel-2Data: Sentinel-2 Earth observation mission from ESAEarth observation mission from ESA 13 spectral bands, from RGB to SWIR (Short Wave13 spectral bands, from RGB to SWIR (Short Wave Infrared)Infrared) Spatial resolution: 10m/px (RGB bands)Spatial resolution: 10m/px (RGB bands) 5 day revisit time5 day revisit time Free and open data policyFree and open data policy 5
  • 6. Data acquisitionData acquisition Images downloaded using Sentinel Hub’s WMS (webImages downloaded using Sentinel Hub’s WMS (web mapping service)mapping service) Download tool from Matthieu Guillaumin (@mguillau)Download tool from Matthieu Guillaumin (@mguillau) 6
  • 7. DataData 256 x 256 px images, RGB256 x 256 px images, RGB 7
  • 9. Filter CloudsFilter Clouds Need to remove cloudy images before segmentingNeed to remove cloudy images before segmenting Approach: train a Neural Network to classify images asApproach: train a Neural Network to classify images as clear or cloudyclear or cloudy CNN Architectures: ResNet50 and ResNet101CNN Architectures: ResNet50 and ResNet101 9
  • 10. ResNet building blockResNet building block 10
  • 11. Filter Clouds: training dataFilter Clouds: training data ‘Planet: Understanding the Amazon from Space’ Kaggle‘Planet: Understanding the Amazon from Space’ Kaggle competitioncompetition 40K images labeled as clear, hazy, partly cloudy or40K images labeled as clear, hazy, partly cloudy or cloudycloudy 11
  • 12. Filter Clouds: Training data(2)Filter Clouds: Training data(2) Origin No. of Images Cloudy Images Kaggle Competition 40000 30% Sentinel-2(hand labelled) 5000 50% Total 45000 32% Only two classes: clear and cloudy (cloudy = haze +Only two classes: clear and cloudy (cloudy = haze + partly cloudy + cloudy)partly cloudy + cloudy) 12
  • 14. ResultsResults Model Accuracy F1 Epochs (train + finetune) ResNet50 0.983 0.986 23 + 7 ResNet101 0.978 0.982 43 + 9 Choose ResNet50 for filtering cloudy imagesChoose ResNet50 for filtering cloudy images 14
  • 16. Data AugmentationData Augmentation import Augmentor p = Augmentor.Pipeline(img_dir) p.skew(probability=0.5, magnitude=0.5) p.shear(probability=0.3, max_shear=15) p.flip_left_right(probability=0.5) p.flip_top_bottom(probability=0.5) p.rotate_random_90(probability=0.75) p.rotate(probability=0.75, max_rotation=20) 16
  • 17. Example Data AugmentationExample Data Augmentation 17
  • 20. Approach U-NetApproach U-Net State of the Art CNN for Image Segmentation Commonly used with biomedical images Best Architecture for tasks like this O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. arxiv:1505.04597, 2015O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. arxiv:1505.04597, 2015 20
  • 22. U-Net Building BlocksU-Net Building Blocks def conv_block(channels, kernel_size): out = nn.HybridSequential() out.add( nn.Conv2D(channels, kernel_size, padding=1, use_bias=False nn.BatchNorm(), nn.Activation('relu') ) return out def down_block(channels): out = nn.HybridSequential() out.add( conv_block(channels, 3), conv_block(channels, 3) ) return out 22
  • 23. U-Net Building Blocks (2)U-Net Building Blocks (2) class up_block(nn.HybridBlock): def __init__(self, channels, shrink=True, **kwargs): super(up_block, self).__init__(**kwargs) self.upsampler = nn.Conv2DTranspose(channels=channels, ker strides=2, padding=1, self.conv1 = conv_block(channels, 1) self.conv3_0 = conv_block(channels, 3) if shrink: self.conv3_1 = conv_block(int(channels/2), 3) else: self.conv3_1 = conv_block(channels, 3) def hybrid_forward(self, F, x, s): x = self.upsampler(x) x = self.conv1(x) x = F.relu(x) x = F.Crop(*[x,s], center crop=True) 23
  • 24. U-Net: Training dataU-Net: Training data Ground truth: tulip fields in the Netherlands Provided by Geopedia, from Sinergise 24
  • 25. Loss function: Soft Dice Coefficient lossLoss function: Soft Dice Coefficient loss Prediction = Probability of each pixel belonging to aPrediction = Probability of each pixel belonging to a Tulip Field (Softmax output)Tulip Field (Softmax output) ε serves to prevent division by zeroε serves to prevent division by zero 25
  • 26. Evaluation Metric: Intersection Over Union(IoU)Evaluation Metric: Intersection Over Union(IoU) AkaAka Jaccard IndexJaccard Index Similar to Dice coefficient, standard metric for imageSimilar to Dice coefficient, standard metric for image segmentationsegmentation 26
  • 27. ResultsResults IoU = 0.73 after 23 training epochs Related results: DSTL Kaggle competition IoU = 0.84 on crop vs building/road/water/etc segmentation https://www.kaggle.com/c/dstl-satellite-imagery-feature-detection/discussion/29790https://www.kaggle.com/c/dstl-satellite-imagery-feature-detection/discussion/29790 27
  • 28. 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 28
  • 29. 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 29
  • 30. 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 Die Apache Beam VisionDie Apache Beam Vision 30
  • 32. 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 | "Filter Cloudy images" >> beam.ParDo(FilterCloudyFn.FilterC filtered_images | "Segment for Land use" >> beam.ParDo(UNetInference.UNetInferenceFn(known_args.m 32
  • 33. Cloud Classifier DoFnCloud Classifier DoFn class FilterCloudyFn(apache_beam.DoFn): def process(self, element): """ Returns clear images after filtering the cloudy ones :param element: :return: """ clear_images = [] batch = self.load_batch(element) batch = batch.as_in_context(self.ctx) preds = mx.nd.argmax(self.net(batch), axis=1) idxs = np.arange(len(element))[preds.asnumpy() == 0] clear_images.extend([element[i] for i in idxs]) yield clear_images 33
  • 34. U-Net Segmentation DoFnU-Net Segmentation DoFn class UNetInferenceFn(apache_beam.DoFn): def save_batch(self, filenames, predictions): for idx, fn in enumerate(filenames): base, ext = os.path.splitext(os.path.basename(fn)) mask_name = base + "_predicted_mask" + ext imsave(os.path.join(self.output, mask_name) , predict 34
  • 36. No Tulip FieldsNo Tulip Fields 36
  • 37. Large Tulip FieldsLarge Tulip Fields 37
  • 38. Small Tulips FieldsSmall Tulips Fields 38
  • 40. 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 40
  • 41. Measure Crop HealthMeasure Crop Health Using Near-Infrared (NIR) radiationUsing Near-Infrared (NIR) radiation Emitted by plant Chlorophyll and MesophyllEmitted by plant Chlorophyll and Mesophyll Chlorophyll content differs between plants and plantChlorophyll content differs between plants and plant stagesstages Good measure to identify different plants and theirGood measure to identify different plants and their healthhealth https://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculturehttps://en.wikipedia.org/wiki/Near-infrared_spectroscopy#Agriculture 41
  • 42. 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 RedbandImages are in Redband Unsupervised Learning - ClusteringUnsupervised Learning - Clustering 42
  • 43. CreditsCredits Jose Contreras, Matthieu Guillaumin, Kellen Sunderland (Amazon - Berlin) Ali Abbas (HERE - Frankfurt) Apache Beam: Pablo Estrada, Lukasz Cwik, Sergei Sokolenko (Google) Pascal Hahn, Jed Sundvall (Amazon - Germany) Apache OpenNLP: Bruno Kinoshita, Joern Kottmann Stevo Slavic (SAP - Munich) 43
  • 44. LinksLinks Earth on AWS: https://aws.amazon.com/earth/ Semantic Segmentation - U-Net: https://medium.com/@keremturgutlu/semantic- segmentation-u-net-part-1-d8d6f6005066 ResNet: https://arxiv.org/pdf/1512.03385.pdf U-Net: https://arxiv.org/pdf/1505.04597.pdf 44
  • 45. Links (contd)Links (contd) Apache Beam: https://beam.apache.org Slides: https://smarthi.github.io/BBuzz18-Satellite- image-classification-for-landuse Code: https://github.com/smarthi/satellite-images 45