Import images

Overview

Imports images from a Supervisely project, dataset, or collection into an OvalBee dataset, optionally with their annotations.

Every run creates a new version of the destination dataset that keeps what it already held and adds the imported images. The LAST_RUN output opens a hidden dataset holding only the images handled in the latest run, and the node badge shows how many there were.

Import images Dataset

Prerequisites

RequirementWhat you need
Supervisely credentialsA Supervisely secret holding the server address and an API token for an account that can read the source.
Image projectThe Supervisely source must belong to an image project.

How it works

1

Reads the source from the URL. A project URL covers all its datasets, while a dataset or collection URL covers only that selection.

2

Creates a new version of the destination dataset.

3

Copies the images, with their annotations when Import annotations is on. Only labeled images then skips images that carry no annotations.

4

Tags every imported image. Leave Asset tag name empty to get a sly_source tag naming the Supervisely project and its dataset or collection, or set your own name and value.

5

Adds the classes and tags of the Supervisely project to the destination dataset’s ontology and refreshes its statistics. Nothing is deleted from Supervisely.

FAQ

Images from Supervisely image projects only. A video or other project type fails the run before anything is copied.

An image that went to Supervisely in an earlier export from OvalBee remembers which OvalBee asset it came from. With reuse on, that image is attached back to the original asset instead of being uploaded again. If the original asset no longer exists in this workspace, a new one is uploaded. Turn reuse off to always upload new assets.

With Import annotations on, a reused image gets the Supervisely annotation as a new annotation, and nothing existing is replaced or merged. If the destination dataset already held an annotation for that image, OvalBee reads the newest one.

Yes. Each run imports everything in the source, whatever an earlier run brought in. Images uploaded as new assets arrive again as new copies. Reused images stay single assets, because the import never writes an OvalBee asset reference back to Supervisely: only images exported from OvalBee can be reused.

New uploads restore the OvalBee tags saved on the image in Supervisely during an earlier export. If the same tag name appears there, the import tag wins.

Every handled image, including reused assets, not only new uploads.

Only the first source image is reused. The rest are uploaded as new assets.

Import annotations and Only labeled images are on, but the selected source has no labeled images. Turn off Only labeled images or choose a labeled source.

The selected source is empty. Check the source URL. The run still creates a new, unchanged version of the destination dataset and an empty LAST_RUN.

Inputs

From Supervisely
stringRequired

Supervisely project, dataset or collection the images come from. Paste its URL, or a project ID on its own. Key: SLY_URL.

To dataset
datasetRequired

Destination dataset the imported images are added to. Every run creates a new version of it. Key: DATASET.

Supervisely credentials
secretRequired

Your Supervisely server address and API token, stored as a secret. Allowed credential types: supervisely. Key: SLY_SECRET.

Import annotations
booleanDefaults to false

Copy the annotations of each image too, not only the image files. Key: WITH_ANNOTATIONS.

Only labeled images
booleanDefaults to false

Skip source images that carry no annotations. Import fails when nothing in the source is labeled. Visible when WITH_ANNOTATIONS is True. Key: ONLY_LABELED_IMAGES.

Reuse existing assets
booleanDefaults to trueRequired

Images that came from OvalBee in an earlier export are attached back to their original asset instead of being uploaded a second time. Everything else is imported as a new asset. Key: REUSE_EXISTING.

Asset tag name
string

Tag name attached to every imported asset. Leave empty to tag each asset with the Supervisely project, dataset or collection it came from. Key: ASSET_TAG_NAME.

Asset tag value
string

Text stored under that tag name. Required once Asset tag name is set. Visible when ASSET_TAG_NAME is not empty. Key: ASSET_TAG_VALUE.

Outputs

Dataset
dataset

ID of the OvalBee dataset that received imported image assets. Key: DATASET.

Last Run
dataset

Hidden dataset containing image assets handled during this import run, including reused assets. A rerun writes a new version of it. Shown as an artifact. Key: LAST_RUN.

Last Images Count
string

Short badge with the number of image assets handled during the last import, including reused assets. Shown on the node as a badge. Selecting the badge opens LAST_RUN. Key: LAST_IMAGES_COUNT.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Import images",
"description": "Imports images from Supervisely into OvalBee and adds them to the destination dataset.",
"category": "Supervisely",
"namespace": "supervisely",
"templateKey": "supervisely/import_images",
"version": "v1",
"inputs": [
{
"key": "SLY_URL",
"label": "From Supervisely",
"type": "string",
"description": "Supervisely project, dataset or collection the images come from. Paste its URL, or a project ID on its own.",
"required": true,
"default": null,
"visibleWhen": null
},
{
"key": "DATASET",
"label": "To dataset",
"type": "dataset",
"description": "Destination dataset the imported images are added to. Every run creates a new version of it.",
"required": true,
"default": null,
"visibleWhen": null
},
{
"key": "SLY_SECRET",
"label": "Supervisely credentials",
"type": "secret",
"description": "Your Supervisely server address and API token, stored as a secret.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"types": [
"supervisely"
]
}
},
{
"key": "WITH_ANNOTATIONS",
"label": "Import annotations",
"type": "boolean",
"description": "Copy the annotations of each image too, not only the image files.",
"required": false,
"default": false,
"visibleWhen": null
},
{
"key": "ONLY_LABELED_IMAGES",
"label": "Only labeled images",
"type": "boolean",
"description": "Skip source images that carry no annotations. Import fails when nothing in the source is labeled.",
"required": false,
"default": false,
"visibleWhen": {
"key": "WITH_ANNOTATIONS",
"operator": "equals",
"value": true
}
},
{
"key": "REUSE_EXISTING",
"label": "Reuse existing assets",
"type": "boolean",
"description": "Images that came from OvalBee in an earlier export are attached back to their original asset instead of being uploaded a second time. Everything else is imported as a new asset.",
"required": true,
"default": true,
"visibleWhen": null
},
{
"key": "ASSET_TAG_NAME",
"label": "Asset tag name",
"type": "string",
"description": "Tag name attached to every imported asset. Leave empty to tag each asset with the Supervisely project, dataset or collection it came from.",
"required": false,
"default": null,
"visibleWhen": null
},
{
"key": "ASSET_TAG_VALUE",
"label": "Asset tag value",
"type": "string",
"description": "Text stored under that tag name. Required once Asset tag name is set.",
"required": false,
"default": null,
"visibleWhen": {
"key": "ASSET_TAG_NAME",
"operator": "notEquals",
"value": null
}
}
],
"outputs": [
{
"key": "DATASET",
"label": "Dataset",
"type": "dataset",
"description": "ID of the OvalBee dataset that received imported image assets.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "LAST_RUN",
"label": "Last Run",
"type": "dataset",
"description": "Hidden dataset containing image assets handled during this import run, including reused assets. A rerun writes a new version of it.",
"artifact": true,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "LAST_IMAGES_COUNT",
"label": "Last Images Count",
"type": "string",
"description": "Short badge with the number of image assets handled during the last import, including reused assets.",
"artifact": false,
"badge": true,
"badgeOpens": "LAST_RUN",
"hidden": false
}
]
}