Google Earth Engine (GEE) - Tensor Flow Flood Model Dataset (Sentinel-1)

Tensor Flow Hydra Flood Models
This data set is the surface water output image of the Hydrological Remote Sensing Analysis Flood (HYDRAFloods) system, using the deep learning TensorFlow method. Specifically, this Joint Research Center (JRC) adjusted learning rate Binary Cross Entropy (BCE) Dice model and method are discussed in detail in the recent Deep Learning Approach to Surface Water Mapping with Google Earth Engine's Sentinel-1 .

Hydrological Remote Sensing Analysis of Floods (or HYDRAFloods) is an open source Python application for downloading, processing and serving surface water maps from remote sensing data. The basis behind this tool is to provide a sensor-independent way to make surface water maps. Additionally, there are workflows that leverage multiple remote sensing datasets in combination to provide daily surface water maps for flood applications.

The HYDRAFloods application was built using Google Earth Engine and Google Cloud Platform (GCP) to take advantage of cloud computing for large-scale calculations and high data volume output. The goal of this package is to give users access to high-quality, cloud-based surface water mapping algorithms with minimal effort. To achieve this goal, hydrafloods provides a high-level API on top of the Earth Engine Python API to reduce duplication of code, such as filtering or carrying metadata for image processing, and to provide complex surface water algorithms. Additionally, this package provides some GCP functions to read and transmit data for use within Earth Engine.

Quick Start
To highlight a quick example of the hydrafloods API and how easy it is to make high-quality surface water maps, we provide a quick example using Sentinel-1 to map surface water at the confluence of the Mekong and Tonle Sap rivers in Cambodia, where Floods are frequent.

literature:

Mayer, T., Poortinga, A., Bhandari, B., Nicolau, A.P., Markert, K., Thwal, N.S., Markert, A., Haag, A., Kilbride, J., Chishtie, F. and Wadhwa, A.,
2021. Deep Learning approach for Sentinel-1 Surface Water Mapping leveraging Google Earth Engine. ISPRS Open Journal of Photogrammetry and Remote
Sensing, p.100005.

More details on HYDRAFloods open-source Python application for downloading, processing and serving surface water maps derived from remote sensing data. See HYDRAFloods documentation. HYDRAFloods Documentation .

  code:

var HydraFloods_Deep_Learning_Output = ee.Image("users/tjm0042/Hydrafloods_Outputs/TensorFlow_Surface_Water_Model_Mosaic")
Map.setCenter(104.9614, 12.2642,9);
var palettes = require('users/gena/packages:palettes');
Map.addLayer(HydraFloods_Deep_Learning_Output,{min: 0,max: 1, palette: palettes.cmocean.Tempo[7]},
"HYDRAFloods TensorFlow Model Approach: Joint Research Centre Adjusted Learning Rate Binary Cross Entropy Dice")

//Add a grayscale map to help higlight the feature
var SubtleGrayscale
 = 
[
  {
    "featureType": "administrative",
    "elementType": "all",
    "stylers": [
      {
        "saturation": "-100"
      }
    ]
  },
  {
    "featureType": "administrative.province",
    "elementType": "all",
    "stylers": [
      {
        "visibility": "off"
      }
    ]
  },
  {
    "featureType": "landscape",
    "elementType": "all",
    "stylers": [
      {
        "saturation": -100
      },
      {
        "lightness": 65
      },
      {
        "visibility": "on"
      }
    ]
  },
  {
    "featureType": "poi",
    "elementType": "all",
    "stylers": [
      {
        "saturation": -100
      },
      {
        "lightness": "50"
      },
      {
        "visibility": "simplified"
      }
    ]
  },
  {
    "featureType": "road",
    "elementType": "all",
    "stylers": [
      {
        "saturation": "-100"
      }
    ]
  },
  {
    "featureType": "road.highway",
    "elementType": "all",
    "stylers": [
      {
        "visibility": "simplified"
      }
    ]
  },
  {
    "featureType": "road.arterial",
    "elementType": "all",
    "stylers": [
      {
        "lightness": "30"
      }
    ]
  },
  {
    "featureType": "road.local",
    "elementType": "all",
    "stylers": [
      {
        "lightness": "40"
      }
    ]
  },
  {
    "featureType": "transit",
    "elementType": "all",
    "stylers": [
      {
        "saturation": -100
      },
      {
        "visibility": "simplified"
      }
    ]
  },
  {
    "featureType": "water",
    "elementType": "geometry",
    "stylers": [
      {
        "hue": "#ffff00"
      },
      {
        "lightness": -25
      },
      {
        "saturation": -97
      }
    ]
  },
  {
    "featureType": "water",
    "elementType": "labels",
    "stylers": [
      {
        "lightness": -25
      },
      {
        "saturation": -100
      }
    ]
  }
]
Map.setOptions('SubtleGrayscale', {SubtleGrayscale: SubtleGrayscale})

Code link:

https://code.earthengine.google.com/?scriptPath=users/sat-io/awesome-gee-catalog-examples:hydrology/TENSORFLOW-HYDRA-FLOOD-MODELS

code:

# content of example.py Python file

# import the hydrafloods and ee package
import hydrafloods as hf
import ee
ee.Initialize()

# specify start and end time as well as geographic region to process
start_time = "2019-10-05"
end_time =  "2019-10-06"
region = ee.Geometry.Rectangle([104, 11.5, 106, 12.5 ])

# get the Sentinel-1 collection
# the hf.dataset classes performs the spatial-temporal filtering for you
s1 = hf.datasets.Sentinel1(region, start_time, end_time)

# apply a water mapping function to the S1 dataset
# this applies the "Edge Otsu" algorithm from https://doi.org/10.3390/rs12152469
water_imgs = s1.apply_func(
    hf.thresholding.edge_otsu,
    initial_threshold=-14,
    edge_buffer=300
)

# take the mode from multiple images
# since this is just imagery from one day, it will simply mosaic the images
water_map = ee.Image(water_imgs.collection.mode())

# export the water map
hf.geeutils.export_image(
    water_map,
    region,
    "users/<YOUR_USERNAME>/water_map_example",
    scale=30,
)

 

License

This work is licensed under a Creative Commons Attribution 4.0 International License. You are free to copy and redistribute the material in any medium or format, and to transform and build upon the material for any purpose, even commercially. You must give appropriate credit, provide a link to the license, and indicate if changes were made.

Curated by: Tim Mayer, Kel Markert, Biplov Bhandari, Ate Poortinga

Keywords: Surface Water Mapping, Floods, Deep Learning TensorFlow, SERVIR

Last updated: 2021-10-20

 

Guess you like

Origin blog.csdn.net/qq_31988139/article/details/129980914