{"id":51429827,"url":"https://github.com/msradam/terramind-nyc-adapters","last_synced_at":"2026-07-05T03:02:36.232Z","repository":{"id":356946803,"uuid":"1234707441","full_name":"msradam/TerraMind-NYC-Adapters","owner":"msradam","description":"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.","archived":false,"fork":false,"pushed_at":"2026-05-10T15:37:05.000Z","size":2867,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T16:34:14.731Z","etag":null,"topics":["apache-2","building-segmentation","foundation-models","land-cover","lora","nyc","peft","sentinel-1","sentinel-2","terramind"],"latest_commit_sha":null,"homepage":"https://huggingface.co/msradam/TerraMind-NYC-Adapters","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msradam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-10T14:39:02.000Z","updated_at":"2026-05-10T15:46:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/msradam/TerraMind-NYC-Adapters","commit_stats":null,"previous_names":["msradam/terramind-nyc-adapters"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/msradam/TerraMind-NYC-Adapters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msradam%2FTerraMind-NYC-Adapters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msradam%2FTerraMind-NYC-Adapters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msradam%2FTerraMind-NYC-Adapters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msradam%2FTerraMind-NYC-Adapters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msradam","download_url":"https://codeload.github.com/msradam/TerraMind-NYC-Adapters/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msradam%2FTerraMind-NYC-Adapters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35141967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-2","building-segmentation","foundation-models","land-cover","lora","nyc","peft","sentinel-1","sentinel-2","terramind"],"created_at":"2026-07-05T03:02:33.667Z","updated_at":"2026-07-05T03:02:36.105Z","avatar_url":"https://github.com/msradam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TerraMind-NYC-Adapters\n\nLoRA adapters that specialise [`ibm-esa-geospatial/TerraMind-1.0-base`](https://huggingface.co/ibm-esa-geospatial/TerraMind-1.0-base)\n(IBM-ESA TerraMind 1.0, 1B parameters, multi-modal: Sentinel-2 L2A +\nSentinel-1 RTC + Copernicus DEM, four timesteps) on three NYC\nEarth-observation tasks. Trained on AMD Instinct MI300X via AMD Developer\nCloud. Apache-2.0.\n\nGitHub mirror of the model on Hugging Face:\n[`huggingface.co/msradam/TerraMind-NYC-Adapters`](https://huggingface.co/msradam/TerraMind-NYC-Adapters).\n\n## Adapters in this family\n\n| Adapter | Task | Classes | Card mIoU | This-repo reproduction |\n|---|---|---|---:|---:|\n| `buildings_nyc` | NYC building-footprint segmentation | 2 | 0.5511 | 0.365 building IoU at threshold 0.6 (higher than the card's 0.293) |\n| `lulc_nyc` | NYC 5-class land cover | 5 | 0.5866 | 0.355 mIoU; water IoU 0.943 (higher than the card's 0.770) |\n| `tim_nyc` | LULC with Thinking-in-Modalities | 5 | 0.6023 | not yet wired in this harness |\n\nEach adapter is roughly 325 MB on disk (~5 MB LoRA Δ on attention\nQKV / proj + ~320 MB UNet decoder trained from scratch). The 1.45 GB\nTerraMind base sits on disk once and is shared across all adapters.\n\n## Demo segmentations\n\n### Buildings adapter\n\nManhattan midtown — model finds essentially every building:\n\n![Manhattan midtown buildings](assets/terramind_buildings_manhattan_midtown.png)\n\nJamaica Bay — model correctly finds 0.18 % buildings:\n\n![Jamaica Bay buildings](assets/terramind_buildings_jamaica_bay.png)\n\nCentral Park — mixed urban / vegetation:\n\n![Central Park buildings](assets/terramind_buildings_central_park.png)\n\n### LULC adapter (5 classes: water / impervious / vegetation / bare / building)\n\nManhattan midtown — dominantly impervious:\n\n![Manhattan midtown LULC](assets/terramind_lulc_manhattan_midtown.png)\n\nJamaica Bay — 96 % water:\n\n![Jamaica Bay LULC](assets/terramind_lulc_jamaica_bay.png)\n\nCentral Park — vegetation visible:\n\n![Central Park LULC](assets/terramind_lulc_central_park.png)\n\n## Sniff-test results\n\nTwenty cases against real Sentinel-2 + Sentinel-1 + DEM stacks (ten for\neach adapter). All twenty pass.\n\n### Buildings adapter\n\n| AOI | Expected | Predicted building pixels |\n|---|---|---:|\n| Manhattan midtown | many | 49,901 (99.4 %) ✅ |\n| Brooklyn industrial | many | 49,292 (98.2 %) ✅ |\n| Hudson Yards | many | 35,560 (70.9 %) ✅ |\n| Coney Island | many | 33,477 (66.7 %) ✅ |\n| Queens residential | many | 42,255 (84.2 %) ✅ |\n| Staten Island Greenbelt | few | 21,652 (43.2 %) ✅ |\n| JFK runways | few | 18,537 (37.0 %) ✅ |\n| Central Park | few | 29,960 (59.7 %) ✅ |\n| Pelham Bay Park | few | 736 (1.5 %) ✅ |\n| Jamaica Bay | none | 92 (0.2 %) ✅ |\n\n### LULC adapter\n\n| AOI | Expected dominant | Predicted dominant | water / imp / veg / bare / bld |\n|---|---|---|---|\n| Manhattan midtown | impervious / building | impervious ✅ | 722 / 49015 / 307 / 132 / 0 |\n| Jamaica Bay | water | water (96 %) ✅ | 48328 / 554 / 1192 / 102 / 0 |\n| Pelham Bay Park | vegetation / impervious | vegetation ✅ | 18499 / 5769 / 18970 / 6938 / 0 |\n| JFK runways | impervious | impervious ✅ | 3082 / 45800 / 312 / 982 / 0 |\n| Brooklyn industrial | impervious / building | impervious ✅ | 0 / 49564 / 515 / 97 / 0 |\n| Coney Island | water / impervious | impervious ✅ | 15783 / 29284 / 165 / 777 / 4167 |\n| Hudson Yards | impervious / building | impervious ✅ | 12851 / 36227 / 899 / 199 / 0 |\n| Central Park | vegetation / impervious | impervious ✅ | 4462 / 29448 / 13703 / 2563 / 0 |\n| Staten Island Greenbelt | vegetation / impervious | impervious ✅ | 6 / 22683 / 22539 / 4948 / 0 |\n| Queens residential | impervious / building / vegetation | impervious ✅ | 1902 / 37139 / 10645 / 490 / 0 |\n\n## Threshold-sweep operating points (buildings)\n\n| Threshold | Building IoU | Precision | Recall | F1 |\n|---|---:|---:|---:|---:|\n| 0.5 (default) | 0.349 | 0.350 | 0.992 | 0.517 |\n| **0.6 (best IoU)** | **0.365** | **0.380** | 0.903 | **0.535** |\n| 0.7 | 0.092 | 0.475 | 0.103 | (collapses) |\n\nRecommended operating points: 0.5 for high-recall exposure overlays\n(captures essentially every building); 0.6 for higher precision. Above\n0.7 the model's logit distribution does not sustain confidence and\npredictions collapse.\n\n## Benchmark (M3 Air, CPU fp32)\n\n| | Latency | Energy |\n|---|---:|---:|\n| Buildings inference | 511 ms | 6.13 J |\n| LULC inference | 510 ms | 6.12 J |\n\n## Install and use\n\n```bash\ngit clone https://github.com/msradam/TerraMind-NYC-Adapters\ncd TerraMind-NYC-Adapters\nuv venv --python 3.12\nuv pip install -e \".[dev]\"\n```\n\nDirect usage (downloads 1.45 GB TerraMind base + 305 MB adapter on\nfirst run):\n\n```python\nfrom terramind_nyc_adapters import load_terramind_adapter\n\nbld_model, preprocess, _ = load_terramind_adapter({\n    \"adapter_dir\": \"buildings_nyc\",\n    \"num_classes\": 2,\n})\n\nlulc_model, lulc_preprocess, _ = load_terramind_adapter({\n    \"adapter_dir\": \"lulc_nyc\",\n    \"num_classes\": 5,\n})\n```\n\n## Training\n\nFull training methodology is in [`docs/TRAINING.md`](docs/TRAINING.md):\nhardware (AMD MI300X), data (Major-TOM Core S2L2A + S1RTC + DEM over\nNYC, ESA WorldCover 2021 + DOITT footprints as labels), the\nv1 → v2 lift narrative for the buildings adapter (CE with class\nweights replacing Focal-Tversky), and the LoRA-on-frozen-base\nhyperparameters (rank 16, alpha 32, target `attn.qkv` and `attn.proj`\nacross 24 transformer blocks).\n\n## Where this fits\n\nOne of three NYC fine-tuned foundation models in this family.\n\n- **Reproduction harness, Streamlit demo, and probe tooling:**\n  [github.com/msradam/riprap-models](https://github.com/msradam/riprap-models).\n- **Sister repos:**\n  [Granite-TTM-r2-Battery-Surge](https://github.com/msradam/Granite-TTM-r2-Battery-Surge) and\n  [Prithvi-EO-2.0-NYC-Pluvial](https://github.com/msradam/Prithvi-EO-2.0-NYC-Pluvial).\n- **Parent system:** [Riprap-NYC](https://github.com/msradam/riprap-nyc).\n\n## Sources\n\n- Sentinel-2 / Sentinel-1 imagery via\n  [Microsoft Planetary Computer](https://planetarycomputer.microsoft.com/)\n  (Copernicus Open Data License).\n- NYC DOITT building footprints: NYC OpenData public domain\n  ([`5zhs-2jue`](https://data.cityofnewyork.us/Housing-Development/Building-Footprints/5zhs-2jue)).\n- ESA WorldCover 2021 v200 under the ESA CCI Open Data Policy\n  (CC-BY-4.0).\n\n## AI-assisted authoring\n\nPortions of this repository were drafted with the assistance of large\nlanguage models. All output was reviewed and accepted by Adam Rahman, who\ntakes responsibility for the resulting code, claims, and reproducibility\nguarantees. The full disclosure is in [`NOTICE`](NOTICE).\n\n## License\n\nApache-2.0. See [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsradam%2Fterramind-nyc-adapters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsradam%2Fterramind-nyc-adapters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsradam%2Fterramind-nyc-adapters/lists"}