GithubHelp home page GithubHelp logo

mowerther / bnn_2022 Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 1.0 38.51 MB

Sentinel-3 OLCI and Sentinel-2 MSI Bayesian Neural Networks (BNNs) for oligo- and mesotrophic lakes

License: GNU General Public License v3.0

Python 100.00%

bnn_2022's Introduction

About

This repo contains the code to use the Bayesian Neural Networks for Sentinel-3 OLCI and Sentinel-2 MSI as described in:
A Bayesian approach for remote sensing of chlorophyll-a and associated retrieval uncertainty in oligotrophic and mesotrophic lakes.

BNNs were developed for oligotrophic and mesotrophic lakes (maximum chla 68 $\text{mg m}^{-3}$) and for optical water types (OWTs) [2, 3, 4, 5, 9] described in Spyrakos et al. (2018). Usage outside of this application scope is not intended. The OWT classification is implemented in this repository and an OWT flag generated for each input observation.

Alt Text
Figure 14 from the manuscript: OLCI BNN chla and uncertainty products over southern New Zealand, 9th of February 2020. Chla was measured in situ at the location of Lake Hawea (star symbol) as 0.89 during the overpass.

Installation

You want to have Anaconda installed and use a dedicated Anaconda environment. To install all required packages and versions, follow these steps (recommended):

Clone this repository (e.g., through GitHub Desktop). Alternatively download the repository.
Open your shell (e.g. CMD) and navigate to the directory where you cloned or downloaded the repository to, for example: cd C:\github_repos\BNN_2022

Then:
conda create -n "bnn_2022_env" python=3.8.15. This creates a fresh conda environment with the correct Python version to load the BNN models. Activate it: conda activate bnn_2022_env.
Then: pip install pandas tqdm tensorflow tensorflow_probability numpy uncertainty-toolbox xarray matplotlib. This installes all the repository requirements into your "bnn_2022_env" environment. You can then use any Python IDE, such as VSCode, activate/set the conda environment “bnn_2022_env” and navigate to the folder of this repository on your local drive.

Usage

The scripts bnn_insitu_dataframe.py and bnn_netcdf_dataset.py come with example data and necessary processing steps. I suggest to try running these successfully before using own data.

The input data from a satellite sensor should be the remote sensing reflectance $(\text{sr}^{-1})$ derived through prior atmospheric correction. The BNNs can also be applied to in situ remote sensing reflectance observations that must correspond to the relative spectral response (RSR) of OLCI or MSI S2A/S2B, and measured as or transformed to above-water reflectance. Negative values < 665 nm will be flagged, and a warning issued. The code raises ValueErrors when observations contain NaN values.

Happy usage! Any bugs reported in the issues tab or send me an email directly: mortimer(dot)werther(at)eawag.ch.

bnn_2022's People

Contributors

mowerther avatar

Stargazers

Olivier Burggraaff avatar  avatar Guillaume P. Morin avatar  avatar  avatar Amir Chegoonian avatar Jiarui Shi(史佳睿) avatar echoxiangzhou avatar Zhenjia ZHOU avatar Xianzhang Dong avatar Cao Zhigang avatar Yashar avatar Youki avatar

Watchers

Kostas Georgiou avatar  avatar  avatar R. Quast avatar

Forkers

homas01123

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.