Feature Extraction
Transformers
Safetensors
English
remote-sensing
earth-observation
vision
galileo
sentinel-1
sentinel-2
multimodal
Instructions to use BiliSakura/GALILEO-transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BiliSakura/GALILEO-transformers with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BiliSakura/GALILEO-transformers")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BiliSakura/GALILEO-transformers", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| language: | |
| - en | |
| tags: | |
| - remote-sensing | |
| - earth-observation | |
| - vision | |
| - feature-extraction | |
| - galileo | |
| - sentinel-1 | |
| - sentinel-2 | |
| - multimodal | |
| library_name: transformers | |
| pipeline_tag: feature-extraction | |
| # Galileo Transformers Models | |
| Self-contained HuggingFace model checkpoints for [Galileo](https://arxiv.org/abs/2502.09356). | |
| Each checkpoint subfolder ships remote code for model, processor, and custom pipeline loading with `trust_remote_code=True`. No external `galileo` package is required at inference time. | |
| ## Available checkpoints | |
| | Folder | Hidden size | Layers | Heads | | |
| |--------|-------------|--------|-------| | |
| | `galileo-nano-patch8/` | 128 | 4 | 8 | | |
| | `galileo-tiny-patch8/` | 192 | 12 | 3 | | |
| | `galileo-base-patch8/` | 768 | 12 | 12 | | |
| ## Usage | |
| Galileo operates on native patch grids (default **`patch_size: 8`** in `preprocessor_config.json`). Stack shapes are `(H, W, T, C)`; no fixed 224Γ224 resize is applied. | |
| ```python | |
| from transformers import pipeline | |
| import numpy as np | |
| MODEL = "/path/to/GALILEO-transformers/galileo-nano-patch8" | |
| pipe = pipeline( | |
| task="galileo-feature-extraction", | |
| model=MODEL, | |
| trust_remote_code=True, | |
| ) | |
| # 10-band Sentinel-2 stack at native spatial size | |
| s2 = np.random.randn(64, 64, 1, 10).astype(np.float32) | |
| features = pipe(s2=s2, pool=True, return_tensors=True) | |
| ``` | |
| Sentinel-1 only: | |
| ```python | |
| s1 = np.random.randn(64, 64, 1, 2).astype(np.float32) | |
| features = pipe(s1=s1, pool=True, return_tensors=True) | |
| ``` | |
| ## Test CLI | |
| ```bash | |
| conda activate rsgen | |
| python test_galileo.py | |
| python test_galileo.py --model galileo-tiny-patch8 | |
| python test_galileo.py --model galileo-base-patch8 --no-pool | |
| ``` | |
| ## Dependencies | |
| - `transformers` | |
| - `torch` | |
| - `einops` | |
| ## Per-folder contents | |
| Each checkpoint folder is self-contained: | |
| - `config.json` β HF config with `auto_map` and `custom_pipelines` | |
| - `model.safetensors` β converted encoder weights | |
| - `preprocessor_config.json` β processor settings | |
| - `modeling_galileo.py` β config + encoder + `GalileoEncoderModel` | |
| - `processing_galileo.py` β `GalileoProcessor` | |
| - `pipeline_galileo.py` β `GalileoImageFeatureExtractionPipeline` | |