Skip to main content
SAM2 · Python · Computer Vision · Annotation · Windows · CUDA

Overview

A Windows desktop annotation application built on Meta’s Segment Anything Model 2 (SAM2). Users click on a target in an image to generate a segmentation mask without manual tracing. It ships as a packaged .exe for direct use, and can also be built from source with PyInstaller, producing a dist/SAM2_Annotation_Tool executable directory. The primary use case is building labelled datasets for computer vision research.

Core features

  • Click-driven SAM2 zero-shot segmentation to generate masks quickly
  • Annotate multiple target regions in a single image in sequence
  • Export annotation results for use in downstream training pipelines
  • Packaged executable means no Python environment setup for end users
  • Supports multiple SAM2 model sizes (tiny / small / base_plus / large) to trade off speed and accuracy

Quick start

Two install paths; compare them first, then follow the detailed steps:
1

Download the packaged release

Download the latest SAM2_Annotation_Tool.zip from the Releases page and extract it to any directory.
2

Run the application

Launch SAM2_Annotation_Tool.exe from the extracted folder. The annotation interface opens immediately; no Python installation required.

Option B: build from source (for developers)

1

Install Python and PyTorch (CUDA wheel)

Install Python 3.9 or later, then install PyTorch with the CUDA wheel:
2

Install remaining dependencies

3

Clone the SAM2 repo and install

4

Download model checkpoints

Alternatively, download the .pt weights manually from the SAM2 repository.
5

Run the packaging script

The executable is placed in dist/SAM2_Annotation_Tool when the script finishes.

Notes

A Windows 10/11 (64-bit) machine with an NVIDIA GPU (6 GB VRAM or more) and CUDA support is recommended. The tool can run in CPU mode without a GPU, but inference will be noticeably slower. If you hit out-of-memory errors, switch to a smaller model (e.g. sam2.1_hiera_tiny.pt) or reduce the input image size. Verify that PyTorch can see CUDA:

In practice

Useful for building custom image segmentation datasets: livestock body contour labelling, agricultural object region marking, or any task that needs pixel-level masks generated quickly. The packaged executable lowers the barrier for non-Python annotators to participate in data collection directly.