Giter Club home page Giter Club logo

waterbody-detection-via-deep-learning's Introduction

Waterbody Detection Via Deep Learning

This project explores the application of deep learning to waterbody detection.

Dataset

https://drive.google.com/file/d/1faVYayxdNFGx2m0IxswDncoKmIxusdf7/view

Running The Script

To run the script, simply execute main.py with the index of the GPU you want to train with specified as an optional parameter. If no GPU is specified, the script will default to GPU 0.

python3 main.py [GPU]

Configuration

The script expects an external file called config.json in which the use should specify the desired configuration. Below is an example of such a file and a table outlining the effects of each setting.

Example Configuration

{
  "timestamp": 1,
  "patch_size": 512,
  "experiment_tag": "unet_multispectral",
  "create_logs": true,
  "train": true,
  "test": true,
  "experiments": 1,
  "use_mixed_precision": true,
  "hyperparameters": {
    "model": "unet", 
    "bands": ["RGB", "NIR", "SWIR"],
    "backbone": null,
    "learning_rate": 0.00005,
    "fusion_head": "naive",
    "loss": "jaccard_bce",
    "batch_size": 4,
    "epochs": 50,
    "apply_transfer": false,
    "random_subsample": false, 
    "water_threshold": 0
  }
}

Available Settings

Setting Effects
timestamp The timestamp to use (1, 2 or 3)
patch_size The desired size of the generated patches
experiment_tag The human-readable tag with which to lable the experiment
create_logs Indicates whether or not we want to create logs for the experiment
train Whether or not we want to run the training loop
test Whether or not we want to test the trained model on the test set
experiments Indicate the number of identical experiments we want to run
use_mixed_precision Indicate the number of identical experiments we want to run

Available Hyperparameters

Hyperparameter Effects
model The model we want to use
bands The bands used as inpiut to the model
backbone The model of the pre-trained backbone we want to use
learning_rate The learning rate used by the optimizer
fusion_head The type of fusion head to use to combine spectral bands
loss The loss to use during training
batch_size The size of batches used in training
epochs The number of epochs to train for
apply_transfer Whether or not to apply the PCT water transfer method
random_subsample Whether or not to randomly sample patches for training
water_threshold The threshold at which to stop transplanting water bodies if apply_transfer=true

Citation

Please cite our work if it is helpful for your research.

@article{rs15051253,
title={Water Body Extraction from Sentinel-2 Imagery with Deep Convolutional Networks and Pixelwise Category Transplantation},
author={Billson, Joshua and Islam, MD Samiul and Sun, Xinyao and Cheng, Irene},
journal={Remote Sensing},
volume={15},
year={2023},
number={5},
article-number={1253},
url={https://www.mdpi.com/2072-4292/15/5/1253},
issn={2072-4292},
doi={10.3390/rs15051253}
}

waterbody-detection-via-deep-learning's People

Contributors

joshuabillson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rsaavedra84

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.