Skip to content

AnthonyGigerich/label-studio-ml-backend

Repository files navigation

Based on https://github.com/heartexlabs/label-studio-ml-backend/tree/master/label_studio_ml/examples/simple_text_classifier

Quickstart

  1. Build and start Machine Learning backend on http://localhost:9090
docker-compose up -d
  1. Check if it works:
$ curl http://localhost:9090/health
{"status":"UP"}
  1. Then connect running backend to Label Studio:
label-studio start --init new_project --ml-backends http://localhost:9090 --template image_classification

Writing your own model

  1. Place your scripts for model training & inference inside root directory. Follow the API guidelines described bellow. You can put everything in a single file, or create 2 separate one say my_training_module.py and my_inference_module.py

  2. Write down your python dependencies in requirements.txt

  3. Create ML backend with your model

label-studio-ml init my-ml-backend --script pytorch_transfer_learning/pytorch_transfer_learning.py
  1. Set Label Studio HOSTNAME and API_KEY
export LABEL_STUDIO_HOSTNAME=http://localhost:8080 
export LABEL_STUDIO_API_KEY=<ls-token>
  1. Start ML backend at http://localhost:9090
label-studio-ml start my-ml-backend
  1. Start Label Studio with ML backend connection
label-studio start my-annotation-project --init --ml-backend http://localhost:9090

API guidelines

Check out https://github.com/heartexlabs/label-studio-ml-backend/tree/master#Create_your_own_ML_backend

License

This software is licensed under the Apache 2.0 LICENSE © Heartex. 2020

About

ML Backend for label studio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published