Skip to content

tygwan/AgenticLabeling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgenticLabeling

AI-Powered Automatic Labeling Platform

Single-service MVP for Florence-2 + SAM2 auto-labeling, review, and export

FeaturesArchitectureQuick StartDocumentationLicense

Python License Tests Docker


Overview

AgenticLabeling is currently packaged around a single MVP application that handles image upload, Florence-2 detection, SAM2 segmentation, review, and dataset export in one service. The previous microservices stack is preserved only as a legacy deployment path.

Key Capabilities

  • Auto-Labeling Pipeline: Image → Florence-2 Detection → SAM2 Segmentation → Registry
  • Review Workspace: Browser-based approve/delete flow
  • Dataset Export: YOLO and COCO zip export
  • Runtime Fallback: If SAM2 is unavailable, the pipeline survives with box-mask fallback
  • Legacy Stack Preserved: The old microservices deployment remains available separately

Features

AI Models In The MVP

Model Task Description
Florence-2 Detection Open-vocabulary object detection with grounding
SAM2 Segmentation Instance segmentation with fine masks

Legacy Components Still Available

  • DINOv2 classification
  • YOLO training
  • Video preprocessing / tracking
  • Evaluation / MLflow
  • Microservice gateway and Streamlit UI

Architecture

Default Runtime

Component Port GPU Description
agenticlabeling-mvp 8090 Upload, detect, segment, review, export

Data Flow

Image Input
       │
       ▼
┌──────────────────┐
│    Detection     │ ← Florence-2 grounding
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│   Segmentation   │ ← SAM2 instance masks
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│  Local Registry   │ ← SQLite + filesystem assets
└────────┬─────────┘
         │
    ┌────┴────┐
    ▼         ▼
┌───────┐ ┌───────┐
│Review │ │Export │
│Approve│ │YOLO/  │
│Delete │ │COCO   │
└───────┘ └───────┘

Legacy Runtime

The previous multi-container stack is preserved in docker-compose.legacy.yml. The default docker-compose.yml now starts only the MVP app.


Quick Start

Prerequisites

  • Python 3.10+
  • Docker & Docker Compose
  • NVIDIA GPU with 8GB+ VRAM (recommended)

Installation

# Start the default MVP container
docker compose up --build

# Or use the helper script
./scripts/run_mvp_docker.sh

# Check health
curl http://localhost:8090/health

Basic Usage

# Auto-label an image
curl -X POST "http://localhost:8090/api/pipeline/auto-label" \
  -F "image=@image.jpg" \
  -F "project_id=default-project" \
  -F "classes=person,car,dog"

# Export dataset
curl -X POST "http://localhost:8090/api/export" \
  -F "dataset_name=my_dataset" \
  -F "export_format=yolo" \
  -F "only_validated=true"

Access UIs


Documentation

Document Description
Getting Started Installation and setup guide
Architecture Spec Detailed system architecture
Development Progress Project status and roadmap
PRD Product requirements document
Navigability Docs System map, edit map, interface catalog, failure memory
Standards Application How dev-standards are applied inside this repository
Implementation Memory Why major implementation choices were made and what they changed
Project Memory Local engineering memory store and usage

API Examples

Auto-Labeling

import httpx

# Label an image
with open("image.jpg", "rb") as f:
    response = httpx.post(
        "http://localhost:8090/api/pipeline/auto-label",
        files={"image": f},
        data={"project_id": "default-project", "classes": "person,car,dog"}
    )
    result = response.json()
    print(f"Detected {result['detections']} objects")

Review Objects

# List objects for a source
response = httpx.get(
    "http://localhost:8090/api/review/objects",
    params={"source_id": "src_1234567890ab"},
)
objects = response.json()["data"]
print(objects[0]["category_name"])

Export Dataset

response = httpx.post(
    "http://localhost:8090/api/export",
    data={
        "dataset_name": "my_dataset",
        "export_format": "yolo",
        "only_validated": "true",
    },
)
export_info = response.json()
print(export_info["download_url"])

Testing

# Run the MVP baseline tests
pytest tests/test_mvp_app.py tests/test_mvp_detector.py tests/test_mvp_segmenter.py tests/test_mvp_e2e.py -q
# Run the project-memory regression test
pytest tests/test_project_memory.py -q

Project Status

Progress: ████████████████████░ 95%
Phase Status Description
Phase 1 ✅ Complete Microservices architecture
Phase 2 ✅ Complete Data management & export
Phase 3 ✅ Complete Video processing & tracking
Phase 4 ✅ Complete Training & evaluation
Phase 5 ✅ Complete Testing (120 tests)
Phase 6 ⏳ Pending Production deployment

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: pytest tests/ -v
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments


Made with AI-assisted development

About

Agentic Labeling services for computer vision and VLA(vision language model)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors