# opengeos/segment-geospatial

A Python package for segmenting geospatial data with the Segment Anything Model (SAM)

Repository: https://github.com/opengeos/segment-geospatial
Canonical: https://ross.abutalabs.com/products/segment-geospatial
Homepage: https://samgeo.gishub.org
Language: Python
License: MIT
License Family: permissive
Topics: artificial-intelligence, deep-learning, machine-learning, segmentation, geopython, geospatial, segment-anything
Last push: 2026-08-24T20:37:32+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 88
- inputs: {"age_days": 1232, "days_push": 9, "days_rel": 11, "gap_med": 4.0, "n_releases_24m": 37}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4122, forks 440 (observed 2026-08-28T04:08:35.974903+00:00)

## What it is
SamGeo (segment-geospatial) is a Python package that applies Meta AI's Segment Anything Model (SAM, SAM2, SAM3, HQ-SAM) to geospatial data such as satellite and aerial imagery. It supports downloading map tiles, segmenting GeoTIFFs with point/box/text prompts, exporting masks as GeoJSON/Shapefile/GeoPackage, and serving segmentation via a built-in FastAPI REST API.

## Use cases
- segment satellite imagery into objects like buildings or swimming pools
- run SAM on GeoTIFF files and export masks as shapefiles
- segment remote sensing images with text prompts
- download map tiles from a TMS server and segment them
- serve image segmentation over HTTP for web apps
- interactively mark foreground and background points on a map to segment objects
- batch segment time series of remote sensing imagery

## When to choose
- you need to segment geospatial or remote sensing raster data with minimal code
- you want SAM-based segmentation outputs in GIS vector formats
- you want a REST API or QGIS plugin around SAM for geospatial workflows

## When to avoid
- you need general-purpose (non-geospatial) image segmentation without GIS formats
- you lack GPU resources and need fast inference on very large rasters
- you need automatic reprojection or CRS handling as part of segmentation

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, image-processing, computer-vision, geospatial, sdk
- domain: machine-learning, deep-learning, artificial-intelligence
- platform: python, cross-platform
- tags: segment-anything, sam, sam2, sam3, satellite-imagery, remote-sensing, image-segmentation, geotiff, qgis-plugin, rest-api, geospatial, gpu

## Member repositories
- opengeos/segment-geospatial (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:35.974903+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:06.189177+00:00, confidence not recorded.
  - readme: https://github.com/opengeos/segment-geospatial (fetched 2026-08-28T04:08:35.974903+00:00, sha a184ee51cbfd)
  - homepage: https://samgeo.gishub.org (fetched 2026-08-29T09:14:30.800490+00:00, sha 1edbf589be08)
  - site_page: https://samgeo.gishub.org/installation (fetched 2026-08-29T09:14:30.809877+00:00, sha 43279027ffc5)
  - registry_pypi: https://pypi.org/pypi/segment-geospatial/json (fetched 2026-08-29T09:14:30.832823+00:00, sha 7431b520b349)
  - site_page: https://samgeo.gishub.org/faq (fetched 2026-08-29T09:14:30.822393+00:00, sha 0ac1c9462be1)
  - site_page: https://samgeo.gishub.org/changelog (fetched 2026-08-29T09:14:30.827933+00:00, sha 245650da9268)
  - site_page: https://samgeo.gishub.org/api (fetched 2026-08-29T09:14:30.830062+00:00, sha fd19256a51f8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
