SDK for wrapping ML code into a web server for Label Studio automation
Top 45.0% on sourcepulse
This repository provides a Python SDK and boilerplate configurations for integrating custom machine learning models with Label Studio, an open-source data labeling platform. It enables users to automate labeling tasks by serving ML models as web servers that can be connected to a Label Studio instance, supporting pre-annotation, interactive labeling, and model training.
How It Works
The ML backend acts as a bridge between Label Studio and your ML models. It exposes an API that Label Studio calls to get predictions or to train models based on annotations. The SDK provides a base class LabelStudioMLBase
that users can inherit from, overriding methods like predict
and fit
to implement their model's inference and training logic. This approach allows for flexible integration of various ML frameworks and custom model architectures.
Quick Start & Requirements
docker-compose up
within a model's example directory (e.g., label_studio_ml/examples/{MODEL_NAME}
).docker-compose
, LABEL_STUDIO_URL
, LABEL_STUDIO_API_KEY
environment variables for data access.Highlighted Details
label-studio-ml create
command to scaffold new custom ML backends.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The provided ML backend examples are intended for development and may not support production-level inference serving, potentially leading to "Bad Gateway" or "Service Unavailable" errors under heavy load. Windows users may encounter issues with line endings in shell scripts, requiring specific Git configuration adjustments.
2 weeks ago
1 week