Skip to content

ricds/DL_RS_GEE

Repository files navigation

DL_RS_GEE: Deep Learning with Remote Sensing imagery from Google Earth Engine with R language.

This repo provide code and datasets for training in image segmentation with Deep Learning with Remote Sensing imagery. Experiment is an exercise on rice crops in southern Brazil based on Sentinel-2 data.


Material was used at:

Ricardo Dalagnol, Fabien Wagner. (15/09/2021). Deep learning for Remote Sensing imagery. Mini-course WORCAP 2021 (http://www.inpe.br/worcap/2021/). National Institute for Space Research - INPE. (Presentation Link). (Video pt-br).

Ricardo Dalagnol. (28/10/2021). Introduction to Google Earth Engine with R language. Short course IEEE GRSS-ISPRS SC 2021 (http://grss-isprs.udesc.br/). (Video english).

Ricardo Dalagnol. (04/11/2021). Deep Learning for Remote Sensing images with R language. Short course IEEE GRSS-ISPRS SC 2021 (http://grss-isprs.udesc.br/). (Presentation Link). (Video english).

Next events:

None at this momment.


Example of the output:

U-Net (Deep Learning) Random Forests



Codes in R language:

1) Acquiring imagery from Google Earth Engine directly within R
RGEE pre-installation - please take a look and follow this: rgee_install_packages.R (Video showing the installation in English)
R code: rgee_basics.R
R code: rgee_data_acquisition.R

In the rgee_basics, we see the basics of Google Earth Engine (GEE) in R, thus RGEE
In the rgee_data_acquisition, we have a nice script to acquire Sentinel-2 data for a Machine Learning & Deep Learning experiment


2) Applying deep learning to satellite imagery to map rice crops in the local GPU
Packages pre-installation - please Run this: deep_learning_install_packages.R
R code: deep_learning_crop.R

i) Start with a raw satellite image
ii) Overlay it with samples and crop the data into patches
iii) Train a DL model, and use the DL model to predict the class for all image. Can be done in local PC with GPU or Google Colab
iv) Combine the prediction (multiple patches) into a single mosaic
v) Assess map accuracy quantitatively and qualitatively (visually)
vi) Compare results with a previously produced Random Forests map


3) Deep Learning with remote sensing data for image segmentation: example of rice crop mapping using Sentinel-2 images
Google Colab Jupyter notebook R code: DL_UNet_CropExample.ipynb - link below for Google Colab

Open In Colab

i) Train a deep learning model based on previously prepared cropped patches
ii) Use the model to predict the class for all image patches


4) Deep learning basics with MNIST dataset
Google Colab Jupyter notebook Python code: tutorial_deep_learning_basics_MITmod.ipynb - link below for Google Colab

Open In Colab

MNIST Dream prediction


Dataset:

1) This dataset contains all the data for the experiment to run the code #2 in the PC.

https://zenodo.org/record/5504554/files/DL_Unet_CropExample_dataset.rar

Ricardo Dalagnol. (2021). Dataset for "Deep Learning with remote sensing data for image segmentation: example of rice crop mapping using Sentinel-2 images" (Version v1) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.5504554


Contact

Ricardo Dal'Agnol da Silva
National Institute for Space Research (INPE)
Earth Observation and Geoinformatics Division (DIOTG)
São José dos Campos-SP, Brazil
e-mails: ricds@hotmail.com ; ricardo.silva@inpe.br
phone: +55 12 98208-5089
https://ricds.wordpress.com/
Follow me on Twitter @RicardoDalagnol :)