Skip to main content

Overview

This project provisions a complete image annotation infrastructure using Docker Compose, combining the Label Studio annotation interface, MinIO object storage, and ML Backend services for SAM (Segment Anything Model) versions 3, 3.1, and 2.1. Cloudflare Tunnel enables remote access from environments without a public IP, and batch annotation support accelerates large-scale dataset workflows.

Tech Stack

  • Label Studio: Web-based image annotation interface
  • MinIO: S3-compatible object storage for images and annotation data
  • SAM 3 / 3.1 / 2.1: Meta Segment Anything Model series as ML backends
  • Docker Compose: Multi-service container orchestration
  • Cloudflare Tunnel: Remote access without inbound port exposure
  • Python: ML backend implementation

Key Features

  • Single docker compose up command to start the full annotation environment
  • Switchable ML backends for SAM 3, SAM 3.1, and SAM 2.1
  • MinIO as the Label Studio storage backend, keeping data fully self-hosted
  • Batch annotation mode for efficient processing of large datasets
  • Cloudflare Tunnel integration for remote lab access

Quick Start

  1. Clone the repository and configure environment variables
    git clone https://github.com/felimet/label-anything-sam.git
    cd label-anything-sam
    cp .env.example .env
    # Edit .env with your MinIO and Label Studio credentials
    
  2. Start services
    docker compose up -d
    
  3. Check service status
    docker compose ps
    
  4. Set up Cloudflare Tunnel (optional, for remote access)
    cloudflared tunnel create label-anything
    cloudflared tunnel route dns label-anything <your-domain>
    
Before switching SAM versions, ensure the corresponding model weights are downloaded to the models/ directory and update the ML Backend service configuration in docker-compose.yml.