Skip to content

xinluo2018/WatNet

Repository files navigation

DOI

WatNet:

  • A deep ConvNet for surface water mapping based on Sentinel-2 image

-- Model

  • We use Deeplabv3+ with MobileNetv2 backbone as the main model structure, additionly, some simple yet effective modifications are designed for improving the satellite image-based surface water mapping.

    watnet

-- DataSet

  • Surface water dataset for Deep learning could be downloaded from Zenodo [Link].

    dataset

    Labeling example 1: Labeling example 2:
    example_1 example_2

-- Performance

  • Examples for surface water mapping

    Urban region

    Urban scene AWEI MNDWI WatNet

    Cloudy region

    Cloudy scene AWEI OBIA WatNet

    Mountainous region

    Mountain scene AWEI OBIA WatNet

-- How to use the trained WatNet?

-- Step 1

  • Enter the following commands for downloading the code files, and then configure the python and deep learning environment. The deep learning software used in this repo is Tensorflow 2.5.

    git clone https://github.com/xinluo2018/WatNet.git

-- Step 2

  • Download Sentinel-2 images, and select four visible-near infrared 10-m bands and two 20-m shortwave infrared bands, which corresponding to the band number of 2, 3, 4, 8, 11, and 12 of sentinel-2 image.

-- Step 3

  • Add the prepared sentinel-2 image (6 bands) to the data/test-demo directory, modify the data name in the notebooks/infer_demo.ipynb file, then running the code file: notebooks/infer_demo.ipynb and surface water map can be generated.
  • Users also can specify surface water mapping by using the watnet_infer.py, specifically,
  • --- funtional API:
    from watnet_infer import watnet_infer   
    water_map = watnet_infer(rsimg)  # full example in notebooks/infer_demo.ipynb.
  • --- command line API:
    python watnet_infer.py data/test-demo/*.tif -o data/test-demo/result

-- How to train the WatNet?

  • With the Dataset, the user can train the WatNet through running the code file train/trainer.ipynb. Since tfrecords format data is required in the model training, the user should convert the .tif format dataset to .tfrecords format dataset by running code file dataloader/tfrecord_writter.ipynb firstly.

-- Citation

  • Xin Luo, Xiaohua Tong, Zhongwen Hu. An applicable and automatic method for earth surface water mapping based on multispectral images. International Journal of Applied Earth Observation and Geoinformation, 2021, 103, 102472. [Link]
    @article{luo2021_watnet,
    title = {An applicable and automatic method for earth surface water mapping based on multispectral images},
    author = {Xin Luo and Xiaohua Tong and Zhongwen Hu},
    journal = {International Journal of Applied Earth Observation and Geoinformation},
    volume = {103},
    pages = {102472},
    year = {2021}
    }
    

-- Acknowledgement

About

A deep learning model for surface water mapping based on satellite optical image.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published