SciPy 2024

SAMGeo: Automated Segmentation of Remote Sensing Imagery with the Segment Anything Model
07-11, 14:20–14:50 (US/Pacific), Room 316

Image segmentation plays a crucial role in extracting valuable insights from geospatial data. While traditional segmentation methods can be laborious, deep learning offers automation but often demands extensive training and resources. Meta AI's Segment Anything Model (SAM) presents a compelling solution, segmenting objects without additional training. Our open-source Python package, samgeo, streamlines the use of SAM for geospatial data, offering various segmentation methods. Experiments confirm SAM's accuracy and efficiency as a powerful tool for remote sensing analysis. The samgeo package simplifies the adoption of automated image segmentation, facilitating better geospatial insights and decision-making across multiple domains.


Image segmentation is essential for geospatial analysis as it enables the identification and extraction of relevant features from remote sensing imagery. By segmenting an image into meaningful regions, it becomes possible to extract information about the spatial distribution and characteristics of various objects and land cover types. This information can support decision-making in a wide range of fields, from agriculture and forestry to environmental monitoring and national security. Traditionally, image segmentation has been done manually or semi-automatically, which is time-consuming and labor-intensive. In recent years, deep learning models have been developed to automate the segmentation process. However, these models generally require large amounts of training data and are computationally expensive.

The Segment Anything Model (SAM) by Meta AI is a promptable segmentation system that can generalize to unfamiliar objects and images without additional training. Trained on 11 million images with over 1 billion masks, the model can segment any object in an image using existing checkpoints without additional training. We developed an open-source Python package called segment-geospatial (samgeo), which greatly simplifies the process of segmenting geospatial data with the SAM Model. The samgeo package supports automated mask generation and interactive segmentation with input prompts, such as point coordinates, bounding boxes, low-resolution mask inputs, and text prompts. Georeferenced segmentation results can be saved in various vector and raster formats.

Our experiments demonstrate that the SAM model matches existing state-of-the-art methods in terms of accuracy and efficiency, making it a valuable tool for empowering remote sensing image analysis. With the samgeo package, users can easily and quickly segment geospatial data using the SAM Model, leading to improved insights and more informed decision-making. We hope that the samgeo package will encourage a broader usage of automated image segmentation techniques in the field of geospatial analysis. We believe that the efficiency and accuracy provided by these tools will not only reduce the workload for analysts but also lead to improved outcomes in decision-making processes across various sectors.

Dr. Qiusheng Wu is an Associate Professor in the Department of Geography & Sustainability at the University of Tennessee, Knoxville. In addition, he holds positions as an Amazon Visiting Academic and a Senior Research Fellow at the United Nations University. Specializing in geospatial data science and open-source software development, Dr. Wu is particularly focused on leveraging big geospatial data and cloud computing to study environmental changes, with an emphasis on surface water and wetland inundation dynamics. He is the creator of several open-source packages designed for advanced geospatial analysis and visualization, including geemap, leafmap, and segment-geospatial. For a closer look at his open-source contributions, please visit his GitHub repositories at https://github.com/opengeos.

This speaker also appears in: