Segment Any Stream: Scalable Water Extent Detection with the Segment Anything Model

Published: 21 Oct 2023, Last Modified: 15 Dec 2023NeurIPS CompSust 2023 PosterEveryoneRevisionsBibTeX
Keywords: Remote Sensing, Foundation Model, Image Segmentation
TL;DR: Efficiently fine-tune the Segment Anything Model for water extent mapping from aerial imagery
Abstract: The accurate detection of water extent in streams and rivers is pivotal to understanding inland water hydrodynamics and terrestrial-aquatic interactions of biogeochemical cycles, in particular bank erosion and the resulting transfer of nutrient elements such as phosphorus (P). Prior studies have employed a variety of computational methods, ranging from hand-crafted decision rules based on spectral indices to advanced image segmentation techniques. However, these methods are limited in their generalizability when implemented in new regions. Furthermore, the recent development of vision foundation models such as the Segment Anything Model (SAM) has brought about opportunities for water extent detection due to their exceptional generalization capabilities. Nevertheless, the adaptation of these models remains challenging due to the computational overhead of fully fine-tuning the entire model. Taking these desiderata into account, this work proposes Segment Any Stream (SAS), which employs the Low-Rank Adaptation (LoRA) method to perform low-rank updates on a pretrained SAM with a small amount of curated high-resolution aerial imagery to map the water extents in the Mackinaw watershed, a HUC-8 watershed in central Illinois. Through our experiments, we show that SAS is lightweight yet highly effective: it enables efficient fine-tuning on a single consumer-grade GPU while achieving a high IoU of 0.76. This research highlights a generalizable framework for repurposing foundation models to support river/stream segmentation. We believe this framework can benefit the accurate and scalable quantification of streambank erosion as assessed by bank migration and width changes over time, a significant source of sediment and nutrient losses in agricultural landscapes. Code and data are released at
Submission Number: 18