Skip to content
74 changes: 37 additions & 37 deletions docs/source/guide/ml_tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- Hugging Face
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/bert.png
image: /guide/ml_tutorials/bert.png
meta_description: Tutorial on how to use BERT-based text classification with your
Label Studio project
meta_title: BERT-based text classification
Expand All @@ -22,7 +22,7 @@
- EasyOCR
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/easyocr.png
image: /guide/ml_tutorials/easyocr.png
meta_description: The EasyOCR model connection integrates the capabilities of EasyOCR
with Label Studio to assist in machine learning labeling tasks involving Optical
Character Recognition (OCR).
Expand All @@ -38,7 +38,7 @@
- Flair
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/flair.png
image: /guide/ml_tutorials/flair.png
meta_description: Tutorial on how to use Label Studio and Flair for faster NER labeling
meta_title: Use Flair with Label Studio
order: 75
Expand All @@ -54,7 +54,7 @@
- Hugging Face
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/gliner.png
image: /guide/ml_tutorials/gliner.png
meta_description: Tutorial on how to use GLiNER with your Label Studio project to
complete NER tasks
meta_title: Use GLiNER for NER annotation
Expand All @@ -70,7 +70,7 @@
- Grounding DINO
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/grounding-dino.png
image: /guide/ml_tutorials/grounding-dino.png
meta_description: Label Studio tutorial for using Grounding DINO for zero-shot object
detection in images
meta_title: Image segmentation in Label Studio using a Grounding DINO backend
Expand All @@ -88,7 +88,7 @@
- Segment Anything Model
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/grounding-sam.png
image: /guide/ml_tutorials/grounding-sam.png
meta_description: Label Studio tutorial for using Grounding DINO and SAM for zero-shot
object detection in images
meta_title: Image segmentation in Label Studio using a Grounding DINO backend and
Expand All @@ -106,7 +106,7 @@
- Hugging Face
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/hf-llm.png
image: /guide/ml_tutorials/hf-llm.png
meta_description: This tutorial explains how to run Hugging Face Large Language
model backend in Label Studio. Hugging Face Large Language Model Backend is a
machine learning backend designed to work with Label Studio, providing a custom
Expand All @@ -123,7 +123,7 @@
- Hugging Face
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/hf-ner.png
image: /guide/ml_tutorials/hf-ner.png
meta_description: This tutorial explains how to run a Hugging Face NER backend in
Label Studio.
meta_title: Label Studio tutorial to run Hugging Face NER backend
Expand All @@ -138,7 +138,7 @@
- Interactive matching
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/interactive-substring-matching.png
image: /guide/ml_tutorials/interactive-substring-matching.png
meta_description: Use the interactive substring matching model for labeling NER
tasks in Label Studio
meta_title: Interactive substring matching for NER tasks
Expand All @@ -155,7 +155,7 @@
- Langchain
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/langchain.png
image: /guide/ml_tutorials/langchain.png
meta_description: Use Langchain, OpenAI, and Google to generate responses based
on Google search results.
meta_title: RAG with a Langchain search agent
Expand All @@ -173,7 +173,7 @@
- ChatGPT
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/llm-interactive.png
image: /guide/ml_tutorials/llm-interactive.png
meta_description: Label Studio tutorial for interactive LLM labeling with OpenAI,
Azure, or Ollama
meta_title: Interactive LLM labeling with OpenAI, Azure, or Ollama
Expand All @@ -190,7 +190,7 @@
- MMDetection
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/openmmlab.png
image: /guide/ml_tutorials/openmmlab.png
meta_description: This is a tutorial on how to use the example MMDetection model
backend with Label Studio for image segmentation tasks.
meta_title: Object detection in images with Label Studio and MMDetection
Expand All @@ -206,7 +206,7 @@
- NVidia
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/nvidia.png
image: /guide/ml_tutorials/nvidia.png
meta_description: Tutorial on how to use set up Nvidia NeMo to use for ASR tasks
in Label Studio
meta_title: Automatic Speech Recognition with NeMo
Expand All @@ -215,14 +215,30 @@
title: Automatic Speech Recognition with NVidia NeMo
type: guide
url: /tutorials/nemo_asr.html
- categories:
- Computer Vision
- Optical Character Recognition
- PaddleOCR
hide_frontmatter_title: true
hide_menu: true
image: /guide/ml_tutorials/ppocr.png
meta_description: The PP-OCR model connection integrates PaddleX's OCR pipeline
with Label Studio for high-accuracy text detection and recognition supporting
100+ languages.
meta_title: PP-OCR model connection for text detection and recognition
order: 41
tier: all
title: PP-OCR Text Detection and Recognition
type: guide
url: /tutorials/ppocr.html
- categories:
- Computer Vision
- Image Annotation
- Object Detection
- Segment Anything Model
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/sam2-images.png
image: /guide/ml_tutorials/sam2-images.png
meta_title: Using SAM2 with Label Studio for Image Annotation
order: 15
tier: all
Expand All @@ -236,7 +252,7 @@
- Segment Anything Model
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/sam2-video.png
image: /guide/ml_tutorials/sam2-video.png
meta_title: Using SAM2 with Label Studio for Video Annotation
order: 15
tier: all
Expand All @@ -252,7 +268,7 @@
- ONNX
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/segment-anything.png
image: /guide/ml_tutorials/segment-anything.png
meta_description: Label Studio tutorial for labeling images with MobileSAM or ONNX
SAM.
meta_title: Interactive annotation in Label Studio with Segment Anything Model (SAM)
Expand All @@ -267,7 +283,7 @@
- Scikit-learn
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/scikit-learn.png
image: /guide/ml_tutorials/scikit-learn.png
meta_description: Tutorial on how to use an example ML backend for Label Studio
with Scikit-learn logistic regression
meta_title: Sklearn Text Classifier model for Label Studio
Expand All @@ -282,7 +298,7 @@
- SpaCy
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/spacy.png
image: /guide/ml_tutorials/spacy.png
meta_description: Tutorial on how to use Label Studio and spaCy for faster NER and
POS labeling
meta_title: Use spaCy models with Label Studio
Expand All @@ -297,7 +313,7 @@
- Tesseract
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/tesseract.png
image: /guide/ml_tutorials/tesseract.png
meta_description: Tutorial for how to use Label Studio and Tesseract to assist with
your OCR projects
meta_title: Interactive bounding boxes OCR in Label Studio with a Tesseract backend
Expand All @@ -312,7 +328,7 @@
- WatsonX
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/watsonx.png
image: /guide/ml_tutorials/watsonx.png
meta_title: Integrate WatsonX with Label Studio
order: 15
tier: all
Expand All @@ -326,7 +342,7 @@
- YOLO
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/yolo.png
image: /guide/ml_tutorials/yolo.png
meta_description: Tutorial on how to use an example ML backend for Label Studio
with YOLO
meta_title: YOLO ML Backend for Label Studio
Expand All @@ -335,22 +351,6 @@
title: YOLO ML Backend for Label Studio
type: guide
url: /tutorials/yolo.html
- categories:
- Computer Vision
- Video Classification
- Temporal Labeling
- LSTM
hide_frontmatter_title: true
hide_menu: true
image: /tutorials/yolo-video-classification.png
meta_description: Tutorial on how to use an example ML backend for Label Studio
with TimelineLabels
meta_title: TimelineLabels ML Backend for Label Studio
order: 51
tier: all
title: TimelineLabels ML Backend for Label Studio
type: guide
url: /tutorials/yolo_timeline_labels.html
layout: templates
meta_description: Tutorial documentation for setting up a machine learning model with
predictions using PyTorch, GPT2, Sci-kit learn, and other popular frameworks.
Expand Down
34 changes: 34 additions & 0 deletions docs/source/tutorials/deepgram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Using Deepgram with Label Studio for Text to Speech annotation

This backend uses the Deepgram API to take the input text from the user, do text to speech, and return the output audio for annotation in Label Studio.

https://github.com/user-attachments/assets/9569a955-0baf-4a95-9e8a-d08250a0a298


IMPORTANT NOTE: YOU MUST REFRESH THE PAGE AFTER SUBMITTING THE TEXT TO SEE THE AUDIO APPEAR.

## Prerequistes
1. [Deepgram API Key](https://deepgram.com/) -- create an account and follow the instructions to get an api key with default permissions. Store this key as `DEEPGRAM_API_KEY` in `docker_compose.yml`
2. AWS Storage -- make sure you configure the following parameters in `docker_compose.yml`:
- `AWS_ACCESS_KEY_ID` -- your AWS access key id
- `AWS_SECRET_ACCESS_KEY` -- your AWS secret access key
- `AWS_SESSION_TOKEN` -- your AWS session token
- `AWS_DEFAULT_REGION` - the region you want to use for S3
- `S3_BUCKET` -- the name of the bucket where you'd like to store the created audio files
- `S3_FOLDER` -- the name of the folder within the specified bucket where you'd like to store the audio files.
3. Label Studio -- make sure you set your `LABEL_STUDIO_URL` and your `LABEL_STUDIO_API_KEY` in `docker_compose.yml`. As of 11/12/25, you must use the LEGACY TOKEN.

## Labeling Config
This is the base labeling config to be used with this backend. Note that you may add additional annotations to the document after the audio without breaking anything!
```
<View>
<Header value="What would you like to TTS?"/>
<TextArea name="text" toName="audio" placeholder="What do you want to tts?" value="$text" valrows="4" maxSubmissions="1"/>
<Audio name="audio" value="$audio" zoom="true" hotkey="ctrl+enter"/>
</View>
```
## A Data Note
Note that in order for this to work, you need to upload dummy data (i.e. empty text and audio) so that the tasks populate. You can use `dummy_data.json` as this data.

## Configuring the backend
When you attach the model to Label Studio in your model settings, make sure to toggle ON interactive preannotations!
15 changes: 14 additions & 1 deletion docs/source/tutorials/gliner.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,17 @@ The following common parameters are available:
- `WORKERS` - Specify the number of workers for the model server.
- `THREADS` - Specify the number of threads for the model server.
- `LABEL_STUDIO_URL` - Specify the URL of your Label Studio instance. Note that this might need to be `http://host.docker.internal:8080` if you are running Label Studio on another Docker container.
- `LABEL_STUDIO_API_KEY`- Specify the API key for authenticating your Label Studio instance. You can find this by logging into Label Studio and and [going to the **Account & Settings** page](https://labelstud.io/guide/user_account#Access-token).
- `LABEL_STUDIO_API_KEY`- Specify the API key for authenticating your Label Studio instance. You can find this by logging into Label Studio and and [going to the **Account & Settings** page](https://labelstud.io/guide/user_account#Access-token).

## A Note on Model Training

If you plan to use a webhook to train this model on "Start Training", note that you do
not need to configure a separate webhook. Instead, go to the three dots next to your model
on the Model tab in your project settings and click "start training".

Additionally, note that this container has been set for a **VERY SMALL** demo set, with only 1
non-eval sample (we expect the first 10 data samples to be for evaluation.)

If you're working with a larger dataset, be sure to:
1. update num_steps and batch size to the number of training steps you want and the batch size that works for your dataset.
2. change the uploaded model after training (line 239 of `model.py`) to the highest checkpoint that you have.
8 changes: 4 additions & 4 deletions docs/source/tutorials/mmdetection-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ https://mmdetection.readthedocs.io/en/latest/
This example demonstrates how to use the MMDetection model with Label Studio to annotate images with bounding boxes.
The model is based on the YOLOv3 architecture with a MobileNetV2 backbone and trained on the COCO dataset.

![screenshot.png](/tutorials/screenshot.png)
![screenshot.png](screenshot.png)

## Before you begin

Expand All @@ -43,7 +43,7 @@ docker-compose up -d

See the tutorial in the documentation for building your own image and advanced usage:

https://github.com/HumanSignal/label-studio/blob/develop/docs/source/tutorials/object-detector.md
https://github.com/HumanSignal/label-studio/blob/master/docs/source/tutorials/object-detector.md


## Labeling config
Expand Down Expand Up @@ -85,7 +85,7 @@ In this example, you can combine multiple labels into one Label Studio annotatio
1. Clone the Label Studio ML Backend repository in your directory of choice:

```
git clone https://github.com/HumanSignal/label-studio-ml-backend
git clone https://github.com/heartexlabs/label-studio-ml-backend
cd label-studio-ml-backend/label_studio_ml/examples/mmdetection-3
```

Expand Down Expand Up @@ -166,4 +166,4 @@ gunicorn --preload --bind :9090 --workers 1 --threads 1 --timeout 0 _wsgi:app
```

* Use this guide to find out your access token: https://labelstud.io/guide/api.html
* You can use and increased value of `SCORE_THRESHOLD` parameter when you see a lot of unwanted detections or lower its value if you don't see any detections.
* You can use and increased value of `SCORE_THRESHOLD` parameter when you see a lot of unwanted detections or lower its value if you don't see any detections.
21 changes: 17 additions & 4 deletions docs/source/tutorials/segment_anything_2_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,32 @@ cd label_studio_ml/examples/segment_anything_2_image
pip install -r requirements.txt
```

2. Download [`segment-anything-2` repo](https://github.com/facebookresearch/segment-anything-2) into the root directory. Install SegmentAnything model and download checkpoints using [the official Meta documentation](https://github.com/facebookresearch/segment-anything-2?tab=readme-ov-file#installation)
2. Download [`segment-anything-2` repo](https://github.com/facebookresearch/sam2) into the root directory. Install SegmentAnything model and download checkpoints using [the official Meta documentation](https://github.com/facebookresearch/sam2?tab=readme-ov-file#installation)
You should now have the following folder structure:


| root directory
| label-studio-ml-backend
| label-studio-ml
| examples
| segment_anything_2_image
| sam2
| sam2
| checkpoints


3. Then you can start the ML backend on the default port `9090`:

```bash
cd ../
label-studio-ml start ./segment_anything_2_image
cd ~/sam2
label-studio-ml start ../label-studio-ml-backend/label_studio_ml/examples/segment_anything_2_image
```

Due to breaking changes from Meta [HERE](https://github.com/facebookresearch/sam2/blob/c2ec8e14a185632b0a5d8b161928ceb50197eddc/sam2/build_sam.py#L20), it is CRUCIAL that you run this command from the sam2 directory at your root directory.

4. Connect running ML backend server to Label Studio: go to your project `Settings -> Machine Learning -> Add Model` and specify `http://localhost:9090` as a URL. Read more in the official [Label Studio documentation](https://labelstud.io/guide/ml#Connect-the-model-to-Label-Studio).

## Running with Docker (coming soon)
## Running with Docker

1. Start Machine Learning backend on `http://localhost:9090` with prebuilt image:

Expand Down
4 changes: 2 additions & 2 deletions docs/source/tutorials/segment_anything_2_video.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guide describes the simplest way to start using **SegmentAnything 2** with
This repository is specifically for working with object tracking in videos. For working with images,
see the [segment_anything_2_image repository](https://github.com/HumanSignal/label-studio-ml-backend/tree/master/label_studio_ml/examples/segment_anything_2_image)

![sam2](/tutorials/Sam2Video.gif)
![sam2](./Sam2Video.gif)

## Before you begin

Expand Down Expand Up @@ -83,4 +83,4 @@ If you want to contribute to this repository to help with some of these limitati

## Customization

The ML backend can be customized by adding your own models and logic inside the `./segment_anything_2_video` directory.
The ML backend can be customized by adding your own models and logic inside the `./segment_anything_2_video` directory.
Loading
Loading