nasa-ibm-ai4science/Crater-Detection-NASA-IBM-Lunar-Foundation-Model
NASA-IBM LFM — Crater Detection
Fine-tuned crater-detection checkpoints for the [NASA-IBM Lunar Foundation Model](https://huggingface.co/nasa-ibm-ai4science/NASA-IBM-Lunar-Foundation-Model) (NASA-IBM LFM).
Two checkpoints, one per scale, both LoRA-adapted from the same pretrained lunar backbone — the adaptation strategy that performed best on crater detection in our experiments:
- WAC (context scale, ~100 m/px) — trained on the Robbins crater catalog benchmark. Best result on the benchmark: mAP 0.2581 ± 0.0017, ahead of every ImageNet-pretrained baseline (best: SwinV2-B, 0.2420 ± 0.0047) and of an architecture-matched random-init control (0.2289 ± 0.0037).
- NAC (meter scale, ~1 m/px) — trained on the NAC hand-labeled benchmark. mAP 0.1543 ± 0.0098, the best NASA-IBM LFM variant on this task and statistically indistinguishable from the top baseline (SwinV2-B, 0.1552 ± 0.0086).
📄 Full method and tables: [paper](https://huggingface.co/nasa-ibm-ai4science/NASA-IBM-Lunar-Foundation-Model/blob/main/NI_LFM_Technical_Report.pdf) · 💻 Fine-tuning code and configs: [GitHub](https://github.com/NASA-IMPACT/NASA-IBM-Lunar-Foundation-Model) · 🧠 Pretrained backbone: [nasa-ibm-lunar-fm](https://huggingface.co/nasa-ibm-ai4science/NASA-IBM-Lunar-Foundation-Model)
<p align="center"> <img src="craterpredictionWAC.png" alt="Crater detection predictions for the WAC Robbins catalog benchmark." width="75%"> </p>
<p align="center"> <img src="craterpredictionNAC.png" alt="Crater detection predictions for the NAC Hand Labeled benchmark." width="75%"> </p>
<p align="center"><em>Example predictions. Top: WAC / Robbins crater catalog. Bottom: NAC hand-labeled dataset. Green: ground truth; blue: predictions at confidence ≥ 0.5. The NAC benchmark has denser, less sharply defined labels and part of it is annotated at 5 m/px (visibly blurrier — including the tile shown), which helps explain the lower scores there for all models.</em></p>
<!-- { width=50% }
{ width=50% } Example predictions. Top: WAC / Robbins crater catalog. Bottom: NAC hand-labeled dataset. Green: ground truth; blue: predictions at confidence ≥ 0.5. The NAC benchmark has denser, less sharply defined labels and part of it is annotated at 5 m/px (visibly blurrier — including the tile shown), which helps explain the lower scores there for all models. -->
Checkpoints at a glance
Repository contents
NAC_config.yaml NAC craters: TerraTorch config for NAC crater task
NAC_ni_lfm_ps9_s44.ckpt NAC craters: LoRA adapter + detection head weights
WAC_congig.yaml WAC, Robbins craters: TerraTorch config (100% training data)
WAC_ni_lfm_ps8_lora_s46.ckpt WAC, Robbins craters: LoRA adapter + detection head weights (100% training data)The pretrained backbone is not duplicated here — pull it from nasa-ibm-lunar-fm and point the config's backbone checkpoint field at it.
Benchmark datasets
Both benchmarks ship as part of SomBench.
Robbins craters (WAC). The Robbins catalog is a manually annotated global database of over 2 million lunar impact craters, intended as a near-complete census of diameters ≥ 1–2 km, digitized from LROC WAC global mosaics with topographic cross-checks. Rim polygons are converted to per-tile bounding boxes. The benchmark is 1,000 WAC visible tiles drawn from the test split of the pretraining corpus, filtered to solar-incidence angles of 60–80° for favorable illumination.
NAC hand-labeled. Built from LROC NAC imagery (1–5 m/px) spanning six NAC PHO sites — Highlands, King Ejecta, Apollo 15 S-IVB, Apollo 17, Reiner Gamma, and March 17 Impact Crater — selected under relief-enhancing illumination (incidence ~50–80°). Craters were manually labeled inside 4–6 fixed 1024 × 1024 px study areas per site using co-registered 3 m/px DTMs, digitized as circles with OpenCraterTool, then mapped to 256 × 256 patches in COCO format: 766 patches, 97,104 crater annotations. Splits are enforced at both site and study-area level to prevent leakage.
Intended use
Detecting impact craters in LROC imagery at either context scale (WAC mosaics) or meter scale (NAC frames), and as a starting point for further fine-tuning on your own crater labels. Crater catalogs underpin relative-age dating, geologic mapping, and landing-site hazard assessment — these checkpoints are research tools for that pipeline, not certified products for any of it.
Out of scope.
- Not validated for operational decisions such as landing-site certification or hazard clearance. Absolute mAP is modest, particularly at meter scale (0.15), and detections should be treated as candidates for review.
- Illumination-conditioned. Both benchmarks were built under favorable incidence angles (60–80° WAC, ~50–80° NAC). Behavior under near-nadir or extreme-grazing illumination is untested.
- WAC and NAC tiles come from the pretraining test split, so they are unseen by the backbone — but they are drawn from the same corpus and instrument processing. Transfer to other mosaic products or reprocessings is unmeasured.
- Not evaluated on other planetary bodies. As with the backbone, no geodetic reference frame is maintained.
Usage
Both checkpoints run 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 .
# reproduce the WAC / Robbins fine-tune
terratorch fit --config configs/finetune/crater_wac_robbins_lora.yaml
# evaluate a released checkpoint
terratorch test --config configs/finetune/crater_wac_robbins_lora.yaml \
--ckpt_path wac_robbins/checkpoint.ckptfrom huggingface_hub import snapshot_download
local = snapshot_download("nasa-ibm-ai4science/Crater-Detection-NASA-IBM-Lunar-Foundation-Model")
# then set the backbone checkpoint path in the YAML to the downloaded nasa-ibm-lunar-fm backboneExact registry names and full hyperparameters are in the GitHub repo.
Evaluation
All backbones are fine-tuned through TerraTorch with the data loaders, splits, augmentations, loss, and evaluation metric held fixed — only encoder weights and initialization differ. Values are mean ± standard deviation over 5 random seeds; bold is the best mean per column, <u>underline</u> the second best. Metrics are test-set bounding-box mAP (COCO convention).
Baselines are ResNet-50, ViT-B MAE, ConvNeXt-B, ConvNeXt-V2-B, SwinV2-B, and DaViT-B initialized from public ImageNet-1k/22k weights, plus two from-scratch controls: a random-init ResNet-50 and an architecturally identical random-init copy of our model, which isolates the contribution of lunar pretraining from that of architecture.
Robbins craters, LROC WAC (context scale)
Reported at two training-data fractions to probe label efficiency.
50% training data
100% training data — the released WAC checkpoint
NAC hand-labeled craters (meter scale), 100% training data
The released NAC checkpoint.
What to read from these tables
- On WAC, lunar pretraining wins clearly. The pretrained variants lead every metric column at both data fractions, and the gap to both the best ImageNet baseline and the random-init control is substantially larger than the seed spread. The ranking is stable across fractions.
- Label efficiency. The pretrained variants trained on 50% of the WAC data already match or exceed SwinV2-B trained on the full set (0.2541 / 0.2539 vs. 0.2420).
- LoRA is the better choice here. It tops every WAC column at 100% data and gives the best NASA-IBM LFM mAP on NAC, while training only a small fraction of the encoder parameters — and with a narrower seed spread than full fine-tuning (e.g. NAC: ± 0.0098 vs. ± 0.0264). This is why both released checkpoints are LoRA.
- On NAC, treat the leaders as comparable. Scores are low across the board and the top models sit inside one another's standard deviation, so LoRA at 0.1543 and SwinV2-B at 0.1552 should not be read as a ranking. Two properties of the benchmark plausibly bound all models: labels are dense and less sharply defined than the Robbins boxes, and part of the data is annotated at 5 m/px and visibly blurrier.
- Freezing the encoder fails on this task. The frozen variant falls below every baseline at both scales, and on NAC performs like random init (0.1295 vs. 0.1274) — some encoder adaptation is needed at meter scale.
Training configuration
Shared across both checkpoints unless noted.
Optimizer recipes are deliberately not shared across backbone families: our pretrained model uses layer-wise LR decay with a lower encoder LR to avoid pushing pretrained representations away early in training, while ImageNet baselines and from-scratch controls use flat learning rates conventional for their architectures.
Limitations
- Small test sets. 100 WAC tiles and 62 NAC patches. Differences below the reported seed spread are not a ranking — this is the main caveat on the NAC numbers.
- NAC annotation heterogeneity. Sites annotated at 5 m/px are visibly blurrier than higher-resolution sites, and the benchmark mixes both. NAC pointing is uncontrolled in these frames.
- NAC coverage is site-limited by construction — six NAC PHO sites with co-registered 3 m stereo DTMs. Globally distributed, not globally dense.
Citation
@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}}
}
@article{Robbins2019New,
title = {A New Global Database of Lunar Impact Craters $>$1--2 km: 1. Crater Locations
and Sizes, Comparisons With Published Databases, and Global Analysis},
author = {Robbins, Stuart J.},
journal = {Journal of Geophysical Research: Planets},
volume = {124},
pages = {871--892},
year = {2019},
doi = {10.1029/2018JE005592}
}Please also cite TerraMind (Jakubik et al., 2025), TerraTorch (Gomes et al., 2025), FlexiViT (Beyer et al., 2023), and — for the NAC annotations — OpenCraterTool (Heyer et al., 2023).
Acknowledgments
Supported by NASA under Award No. 80MSFC25M0084. Data products courtesy of LROC and LOLA.
Contact: Sujit Roy (sujit.roy@nasa.gov) · Paolo Fraccaro (paolo.fraccaro@ibm.com)
