Serve live auto labeling with SAM 3
Overview
Suggests labels for new images using examples you have already labeled. Every annotation submitted to the session becomes a SAM 3 visual prompt — a concept captured from the geometry you drew — and a prediction applies the concepts that look most like the target image to that image.
Nothing is trained. There is no optimizer, no loss and no checkpoint: the bank of captured references is the model state. Fine-tuning can reuse the same labeled images. This session only improves when you give it more labeled images, but it does so instantly — the first submitted image is usable as a reference the moment it is captured, where a fine-tune needs hundreds of iterations before its suggestions are worth looking at.
Start this deployment from the Deployments page or place it on the canvas as a deploy node. It holds one GPU for its whole lifetime and accepts requests over HTTP from the labeling tool as images are submitted, or from anything else that can call the routes below. On the canvas, its Deployment output feeds Simulate labeling with auto labeling and Prelabel with auto labeling. Set Labeling dataset to the dataset a labeling step takes its images from, and only that step’s labelers are offered the session. For a session that trains on submitted examples, use Serve live training with Grounding DINO.
Prerequisites
How it works
Fetches the model’s weights - the catalog’s from OvalBee’s copy, checked against a pinned SHA-256 - and loads SAM 3 with them onto the deployment’s GPU.
Takes labeled images on POST /samples. Each one is downloaded, its newest annotation is read,
and one concept per class drawn on it is captured: the class name as the text channel, each
object’s bounding box, and points sampled from its mask where the mask shows occlusion. What
the session predicted on that image and the labeler removed is captured as negative boxes for
its class, which pushes the concept away from that mistake. A class nobody had drawn yet is appended
to the vocabulary.
Banks every submitted image as a reference, alongside a cheap descriptor of what it looks like. Submitting an image again replaces the reference it contributed before, so a correction replaces the thing it corrects rather than competing with it.
Answers POST /predict by running the backbone once on the target, then, per class, merging
the retrieval_k most visually similar references into one concept and applying it. Only the
grounding head re-runs per class, so a large vocabulary costs far less than one pass each.
Splits large images into windows when their objects would be too small to find. SAM 3 sees
every image scaled to 1008 x 1008 pixels, and objects that end up under about 32 pixels
there are mostly missed. With tiling on, the references retrieved for the target say how
large its objects are relative to the image, the smallest of them counting; when one would come out under about 48
pixels, the target is predicted in overlapping windows sized to bring it there, at most 25,
and each submitted image is captured from one such window, the one holding the most of its
objects. Sizes are read relative to the image, so a dataset mixing close-ups and wide shots
tiles only the images whose references show small objects. An image that is already small enough
is predicted whole, as before. Each window costs one backbone pass, and each is another chance
for a false box, so a windowed image keeps only detections at tile_confidence_threshold or
above, or the request’s own threshold if that is higher.
Resolves detections that claim the same object across classes by keeping the highest scoring
one, comparing masks rather than boxes so two overlapping objects of different classes both
survive. With drop_nested_boxes on, a box that lies alone inside a larger box of its class
is dropped as a part of that object; a larger box holding two or more boxes is a group, and
its inner boxes stay. Answers in masks or boxes as output_geometry asks.
FAQ
How do I call the deployment?
Every endpoint is reached through the deployment’s own invoke URL, which the Deployments page
shows on the deployment’s info dialog. GET /status reports the phase, how many labeled images
the session holds, how many references are banked per class, and the vocabulary.
Can it predict before anything has been labeled?
No. Unlike a text-prompted detector, a concept cannot exist before something has been drawn —
classes in Config only decides which class names the session will accept, not what they look
like. POST /predict answers 400 until initial_samples labeled images have arrived.
What happens if I submit the same image twice?
Its reference is replaced by the newer one. Correcting an image is therefore worth doing: the session prompts from the corrected geometry, not from both versions.
Why did adding more labeled images not change anything?
Only retrieval_k references are used per prediction, chosen by visual similarity to the
target. A new reference changes a prediction when it is among the closest to that image, which
is what makes the bank scale — adding the hundredth image of the same scene changes little,
adding the first image of a new one changes a lot.
Masks or boxes?
output_geometry: instance_segmentation returns SAM 3’s own per-detection mask, and
object_detection returns that mask’s bounding box. The work is identical either way — SAM 3
computes the mask regardless — so the choice is only about what the caller wants. Set it to
object_detection when the dataset is a detection dataset, so what the session writes back
is the geometry the rest of the flow expects.
The box is taken from the mask rather than from SAM 3’s own detection head. The two disagree by a few pixels, and the head’s box can cut off part of the object the same prediction segmented, so the mask is the one both geometries are derived from.
Does stopping the deployment lose anything?
All of it. The concept bank lives in the container’s memory and there is no checkpoint to write it to, so a restarted deployment starts empty and the images have to be submitted again.
What does this node not support?
One GPU and one session per deployment. It produces no model version, because nothing is trained — to end up with weights, label with this session and then run a training node over the result. It reports no quality metric, because nothing is held out.
Inputs
SAM 3 weights the session labels with: SAM3 from the catalog, OvalBee’s copy of its authors’ weights, or weights of your own. With the safe-weights policy on, only safetensors load. Key: MODEL.
The dataset a labeling step takes its images from - the labeling pool whose labeled images become this session’s prompts. Set it, and the labeling tool offers this session only to labeling steps drawing from that dataset, so labelers of another flow neither see it nor send it their images. Empty, every labeling step in the workspace is offered it. Key: LABELING_DATASET.
YAML settings for what the session outputs and how it builds and applies concepts. classes lists the class names the session starts with, every class drawn on a submitted image is appended to it. Nothing is predicted until initial_samples labeled images have been submitted, since a class has no concept before something of it has been drawn. output_geometry chooses whether predictions come back as masks or as boxes. SAM 3 sees every image scaled to about 1000 pixels, so with tiling on, an image whose objects would shrink below what it can find - judged by the size of the objects on the submitted images - is predicted in overlapping windows, and the labeled images are taken in at the same scale. A windowed image keeps only detections at tile_confidence_threshold or above, since every window is another chance for a false box. drop_nested_boxes removes a box lying alone inside a larger box of its class - SAM 3 boxing part of an object it also boxed whole. The prompt channels and point counts are baked into concepts as they are captured, so changing them only affects images submitted afterwards. Key: CONFIG.
Outputs
The running session. Wire it into a node that takes an auto labeling session to submit labeled images to it or to pre-label a dataset with it while it is up. Key: DEPLOYMENT.
Models and configuration
Model is the SAM 3 the session labels with: SAM3 copied from the catalog, whose weights the
deployment downloads from OvalBee’s copy when it starts, through the workspace’s model cache when
the worker has one, or SAM3 weights of your own. With the safe-weights policy on, only safetensors
load; a .pt checkpoint, the catalog’s included, has to be converted first.
Config splits into four groups. classes and initial_samples decide what the session will accept
and when it will answer. output_geometry and confidence_threshold decide what comes back, and
confidence_threshold is the only key a single /predict call may override, through settings.
The prompt channels — use_text_prompt, use_box_prompt, use_point_prompt, adaptive_points,
occlusion_threshold and the n_*_points counts — decide how a concept is built. They are baked
into each reference as it is captured, so changing them only affects images submitted afterwards.
To re-capture the existing bank under new settings, submit those images again. At least one of
use_text_prompt or use_box_prompt must stay on, since SAM 3 cannot build a concept without a
text or box channel.
retrieval_k and conflict_iou_threshold decide how concepts are applied: how many references are
merged per class, and how much mask overlap makes two detections the same object. The same overlap
merges an object two neighbouring windows both see whole; a detection cut by a window edge is
dropped when another window holds the object whole.
Runtime
Runs on the node-sam3-live image, which is the Serve SAM3 image plus a patch that lets a concept
captured on one image be applied to another — vanilla SAM 3 can only ground a prompt against the
image the prompt was drawn on. The build fails rather than the first request if that patch does not
apply. The image carries no weights.
The deployment serves on the platform’s standard service port and reports 503 on its health endpoint until SAM 3 is on the device, so it is not routed traffic it cannot answer. Submissions and predictions share one GPU under a lock, taken per image rather than per request, so a submission arriving during a large prediction batch waits for one image rather than all of them.
JSON config
Machine-readable node interface for automation and advanced usage.