Predict DEIM

GPU Dockerfile
First run can take longer while the worker pulls the configured Docker image.

Overview

Runs a DEIM object detector from your workspace registry over an image or video dataset and writes the assets with their predicted boxes to the output dataset. The input dataset stays unchanged.

Pick a Destination dataset to add the predictions to a dataset you already have, such as a labeling pool or an active-learning set: it keeps what it holds, and an image it already annotates gets the new prediction instead. Leave it empty and the node writes into a dataset of its own, one version per run.

Predict with a model you trained here or a public COCO checkpoint copied in from the catalog, without preparing anything first. Each box carries its score in a confidence tag. The badge counts the annotated assets and opens the output dataset.

Train DEIM Predict DEIM Evaluate object detection
  • DEIMv2 HGNetV2-Atto
  • DEIMv2 HGNetV2-Femto
  • DEIMv2 HGNetV2-Pico
  • DEIMv2 HGNetV2-N
  • DEIMv2 DINOv3-S
  • DEIMv2 DINOv3-M
  • DEIMv2 DINOv3-L
  • DEIMv2 DINOv3-X
  • D-FINE HGNetV2-N
  • D-FINE HGNetV2-S
  • D-FINE HGNetV2-M
  • D-FINE HGNetV2-L
  • D-FINE HGNetV2-X
  • RT-DETRv2-S (r18vd)
  • RT-DETRv2-M (r34vd)
  • RT-DETRv2-M* (r50vd_m)
  • RT-DETRv2-L (r50vd)
  • RT-DETRv2-X (r101vd)

Prerequisites

RequirementWhat you need
GPU workerA worker with a GPU.
DEIM modelA DEIM detection model in the workspace registry: a version produced by Train DEIM, or a catalog architecture copied in from the Model picker.

How it works

1

Takes the destination dataset, or the node’s own output dataset - created on the first run, a new empty version of it on a rerun - and adds the input dataset’s images and videos to it without duplicating them.

2

Pins the output dataset to the model’s ontology and loads the version’s checkpoint and training config onto the GPU.

3

Runs detection in batches, dropping detections below the confidence threshold.

4

Writes one prediction annotation per asset and refreshes the output dataset’s statistics.

FAQ

No. The output holds the same assets as the input, but only this run’s predictions as annotations, which is what an evaluation node expects. The input dataset is never changed.

Images and videos. If the dataset holds at least one image, only images are predicted: videos are still added to the output dataset but get no predictions in that run. Videos are predicted frame by frame, and each run renders an annotated copy of the video beside its annotation.

Yes. Copy a catalog architecture into the workspace from the Model picker. Those checkpoints predict the 80 COCO classes, so they are useful for a quick look or for pre-labeling common objects, not for your own class set. The weights are downloaded on every run.

Tick the classes to keep in Predict classes, which lists the model’s ontology. Detections of every other class are dropped before the image annotations are written. The filter applies to images only: video predictions keep every class.

Each annotation is tagged with the task that produced it, the model version, and the model’s name. Every box stores its score in the numeric confidence tag.

The input dataset has no image or video assets. The output dataset is still created or versioned, but stays empty.

Run Evaluate object detection with the input dataset as ground truth and this output as predictions. Prediction alone reports how many assets were annotated, not how correct the annotations are.

Inputs

Dataset
datasetRequired

Dataset to run detection on. Its assets are copied into the output dataset that also receives the predictions. Key: DATASET.

Destination dataset
dataset

Dataset the predictions are added to, keeping what it already holds. An image it already annotates gets the new prediction instead. Leave empty to use the node’s own output dataset, which a rerun writes a new version of. Key: DST_DATASET.

Model
modelRequired

Model to run inference with, from this workspace or the zoo. The node is handed the resolved version and runs on its weights: the checkpoint stored for it, or the public COCO weights of its architecture for a pretrained entry that hosts none. Key: MODEL.

Predict classes
ontologyRequired

Classes kept in the predictions - detections of every other class are dropped. Leave empty to keep all of them. Values come from MODEL. Key: CLASSES.

Config
yamlRequired

Inference settings in YAML - the confidence a detection needs to be kept, and how many assets go through the model at once. Key: CONFIG.

Download batch size
integerDefaults to 64Required

Number of assets downloaded in one go while the model runs on the ones already fetched. Minimum: 1. Key: DOWNLOAD_BATCH_SIZE.

Prefetch batches
integerDefaults to 4Required

Number of batches allowed to wait on disk ahead of the model. Higher values ride out slow downloads at the cost of disk space. Minimum: 1. Key: PREFETCH_BATCHES.

Outputs

Output Dataset
dataset

Dataset with the input images plus the DEIM prediction annotations: the destination dataset when one is picked, otherwise the node’s own. Shown as an artifact. Key: OUTPUT_DATASET.

Predicted
string

Number of images annotated. Shown on the node as a badge. Selecting the badge opens OUTPUT_DATASET. Key: PRED_COUNT.

Models and configuration

Model is the one place the weights come from. The picker lists the workspace’s DEIM detection models and their ready versions. Picking the model itself follows its newest ready version at every run, and picking a version pins it. A trained version runs on its stored checkpoint and training config, and a catalog version on the public COCO weights of its architecture.

A trained checkpoint carries its own class list, which names the predictions. When it has none, the version’s recorded classes are used.

Config holds the inference settings. conf_threshold (default 0.5) is the score a detection needs to survive, and batch_size (default 4) how many images or video frames the model sees at once. Config must be a YAML mapping.

Runtime

The node runs in its own GPU container. The first run takes longer while the worker pulls the image.

Images are fetched ahead of the model to keep the GPU busy. Download batch size sets how many arrive at once and Prefetch batches how many wait on local disk, so raise them for fast storage and lower them when disk is tight.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Predict DEIM",
"description": "Run DEIM object detection inference on a dataset and write the images and the DEIM prediction annotations into the output dataset.",
"category": "Predict",
"namespace": "ovalbee",
"templateKey": "models/deim/predict_deim",
"version": "v1",
"inputs": [
{
"key": "DATASET",
"label": "Dataset",
"type": "dataset",
"description": "Dataset to run detection on. Its assets are copied into the output dataset that also receives the predictions.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"creatable": false
}
},
{
"key": "DST_DATASET",
"label": "Destination dataset",
"type": "dataset",
"description": "Dataset the predictions are added to, keeping what it already holds. An image it already annotates gets the new prediction instead. Leave empty to use the node's own output dataset, which a rerun writes a new version of.",
"required": false,
"default": null,
"visibleWhen": null
},
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "Model to run inference with, from this workspace or the zoo. The node is handed the resolved version and runs on its weights: the checkpoint stored for it, or the public COCO weights of its architecture for a pretrained entry that hosts none.\n",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"framework": "deim",
"task_type": "object_detection"
}
},
{
"key": "CLASSES",
"label": "Predict classes",
"type": "ontology",
"description": "Classes kept in the predictions - detections of every other class are dropped. Leave empty to keep all of them.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"ref": "MODEL",
"selectable": true
}
},
{
"key": "CONFIG",
"label": "Config",
"type": "yaml",
"description": "Inference settings in YAML - the confidence a detection needs to be kept, and how many assets go through the model at once.",
"required": true,
"default": "conf_threshold: 0.5\nbatch_size: 4\n",
"visibleWhen": null
},
{
"key": "DOWNLOAD_BATCH_SIZE",
"label": "Download batch size",
"type": "number",
"description": "Number of assets downloaded in one go while the model runs on the ones already fetched.",
"required": true,
"default": 64,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1
}
},
{
"key": "PREFETCH_BATCHES",
"label": "Prefetch batches",
"type": "number",
"description": "Number of batches allowed to wait on disk ahead of the model. Higher values ride out slow downloads at the cost of disk space.",
"required": true,
"default": 4,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1
}
}
],
"outputs": [
{
"key": "OUTPUT_DATASET",
"label": "Output Dataset",
"type": "dataset",
"description": "Dataset with the input images plus the DEIM prediction annotations: the destination dataset when one is picked, otherwise the node's own.",
"artifact": true,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "PRED_COUNT",
"label": "Predicted",
"type": "string",
"description": "Number of images annotated.",
"artifact": false,
"badge": true,
"badgeOpens": "OUTPUT_DATASET",
"hidden": false
}
],
"runtime": {
"type": "docker",
"requiresGpu": true,
"dockerImage": "cr.internal.supervisely.com/ovalbee-internal/nodes/deim:0.0.15"
},
"widgets": {
"widget": {
"id": "asset-preview",
"settings": {
"datasetId": {
"type": "variable",
"value": "self.outputs.OUTPUT_DATASET"
}
}
}
}
}

References