Downloads · 30 days
2.4K
34% of all-time downloads
nasa-ibm-ai4science/NASA-IBM-Lunar-Foundation-Model
NASA-IBM-Lunar-Foundation-Model is a image feature extraction model from nasa-ibm-ai4science. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for terratorch. The card lists the license as apache-2.0.
A multimodal, multi-resolution foundation model for lunar remote sensing.
Downloads · 30 days
2.4K
34% of all-time downloads
All-time downloads
6.9K
Public
Repo size
12.8 GB
Likes
55
Public
Click a slice to open those files.
.pt12.8 GB · 100%
From the Hugging Face model README
A multimodal, multi-resolution foundation model for lunar remote sensing.
A ViT-B encoder–decoder trained from scratch on SomBench — ~2 million co-registered lunar tile bundles spanning 11 modalities at two spatial scales (LROC NAC ~1 m/px and LROC WAC ~100 m/px). It adapts the TerraMind masked-token recipe to the Moon with two extensions:
FlexiViT patch embedding lets the checkpoint be fine-tuned at other patch sizes without retraining the backbone; modality-wise tokenization lets you drop or add modalities at fine-tuning time.
📄 Full method, ablations, and per-baseline results: paper

Modality-wise tokenization (left/center-left) feeds a TerraMind-style any-to-any masked-token objective (center-right); the pretrained encoder then supports multimodal generation, multimodal fine-tuning, and FlexiViT fine-tuning at new patch sizes (right).
| Encoder / decoder | ViT-B (768 dim, 12 layers, 12 heads) / 12-layer Transformer, shared width |
| Input size / patch size | 256 × 256 px / 16 × 16 at pretraining (FlexiViT-resizable; results below use ps8) |
| Modalities | 11 — 9 dense image-like, plus per-tile optical metadata and static-map context |
| Objective | Cross-entropy over discrete token vocabularies at sampled target positions |
| Tokenizers | 9 modality-specific VQ-VAE, FSQ quantization (levels 8,8,8,6,5), DDPM decoder |
| Pretraining | 16 × H100, 150k steps, global batch 1,536, peak LR 1e-4 cosine, bf16, ~1.1k GPU-h |
| Data | SomBench — 963,609 WAC + 1,000,113 NAC bundles, split geographically by LTM zone / LPS cap |
| Downstream adaptation | TerraTorch |
| License | Apache-2.0 |
backbone/ pretrained checkpoint and config to be used for finetuning/generation
tokenizers/ checkpoints and configs for all tokenizers
A reusable representation for lunar remote sensing: fine-tune or LoRA-adapt the encoder for detection, segmentation, and dense regression on LROC WAC/NAC imagery and co-registered terrain products, with modality subsets and patch grids that differ from pretraining. Any-to-any multimodal generation is supported as a qualitative probe of learned cross-modal structure.
Out of scope. Not a scientific-grade generative product — generated fields are not calibrated predictions and are no substitute for instruments, stereo photogrammetry, or geodetic solutions. The model maintains no geodetic reference frame: it recovers local structure but not absolute values (DTM shape is right at a shifted elevation offset; generated lat/lon can be off by tens of degrees). Not validated for operational decisions such as landing-site certification or hazard clearance. Ice-prospectivity outputs regress a knowledge-driven fuzzy-overlay prospectivity map, not measured ice. Not evaluated beyond the Moon or on products absent from SomBench.
Dense modalities are patch-embedded and tokenized as images. A sample is either NAC- or WAC-centered — the two families are never mixed within a sample.
| Family | Modality | Key | Native res. | Ch. | Source |
|---|---|---|---|---|---|
| WAC (51.2 km tiles) | Visible reflectance | vis | 100 m | 5 | LROC WAC |
| Ultraviolet reflectance | uv | 500 m | 2 | LROC WAC | |
| Topography / slope / aspect | dtm, slope, aspect | 60 m | 1 / 1 / 2 | SLDEM2015 | |
| NAC (512 m tiles) | Panchromatic imagery | nac | 1 m | 1 | LROC NAC |
| Topography / slope / aspect | dtm_3m, slope_3m, aspect_3m | 3 m | 1 / 1 / 2 | NAC-stereo DTM |
Aspect is stored as a sine–cosine pair to avoid angular wrap-around.
Two sequence-like modalities carry scalar context, binned and stringified before text tokenization (e.g. with
0.25° longitude bins, a tile-center longitude of 87.49° becomes C_LON=87.25-->87.50):
TREG, TBOL,
ROCK_ABUND, HPAR, DICE), LOLA products (ROUGHNESS, PSR, AVG_ILLUM, ALBEDO), Mini-RF radar
(MINIRF_*), Kaguya mineralogy (MI_*, SW_FE, SP_MINER), LROC WAC (nr643, TIO2, WAC_*), GRAIL
(GRAVITY), and Lunar Prospector (HYDROGEN). Coverage varies by instrument footprint, from near-global to
polar-only (~6,900 polar tiles per track).Fine-tuning runs through TerraTorch, configured from YAML. The companion repo adds the SomBench benchmark datamodules, backbone wrappers, support for registering new input modalities into the pretrained backbone, and FlexiViT patch-embedding interpolation.
git clone https://github.com/NASA-IMPACT/NASA-IBM-Lunar-Foundation-Model && cd $_
pip install -e .
terratorch fit --config configs/finetune/ice_prospectivity.yaml
Point the backbone checkpoint field at the downloaded checkpoint from this repo. Exact registry names and full hyperparameters are in the GitHub.
Checkpoint can be downloaded using Python:
from huggingface_hub import snapshot_download
# Only download model weights and config
snapshot_download(repo_id="nasa-ibm-ai4science/NASA-IBM-Lunar-Foundation-Model", allow_patterns="backbone/*", local_dir="./")
# Download entire HuggingFace directory
snapshot_download(repo_id="nasa-ibm-ai4science/NASA-IBM-Lunar-Foundation-Model", local_dir="./")
Which adaptation strategy? From our experiments:
Four SomBench benchmarks via TerraTorch, with loaders, splits, augmentations, loss, and metric held fixed across backbones — only encoder weights and initialization differ. Mean ± std over 5 seeds (3 for the ablation). Baselines are ResNet-50, ViT-B MAE, ConvNeXt-B, ConvNeXt-V2-B, SwinV2-B, DaViT-B (ImageNet-1k/22k), plus DeepLabV3+ and SegFormer on segmentation. Full tables are in the paper.
| Benchmark | Metric | Best NASA-IBM LFM | Best baseline | Random-init LFM |
|---|---|---|---|---|
| Robbins craters, WAC, 50% data | mAP ↑ | 0.2541 ± 0.0018 (full FT) | 0.2313 ± 0.0027 (SwinV2-B) | 0.2197 ± 0.0027 |
| Robbins craters, WAC, 100% data | mAP ↑ | 0.2581 ± 0.0017 (LoRA) | 0.2420 ± 0.0047 (SwinV2-B) | 0.2289 ± 0.0037 |
| NAC craters, meter scale | mAP ↑ | 0.1543 ± 0.0098 (LoRA) | 0.1552 ± 0.0086 (SwinV2-B) | 0.1274 ± 0.0151 |
| Irregular Mare Patches | IoU₁ ↑ | 0.5709 ± 0.0114 (frozen) | 0.5687 ± 0.0181 (ConvNeXtV2-B) | 0.3142 ± 0.0746 |
| Polar ice prospectivity | RMSE ↓ | 0.0293 ± 0.0013 (full FT) | 0.0377 ± 0.0004 (SwinV2-B) | 0.0397 ± 0.0004 |
Qualitative generation. Chained generation confirms the intended cross-modal correspondences: slope and aspect from DTM at both scales; reflectance whose illumination pattern follows the supplied metadata (shadows align with the sun direction implied by sub-solar coordinates) even where it doesn't match pixel-for-pixel; and coarse spatial pattern across the full co-registered set. Absolute values drift (see Out of scope). These are qualitative sanity checks, not a systematic evaluation.
@article{fraccaro2026lfm,
title = {Multimodal-Multiresolution Foundation Model for Lunar Remote Sensing},
author = {Fraccaro, Paolo and Nyirjesy, Gabby and Szwarcman, Daniela and Patil, Himanshu
and Gaur, Vishal and Lal, Rohit and Slank, Rachel A. and Dawson, Geoffrey
and Debary, Hiyam and Dionelis, Nikolaos and Barker, Michael K. and Annex, Andrew
and Viswanathan, Vishnu and Morse, Zachary and Schaefer, Ethan I. and Kumar, Ankur
and Watson, Campbell D. and Dawson-Rigas, Rebekah I. and Maskey, Manil
and Roy, Sujit and Ramachandran, Rahul and Bernab\'e-Moreno, Juan},
year = {2026}
}
@misc{sombench2026collection,
author = {Patil, Himanshu and Nyirjesy, Gabby and Slank, Rachel A. and Gaur, Vishal
and Szwarcman, Daniela and Fraccaro, Paolo and Dionelis, Nikolaos and Barker, Michael K.
and Annex, Andrew and Viswanathan, Vishnu and Morse, Zachary and Schaefer, Ethan I.
and Debary, Hiyam and Kumar, Ankur and Lal, Rohit and Dawson, Geoffrey
and Watson, Campbell and Dawson-Rigas, Rebekah I. and Maskey, Manil
and Bernab\'e-Moreno, Juan and Ramachandran, Rahul and Roy, Sujit},
title = {{SomBench}: Benchmark Dataset for Advancing Machine Learning in Lunar Science},
year = {2026},
howpublished = {\url{https://huggingface.co/collections/nasa-ibm-ai4science/lunar-fm-ml-ready-benchmark-dataset-sombench}}
}
Supported by NASA under Award No. 80MSFC25M0084. Data products courtesy of LROC, LOLA, Diviner, Mini-RF, Kaguya/SELENE, GRAIL, Lunar Prospector, and USGS.
Contact: Sujit Roy ([email protected]) · Paolo Fraccaro ([email protected])