Skip to navigation

Export to archive

Overview

Packs a dataset’s images, and their annotations, into zip archives laid out in the format you pick. After the run, Download on the node saves the archive to your computer.

A large dataset is split into parts of about 2 GiB each. Every part is a regular zip that opens on its own. To export into a bucket instead, use Export to cloud storage.

Dataset Export to archive Zip archives to download

Prerequisites

RequirementWhat you need
Dataset with imagesAn OvalBee dataset that already holds at least one image.

How it works

1

Reads the source dataset and confirms it holds at least one image.

2

Exports the images, and their annotations unless With annotations is off, laid out as Annotation format.

3

Writes the files into a zip. Once the zip reaches about 2 GiB, the node stores it and starts the next part.

4

Stores the last part. Download on the node then offers the archive, or a list of its parts.

FAQ

YOLO writes images/train, labels/train and a data.yaml class list. COCO writes images/train and an annotations/train.json. Supervisely writes a project-level meta.json plus <dataset>/img and <dataset>/ann folders.

Extract every part into the same folder. Each part holds a share of the images. The files that describe the whole dataset, such as annotations/train.json, data.yaml or meta.json, are in the last part.

Turn off With annotations. The node still writes the layout for the picked Annotation format, but skips every annotation file.

The source dataset may have no images, or the worker may not have enough free disk for one 2 GiB part.

Inputs

Dataset
datasetRequired

Dataset whose images are exported. Key: DATASET.

With annotations
booleanDefaults to trueRequired

Export annotations next to the images. Turn off to export only the image files. Key: WITH_ANNOTATIONS.

Annotation format
selectDefaults to superviselyRequired

Format the annotations are written in. Visible when WITH_ANNOTATIONS is not False. Key: ANNOTATION_FORMAT.

Options:

  • Supervisely (supervisely)
  • COCO (coco)
  • YOLO (yolo)

Outputs

Archive
string

Asset holding the zip archives, one per 2 GiB part. Read by the download widget. Hidden from the flow editor. Key: ARCHIVE.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Export to archive",
"description": "Pack a dataset's images, with their annotations, into zip archives you download from the node.",
"category": "Export",
"namespace": "ovalbee",
"templateKey": "export_ops/export_to_archive",
"version": "v1",
"inputs": [
{
"key": "DATASET",
"label": "Dataset",
"type": "dataset",
"description": "Dataset whose images are exported.",
"required": true,
"default": null,
"visibleWhen": null
},
{
"key": "WITH_ANNOTATIONS",
"label": "With annotations",
"type": "boolean",
"description": "Export annotations next to the images. Turn off to export only the image files.",
"required": true,
"default": true,
"visibleWhen": null
},
{
"key": "ANNOTATION_FORMAT",
"label": "Annotation format",
"type": "select",
"description": "Format the annotations are written in.",
"required": true,
"default": "supervisely",
"visibleWhen": {
"key": "WITH_ANNOTATIONS",
"operator": "notEquals",
"value": false
},
"options": {
"options": [
{
"label": "Supervisely",
"value": "supervisely"
},
{
"label": "COCO",
"value": "coco"
},
{
"label": "YOLO",
"value": "yolo"
}
]
}
}
],
"outputs": [
{
"key": "ARCHIVE",
"label": "Archive",
"type": "string",
"description": "Asset holding the zip archives, one per 2 GiB part. Read by the download widget.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": true
}
],
"widgets": {
"widget": {
"id": "dataset-download",
"settings": {
"assetId": {
"type": "variable",
"value": "self.outputs.ARCHIVE"
}
}
}
}
}