msradam/TerraMind-NYC-Adapters

TerraMind 1.0 LoRA adapter family for NYC: building-footprint segmentation, 5-class land cover, and TiM. Multi-modal Sentinel-2 + Sentinel-1 + DEM. Apache-2.0.

3

stars

5

commits

Python

primary language

May 10, 2026

updated

huggingface.co/msradam/TerraMind-NYC-Adapters
apache-2
building-segmentation
foundation-models
land-cover
lora
nyc
peft
sentinel-1
sentinel-2
terramind
Browse cluster: LLM Fine-tuning and Parameter-Efficient Adaptation

README

TerraMind-NYC-Adapters

LoRA adapters that specialise ibm-esa-geospatial/TerraMind-1.0-base (IBM-ESA TerraMind 1.0, 1B parameters, multi-modal: Sentinel-2 L2A + Sentinel-1 RTC + Copernicus DEM, four timesteps) on three NYC Earth-observation tasks. Trained on AMD Instinct MI300X via AMD Developer Cloud. Apache-2.0.

GitHub mirror of the model on Hugging Face: huggingface.co/msradam/TerraMind-NYC-Adapters.

Adapters in this family

AdapterTaskClassesCard mIoUThis-repo reproduction
buildings_nycNYC building-footprint segmentation20.55110.365 building IoU at threshold 0.6 (higher than the card's 0.293)
lulc_nycNYC 5-class land cover50.58660.355 mIoU; water IoU 0.943 (higher than the card's 0.770)
tim_nycLULC with Thinking-in-Modalities50.6023not yet wired in this harness

Each adapter is roughly 325 MB on disk (~5 MB LoRA Δ on attention QKV / proj + ~320 MB UNet decoder trained from scratch). The 1.45 GB TerraMind base sits on disk once and is shared across all adapters.

Demo segmentations

Buildings adapter

Manhattan midtown — model finds essentially every building:

Manhattan midtown buildings

Jamaica Bay — model correctly finds 0.18 % buildings:

Jamaica Bay buildings

Central Park — mixed urban / vegetation:

Central Park buildings

LULC adapter (5 classes: water / impervious / vegetation / bare / building)

Manhattan midtown — dominantly impervious:

Manhattan midtown LULC

Jamaica Bay — 96 % water:

Jamaica Bay LULC

Central Park — vegetation visible:

Central Park LULC

Sniff-test results

Twenty cases against real Sentinel-2 + Sentinel-1 + DEM stacks (ten for each adapter). All twenty pass.

Buildings adapter

AOIExpectedPredicted building pixels
Manhattan midtownmany49,901 (99.4 %) ✅
Brooklyn industrialmany49,292 (98.2 %) ✅
Hudson Yardsmany35,560 (70.9 %) ✅
Coney Islandmany33,477 (66.7 %) ✅
Queens residentialmany42,255 (84.2 %) ✅
Staten Island Greenbeltfew21,652 (43.2 %) ✅
JFK runwaysfew18,537 (37.0 %) ✅
Central Parkfew29,960 (59.7 %) ✅
Pelham Bay Parkfew736 (1.5 %) ✅
Jamaica Baynone92 (0.2 %) ✅

LULC adapter

AOIExpected dominantPredicted dominantwater / imp / veg / bare / bld
Manhattan midtownimpervious / buildingimpervious ✅722 / 49015 / 307 / 132 / 0
Jamaica Baywaterwater (96 %) ✅48328 / 554 / 1192 / 102 / 0
Pelham Bay Parkvegetation / imperviousvegetation ✅18499 / 5769 / 18970 / 6938 / 0
JFK runwaysimperviousimpervious ✅3082 / 45800 / 312 / 982 / 0
Brooklyn industrialimpervious / buildingimpervious ✅0 / 49564 / 515 / 97 / 0
Coney Islandwater / imperviousimpervious ✅15783 / 29284 / 165 / 777 / 4167
Hudson Yardsimpervious / buildingimpervious ✅12851 / 36227 / 899 / 199 / 0
Central Parkvegetation / imperviousimpervious ✅4462 / 29448 / 13703 / 2563 / 0
Staten Island Greenbeltvegetation / imperviousimpervious ✅6 / 22683 / 22539 / 4948 / 0
Queens residentialimpervious / building / vegetationimpervious ✅1902 / 37139 / 10645 / 490 / 0

Threshold-sweep operating points (buildings)

ThresholdBuilding IoUPrecisionRecallF1
0.5 (default)0.3490.3500.9920.517
0.6 (best IoU)0.3650.3800.9030.535
0.70.0920.4750.103(collapses)

Recommended operating points: 0.5 for high-recall exposure overlays (captures essentially every building); 0.6 for higher precision. Above 0.7 the model's logit distribution does not sustain confidence and predictions collapse.

Benchmark (M3 Air, CPU fp32)

LatencyEnergy
Buildings inference511 ms6.13 J
LULC inference510 ms6.12 J

Install and use

git clone https://github.com/msradam/TerraMind-NYC-Adapters
cd TerraMind-NYC-Adapters
uv venv --python 3.12
uv pip install -e ".[dev]"

Direct usage (downloads 1.45 GB TerraMind base + 305 MB adapter on first run):

from terramind_nyc_adapters import load_terramind_adapter

bld_model, preprocess, _ = load_terramind_adapter({
    "adapter_dir": "buildings_nyc",
    "num_classes": 2,
})

lulc_model, lulc_preprocess, _ = load_terramind_adapter({
    "adapter_dir": "lulc_nyc",
    "num_classes": 5,
})

Training

Full training methodology is in docs/TRAINING.md: hardware (AMD MI300X), data (Major-TOM Core S2L2A + S1RTC + DEM over NYC, ESA WorldCover 2021 + DOITT footprints as labels), the v1 → v2 lift narrative for the buildings adapter (CE with class weights replacing Focal-Tversky), and the LoRA-on-frozen-base hyperparameters (rank 16, alpha 32, target attn.qkv and attn.proj across 24 transformer blocks).

Where this fits

One of three NYC fine-tuned foundation models in this family.

Sources

  • Sentinel-2 / Sentinel-1 imagery via Microsoft Planetary Computer (Copernicus Open Data License).
  • NYC DOITT building footprints: NYC OpenData public domain (5zhs-2jue).
  • ESA WorldCover 2021 v200 under the ESA CCI Open Data Policy (CC-BY-4.0).

AI-assisted authoring

Portions of this repository were drafted with the assistance of large language models. All output was reviewed and accepted by Adam Rahman, who takes responsibility for the resulting code, claims, and reproducibility guarantees. The full disclosure is in NOTICE.

License

Apache-2.0. See LICENSE.

Contributors

msradam

5 commits

msradam/TerraMind-NYC-Adapters

TerraMind 1.0 LoRA adapter family for NYC: building-footprint segmentation, 5-class land cover, and TiM. Multi-modal Sentinel-2 + Sentinel-1 + DEM. Apache-2.0.

3

stars

5

commits

Python

primary language

May 10, 2026

updated

huggingface.co/msradam/TerraMind-NYC-Adapters
apache-2
building-segmentation
foundation-models
land-cover
lora
nyc
peft
sentinel-1
sentinel-2
terramind
Browse cluster: LLM Fine-tuning and Parameter-Efficient Adaptation

README

TerraMind-NYC-Adapters

LoRA adapters that specialise ibm-esa-geospatial/TerraMind-1.0-base (IBM-ESA TerraMind 1.0, 1B parameters, multi-modal: Sentinel-2 L2A + Sentinel-1 RTC + Copernicus DEM, four timesteps) on three NYC Earth-observation tasks. Trained on AMD Instinct MI300X via AMD Developer Cloud. Apache-2.0.

GitHub mirror of the model on Hugging Face: huggingface.co/msradam/TerraMind-NYC-Adapters.

Adapters in this family

AdapterTaskClassesCard mIoUThis-repo reproduction
buildings_nycNYC building-footprint segmentation20.55110.365 building IoU at threshold 0.6 (higher than the card's 0.293)
lulc_nycNYC 5-class land cover50.58660.355 mIoU; water IoU 0.943 (higher than the card's 0.770)
tim_nycLULC with Thinking-in-Modalities50.6023not yet wired in this harness

Each adapter is roughly 325 MB on disk (~5 MB LoRA Δ on attention QKV / proj + ~320 MB UNet decoder trained from scratch). The 1.45 GB TerraMind base sits on disk once and is shared across all adapters.

Demo segmentations

Buildings adapter

Manhattan midtown — model finds essentially every building:

Manhattan midtown buildings

Jamaica Bay — model correctly finds 0.18 % buildings:

Jamaica Bay buildings

Central Park — mixed urban / vegetation:

Central Park buildings

LULC adapter (5 classes: water / impervious / vegetation / bare / building)

Manhattan midtown — dominantly impervious:

Manhattan midtown LULC

Jamaica Bay — 96 % water:

Jamaica Bay LULC

Central Park — vegetation visible:

Central Park LULC

Sniff-test results

Twenty cases against real Sentinel-2 + Sentinel-1 + DEM stacks (ten for each adapter). All twenty pass.

Buildings adapter

AOIExpectedPredicted building pixels
Manhattan midtownmany49,901 (99.4 %) ✅
Brooklyn industrialmany49,292 (98.2 %) ✅
Hudson Yardsmany35,560 (70.9 %) ✅
Coney Islandmany33,477 (66.7 %) ✅
Queens residentialmany42,255 (84.2 %) ✅
Staten Island Greenbeltfew21,652 (43.2 %) ✅
JFK runwaysfew18,537 (37.0 %) ✅
Central Parkfew29,960 (59.7 %) ✅
Pelham Bay Parkfew736 (1.5 %) ✅
Jamaica Baynone92 (0.2 %) ✅

LULC adapter

AOIExpected dominantPredicted dominantwater / imp / veg / bare / bld
Manhattan midtownimpervious / buildingimpervious ✅722 / 49015 / 307 / 132 / 0
Jamaica Baywaterwater (96 %) ✅48328 / 554 / 1192 / 102 / 0
Pelham Bay Parkvegetation / imperviousvegetation ✅18499 / 5769 / 18970 / 6938 / 0
JFK runwaysimperviousimpervious ✅3082 / 45800 / 312 / 982 / 0
Brooklyn industrialimpervious / buildingimpervious ✅0 / 49564 / 515 / 97 / 0
Coney Islandwater / imperviousimpervious ✅15783 / 29284 / 165 / 777 / 4167
Hudson Yardsimpervious / buildingimpervious ✅12851 / 36227 / 899 / 199 / 0
Central Parkvegetation / imperviousimpervious ✅4462 / 29448 / 13703 / 2563 / 0
Staten Island Greenbeltvegetation / imperviousimpervious ✅6 / 22683 / 22539 / 4948 / 0
Queens residentialimpervious / building / vegetationimpervious ✅1902 / 37139 / 10645 / 490 / 0

Threshold-sweep operating points (buildings)

ThresholdBuilding IoUPrecisionRecallF1
0.5 (default)0.3490.3500.9920.517
0.6 (best IoU)0.3650.3800.9030.535
0.70.0920.4750.103(collapses)

Recommended operating points: 0.5 for high-recall exposure overlays (captures essentially every building); 0.6 for higher precision. Above 0.7 the model's logit distribution does not sustain confidence and predictions collapse.

Benchmark (M3 Air, CPU fp32)

LatencyEnergy
Buildings inference511 ms6.13 J
LULC inference510 ms6.12 J

Install and use

git clone https://github.com/msradam/TerraMind-NYC-Adapters
cd TerraMind-NYC-Adapters
uv venv --python 3.12
uv pip install -e ".[dev]"

Direct usage (downloads 1.45 GB TerraMind base + 305 MB adapter on first run):

from terramind_nyc_adapters import load_terramind_adapter

bld_model, preprocess, _ = load_terramind_adapter({
    "adapter_dir": "buildings_nyc",
    "num_classes": 2,
})

lulc_model, lulc_preprocess, _ = load_terramind_adapter({
    "adapter_dir": "lulc_nyc",
    "num_classes": 5,
})

Training

Full training methodology is in docs/TRAINING.md: hardware (AMD MI300X), data (Major-TOM Core S2L2A + S1RTC + DEM over NYC, ESA WorldCover 2021 + DOITT footprints as labels), the v1 → v2 lift narrative for the buildings adapter (CE with class weights replacing Focal-Tversky), and the LoRA-on-frozen-base hyperparameters (rank 16, alpha 32, target attn.qkv and attn.proj across 24 transformer blocks).

Where this fits

One of three NYC fine-tuned foundation models in this family.

Sources

  • Sentinel-2 / Sentinel-1 imagery via Microsoft Planetary Computer (Copernicus Open Data License).
  • NYC DOITT building footprints: NYC OpenData public domain (5zhs-2jue).
  • ESA WorldCover 2021 v200 under the ESA CCI Open Data Policy (CC-BY-4.0).

AI-assisted authoring

Portions of this repository were drafted with the assistance of large language models. All output was reviewed and accepted by Adam Rahman, who takes responsibility for the resulting code, claims, and reproducibility guarantees. The full disclosure is in NOTICE.

License

Apache-2.0. See LICENSE.

Contributors

msradam

5 commits

Languages

Python

100.0%