This model is fine-tuned from OlmoEarth-v1_2-Base to map live fuel moisture content (LFMC) values for woody vegetation. It follows the same training setup as OlmoEarth-v1-FT-LFMC-Base.
This model is licensed under the OlmoEarth Artifact License. It is intended for use in accordance with Ai2's Responsible Use Guidelines.
It is trained on the Globe-LFMC-2.0 dataset by Marta Yebra et al., which is released under CC0. We use the subset of the data in the continental US.
The model runs with plain rslearn. Instructions are below.
Model Details
The model takes twelve timesteps of satellite imagery as input. Each timestep has one Sentinel-2 L2A mosaic (12 bands) and one Sentinel-1 RTC mosaic (VV and VH), one per 14-day period, covering the 168 days before the prediction date.
At each 10 m pixel, it regresses the LFMC of woody vegetation as a percentage.
The encoder is OlmoEarth-v1_2-Base with patch size 4, followed by a UNet decoder. The encoder was frozen for the first 20 epochs and then fine-tuned for the remaining epochs, up to 100 in total.
Results on the held-out test set (3,212 labeled pixels):
| Metric | Value |
|---|---|
| MSE | 574.0 |
| RMSE | 24.0 |
| MAE | 16.1 |
| Rยฒ | 0.48 |
| Bias | -2.0 |
Training Data
Each sample in Globe-LFMC 2.0 gives a longitude, latitude, timestamp, fuel type and LFMC value. We only use the 44,022 woody samples for this model. Each sample becomes an rslearn window centered on the sample location, and the imagery comes from the 168 days before the sample's timestamp.
The dataset is split spatially. Each 128x128 pixel grid cell is assigned via hash to train (70%), validation (20%) or test (10%).
Files
| File | Description |
|---|---|
model.ckpt |
Fine-tuned Lightning checkpoint. SHA-256: c5916fab6b61eb49f6e351e36cf7974ecfb3f52696ea7d3d2526ea371756cf6d |
model.yaml |
rslearn model config for both prediction (rslearn model predict) and fine-tuning (rslearn model fit) |
dataset_config.json |
rslearn dataset config, including the labels layer used for fine-tuning. Copy it to <dataset>/config.json. |
olmoearth_config.yaml |
The OlmoEarth Studio config the model was trained with, kept as a record of how it was built |
Inference
Setup
pip install "rslearn[extra]==0.1.18" "olmoearth-pretrain-minimal==0.1.4"
These are the versions the model was trained with. Newer versions may work, but they haven't been tested. The OlmoEarth-v1_2-Base encoder weights download from Hugging Face on first use.
Running prediction
Run these commands from the directory containing model.yaml. model.yaml expects the dataset at
./dataset.
1. Create the dataset.
mkdir -p dataset
cp dataset_config.json dataset/config.json
2. Add a window for each area and date you want to predict.
- The window's start time is the prediction date. Imagery is taken from the 168 days before it.
- Set the end time equal to the start time.
- Windows must be in UTM at 10 m resolution.
rslearn dataset add_windows --root ./dataset --group default --name my_area_2024-08-01 \
--box=-118.0929,34.4221,-118.0859,34.4279 --src_crs EPSG:4326 \
--utm --resolution 10 \
--start 2024-08-01T00:00:00+00:00 --end 2024-08-01T00:00:00+00:00
For many areas, pass a vector file with --fname. For large areas, add --grid_size 1024 to tile
them into multiple windows.
3. Download the imagery.
rslearn dataset prepare --root ./dataset --workers 8
rslearn dataset materialize --root ./dataset --workers 8
The model expects all 12 Sentinel-2 and all 12 Sentinel-1 mosaics for every window. Before running
the model, check that each window has 24 layers/*/completed markers:
for w in dataset/windows/default/*; do echo "$w $(ls $w/layers/*/completed | wc -l)"; done
4. Run the model.
rslearn model predict --config model.yaml --ckpt_path model.ckpt
Each window's prediction is written as a GeoTIFF:
dataset/windows/default/<window>/layers/output/value/geotiff.tif
The model runs on CPU, but a GPU is much faster. model.yaml uses 12 data-loader workers. On a
small machine, lower this with --data.init_args.num_workers N.
Example
These are predictions for Angeles Forest Hwy (34.425, -118.0894), a woody site in the training data. They show what the output looks like. They are not a measure of accuracy.
| Date | Measured | Predicted (3x3 pixels around the site) |
|---|---|---|
| 2022-07-04 | 71 | 72.7 |
| 2022-07-18 | 65 | 68.7 |
| 2022-08-01 | 58 | 65.0 |
Fine-tuning
model.yaml also holds the training configuration this model was trained with:
- AdamW optimizer with learning rate 2e-5 and a plateau scheduler
- 100 epochs, batch size 32, random 32x32 crops
- The encoder frozen for the first 20 epochs, then unfrozen with its learning rate multiplied by 10
- The checkpoint with the lowest validation MSE saved to
./checkpoints/best.ckpt
Fine-tuning starts from the OlmoEarth-v1_2-Base encoder with a new decoder.
1. Create training windows. Create one window per LFMC sample:
- Center the window on the sample, and make it 63x63 pixels in UTM at 10 m resolution.
- Set both the start and end times to the sample's date.
- Set the window option
splittotrain,valortest.
The woody samples can be prepared from Globe-LFMC 2.0 with prepare_labels_herbaceous_woody.py.
2. Write the labels. Write each window's labels layer as a float32 raster with one band,
value:
- The sample's LFMC value goes at the sample's pixel.
- Every other pixel gets 29, which the loss ignores.
Mark the layer completed.
3. Download the imagery. Run prepare and materialize as in the inference steps above.
4. Train and evaluate.
rslearn model fit --config model.yaml
rslearn model test --config model.yaml --ckpt_path checkpoints/best.ckpt
Model tree for allenai/OlmoEarth-v1_2-FT-LFMC-Base
Base model
allenai/OlmoEarth-v1_2-Base