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
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.
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
Happy usage! Any bugs reported in the issues tab or send me an email directly: mortimer(dot)werther(at)eawag.ch.