Export Result Format

When you export labels, a compressed zip file will be created for you to download. This page explains the details of how the export result file created from a single export job is structured and formatted.

Folder Directory

When you extract the export result zip file, you will see files and directories in the structure below.

├── project.json
├── labels/
│ ├── {label-id}.json
│ └── ...
├── meta/
│ ├── {dataset-name}/{data-key}.json
│ └── ...
└── masks/ // (optional)
├── classId/
│ ├── {class-group}
│ │ ├── {label-id}.png
│ │ └── ...
│ │
│ └── ...
└── instanceId/

Project Settings

The project.json file contains information about the current project configurations. This repeats the information entered when creating this project. (See related manual: Create a New Project)

Project JSON File Structure

// filename: project.json
{
"groups": [ // Class Groups
{
"name": string, // Name of group
"info": {
"classes": string[] // Name of object classes in this group
}
}
],
"objects": [ // Annotation objects
{
"class_name": string, // Name of object class
"class_id": number, // ID of object class
"info": {
"min": number, // Min/max number of this object class per image
"max": number, // (0 means no limit)
"shapes": {
{shape-type}: { // "box", "polygon", "polyline", "keypoint", etc.
"default_value": {
"color" : string // Color used to visualize this object class
}
}
},
"properties": [
{
"name": string, // Name of property
"type": string, // "objective": Multiple Choice/Selection, "string": Free Response
"value": string or string[], // Selected value in Multiple Choice/Selection or text result of Free Response
"nullable": boolean, // Whether this property is a required annotation
"duplicated": boolean, // False for Multiple Choice type, true for Multiple Selection type
"default_value": {
"value": string[] // Default response for Multiple Choice/Selection
}
}
]
}
}
],
"keypoint_interface": [ // This presents only when keypoint annotation type exists
{
"id": string, // ID of keypoint
"name": string, // Name of keypoint
"nodes": [
{
"v": number, // Visibility value
"x": number, // Default relative coordinate x
"y": number, // Default relative coordinate y
"name": string, // Name of point
"color": string, // Color of point
"opposite": number // Index of symmetric point
}
],
"edges": [
{
"to": number, // Index of point
"from": number, // Index of other point
"color": string // Color of edge
}
],
"point_visibility": [
// There are two options to represent keypoint visibility, 2-state and 3-state.
// 2-state type
{
"name": "not labeled",
"value": 0 // Visibility value
},
{
"name": "labeled and visible",
"value": 1
},
// or 3-state type
{
"name": "not labeled",
"value": 0
},
{
"name": "labeled but not visible",
"value": 1
},
{
"name": "labeled and visible",
"value": 2
}
]
}
]
}

Annotations

Under the /labels directory, there are JSON files named after the ID of corresponding labels. Each JSON file contains the annotation information for each label.

Annotation JSON File Structure

// filename: {label-id}.json
{
"result": {
"objects": [ // Array of annotations
{
"id": number, // ID of annotation
"class": string, // Class name
"shape": {
// Each object will be in one of the several shape types.
// Type 1: bounding box
"box": { // x, y, width, height of bounding box
"x": number,
"y": number,
"width": number,
"height": number
},
// Type 2: polygon
"polygon": [ // Array of points in polygon
{
"x": number,
"y": number
}
],
// Type 3: polyline
"polyline": [ // Array of points in polyline
{
"x": number,
"y": number
}
],
// Type 4: keypoint
"keypoint": [ // Array of points in keypoint
{
"v": number, // Visibility, see project.json for details
"x": number,
"y": number
}
]
},
"properties" : [ // Array of properties
{
"name" : string, // Property name
"value" : string or string[] // Result value of propery
}
]
}
]
}
}

Additional Label Information

Under the /meta directory, there are JSON files named after the dataset and data key of the corresponding labels.

Meta JSON File Structure

// filename: {dataset-name}/{data-key}.json
{
"label_id": string, // ID of corresponding label
"label_path": string, // relative path to label JSON
"dataset": string, // Name of dataset
"data_key": string, // data key (default to file path when uploaded)
"last_updated_date": datetime, // Last update time for label
"image_info": {
"width": number, // Width of image
"height": number // Height of image
},
"masks": {
// (Optional) Only when mask images are generated
}
}

Mask Images

Under the /masks directory are bitmap mask images for each label. Within this directory are two subdirectories — /classId, where mask images have pixel values corresponding to the object class reference ID, and /instanceId, where mask images have pixel values corresponding to each object instance reference ID.

Take a look below to see the difference between the two mask images.

Original image with visualized annotations.
Bitmap Mask images using classId pixel values (Semantic Segmentation)
Bitmap Mask images using instanceId pixel values (Instance Segmentation)

Any other questions? E-mail us at support@superb-ai.com.