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:Option A: packaged executable (recommended for general use)
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
.pt weights manually from the SAM2 repository.5
Run the packaging script
dist/SAM2_Annotation_Tool when the script finishes.Notes
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.Links
- GitHub: felimet/SAM2_Annotation_Tool
- SAM2 repository: facebookresearch/sam2