Datasets:

ArXiv:
License:
AGBD / README.md
ghjuliasialelli's picture
Update README.md
ac8ae78 verified
metadata
license: cc-by-nc-4.0
task_categories:
  - image-segmentation

🌲 AGBD: A Global-scale Biomass Dataset 🌳

Authors: Ghjulia Sialelli (gsialelli@ethz.ch), Torben Peters, Jan Wegner, Konrad Schindler

Paper: https://huggingface.co/papers/2406.04928

🆕 Updates

  • The dataset was last modified on Feb. 26th, 2025
  • See the changelog for more information about what was updated!

🚀 Quickstart

To get started quickly with this dataset, use the following code snippet:

⚠️ HuggingFace does not support loading scripts anymore. We are in the process of migrating to a new supported format. Thank you for your patience. In the meantime, please reach out to gsialelli@ethz.ch for dataset access.

# Install the datasets library if you haven't already
!pip install datasets

# Import necessary modules
from datasets import load_dataset

# Load the dataset
dataset = load_dataset('prs-eth/AGBD', trust_remote_code=True, streaming=True)["train"]  # Options: "train", "validation", "test"

# Iterate over the dataset
for sample in dataset:
  features, label = sample['input'], sample['label']

This code will load the dataset as an IterableDataset. You can find more information on how to work with IterableDataset objects in the Hugging Face documentation.


📊 Dataset Overview

Each sample in the dataset contains a pair of pre-cropped images along with their corresponding biomass labels. For additional resources, including links to the preprocessed uncropped data, please visit the project page on GitHub.

⚙️ Load Dataset Options

The load_dataset() function provides the following configuration options:

  • norm_strat (str) : {'pct', 'mean_std', 'none'} (default = 'pct')
    The strategy to apply to process the input features. Valid options are: 'pct', which applies min-max scaling with the 1st and 99th percentiles of the data; 'mean_std' which applies Z-score normalization; and 'none', which returns the un-processed data.

  • encode_strat (str) : {'sin_cos', 'onehot', 'cat2vec', 'none'} (default = 'sin_cos') The encoding strategy to apply to the land classification (LC) data. Valid options are: 'onehot', one-hot encoding; 'sin_cos', sine-cosine encoding; 'cat2vec', cat2vec transformation based on embeddings pre-computed on the train set.

  • input_features (dict) The features to be included in the data, the default values being:

    {'S2_bands': ['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09','B11', 'B12'], 
     'S2_dates' : False, 'lat_lon': True, 'GEDI_dates': False, 'ALOS': True, 'CH': True, 'LC': True, 
     'DEM': True, 'topo': False}
    
  • additional_features (list) (default = [])
    A list of additional features the dataset should include. Refer to the documentation below for more details. Possible values are:

    ['s2_num_days', 'gedi_num_days', 'lat', 'lon', 'agbd_se', 'elev_lowes', 'leaf_off_f', 'pft_class', 'region_cla', 'rh98', 'sensitivity', 'solar_elev', 'urban_prop']
    

    This metadata can later be accessed as such:

    from datasets import load_dataset
    
    dataset = load_dataset('AGBD.py',trust_remote_code=True,streaming=True)
    for sample in dataset['train']:
      lat = sample['lat']
      break
    
  • patch_size (int) (default =15)
    The size of the returned patch (in pixels). The maximum value is 25 pixels, which corresponds to 250 meters.


🖼️ Features Details

Each sample consists of a varying number of channels, based on the input_features and encode_strat options passed to the load_dataset() function. The channels are organized as follows:

Feature Channels Included by default? Description
Sentinel-2 bands B01, B02, B03, B04, B05, B06, B07, B08, B8A, B09, B11, B12 Y Sentinel-2 bands, in Surface Reflectance values
Sentinel-2 dates s2_num_days, s2_doy_cos, s2_doy_sin N Date of acquisition of the S2 image (in number of days wrt the beginning of the GEDI mission); sine-cosine encoding of the day of year (DOY).
Geographical coordinates lat_cos, lat_sin, lon_cos, lon_sin Y Sine-cosine encoding of the latitude and longitude.
GEDI dates gedi_num_days, gedi_doy_cos, gedi_doy_sin N Date of acquisition of the GEDI footprint (in number of days wrt the beginning of the GEDI mission); sine-cosine encoding of the day of year (DOY).
ALOS PALSAR-2 bands HH,HV Y ALOS PALSAR-2 bands, gamma-naught values in dB.
Canopy Height ch, ch_std Y Canopy height from Lang et al. and associated standard deviation.
Land Cover Information lc_encoding*, lc_prob Y Encoding of the land class, and classification probability (as a percentage between 0 and 1).
Topography slope, aspect_cos, aspect_sin N Slope (percentage between 0 and 1); sine-cosine encoded aspect of the slope.
Digital Elevation Model (DEM) dem Y Elevation (in meters).

This corresponds to the following value for input_features : {'S2_bands': ['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09','B11', 'B12'], 'S2_dates' : False, 'lat_lon': True, 'GEDI_dates': False, 'ALOS': True, 'CH': True, 'LC': True, 'DEM': True, 'topo': False}

Regarding lc_encoding*, the number of channels follows this convention:

  • sin_cos (default) : 2 channels
  • cat2vec : 5 channels
  • onehot : 14 channels
  • none : 1 channel

Should you get stuck, you can debug the number of channels using the compute_num_features() function in AGBD.py.

In summary, the channels are structured as follows:

(Sentinel-2 bands) | (Sentinel-2 dates) | (Geographical coordinates) | (GEDI dates) | (ALOS PALSAR-2 bands) | (Canopy Height) | (Land Cover Information) | (Topography) | DEM

➕ Additional Features

You can include a list of additional features from the options below in your dataset configuration:

  • "agbd_se" - AGBD Standard Error: The uncertainty estimate associated with the aboveground biomass density prediction for each GEDI footprint.
  • "elev_lowes" - Elevation: The height above sea level at the location of the GEDI footprint.
  • "leaf_off_f" - Leaf-Off Flag: Indicates whether the measurement was taken during the leaf-off season, which can impact canopy structure data.
  • "pft_class" - Plant Functional Type (PFT) Class: Categorization of the vegetation type (e.g., deciduous broadleaf, evergreen needleleaf).
  • "region_cla" - Region Class: The geographical area where the footprint is located (e.g., North America, South Asia).
  • "rh98" - RH98 (Relative Height at 98%): The height at which 98% of the returned laser energy is reflected, a key measure of canopy height.
  • "sensitivity" - Sensitivity: The proportion of laser pulse energy reflected back to the sensor, providing insight into vegetation density and structure.
  • "solar_elev" - Solar Elevation: The angle of the sun above the horizon at the time of measurement, which can affect data quality.
  • "urban_prop" - Urban Proportion: The percentage of the footprint area that is urbanized, helping to filter or adjust biomass estimates in mixed landscapes.
  • "gedi_num_days" - Date of GEDI Footprints: The specific date on which each GEDI footprint was captured, adding temporal context to the measurements.
  • "s2_num_days" - Date of Sentinel-2 Image: The specific date on which each Sentinel-2 image was captured, ensuring temporal alignment with GEDI data.
  • "lat" - Latitude: Latitude of the central pixel.
  • "lon" - Longitude: Longitude of the central pixel.