Skip to main content
QUICK REVIEW

[Paper Review] GeoSAM: Fine-tuning SAM with Multi-Modal Prompts for Mobility Infrastructure Segmentation

Rafi Ibn Sultan, Chengyin Li|arXiv (Cornell University)|Nov 19, 2023
Advanced Neural Network ApplicationsComputer Science9 citations
TL;DR

GeoSAM fine-tunes SAM using dense prompts from zero-shot SAM and sparse prompts from a domain CNN to segment road and pedestrian infrastructure in geographic imagery, outperforming zero-shot SAM and Tile2Net.

ABSTRACT

In geographical image segmentation, performance is often constrained by the limited availability of training data and a lack of generalizability, particularly for segmenting mobility infrastructure such as roads, sidewalks, and crosswalks. Vision foundation models like the Segment Anything Model (SAM), pre-trained on millions of natural images, have demonstrated impressive zero-shot segmentation performance, providing a potential solution. However, SAM struggles with geographical images, such as aerial and satellite imagery, due to its training being confined to natural images and the narrow features and textures of these objects blending into their surroundings. To address these challenges, we propose Geographical SAM (GeoSAM), a SAM-based framework that fine-tunes SAM using automatically generated multi-modal prompts. Specifically, GeoSAM integrates point prompts from a pre-trained task-specific model as primary visual guidance, and text prompts generated by a large language model as secondary semantic guidance, enabling the model to better capture both spatial structure and contextual meaning. GeoSAM outperforms existing approaches for mobility infrastructure segmentation in both familiar and completely unseen regions by at least 5\% in mIoU, representing a significant leap in leveraging foundation models to segment mobility infrastructure, including both road and pedestrian infrastructure in geographical images. The source code can be found in this GitHub Repository: https://github.com/rafiibnsultan/GeoSAM.

Motivation & Objective

  • Extend Segment Anything Model (SAM) to geographical imagery for mobility infrastructure segmentation (roads and pedestrian infrastructure).
  • Develop a sparse-prompt and dense-prompt based fine-tuning pipeline using parameter-efficient fine-tuning (PEFT).
  • Automate prompt generation from a domain-specific CNN encoder and zero-shot prompts to improve segmentation in aerial imagery.

Proposed method

  • Use SAM with a frozen encoder; fine-tune only the decoder via PEFT.
  • Generate sparse prompts automatically from Tile2Net-based pseudo labels for road and pedestrian classes.
  • Generate dense prompts from zero-shot SAM by converting image feature embeddings to SAM-friendly dense prompts.
  • Train with a Dice Focal loss combining Dice Loss and Focal Loss to handle class imbalance.
  • End-to-end inference uses sparse prompts from CNN encoder and dense prompts from zero-shot SAM with the fine-tuned decoder.
Figure 1: Training GeoSAM, an automated mobility infrastructure segmentation pipeline. In Prompts Generation (orange arrows), the model generates the sparse and dense prompts with the help of a secondary CNN-based geographical image encoder. Sparse prompts are generated automatically from the output
Figure 1: Training GeoSAM, an automated mobility infrastructure segmentation pipeline. In Prompts Generation (orange arrows), the model generates the sparse and dense prompts with the help of a secondary CNN-based geographical image encoder. Sparse prompts are generated automatically from the output

Experimental results

Research questions

  • RQ1Can SAM be adapted to multi-class mobility infrastructure segmentation in geographical imagery without full retraining?
  • RQ2Does a combination of sparse prompts from a domain CNN and dense prompts from zero-shot SAM improve segmentation accuracy for roads and pedestrian infrastructure?
  • RQ3How effective is PEFT-based fine-tuning of SAM’s decoder in this geospatial task?
  • RQ4What is GeoSAM’s generalizability to unseen cities (e.g., training on Washington DC and testing on Cambridge, MA)?

Key findings

  • GeoSAM outperforms Tile2Net by 17% (mIoU) and 21% (mAP) on the Washington DC test set.
  • GeoSAM substantially surpasses zero-shot SAM in both mIoU and mAP across road and pedestrian infrastructure.
  • GeoSAM outperforms CNN- and ViT-based benchmarks (e.g., UNet++, Swin UNETR) by large margins in mIoU and mAP for both classes.
  • The model shows a drop in performance on a generalization city (Cambridge, MA) due to data shift, but remains superior to competing baselines on average.
Figure 2: Sparse prompts generated based on segmentation maps created by the pre-trained CNN image encoder. Here, the foreground class is the sidewalk/crosswalk, blue and red circles represent foreground and background clicks respectively.
Figure 2: Sparse prompts generated based on segmentation maps created by the pre-trained CNN image encoder. Here, the foreground class is the sidewalk/crosswalk, blue and red circles represent foreground and background clicks respectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.