Skip to content

DenseForestViT: 10 m Forest Structure From a Native-Resolution ViT

AINewss Editorial Team

DenseForestViT is a compact vision transformer that predicts canopy height, plant area index and foliage height diversity at 10 m from GEDI labels and eight Earth observation modalities. This guide covers its outputs, architecture, measured R² scores, strict input recipe and the geographic limits stated on the model card.

View 1 reference
0 views 0 likes

Allow the functional cookie to save your likes. Privacy details

A satellite view of forest canopy with overlaid height and structure color maps.

What is DenseForestViT?

DenseForestViT is a small vision transformer that predicts three forest-structure variables at 10 m resolution from one model. It was trained on GEDI L2A/L2B labels and eight Earth observation modalities, each kept at its native resolution, by T. Mayer and collaborators.

The model card describes a two-stream architecture: 10 m inputs produce one token per pixel, while 30 m inputs produce one token per 2 x 2 pixel block. Three self-attention layers operate within each stream, cross-attention links the streams, and a convolutional decoder produces three bounded outputs. The full model has 861,679 parameters. The associated paper is listed as in review, and the code lives in a public GitHub repository. Model card

What variables does DenseForestViT predict?

DenseForestViT predicts canopy height, plant area index and foliage height diversity at 10 m, each with a defined unit and output range. These are continuous regression targets, not land-cover classes. Sigmoid-bounded heads keep predictions inside the documented ranges, and an auxiliary waveform head is used only during training.

Output Meaning Unit Range
RH Canopy height, GEDI RH98 meters 0–60
PAI Plant area index m² of plant surface per m² of ground 0–10
FHD Foliage height diversity, Shannon diversity of the vertical profile dimensionless 0–4

The model's heads are sigmoid-bounded to those ranges. During training an auxiliary head reconstructs the GEDI L1B waveform; at inference only Earth observation data is needed, so you do not need GEDI measurements to run it. This is the main practical appeal: one forward pass yields three complementary structure variables. Output definitions

How accurate is DenseForestViT against airborne lidar?

DenseForestViT reaches R-squared values between 0.23 and 0.72 depending on variable and site, with plant area index proving harder than height. The model card reports these against airborne lidar at 10 m. It matched a U-Net for height and exceeded it for plant area index at all three sites.

Site RH R² PAI R² FHD R²
Sewanee, TN 0.60 0.23 0.40
MLBS, VA 0.55 0.33 0.41
ORNL, TN 0.72 0.50 0.49
Held-out GEDI validation 0.55 0.28 0.61

Against a U-Net baseline, DenseForestViT matched height accuracy, exceeded it for plant area index at all sites, and performed similarly for foliage height diversity. The paper reports 95% block-bootstrap intervals, but the model card page lists only point estimates, so do not quote these as precise confidence bounds. Differences between the GEDI-validation and lidar-evaluation numbers also show that the target source matters. Evaluation table

How does DenseForestViT handle 10 m and 30 m inputs together?

It maintains separate token streams for each resolution and links them with cross-attention, using an ALiBi bias derived from the ground distance between token centres. This lets the model keep native pixel spacing instead of resampling every input to a common grid.

The 10 m stream covers Sentinel-1, Sentinel-2 and Sentinel-2 indices, giving three sets of 1,024 tokens per chip. The 30 m stream covers HLS indices, Landsat, Landsat indices, Landsat tasseled cap and SRTM terrain, giving five sets of 256 tokens where one token represents a 60 m block. Cross-attention runs at 96 dimensions with four heads. The design is a direct response to the common practice of upsampling coarse bands, which discards the different spatial support of each sensor.

Training used 152,308 GEDI-centred 32 x 32 chips from 200 sample areas across 24 Appalachian Level IV ecoregions, split into 42,820 test and 22,628 held-out validation chips by 1 km blocks. Huber loss was applied to the 3 x 3 pixels under each GEDI footprint with equal task weights, plus 0.2 times a waveform loss and 0.001 times a total-variation term. Optimization used AdamW at 2 x 10⁻⁴ with an effective batch of 32 and early stopping on GEDI test loss; the selected run was P2_L2_seed2.

How do you run DenseForestViT?

You install PyTorch and Hugging Face Hub, then run the example script with the repository ID. The hard part is input preparation: a 32 x 32 window per modality at native resolution, bands in the exact documented order, median-filled gaps, and per-window 0–1 stretching. Only the centre 3 x 3 pixels are trained predictions.

pip install torch huggingface_hub
python example_inference.py TMayer77/DenseForestViT

Input preparation must follow stage2_windows.py in the code repository:

  1. For each chip centre, assemble a 32 x 32 window of every modality at its native resolution.
  2. Select bands by name in the exact order listed in that script.
  3. Fill missing values with the window median.
  4. Stretch each band to 0–1 within the window.
  5. Use the centre 3 x 3 pixels of the output, corresponding to 30 m, as the trained prediction.

For wall-to-wall mapping, tile one chip per 3 x 3 block; the repository's Stage_2_Inference/stage2_run_v13.py shows the pattern. The model is not deployed by a Hugging Face inference provider, so plan on local execution. Inference instructions

Where does DenseForestViT fail?

The model is trained and evaluated only in Appalachian ecoregions of the eastern United States, and the card says not to apply it elsewhere without retraining and independent validation. It also regresses tall stands toward the mean, saturates plant area index near 3, and expects 2024-style annual composites.

Concretely, stands taller than about 30 m are predicted at 22–28 m, and plant area index saturates near 3 m² per m². That makes the model unsuitable for very tall or very dense forests even within its training region. It also expects 2024-style annual composites built with the recipe in the paper; a different compositing method shifts the input distribution and degrades predictions.

Two more practical limits: the license is not stated on the model card page, so check the repository before any commercial use, and the associated paper is still in review, so the reported intervals may change. Treat this as a research artifact with a narrow, well-documented domain rather than a general forest-monitoring product. Limitations

Frequently asked questions about DenseForestViT

These questions cover the checks before using DenseForestViT: what inputs it needs, its size, how it compares with a U-Net, whether Sentinel-2 alone is enough, and whether a hosted API exists. Each answer is taken from the model card and reflects the narrow domain the authors specify.

What does DenseForestViT need at inference time?

Only Earth observation inputs. The auxiliary waveform head is used during training to improve representations, but inference needs the eight EO modalities and not GEDI measurements.

How big is the model?

861,679 parameters. Much of the checkpoint's size comes from precomputed distance-bias buffers rather than learned weights.

Does it beat a U-Net?

It matched a U-Net for canopy height, beat it for plant area index at all three evaluation sites, and was similar for foliage height diversity. The comparison is limited to the Appalachian evaluation sites.

Can I use Sentinel-2 data alone?

No. The architecture expects both a 10 m stream and a 30 m stream with bands in the documented order. Missing inputs would change the token structure the model was trained on.

Is there a hosted API?

No. The model card states it is not deployed by any inference provider, so you must run it from the repository yourself.

Bottom line

DenseForestViT is a useful example of native-resolution multi-sensor modeling, and its model card is unusually honest about where it breaks. Use it if you work in eastern US Appalachian forests with 2024-style annual composites and need height, PAI and FHD from one small model. Elsewhere, treat the published weights as a starting point for retraining rather than a deployable map product.

References

  1. DenseForestViT model cardhuggingface.co