Skip to navigation

Prelabel with auto labeling

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 - to pre-label the rest of a dataset in one pass, or to compare the session’s predictions with ground truth.

Serve live auto labeling with SAM 3 Prelabel with auto labeling Compare prelabels with ground truth

Prerequisites

RequirementWhat you need
Auto labeling sessionA running session, from the Serve live auto labeling with SAM 3 node, that already holds as many labeled images as its config requires.
ImagesA dataset with the images to pre-label, from the Dataset node or any node that outputs one.

How it works

1

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

2

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

3

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

FAQ

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.

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.

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.

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
deploymentRequired

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
datasetRequired

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
integerDefaults to 8Required

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.

{
"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"
}
}
}
}
}