This guide describes the simplest way to start using ML backend with Label Studio.
- Start Machine Learning backend on
http://localhost:9090
with prebuilt image:
docker-compose up
- Validate that backend is running
$ curl http://localhost:9090/
{"status":"UP"}
- Connect to the backend from Label Studio running on the same host: go to your project
Settings -> Machine Learning -> Add Model
and specifyhttp://localhost:9090
as a URL.
To build the ML backend from source, you have to clone the repository and build the Docker image:
docker-compose build
To run the ML backend without Docker, you have to clone the repository and install all dependencies using pip:
python -m venv ml-backend
source ml-backend/bin/activate
pip install -r requirements.txt
Then you can start the ML backend:
label-studio-ml start ./dir_with_your_model
Parameters can be set in docker-compose.yml
before running the container.
The following common parameters are available:
BASIC_AUTH_USER
- specify the basic auth user for the model serverBASIC_AUTH_PASS
- specify the basic auth password for the model serverLOG_LEVEL
- set the log level for the model serverWORKERS
- specify the number of workers for the model serverTHREADS
- specify the number of threads for the model server
The ML backend can be customized by adding your own models and logic inside the ./dir_with_your_model
directory.