DataGym.ai
  • DataGym.ai
  • Getting Started
  • Project
    • What is a project?
    • Create a new project
    • Update a project
    • Delete a project
    • Connect a dataset
    • Export data
    • Import Data
  • Dataset
    • What is a dataset?
    • Create a new dataset
    • Update a dataset
    • Connect with AWS S3
    • Delete a dataset
    • Manage images
      • Upload to DataGym.ai
      • Add public links
      • Synchronize with AWS S3
    • Connect to a project
    • Use the review mode
  • Label configuration
    • What is a label configuration?
    • Configuration entry
    • Entry types
    • Creating an entry
    • Editing an entry
    • Duplicating an entry
  • Label mode
    • What is the label mode?
    • Entry-list
    • Value-list
    • Task control
    • Toolbar
    • Workspace
    • AI-assisted labeling
    • Video labeling
  • Tasks
    • What is a task?
    • Process a task
    • Manage Tasks
  • AI-Assistant
    • AI-assisted pre-labeling
    • Object Classes
  • API Token
    • API
    • Manage API Token
  • Account-Management
    • Account Settings
    • Organisation-Management
  • Python API
    • Getting Started
    • Projects
    • Labeled data
    • Datasets
    • Images
    • Label configuration
    • Uploading COCO
  • Changelog
Powered by GitBook
On this page
  • The used example:
  • Label classes:
  • A single tasks:

Was this helpful?

  1. Project

Export data

How to export the labeled data.

PreviousConnect a datasetNextImport Data

Last updated 4 years ago

Was this helpful?

In the projects home tab the "Export labels" button is located below the full description. A click on this button creates a new JSON file containing the labeled data. This button is only enabled if labeled data is available.

The exported JSON file starts with an overview of the label classes defined within the followed by the list of tasks.

The used example:

For this documentation the following label configuration was used.

Label classes:

The label classes may look like the following snippet:

label_classes.json
{ 
  "label_classes" : [ {
    "class_name": "bus",
    "geometry_type": "rectangle"
  }, {
    "class_name": "car",
    "geometry_type": "polygon"
  }, {
    "class_name": "car_type",
    "classification_type": "select"
  }, {
    "class_name": "weather",
    "classification_type": "radio"
  }, {
    "class_name" : "daytime",
    "classification_type" : "select"
  } ]
}

The class_names are export keys from the classifications and geometries defined in the label configuration. They are also used in the labels and global_classifications sections for each task. The geometry_type or classification_type describe the type of that classes.

Classifications of type option are exported as type radio if they contain up to three options otherwise they are exported as type select.

A single tasks:

Every exported task consists of the following properties:

task_snippted.json
{
  "internal_media_ID" : "datagym-image-id",
  "external_media_ID" : "awesome-image.jpg",
  "labeler" : "labeler-id",
  "status" : "completed",
  "segmentations": [],
  "global_classifications" : {},
  "labels" : {}
}

Property

Description

internal_media_ID

external_media_ID

The media's file name.

labeler

To identify the assigned labeler.

status

segmentations

global_classifications

Uses the label_classes to describe the image.

labels

Uses the class names listed in the label_classes section to describe a geometry within the image.

Global classifications:

The global_classifications section uses the class_names defined in the label_classes section to describe the image. This section may look like the following:

global_classifications.json
{
  "global_classifications" : {
    "weather" : [ "sunny", {
      "daytime" : [ "day" ]
    } ]
  }
}

Nested classifications are possible.

The Labels:

The label object contains an entry for each geometry type defined in the label_classes section with the class_name as key. Every entry contains a geometry of the assigned geometry_type. Each entry in that list consists of the geometry and classifications sections. The content of the geometry depends on the geometry_type and the classifications are treated like the global_classifications. The labels section may look like the following snippet:

labels_snippet.json
{
  "labels" : {
    "bus": [],
    "car": []
  }
}

The geometries:

For every geometry_type defined in the label_classes sections, a list of objects is created. Every entry describes an area of interest in the image and is defined by its geometry and classifications.

geometry_snippet.json
{
  "car": [ {
    "geometry": [{
      "x" : 57,
      "y" : 412
    }, {
      "x" : 54,
      "y" : 463
    }, {
      "x" : 130,
      "y" : 524
    }, {
      "x" : 1148,
      "y" : 684
    } ],
    "classifications": { 
      "car_type": [ null ]
    }
  } ]
}

Image segmentation geometries:

Image segmentation geometries are basically treated the same way as polygon geometries, except for the fact that they have multiple arrays of points.

seqmentation_snipped.json
{
    "seqmentation" : [ {
      "geometry" : [ [ {
        "x" : 254,
        "y" : 173
      }, {
        "x" : 177,
        "y" : 174
      }, {
        "x" : 182,
        "y" : 77
      }, {
        "x" : 833,
        "y" : 50
      }, {
        "x" : 842,
        "y" : 160
      }, {
        "x" : 780,
        "y" : 161
      }, {
        "x" : 784,
        "y" : 322
      }, {
        "x" : 250,
        "y" : 313
      }, {
        "x" : 254,
        "y" : 173
      } ], [ {
        "x" : 579,
        "y" : 165
      }, {
        "x" : 685,
        "y" : 163
      }, {
        "x" : 688,
        "y" : 278
      }, {
        "x" : 579,
        "y" : 279
      }, {
        "x" : 579,
        "y" : 165
      } ], [ {
        "x" : 400,
        "y" : 169
      }, {
        "x" : 496,
        "y" : 167
      }, {
        "x" : 500,
        "y" : 275
      }, {
        "x" : 399,
        "y" : 272
      }, {
        "x" : 400,
        "y" : 169
      } ], [ {
        "x" : 285,
        "y" : 172
      }, {
        "x" : 332,
        "y" : 171
      }, {
        "x" : 331,
        "y" : 250
      }, {
        "x" : 286,
        "y" : 249
      }, {
        "x" : 285,
        "y" : 172
      } ] ],
      "classifications" : { }
    } ]

The first array of points are the outer points of the segmentation, while every following array is an inner segment that was cut out. The above JSON Snippet corresponds to the Segmentation in the image below.

The internal id to identify the media file. This ID can be used to .

One of the task's states. See the documentation about .

This section is optional and appears only if at least one image segmentation is configured. This list contains the urls to export the semantic maps. See for more details.

label configuration
view or download the image
the task's lifecycle
the API documentation
Segmentation with three inner cutouts