Instructions to use BiliSakura/SATLAS-transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BiliSakura/SATLAS-transformers with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BiliSakura/SATLAS-transformers")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BiliSakura/SATLAS-transformers", dtype="auto") - Notebooks
- Google Colab
- Kaggle
SatlasPretrain Transformers Models
Hugging Face–compatible checkpoints from the official SatlasPretrain foundation models (ICCV 2023). Each subfolder is a standalone model repo layout (config.json, model.safetensors, preprocessor, and remote code) for feature extraction on satellite and aerial imagery.
Model Description
These models are remote sensing encoders pretrained on the SatlasPretrain dataset covering Sentinel-2, Landsat 8/9, and high-resolution aerial imagery.
This collection bundles 19 checkpoints spanning:
- Architectures: Swin-v2-Base, Swin-v2-Tiny, ResNet50, ResNet152
- Input sources: Sentinel-2, Landsat, aerial
- Modes: single-image (SI) and multi-image temporal max-pooling (MI)
- Band configs: RGB (3ch), multispectral (9ch), Landsat all-bands (11ch)
All folders ship self-contained remote code (modeling_satlaspretrain.py, processor, pipeline) and load with trust_remote_code=True.
Developed by: Allen AI / Satlas
Packaged for Hugging Face by: BiliSakura
License (weights): ODC-BY
Original paper: SatlasPretrain: A Large-Scale Dataset for Remote Sensing Image Understanding
Available checkpoints (19 models)
| Folder | Source | Backbone | Mode | Bands |
|---|---|---|---|---|
satlaspretrain-sentinel2-swinb-si-rgb |
Sentinel-2 | Swin-B | SI | RGB |
satlaspretrain-sentinel2-swinb-mi-rgb |
Sentinel-2 | Swin-B | MI | RGB |
satlaspretrain-sentinel2-swinb-si-ms |
Sentinel-2 | Swin-B | SI | MS (9ch) |
satlaspretrain-sentinel2-swinb-mi-ms |
Sentinel-2 | Swin-B | MI | MS (9ch) |
satlaspretrain-sentinel2-swint-si-rgb |
Sentinel-2 | Swin-T | SI | RGB |
satlaspretrain-sentinel2-swint-mi-rgb |
Sentinel-2 | Swin-T | MI | RGB |
satlaspretrain-sentinel2-swint-si-ms |
Sentinel-2 | Swin-T | SI | MS (9ch) |
satlaspretrain-sentinel2-swint-mi-ms |
Sentinel-2 | Swin-T | MI | MS (9ch) |
satlaspretrain-sentinel2-resnet50-si-rgb |
Sentinel-2 | ResNet50 | SI | RGB |
satlaspretrain-sentinel2-resnet50-mi-rgb |
Sentinel-2 | ResNet50 | MI | RGB |
satlaspretrain-sentinel2-resnet50-mi-ms |
Sentinel-2 | ResNet50 | MI | MS (9ch) |
satlaspretrain-sentinel2-resnet152-si-rgb |
Sentinel-2 | ResNet152 | SI | RGB |
satlaspretrain-sentinel2-resnet152-si-ms |
Sentinel-2 | ResNet152 | SI | MS (9ch) |
satlaspretrain-sentinel2-resnet152-mi-rgb |
Sentinel-2 | ResNet152 | MI | RGB |
satlaspretrain-sentinel2-resnet152-mi-ms |
Sentinel-2 | ResNet152 | MI | MS (9ch) |
satlaspretrain-landsat-swinb-si |
Landsat 8/9 | Swin-B | SI | All (11ch) |
satlaspretrain-landsat-swinb-mi |
Landsat 8/9 | Swin-B | MI | All (11ch) |
satlaspretrain-aerial-swinb-si |
Aerial | Swin-B | SI | RGB |
satlaspretrain-aerial-swinb-mi |
Aerial | Swin-B | MI | RGB |
Usage
Processors default to do_resize: false. Pass tensors or arrays at native resolution; sensor-specific normalization is still applied.
from transformers import pipeline
import torch
model_dir = "satlaspretrain-sentinel2-swinb-si-rgb"
pipe = pipeline(
task="satlaspretrain-feature-extraction",
model=model_dir,
trust_remote_code=True,
)
# Sentinel-2 RGB at native size, values in [0, 1]
x = torch.rand(1, 3, 512, 512)
features = pipe(x, pool=True, return_tensors=True)
print(features.shape)
# Dense feature map
tokens = pipe(x, pool=False, return_tensors=True)
Opt in to resize using the reference size in preprocessor_config.json:
features = pipe(x, pool=True, return_tensors=True, image_processor_kwargs={"do_resize": True})
Standard image-feature-extraction also works:
pipe = pipeline(
task="image-feature-extraction",
model=model_dir,
trust_remote_code=True,
)
Normalization
The bundled image processor applies sensor-specific normalization:
- Sentinel-2 / aerial RGB: divide by 255
- Landsat:
(x - 4000) / 16320, clipped to [0, 1]
See Normalization.md for details.