With the advent of Hyperspectral satellites and Deep Learning, we have the chance to monitor biodiversity on a global scale as a contribution to global digital data streams.
However, there is still a need for methods that fully report the uncertainty of deep learning-derived products. In this regard, this study introduces Dis_UN, a novel distance-based method for estimating predictive uncertainty in deep learning models for plant trait retrievals.
Unlike traditional uncertainty estimation approaches, Dis_UN quantifies worst-case errors by:
- Using residuals as a proxy for uncertainty.
- Measuring dissimilarity in data manifolds.
- Dis_UN effectively detects Out-Of-Domain (OOD) spectral variations, such as urban surfaces, clouds, and open water.
- Provides more reliable uncertainty estimates compared to conventional methods, which often underestimate uncertainty.
- With the increasing availability of hyperspectral data, robust uncertainty quantification is crucial for Earth Observation applications.
- This method contributes to uncertainty quantification in machine learning-derived maps, offering a practical tool for uncertainty assessment valuable for ecological and environmental analyses.
- Python
3.9.5 - TensorFlow
2.7.0 - Additional dependencies are listed in
requirements.txt.
- Clone the repository
- conda create -n python==3.9
- conda activate
- Install tensorflow (The trained model was tested for =2.7.0). May vary with your system.
- cd into the cloned repo
- pip install -r requirements.txt
Raw data available at:
👉 Data
- Spectra of the training data
- Use case scenes: EnMAP and NEON scenes
👉 Corresponding distances in : distances
- DisQuTraining_50neighFaiss_SpLastlayQuNorWithResiduals.csv
- DistQuInferenceEnMAP_50neighFaiss_SpLastlayQuNor.csv
- DistQuInferenceNEON_50neighFaiss_SpLastlayQuNor.csv
To generate the distances of a new scene to the training data, run:
python distInference.py \
--r ./Data/TrainingSpectra_1522.csv \
--modelpath ./DL_Model/ \
--inferpath ./Data/CaseStudies/EnMAP/clip2_south.tif \
--metapath ./Data/CaseStudies/EnMAP/EnmapBands.csv \
--ne 50 \
--lay -4 \
--norVec True \
--emb True \
--sp True \
--nor True \
--gpu 0 \
--sceneText clip2_southSpLastlayQuNor_Test
To infer uncertainty maps, run:
python distance_UN.py \
--modelpath ./Un_models_95QuReg/ \
--path_dist_ts ./distances/DistQuInferenceEnMAP_50neighFaiss_SpLastlayQuNor.csv \
--sceneText clip2_southSpLastlayQuNor_Un
