Predict EdgeCrafter

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

Overview

Runs an EdgeCrafter model from your workspace registry over an image or video dataset and writes the assets with their predicted boxes or masks 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.

The model you pick decides what the node predicts: an ECDet architecture returns bounding boxes, an ECSeg one a mask per instance at the original image resolution as well. Video prediction outputs bounding boxes only. Each prediction carries its score in a confidence tag.

The badge counts the annotated assets and opens the output dataset.

Train EdgeCrafter Predict EdgeCrafter Evaluate object detection
  • EdgeCrafter ECDet-S
  • EdgeCrafter ECDet-M
  • EdgeCrafter ECDet-L
  • EdgeCrafter ECDet-X
  • EdgeCrafter ECSeg-S
  • EdgeCrafter ECSeg-M
  • EdgeCrafter ECSeg-L
  • EdgeCrafter ECSeg-X

Prerequisites

RequirementWhat you need
GPU workerA worker with a GPU.
EdgeCrafter modelAn EdgeCrafter model in the workspace registry: a version produced by Train EdgeCrafter, 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 the model in batches, dropping predictions 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, as boxes even with an ECSeg model.

Pick an ECSeg model, either a catalog architecture or a version trained for segmentation. An ECDet one cannot produce masks.

Tick the classes to keep in Predict classes, which lists the model’s ontology. Everything else is discarded 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 prediction 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 on box predictions, with the input dataset as ground truth. Prediction alone reports how many assets were annotated, not how correct the annotations are.

Inputs

Dataset
datasetRequired

Dataset to run inference on. Images are annotated when the dataset holds any, videos frame by frame otherwise. 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, and with it the task: an ECDet version predicts boxes, an ECSeg one masks as well. The node runs on the resolved version’s 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 to keep in the predictions - everything else the model detects is dropped. Leave empty to keep all of them. Values come from MODEL. Key: CLASSES.

Config
yamlRequired

Inference settings in YAML - how confident a detection must be to be kept, and how many images go through the GPU at once. Key: CONFIG.

Download batch size
integerDefaults to 64Required

Number of images fetched at a time while the GPU works through the ones already downloaded. Minimum: 1. Key: DOWNLOAD_BATCH_SIZE.

Prefetch batches
integerDefaults to 4Required

How far downloading may run ahead of inference, counted in batches. Raise it when a slow connection leaves the GPU idle, at the cost of disk space. Minimum: 1. Key: PREFETCH_BATCHES.

Outputs

Output Dataset
dataset

Dataset with the input images plus the EdgeCrafter 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 EdgeCrafter 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, which predict the 80 COCO classes.

The picked architecture also decides the task: an ECDet model predicts boxes, an ECSeg one masks as well. 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.4) is the score a prediction 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, and a catalog model downloads its public weights on every run.

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 EdgeCrafter",
"description": "Run EdgeCrafter inference (object detection or instance segmentation) on a dataset and write the images and the EdgeCrafter prediction annotations into the output dataset.",
"category": "Predict",
"namespace": "ovalbee",
"templateKey": "models/edgecrafter/predict_edgecrafter",
"version": "v1",
"inputs": [
{
"key": "DATASET",
"label": "Dataset",
"type": "dataset",
"description": "Dataset to run inference on. Images are annotated when the dataset holds any, videos frame by frame otherwise.",
"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, and with it the task: an ECDet version predicts boxes, an ECSeg one masks as well. The node runs on the resolved version's 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": "edgecrafter"
}
},
{
"key": "CLASSES",
"label": "Predict classes",
"type": "ontology",
"description": "Classes to keep in the predictions - everything else the model detects is 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 - how confident a detection must be to be kept, and how many images go through the GPU at once.",
"required": true,
"default": "conf_threshold: 0.4\nbatch_size: 4\n",
"visibleWhen": null
},
{
"key": "DOWNLOAD_BATCH_SIZE",
"label": "Download batch size",
"type": "number",
"description": "Number of images fetched at a time while the GPU works through the ones already downloaded.",
"required": true,
"default": 64,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1
}
},
{
"key": "PREFETCH_BATCHES",
"label": "Prefetch batches",
"type": "number",
"description": "How far downloading may run ahead of inference, counted in batches. Raise it when a slow connection leaves the GPU idle, 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 EdgeCrafter 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/edgecrafter:0.0.15"
},
"widgets": {
"widget": {
"id": "asset-preview",
"settings": {
"datasetId": {
"type": "variable",
"value": "self.outputs.OUTPUT_DATASET"
}
}
}
}
}

References