This repository contains tools for using pre-trained models to predict fractional cover (FC) and LAI based on Sentinel-2 band data. The models are configured and executed using a main.py script and a config.yaml file.
The following models are available for use:
FC: Fractional cover in arable landFC_grassland: Fractional cover in grassland arable landLAI: Leaf area indexSNAP_LAI: Leaf area index using Copernicus Sentinel Application Platform Biophysical Processor
Your data should be provided in a .csv file as reflectance data (between 0 and 1). Each row is a pixel, columns are [B02,B03,B04,B05,B06,B07,B08,B8A,B11,B12] and missing data is np.nan. For the SNAP_LAI model, 3 additional columns are needed containing solar zenith, sensor zenith and relative azimuth (solar - sensor azimuth). All of these values are in degrees.
You will be prompted for your data upon starting the prediction script.
In config.yaml specify your model and output_path (where results will be saved), then call
python main.py
You will need to install torch, as some models (FC, FC_grassland, LAI) use GPUs