Skip to main content

Identify optically shallow and deep waters in satellite imagery

Project description

Optically-Shallow-Deep

This python tool delineates optically shallow and deep waters in Sentinel-2 imagery. The tool uses a deep neural network that was trained on a diverse set of global images.

Supported input includes L1C SAFE files and ACOLITE-processed L2R netCDF files. The output geotiff contains probabilities of water pixels being optically shallow and deep.

Originally coded by by Galen Richardson and Anders Knudby, modified and packaged by Yulun Wu

Home page: https://github.com/yulunwu8/Optically-Shallow-Deep

Installation

1 - Create a conda environment and activate it:

conda create --name opticallyshallowdeep
conda activate opticallyshallowdeep

2 - Install tensorflow

For mac OS:

conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos

For windows:

pip3 install tensorflow

More on installing tensorflow: https://www.tensorflow.org/install

3 - Install other dependencies:

conda install -c conda-forge geopandas rasterio tifffile netCDF4 pyproj

4 - Install opticallyshallowdeep:

pip3 install opticallyshallowdeep

Quick Start

import opticallyshallowdeep as osd

# Input file 
file_in = 'test_folder_in/S2.SAFE' # or path to an ACOLTIE-generated L2R netCDF file

# Output folder 
folder_out = 'folder/test_folder_out'

# Run the OSW/ODW classifier 
osd.run(file_in, folder_out)

Output is a 3-band geotiff:

  • B1: Binary prediction (OSW/ODW)
  • B2: Prediction probability of OSW (100 means most likely OSW, 0 means most likely ODW)
  • B3: pixels that are masked out

An intermediate multi-band geotiff and a log file are also generated in the output folder. They can be deleted after the processing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opticallyshallowdeep-1.1.1.tar.gz (256.1 kB view hashes)

Uploaded Source

Built Distribution

opticallyshallowdeep-1.1.1-py3-none-any.whl (256.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page