An interactive image segmentation web application based on SAM 2.1 (Segment Anything Model 2). After uploading an image, users can click on any object to segment and highlight it in real-time.
Tech Stack
- Backend: FastAPI + SAM 2.1 (Meta's segmentation model, Apache 2.0 Open Source)
- Frontend: Next.js 15 + TypeScript + Tailwind CSS v4 + Framer Motion
- Model: SAM 2.1 Hiera — supports image/video segmentation; no application required, direct download
- Package Management: uv (Backend) + npm (Frontend)
Key Features
- Click-to-Segment: Interactive segmentation with millisecond-level response
- Multiple Model Selection: tiny (39M) / small (46M) / base+ (81M) / large (224M)
- CPU/GPU Dual Mode: The tiny model can even run on a CPU
- Multi-Object Selection: Annotate multiple segmented areas with different colors
- RLE Compressed Transmission: Mask data compression rate > 98%
- No Application Required: Model weights are downloaded directly under the Apache 2.0 license