Tessera#
- class torchgeo.models.Tessera(embed_dim=128)[source]#
Bases:
ModuleTessera pixel time series foundation model.
Tessera is a foundation model for pixel-level time series data from Sentinel-1 and Sentinel-2 satellites. It uses separate transformer encoders for SAR and optical data with temporal-aware pooling.
If you use this model in your research, please cite the following paper:
Added in version 0.9.
- __init__(embed_dim=128)[source]#
Initialize a new Tessera instance.
- Parameters:
embed_dim (int) – Output embedding dimension.
- forward(x)[source]#
Forward pass of the Tessera model.
- Parameters:
x (Tensor) – Input tensor of shape (B, seq_len, 14) containing: - Channels 0-9: Sentinel-2 bands (B2-B12) - Channel 10: Sentinel-2 day of year - Channels 11-12: Sentinel-1 VV and VH - Channel 13: Sentinel-1 day of year
- Returns:
Fused embedding tensor of shape (B, embed_dim).
- Raises:
AssertionError – If input does not have 14 channels.
- Return type:
- torchgeo.models.tessera(weights=None, *args, **kwargs)[source]#
Tessera pixel time series foundation model.
If you use this model in your research, please cite the following paper:
Added in version 0.9.
- Parameters:
weights (Tessera_Weights | None) – Pre-trained model weights to use. If using encoder-only weights (
TESSERA_SENTINEL1_ENCODERorTESSERA_SENTINEL2_ENCODER), returns the respective encoder backbone instead of the full model.**kwargs (Any) – Additional keyword arguments to pass to
Tessera.
- Returns:
A Tessera model or encoder backbone.
- Return type: