AI-Powered Automatic Labeling Platform
Single-service MVP for Florence-2 + SAM2 auto-labeling, review, and export
Features • Architecture • Quick Start • Documentation • License
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.
- 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
| Model | Task | Description |
|---|---|---|
| Florence-2 | Detection | Open-vocabulary object detection with grounding |
| SAM2 | Segmentation | Instance segmentation with fine masks |
- DINOv2 classification
- YOLO training
- Video preprocessing / tracking
- Evaluation / MLflow
- Microservice gateway and Streamlit UI
| Component | Port | GPU | Description |
|---|---|---|---|
| agenticlabeling-mvp | 8090 | ✅ | Upload, detect, segment, review, export |
Image Input
│
▼
┌──────────────────┐
│ Detection │ ← Florence-2 grounding
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Segmentation │ ← SAM2 instance masks
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Local Registry │ ← SQLite + filesystem assets
└────────┬─────────┘
│
┌────┴────┐
▼ ▼
┌───────┐ ┌───────┐
│Review │ │Export │
│Approve│ │YOLO/ │
│Delete │ │COCO │
└───────┘ └───────┘
The previous multi-container stack is preserved in docker-compose.legacy.yml. The default docker-compose.yml now starts only the MVP app.
- Python 3.10+
- Docker & Docker Compose
- NVIDIA GPU with 8GB+ VRAM (recommended)
# 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# 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"- MVP Home: http://localhost:8090/
- Review UI: http://localhost:8090/review
- API Health: http://localhost:8090/health
- Legacy Stack:
./scripts/run_legacy_docker.sh
| 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 |
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")# 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"])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"])# 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 -qProgress: ████████████████████░ 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 |
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
pytest tests/ -v - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Florence-2 - Microsoft
- SAM2 - Meta AI
- DINOv2 - Meta AI
- Ultralytics YOLO - Ultralytics
- X-AnyLabeling - Inspiration for project structure
Made with AI-assisted development