Detecting pools in urban areas using SAM-GEO
Jun 30, 2023 10 min

Introduction
During residential construction or renovation, the detection of the presence and dimensions of the existing swimming pool is essential. This operation is currently performed by construction or renovation companies through on-site surveys, which can take several hours and cost hundreds of dollars per site. In this article, we intend to explore how solutions deployed in our MLOps platform, GeoEngine, specifically SAM-GEO, can be leveraged to automate this process at scale in a fraction of time and cost
Dataset and Model Description
Segment Geospatial or SAM-GEO relies on Language-Segment-Anything (LangSAM), a powerful foundation model that combines the power of instance segmentation and text prompts to generate masks for specific objects in images. It is observed to have decent performance on accurate segmentation of high-resolution satellite imagery.

LangSAM Architecture
To analyze the performance of the SAM-GEO model as regards localization and identification of swimming pools, we use the BH-POOLS dataset, which consists of 200 4K images and 3980 pool annotations from 8 different neighborhoods in the city of Belo Horizonte, Minas Gerais, Brazil.

BH-POOLS Image and Ground Truth Samples
You can view the dataset on GeoEngine here.
Results
We applied SAM-GEO on each of the BH-POOL images to generate pool masks. Figure 3 depicts some of the BH-POOL samples and respective SAM-GEO predictions:

BH-POOL Image Samples and corresponding SAM-GEO Outputs
We observe that SAM-GEO manages to identify pools in the BH-POOL dataset exceptionally well, barring a few false positives and negatives.
References
- Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A., Lo, W.Y., Dollar, P., & Girshick, R. (2023). Segment Anything. arXiv:2304.02643.
- BH-Pools/Watertanks Datasets [Link]
Object DetectionPool DetectionUrban SprawlMapboxSAMGeospatial