> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Import images

> Imports images from Supervisely into OvalBee and adds them to the destination dataset.

## Overview

Imports images from a [Supervisely](https://docs.supervisely.com/) 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.

```mermaid
flowchart LR
  n1["Import images"] --> n2["Dataset"]
```

## Prerequisites

| Requirement                 | What you need                                                                                             |
| --------------------------- | --------------------------------------------------------------------------------------------------------- |
| **Supervisely credentials** | A Supervisely secret holding the server address and an API token for an account that can read the source. |
| **Image project**           | The Supervisely source must belong to an image project.                                                   |

## How it works

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

Creates a new version of the destination dataset.

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

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.

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

#### What can this node import?

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

#### What does Reuse existing assets do?

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.

#### What happens to annotations when an asset is reused?

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.

#### Does a rerun import the same images again?

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.

#### Which tags does the node restore or override?

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.

#### What does the import badge count?

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

#### What happens when several source images point to the same OvalBee asset?

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

#### Why were no labeled images found?

**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.

#### Why did the run finish with \`+0 images\`?

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`** `string` — required

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

---

**`To dataset`** `dataset` — required

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

---

**`Supervisely credentials`** `secret` — required

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

---

**`Import annotations`** `boolean` — default: false

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

---

**`Only labeled images`** `boolean` — default: 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`** `boolean` — required, default: true

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.

#### Show JSON

```json
{
  "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
    }
  ]
}
```