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 python=3.10
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
If you have compatibility issues, please try tensorflow 2.13.0:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for opticallyshallowdeep-1.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0c83070bd70f855190b29eee11e95145c95d1f63e247a8e604ba8f775dd688 |
|
MD5 | 25006b3f865100a61192bac24e96a5dd |
|
BLAKE2b-256 | 0fa958b513f4e921916e87ceebaaa32ce034b494aeaa6cd6f7153674693e836a |
Hashes for opticallyshallowdeep-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 359312562431a284293cb032049417fa26cc5106b6acdff2725252a10c7de286 |
|
MD5 | 61f5e19f710c645bd342cb14e34ed55c |
|
BLAKE2b-256 | da7e7553667a1238fb6bc7cbd4bffd3eb979f626483408fb48804b33fef1f864 |