Label Studio · SAM · Docker · Supabase · MinIO · Cloudflare Tunnel
Overview
As of 2026-04, the upstream Label Studio ML backend does not provide a maintained SAM3 production deployment path. This project fills that gap: a Docker Compose stack that bundles Label Studio, PostgreSQL, Redis, MinIO, Nginx, and a Cloudflare Tunnel as the core service set, with optional GPU overlays for SAM3 and SAM2.1 image and video inference backends. The Label Studio database backend uses Supabase standalone (thev1.1.x main line). For native PostgreSQL mode, switch to the v1.0.4 release line.
Core features
make upbrings up the full core stack (Label Studio + PostgreSQL + Redis + MinIO + Nginx + Cloudflare Tunnel)- SAM3 backend: native point embeddings (image + video), mask selection modes (
adaptive/top1/topk/threshold/all), bidirectional video tracking, multi-object track merging, runtime threshold and mode UI overrides - SAM2.1 backend: image and video inference
- SAM3 Agent (optional): LLM-assisted mask selection, compatible with vLLM, Ollama, OpenAI, Gemini, Groq, and any vision-capable endpoint
- Batch annotation: run SAM3 or SAM2.1 inference over an entire Label Studio project from the CLI or from a browser-based Web UI with no terminal required
- Separate env files (
.env/.env.ml/.env.supabase/.env.tools) to keep per-scope variables isolated - Optional Cloudflare Tunnel routes for admin interfaces (Supabase Studio, RedisInsight, etc.)
Inference backends
Optional GPU overlays provide three inference backends; pick by task:Architecture
Quick start
1
Clone the repo and prepare env files
<PLACEHOLDER> values. LABEL_STUDIO_USER_TOKEN has a 40-character limit; generate one with openssl rand -hex 20. The POSTGRES_PASSWORD in .env and .env.supabase must match.2
Start Supabase and the core stack
make init-minio is a one-time command that initialises MinIO buckets and service accounts. Open http://localhost:18090 to confirm Label Studio is running.3
Attach GPU inference backends (optional)
4
Verify stack health
Notes
In practice
Used for annotating precision livestock imagery: SAM auto-generates initial masks, which annotators then correct, significantly faster than fully manual labelling. Batch annotation mode processes an entire Label Studio project of images or video in one command, well-suited to the initial segmentation pass on large datasets.Links
- GitHub: felimet/label-anything-sam
- Upstream Label Studio ML backend: HumanSignal/label-studio-ml-backend