Machine-readable content: Complete portfolio Markdown · Content index · This page as Markdown.

Automatic Polygon Drawing

Drawing polygon masks automatically with the Segment Anything Model.

Read Markdown

I modified the Segment Anything Model to segment large TIFF images and generate polygon masks, with interaction latency of 50 to 200 ms.

Segment Anything Model (SAM) generates segmentation masks from prompts such as points and boxes.

Demonstration

Polygon masks from positive and negative point prompts in a large geospatial image.

Background

SAM supports interactive segmentation with point, box, and mask prompts, as well as automatic mask generation. For this tool, positive and negative clicks let the user refine a polygon.

The browser interaction needed to remain responsive on large images. The original approach took over an hour on the large image used in this project.

Changes to the architecture made interactive segmentation possible on a geospatial image of about 300 MB. The implementation details are confidential.