Computer Vision Pipeline
CV pipeline with Label Studio for annotation, MinIO storage, and Triton inference server
Overview
Label Studio is an open-source data labeling platform developed by Heartex that provides a web-based interface for annotating various types of data including images, text, audio, and video. Originally created to address the bottleneck of manual data annotation in machine learning workflows, Label Studio supports over 60 different labeling templates and can handle complex annotation tasks like object detection, semantic segmentation, and multi-class classification with customizable labeling interfaces.
This computer vision pipeline combines Label Studio's annotation capabilities with MinIO's S3-compatible object storage for scalable data management and NVIDIA Triton Inference Server for high-performance model serving. The stack creates a complete MLOps workflow where raw images are stored in MinIO buckets, annotated through Label Studio's web interface, and the resulting trained models are deployed via Triton for real-time inference. PostgreSQL handles Label Studio's metadata, user management, and annotation storage, ensuring data integrity throughout the annotation process.
This configuration is ideal for computer vision teams, AI startups, and research organizations that need to process large volumes of visual data while maintaining control over their annotation pipeline and model deployment infrastructure. The combination provides enterprise-grade performance and scalability without the vendor lock-in of cloud-based annotation services, making it particularly valuable for organizations with strict data governance requirements or those working with sensitive visual data.
Key Features
- Label Studio's flexible annotation interface with support for bounding boxes, polygons, keypoints, and semantic segmentation for computer vision tasks
- MinIO S3-compatible storage with erasure coding and encryption for secure management of large image datasets and model artifacts
- NVIDIA Triton Inference Server with GPU acceleration supporting TensorRT, PyTorch, TensorFlow, and ONNX model formats
- PostgreSQL backend for Label Studio providing ACID compliance for annotation data and support for complex queries on labeling statistics
- Label Studio's export functionality generating annotations in COCO, YOLO, Pascal VOC, and other popular computer vision formats
- Triton's dynamic batching and model versioning capabilities for A/B testing different computer vision model iterations
- MinIO's bucket lifecycle policies for automated data archival and cost optimization of training datasets
- Label Studio's collaborative annotation features with user roles, task assignment, and annotation quality control workflows
Common Use Cases
- 1Autonomous vehicle companies building training datasets for object detection and semantic segmentation models
- 2Medical imaging organizations annotating radiological scans, pathology slides, and diagnostic images for AI-assisted diagnosis
- 3Retail and e-commerce platforms creating product image classification and visual search training data
- 4Security and surveillance companies developing person detection, behavior analysis, and anomaly detection systems
- 5Manufacturing quality control teams training computer vision models for defect detection and automated inspection
- 6Agricultural technology companies building crop monitoring and disease detection models from drone and satellite imagery
- 7Sports analytics organizations annotating player movements, ball tracking, and game event detection in video footage
Prerequisites
- NVIDIA GPU with CUDA support and nvidia-docker runtime installed for Triton inference server acceleration
- Minimum 8GB RAM recommended (2GB for MinIO, 1GB for PostgreSQL, 2GB for Label Studio, 3GB+ for Triton with models)
- Docker Compose version 3.8+ with GPU support and familiarity with NVIDIA Container Toolkit configuration
- Understanding of computer vision model formats (ONNX, TensorRT, PyTorch) and Triton model repository structure
- Basic knowledge of S3 API and MinIO bucket policies for managing training data and model artifact storage
- Familiarity with Label Studio's labeling templates and annotation export formats for computer vision workflows
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 label-studio: 3 image: heartexlabs/label-studio:latest4 container_name: label-studio5 restart: unless-stopped6 ports: 7 - "${LABEL_STUDIO_PORT:-8080}:8080"8 environment: 9 - DJANGO_DB=default10 - POSTGRE_NAME=labelstudio11 - POSTGRE_USER=labelstudio12 - POSTGRE_PASSWORD=${DB_PASSWORD}13 - POSTGRE_HOST=label-studio-db14 - POSTGRE_PORT=543215 - LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true16 - LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/files17 volumes: 18 - label_studio_data:/label-studio/data19 - ./files:/label-studio/files20 depends_on: 21 - label-studio-db2223 label-studio-db: 24 image: postgres:15-alpine25 container_name: label-studio-db26 restart: unless-stopped27 environment: 28 - POSTGRES_USER=labelstudio29 - POSTGRES_PASSWORD=${DB_PASSWORD}30 - POSTGRES_DB=labelstudio31 volumes: 32 - label_studio_db_data:/var/lib/postgresql/data3334 minio: 35 image: minio/minio:latest36 container_name: cv-minio37 restart: unless-stopped38 ports: 39 - "${MINIO_PORT:-9000}:9000"40 - "${MINIO_CONSOLE:-9001}:9001"41 environment: 42 - MINIO_ROOT_USER=${MINIO_ACCESS_KEY}43 - MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}44 volumes: 45 - minio_data:/data46 command: server /data --console-address ":9001"4748 triton: 49 image: nvcr.io/nvidia/tritonserver:latest50 container_name: triton51 restart: unless-stopped52 ports: 53 - "${TRITON_HTTP:-8000}:8000"54 - "${TRITON_GRPC:-8001}:8001"55 - "${TRITON_METRICS:-8002}:8002"56 volumes: 57 - ./models:/models58 command: tritonserver --model-repository=/models59 deploy: 60 resources: 61 reservations: 62 devices: 63 - driver: nvidia64 count: all65 capabilities: [gpu]6667volumes: 68 label_studio_data: 69 label_studio_db_data: 70 minio_data: .env Template
.env
1# Computer Vision Pipeline2LABEL_STUDIO_PORT=80803MINIO_PORT=90004MINIO_CONSOLE=90015TRITON_HTTP=80006TRITON_GRPC=80017TRITON_METRICS=800289# Database10DB_PASSWORD=labelstudio_password1112# MinIO13MINIO_ACCESS_KEY=minioadmin14MINIO_SECRET_KEY=minioadminUsage Notes
- 1Label Studio at http://localhost:8080 (create account)
- 2MinIO Console at http://localhost:9001
- 3Triton inference at localhost:8000 (HTTP), 8001 (gRPC)
- 4Place models in ./models with Triton config.pbtxt
- 5Label Studio exports annotations for training
- 6Triton serves trained models for inference
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
label-studio
label-studio:
image: heartexlabs/label-studio:latest
container_name: label-studio
restart: unless-stopped
ports:
- ${LABEL_STUDIO_PORT:-8080}:8080
environment:
- DJANGO_DB=default
- POSTGRE_NAME=labelstudio
- POSTGRE_USER=labelstudio
- POSTGRE_PASSWORD=${DB_PASSWORD}
- POSTGRE_HOST=label-studio-db
- POSTGRE_PORT=5432
- LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
- LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/files
volumes:
- label_studio_data:/label-studio/data
- ./files:/label-studio/files
depends_on:
- label-studio-db
label-studio-db
label-studio-db:
image: postgres:15-alpine
container_name: label-studio-db
restart: unless-stopped
environment:
- POSTGRES_USER=labelstudio
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=labelstudio
volumes:
- label_studio_db_data:/var/lib/postgresql/data
minio
minio:
image: minio/minio:latest
container_name: cv-minio
restart: unless-stopped
ports:
- ${MINIO_PORT:-9000}:9000
- ${MINIO_CONSOLE:-9001}:9001
environment:
- MINIO_ROOT_USER=${MINIO_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
triton
triton:
image: nvcr.io/nvidia/tritonserver:latest
container_name: triton
restart: unless-stopped
ports:
- ${TRITON_HTTP:-8000}:8000
- ${TRITON_GRPC:-8001}:8001
- ${TRITON_METRICS:-8002}:8002
volumes:
- ./models:/models
command: tritonserver --model-repository=/models
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpu
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 label-studio:5 image: heartexlabs/label-studio:latest6 container_name: label-studio7 restart: unless-stopped8 ports:9 - "${LABEL_STUDIO_PORT:-8080}:8080"10 environment:11 - DJANGO_DB=default12 - POSTGRE_NAME=labelstudio13 - POSTGRE_USER=labelstudio14 - POSTGRE_PASSWORD=${DB_PASSWORD}15 - POSTGRE_HOST=label-studio-db16 - POSTGRE_PORT=543217 - LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true18 - LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/files19 volumes:20 - label_studio_data:/label-studio/data21 - ./files:/label-studio/files22 depends_on:23 - label-studio-db2425 label-studio-db:26 image: postgres:15-alpine27 container_name: label-studio-db28 restart: unless-stopped29 environment:30 - POSTGRES_USER=labelstudio31 - POSTGRES_PASSWORD=${DB_PASSWORD}32 - POSTGRES_DB=labelstudio33 volumes:34 - label_studio_db_data:/var/lib/postgresql/data3536 minio:37 image: minio/minio:latest38 container_name: cv-minio39 restart: unless-stopped40 ports:41 - "${MINIO_PORT:-9000}:9000"42 - "${MINIO_CONSOLE:-9001}:9001"43 environment:44 - MINIO_ROOT_USER=${MINIO_ACCESS_KEY}45 - MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}46 volumes:47 - minio_data:/data48 command: server /data --console-address ":9001"4950 triton:51 image: nvcr.io/nvidia/tritonserver:latest52 container_name: triton53 restart: unless-stopped54 ports:55 - "${TRITON_HTTP:-8000}:8000"56 - "${TRITON_GRPC:-8001}:8001"57 - "${TRITON_METRICS:-8002}:8002"58 volumes:59 - ./models:/models60 command: tritonserver --model-repository=/models61 deploy:62 resources:63 reservations:64 devices:65 - driver: nvidia66 count: all67 capabilities: [gpu]6869volumes:70 label_studio_data:71 label_studio_db_data:72 minio_data:73EOF7475# 2. Create the .env file76cat > .env << 'EOF'77# Computer Vision Pipeline78LABEL_STUDIO_PORT=808079MINIO_PORT=900080MINIO_CONSOLE=900181TRITON_HTTP=800082TRITON_GRPC=800183TRITON_METRICS=80028485# Database86DB_PASSWORD=labelstudio_password8788# MinIO89MINIO_ACCESS_KEY=minioadmin90MINIO_SECRET_KEY=minioadmin91EOF9293# 3. Start the services94docker compose up -d9596# 4. View logs97docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/computer-vision-pipeline/run | bashTroubleshooting
- Label Studio 'Database connection failed' error: Ensure PostgreSQL container is fully started before Label Studio by adding health checks or increasing startup delay
- Triton 'No models available' message: Verify model repository structure with config.pbtxt files and correct model format in ./models directory
- MinIO 'Access Denied' errors: Check MINIO_ACCESS_KEY and MINIO_SECRET_KEY environment variables match client configuration and bucket policies
- Label Studio annotation exports timing out: Increase Django timeout settings and ensure sufficient disk space in label_studio_data volume
- Triton GPU memory errors: Monitor nvidia-smi output and adjust model instance counts or batch sizes in model configuration files
- PostgreSQL connection pool exhaustion: Increase max_connections in PostgreSQL configuration or implement connection pooling for high-volume annotation workloads
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
label-studiotritonminiopostgres
Tags
#computer-vision#label-studio#triton#annotation#inference#ml
Category
AI & Machine LearningAd Space
Shortcuts: C CopyF FavoriteD Download