segment-geospatial: a geospatial segmentation tool that adapts the Segment Anything Model for remote sensing imagery

segment-geospatial: a geospatial segmentation tool that adapts the Segment Anything Model for remote sensing imagery

What it solves

SamGeo simplifies the process of using the Segment Anything Model (SAM) for geospatial data analysis. It removes the need for extensive coding to segment remote sensing imagery and satellite data, making advanced image segmentation tools accessible to researchers and GIS professionals.

How it works

The package integrates several segmentation models, including SAM, SAM 2, SAM 3, Fast SAM, and HQ-SAM. It allows users to define areas of interest using various prompt types—such as text prompts (via Grounding DINO), interactive markers (foreground/background), and bounding boxes—to isolate specific objects in GeoTIFF files. It also handles the geospatial specifics, such as downloading map tiles from TMS servers and saving results as standard vector formats like GeoJSON, Shapefile, and GeoPackage.

Who it’s for

This tool is designed for geospatial analysts, remote sensing researchers, and GIS professionals who need to extract objects from satellite imagery without writing complex deep learning code.

Highlights

  • Multi-Model Support: Compatible with SAM, SAM 2, SAM 3, Fast SAM, and HQ-SAM.
  • Flexible Prompting: Supports text-based segmentation, interactive point markers, and box prompts.
  • Text-to-Mask: Ability to segment remote sensing imagery using text prompts.
  • GIS Integration: Available as a QGIS plugin and compatible with ArcGIS Pro.
  • Geospatial Output: Saves segmentation results directly into common vector formats.
  • REST API: Includes a REST API for serving segmentation services over HTTP.

Sources