Coder Social home page Coder Social logo

langnico / gedi-bdl Goto Github PK

View Code? Open in Web Editor NEW
61.0 3.0 26.0 31 KB

This repository provides the code used to create the results presented in "Global canopy height regression and uncertainty estimation from GEDI LIDAR waveforms with deep ensembles".

Shell 5.79% Python 94.21%
cnn lidar gedi waveform deep-learning 1d-convolution 1d-cnn convolutional-neural-networks bayesian-deep-learning deep-ensembles uncertainty-estimation regression

gedi-bdl's Introduction

Global canopy height regression and uncertainty estimation from GEDI LIDAR waveforms with deep ensembles

This repository provides the code used to create the results presented in Global canopy height regression and uncertainty estimation from GEDI LIDAR waveforms with deep ensembles.

Installation

The code has been tested with Python 3.8.5.

Setup a virtual environment

See details in the venv documentation.

Example on linux:

Create a new virtual environment called GEDI_BDL_env.

python3 -m venv /path/to/new/virtual/environment/GEDI_BDL_env

Activate the new environment:

source /path/to/new/virtual/environment/GEDI_BDL_env/bin/activate

Install python packages

After activating the venv, install the python packages with:

pip install -r requirements.txt

Download data for the DEMO scripts

Please download the zip file GEDI_BDL_demo.zip from here.

Extract and save it in this repository such that path reads like this: GEDI-BDL/demo_data/GEDI_BDL_demo/. The demo scripts will refer to this relative path.

This demo dataset contains a subset of the ALS crossover training data used in the paper. It consists of 6,868 samples and is based on the publicly available ALS data from the National Ecological Observatory Network (NEON) in the United States.

Note: The purpose of this demo dataset is to setup the code. Models trained on this subset may not generalize as described in the paper. More information on the demo dataset in the readme file: demo_data/GEDI_BDL_demo/README.txt.

Running the code

Train and test a single CNN (or an ensemble)

This example runs the regression of RH98 (proxy for the canopy top height) from the input L1B waveform. It runs the first model of the first random cross-validation fold.

Running this script multiple times with job indices from 0-9 will train and test a full ensemble of 10 models for the first cross-validation fold. Job indices 10-19 will run the ensemble for the second fold and so on.

bash DEMO_GEDI_regression_crossval_ensemble.sh

Alternative run a parallel job array on an IBM LSF batch system:

bsub < cluster/job_array_regression_crossval_ensemble.sh

Launch tensorboard to look at the training and validation loss curves:

tensorboard --logdir output_demo --port 7777

Collect ensemble predictions from all cross-validation folds

Here we run it for the ensemble demo output that was already included in the .zip file.

python torch_code/collect_ensemble_preds.py demo_data/GEDI_BDL_demo/output_demo/

Predict for all (quality) waveforms in an L1B orbit file

This example demonstrates how a trained model can be deployed to a full orbit file of the GEDI Version 1 data. This script loads the ensemble trained on the demo dataset from here: demo_data/GEDI_BDL_demo/output_demo/testfold_0/.

The orbit files are loaded from demo_data/GEDI_BDL_demo/DEMO_orbit_files. The quality flag from the corresponding L2A file is used to filter the predictions.

bash DEMO_GEDI_orbit_prediction.sh

Citation

If you use this code please cite our paper:

Lang, N., Kalischek, N., Armston, J., Schindler, K., Dubayah, R., & Wegner, J. D. (2022). Global canopy height regression and uncertainty estimation from GEDI LIDAR waveforms with deep ensembles. Remote Sensing of Environment, 268, 112760.

BibTex:

@article{lang2022global,
  title={Global canopy height regression and uncertainty estimation from GEDI LIDAR waveforms with deep ensembles},
  author={Lang, Nico and Kalischek, Nikolai and Armston, John and Schindler, Konrad and Dubayah, Ralph and Wegner, Jan Dirk},
  journal={Remote Sensing of Environment},
  volume={268},
  pages={112760},
  year={2022},
  publisher={Elsevier}
}

gedi-bdl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gedi-bdl's Issues

Train the model with my own label data but can't predict?

Hello, I have met the question.
Everything is ok, when i use the demo dataset, i can predict the canopy height of my research GEDI waveforms.
When the ensemble model is trained with my own dataset, the train result is ok, although the train precision is weak (RMSE=7. ~9.). But I can't predict the test GEDI waveforms even though the test waveforms are the subset of the train dataset. I try to adjust the model parameter (net/batch size/optimizer/...), no help.

TRAIN RESULT
train_result

the TEST RESULT
Snipaste_2023-03-21_09-12-11

Would someone help me?THANKS!!!

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.