> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Prelabel with auto labeling

> Pre-label a dataset's images with a running auto labeling session, from the labeled images it holds right now, into a new dataset. The session keeps running.

## Overview

Pre-labels a dataset's images with a running auto labeling session, into a new dataset. Each image is labeled from the labeled images the session holds at that moment, and the session keeps running afterwards.

Use it once a session has been given enough labeled images to be useful - by labelers, or by [Simulate labeling with auto labeling](/node-library/nodes/models-general-simulate-labeling-with-auto-labeling) - to pre-label the rest of a dataset in one pass, or to compare the session's predictions with ground truth.

```mermaid
flowchart LR
  n1["Serve live auto labeling with SAM 3"] --> n2["Prelabel with auto labeling"] --> n3["Compare prelabels with ground truth"]
```

## Prerequisites

| Requirement           | What you need                                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Auto labeling session | A running session, from the [Serve live auto labeling with SAM 3](/node-library/nodes/models-sam-3-serve-live-auto-labeling-with-sam-3) node, that already holds as many labeled images as its config requires. |
| Images                | A dataset with the images to pre-label, from the [Dataset](/node-library/nodes/dataset-ops-dataset) node or any node that outputs one.                                                                          |

## How it works

Adds a version to the node's own pre-label dataset, on the classes of the input dataset, holding the input images.

Sends the images to the session in batches of **Images per request**, dropping predictions below **Minimum confidence** when it is set.

Writes each image's prediction as its annotation in the pre-label dataset as soon as its batch comes back.

## FAQ

#### Why did the run stop with a warning and only some images pre-labeled?

The session refused to predict: it is still loading its model, or holds fewer labeled images than `initial_samples` in its config asks for. The images it labeled before that are kept. Submit labeled images to the session and run the node again.

#### What happens when I run it again?

Every run adds a new version of the pre-label dataset with that run's images and predictions only. The session may hold more labeled images by then, so the same image can come back with a different annotation.

#### Does it change the input dataset?

No. The input images are added to the node's own dataset with the predictions as their annotations, and the input dataset keeps its own annotations.

#### Masks or boxes?

Whichever the session answers in: `output_geometry` in the session's config decides. Set it to `object_detection` when the dataset is labeled with bounding boxes.

## Inputs

**`Auto labeling session`** `deployment` — required

Running auto labeling session to ask. It labels from the labeled images submitted to it so far, and refuses until it holds as many as its Config requires. Key: `DEPLOYMENT`.

---

**`Dataset`** `dataset` — required

Images to pre-label. They are left untouched here and copied, with the predicted annotations, into the node's pre-label dataset. Key: `DATASET`.

---

**`Minimum confidence`** `number`

Predictions less confident than this are not drawn. Empty uses the session's own threshold. Minimum: `0.05`. Maximum: `1`. Step: `0.05`. Key: `CONF_THRESHOLD`.

---

**`Images per request`** `integer` — required, default: 8

How many images each request to the session carries. Every batch is uploaded as soon as it comes back, so a smaller one loses less work if the session stops mid-run. Minimum: `1`. Maximum: `64`. Step: `1`. Key: `BATCH_SIZE`.

---

## Outputs

**`Prelabeled dataset`** `dataset`

The node's pre-label dataset, holding the input images with the session's predictions as their annotations. Every run adds a version with this run's images only. Key: `OUTPUT_DATASET`.

---

**`Prelabeled images`** `string`

How many images got predictions, and how many labeled images the session held when it made them. Shown on the node as a badge. Key: `PRED_COUNT`.

---

## JSON config

Machine-readable node interface for automation and advanced usage.

#### Show JSON

```json
{
  "name": "Prelabel with auto labeling",
  "description": "Pre-label a dataset's images with a running auto labeling session, from the labeled images it holds right now, into a new dataset. The session keeps running.",
  "category": "Predict",
  "namespace": null,
  "templateKey": "models/general/prelabel_with_auto_labeling",
  "version": "v1",
  "inputs": [
    {
      "key": "DEPLOYMENT",
      "label": "Auto labeling session",
      "type": "deployment",
      "description": "Running auto labeling session to ask. It labels from the labeled images submitted to it so far, and refuses until it holds as many as its Config requires.",
      "required": true,
      "default": null,
      "visibleWhen": null,
      "options": {
        "kind": "auto_labeling"
      }
    },
    {
      "key": "DATASET",
      "label": "Dataset",
      "type": "dataset",
      "description": "Images to pre-label. They are left untouched here and copied, with the predicted annotations, into the node's pre-label dataset.",
      "required": true,
      "default": null,
      "visibleWhen": null,
      "options": {
        "creatable": false
      }
    },
    {
      "key": "CONF_THRESHOLD",
      "label": "Minimum confidence",
      "type": "number",
      "description": "Predictions less confident than this are not drawn. Empty uses the session's own threshold.",
      "required": false,
      "default": null,
      "visibleWhen": null,
      "options": {
        "min": 0.05,
        "max": 1,
        "step": 0.05,
        "type": "float"
      }
    },
    {
      "key": "BATCH_SIZE",
      "label": "Images per request",
      "type": "number",
      "description": "How many images each request to the session carries. Every batch is uploaded as soon as it comes back, so a smaller one loses less work if the session stops mid-run.",
      "required": true,
      "default": 8,
      "visibleWhen": null,
      "options": {
        "min": 1,
        "max": 64,
        "step": 1,
        "type": "integer"
      }
    }
  ],
  "outputs": [
    {
      "key": "OUTPUT_DATASET",
      "label": "Prelabeled dataset",
      "type": "dataset",
      "description": "The node's pre-label dataset, holding the input images with the session's predictions as their annotations. Every run adds a version with this run's images only.",
      "artifact": false,
      "badge": false,
      "badgeOpens": null,
      "hidden": false
    },
    {
      "key": "PRED_COUNT",
      "label": "Prelabeled images",
      "type": "string",
      "description": "How many images got predictions, and how many labeled images the session held when it made them.",
      "artifact": false,
      "badge": true,
      "badgeOpens": null,
      "hidden": false
    }
  ],
  "widgets": {
    "widget": {
      "id": "asset-preview",
      "settings": {
        "datasetId": {
          "type": "variable",
          "value": "self.outputs.OUTPUT_DATASET"
        }
      }
    }
  }
}
```