This is the code accompanying our paper by Alexander Becker, Jan D. Wegner, Evans Dawoe, Konrad Schindler, William J. Thompson, Christian Bunn, Rachael D. Garrett, Fabio Castro, Simon P. Hart, Wilma J. Blaser-Hart.
[Link to paper] [Link to interactive maps] [Link to checkpoints & maps]
* ./shade: code for training and inference of the shade cover model
* reproject.py: build a reprojected dataset from raw input images
* train_gbr.py: train a GBR regressor from the dataset
* predict.py: run inference with a trained model
* ./agbd: code adapted from Lanfranchi et al. (2022) for biomass estimation
The code requires Python 3.9 (i.e. installed via conda), then install all requirements:
pip install -r shade/requirements.txt
Becker, A., Wegner, J. D., Dawoe, E., Schindler, K., Thompson, W. J., Bunn, C., Garrett, R. D., Castro, F., Hart, S. P., & Blaser-Hart, W. J. (2025). The unrealized potential of agroforestry for an emissions-intensive agricultural commodity. Nature Sustainability. https://doi.org/10.1038/s41893-025-01608-7