Annotated Data Format

Annotated Data Format Specification

General Convention

  1. Use the UTC time zone ISO 8601 format, such as 2012-03-29T10:05:45Z ;
  2. Where UUID is needed, use the V4 version uniformly, such as 6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b
  3. All types of constants use uppercase + underscore, such as 3D_BOX ;
  4. Important data with data version version , such as Classification and Class, in order to compare data and prevent concurrency conflicts when modifying, in the reference to these data where the need to save the reference to these data version;

Classification Template

Classification has only one attribute (Attribute) and supports nested attributes, which means that options can also have attributes.

{
  // ID
  "id": 1,
  // Version
  "version": 1,
  // Attribute
  "attribute": {
    // ID
    "id": "64a16626-153f-4136-b7b4-572c10db08c3",
    // Version
    "version": 1,
    // Name
    "name": "Brand",
    // Type, RADIO, DROPDOWN, TEXT, MULTI_SELECTION, RANKING etc.
    "type": "RADIO",
    // Is required
    "required": true,
    // Options
    "options": [
      {
        "id": "92f6b36c-0589-4310-bdc9-5b6918a9a2be",
        "name": "Benz",
        "attributes": [
          {
            "id": "24ce829b-9b60-4b88-99f7-379b144a3cb3",
            "version": 1,
            "name": "Level",
            "type": "RADIO",
            "required": false,
            "options": [
              {
                "id": "9dbdbe60-9a95-4f6f-9a4e-6bf84efb8382",
                "name": "Car"
              },
              {
                "id": "e4497a0f-5c66-40a3-bce7-d9abc59ebbb3",
                "name": "SUV"
              }
            ]
          },
          {
            "id": "0669d8b1-f175-4f46-a8d2-cea7bf9dc1e2",
            "version": 1,
            "name": "Power",
            "type": "MULTI_SELECTION",
            "required": false,
            "options": [
              {
                "id": "14c9b60d-b4cb-475d-9cad-6dc8be58d67b",
                "name": "Gasoline",
                "attributes": [
                  {
                    "id": "9c0d296f-7141-4fd9-9cbe-c3d96a93d411",
                    "version": 1,
                    "name": "Displacement",
                    "type": "RADIO",
                    "required": false,
                    "options": [
                      {
                        "id": "bd290f13-5c04-4828-bf2c-2ccfbca31ef3",
                        "name": "1.0L"
                      },
                      {
                        "id": "4858b7e1-c86c-40a9-96cf-7d1c2aa6ec77",
                        "name": "1.5L"
                      },
                      {
                        "id": "973100cc-ae0a-4379-995f-a98fcf0c4944",
                        "name": "2.0L"
                      }
                    ]
                  }
                ]
              },
              {
                "id": "98b033e7-6c1c-4ade-95d5-684a5e6a26e0",
                "name": "Battery",
                "attributes": [
                  {
                    "id": "8e790d10-9931-43f6-82bb-60619f1a25ea",
                    "version": 1,
                    "name": "Capacity",
                    "type": "RADIO",
                    "required": false,
                    "options": [
                      {
                        "id": "ea9080e5-ce3b-4df8-a55e-b4f53a1f1213",
                        "name": "<20kWh"
                      },
                      {
                        "id": "fec71b3d-a7db-4d6c-a68a-d9c66ec49c6e",
                        "name": "20~50kWh"
                      },
                      {
                        "id": "d995f663-766b-403c-bfef-ee6aa1ae0379",
                        "name": "50~100kWh"
                      },
                      {
                        "id": "7f90dbcd-f81e-4638-b342-4dad454bf728",
                        "name": ">=100kWh"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "id": "f7192a9a-ecee-4eb3-825c-5007c47c1c86",
        "name": "BMW"
      }
    ]
  }
}

Class Template

Class is similar to Classification, but can contain multiple attributes.

{
  // ID
  "id": 1,
  // Version
  "version": 1,
  // Name
  "name": "Car",
  // Color
  "color": "#7dfaf2",
  // Tool type, BOUNDING_BOX, CUBOID, POLYLINE etc.
  "toolType": "CUBOID",
  // Tool options
  "toolOptions": {},
  // Attributes
  "attributes": [
    // ... more details can reference classification template
    {
      "id": "e0c006ee-9808-4fb4-bda9-c047b2c0534f",
      // Version
      "version": 1,
      "name": "Car condition",
      "type": "RANKING",
      "required": true,
      "options": [
        {
          "id": "0e4a932e-9f44-412b-8178-012464ab397f",
          "name": "Good"
        },
        {
          "id": "8303aee3-e816-49bd-938a-99903b5cd44c",
          "name": "Generally"
        },
        {
          "id": "d872f65e-0d2c-4626-8161-3e3b295ab2d2",
          "name": "Poor"
        }
      ]
    }
  ]
}

Data Annotated Results

Annotated object

{
  // Data ID, ignored when importing
  "dataId": 1,
  // Result source ID, ignored when importing
  "sourceId": 1,
  // Result source Type, DATA_FLOW, TASK, MODEL, EXTERNAL_GROUND_TRUTH, EXTERNAL_MODEL etc.
  "sourceType": "TASK",
  // Result source Name
  "sourceName": "20221009000000",
  // Data validity, VALID, INVALID, or UNKNOWN
  "validity": "VALID",
  // Classification annotation objects
  "classifications": [
    {
      // ID, ignored when importing
      "id": "6633b193-516d-4f91-acac-c6e224c6aada",
      // Classification template ID, the template must exist in dataset when importing
      "classificationId": 1,
      // Classification value version, optional, default to 1
      "classificationVersion": 1,
      // Classification attribute values
      "values": [
        {
          // Attribute ID
          "id": "64a16626-153f-4136-b7b4-572c10db08c3",
          // Attribute value version, optional, default to 1
          "attributeVersion": 1,
          // Parent attribute ID, null for root attribute
          "pid": null,
          // Parent attribute value, only needed when parent selected multiple values
          "pvalue": null,
          "name": "Brand",
          "type": "RADIO",
          "value": "Benz",
          "alias": "Trademark",
          // Is the lowest attribute value
          "isLeaf": false
        },
        {
          "id": "24ce829b-9b60-4b88-99f7-379b144a3cb3",
          "attributeVersion": 1,
          "pid": "64a16626-153f-4136-b7b4-572c10db08c3",
          "pvalue": null,
          "name": "Level",
          "type": "RADIO",
          "value": "Car",
          "alias": null,
          "isLeaf": true
        },
        {
          "id": "0669d8b1-f175-4f46-a8d2-cea7bf9dc1e2",
          "attributeVersion": 1,
          "pid": "64a16626-153f-4136-b7b4-572c10db08c3",
          "pvalue": null,
          "name": "Power",
          "type": "MULTI_SELECTION",
          "value": [
            "Gasoline",
            "Battery"
          ],
          "alias": null,
          "isLeaf": false
        },
        {
          "id": "9c0d296f-7141-4fd9-9cbe-c3d96a93d411",
          "attributeVersion": 1,
          "pid": "0669d8b1-f175-4f46-a8d2-cea7bf9dc1e2",
          "pvalue": "Gasoline",
          "name": "Displacement",
          "type": "RADIO",
          "value": "2.0L",
          "alias": null,
          "isLeaf": true
        },
        {
          "id": "8e790d10-9931-43f6-82bb-60619f1a25ea",
          "attributeVersion": 1,
          "pid": "0669d8b1-f175-4f46-a8d2-cea7bf9dc1e2",
          "pvalue": "Battery",
          "name": "Capacity",
          "type": "RADIO",
          "value": "20~50kWh",
          "alias": null,
          "isLeaf": true
        }
      ]
    }
  ],
  // Geometry annotation objects
  "instances": [
    {
      // ID, ignored when importing
      "id": "6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b",
      // Type, 3D_BOX, 2D_BOX, CHAT_THUMB, CLIP etc.
      "type": "3D_BOX",
      // Version, optional, default to 1
      "version": 1,
      // Creator ID, ignored when importing
      "createdBy": 1,
      // Create time, ignored when importing
      "createdAt": "2012-03-29T10:05:45Z",
      // Tracking object ID
      "trackId": "J0lkBP7r",
      // Tracking object name
      "trackName": "Car 1",
      // Class template ID, the template must exist in dataset when importing
      "classId": 1,
      // Class value version, optional, default to 1
      "classVersion": 1,
      // Class name, ignored when importing
      "className": "Car",
      // Class values
      "classValues": [
        // ... more details can reference classification annotion objects
        {
          "id": "e0c006ee-9808-4fb4-bda9-c047b2c0534f",
          "attributeVersion": 1,
          "pid": null,
          "pvalue": null,
          "name": "Car condition",
          "type": "RANKING",
          // Arrange from high to low according to the possibility
          "value": [
              "Generally",
              "Poor"
          ],
          "alias": null,
          "isLeaf": true
        }
      ],
      // Model recognition confidence, only when recognized by model
      "modelConfidence": 0.83232,
      // Model recognition class, only when recognized by model
      "modelClass": "Person",
      // The closest distance to the original point at the XY plane, only for point cloud annotation object, automatically supplement when importing
      "minDistance": 10,
      // The farthest distance to the original point at the XY plane, only for point cloud annotation object, automatically supplement when importing
      "maxDistance": 30,
      // The maximum height on the Z axis, only for point cloud annotation object, automatically supplement when importing
      "minHeight": 0,
      // The minimum height on the Z axis, only for point cloud annotation object, automatically supplement when importing
      "maxHeight": 5,
      // Device name, used to distinguish different data files in multimodal data
      "deviceName": "lidar_point_cloud_0",
      // DICOM information,only for medical image annotation objects
      "dicom": {
          "patient": "Inv234_Exp_56_Group78",
          "study": "1.3.6.1.4.1.14519.5.2.1.7009.2403.334240657131972136850343327463",
          "series": "1.3.6.1.4.1.14519.5.2.1.7009.2403.226151125820845824875394858561",
          "instance": "1.3.6.1.4.1.14519.5.2.1.7009.2403.199347090945987353639771262550",
          // Frame, fixed to 1 for single frame images
          "frame": 1,
      },
      // Contour information, according to the specific type
      "contour": {
        // Including points, only for point cloud, automatically supplement when importing
        "pointN": 3057,
        // Area, only for the image, automatically supplement when importing
        "area": 100,
        "points": [],
        "size3D": {
          "x": 2.2125,
          "y": 4.993,
          "z": 1.38
        },
        "center3D": {
          "x": 3.9220652257399284,
          "y": -6.013346632547687,
          "z": 0.39
        },
        "rotation3D": {
          "x": 0,
          "y": 0,
          "z": -1.6622375116055483
        },
        "interior": [
            {
                "points": []
            }
        ]
      }
    },
    {
      "id": "62383691-8077-44c2-ad8a-a6a7f54390c5",
      "type": "2D_BOX",
      // ...
      "contour": {
        "points": [
          {
            "x": 976.6271156786534,
            "y": 509.30442784738
          },
          {
            "x": 976.9704479066531,
            "y": 518.6737077997769
          }
        ],
        "viewIndex": 3
      }
    },
    {
      "id": "0d2c92c4-e96d-4672-abc7-a3480f412753",
      "type": "CHAT_THUMB",
      // ...
      // Thumb direction, up or down
      "direction": "up",
      // Message ID
      "messageId": "8EuFV13C"
    },
    {
      "id": "e1b566f7-ae75-4836-a8a8-7cb9721d3ca3",
      "type": "CLIP",
      // ...
      // Valid or not
      "isValid": true,
      // Note
      "note": "Weather in Paris.",
      // Start time, unit milliseconds
      "start": 340,
      // End time, unit milliseconds
      "end": 2365
    }
  ],
  // Segmentation annotation objects
  "segments": [
    {
      "id": "0d2c92c4-e96d-4672-abc7-a3480f412753",
      // Type, SEGMENTATION, MASK etc.
      "type": "MASK",
      // ...
      // Contour information
      "contour": {
        // Including points, only for point cloud, automatically supplement when importing
        "pointN": 3057,
        // Area, only for image, automatically supplement when importing
        "area": 100
      },
      // Number, begin from 1
      "no": 1
    }
  ],
  // Labelmaps, more details can reference "Labelmap" section
  "segmentations": [
    {
      // Labelmap file ID
      "resultFileId": 1,
      // Device name, used to distinguish different data files in multimodal data
      "deviceName": "lidar_point_cloud_0",
      // Segmentation annotation object number, optional, used for each segmentation annotation object has it's own labelmap file
      "segmentNo": 1
    }
  ]
}

Label map

Point cloud segmentation

Each point cloud corresponds to a segmentation result file, the format is PCD file format , which contains only one field seg , whose value is the number of the segmentation object to which the current point belongs, and 0 if there is no attribution.

# PCD v0.7
FIELDS seg
SIZE 1
TYPE U
COUNT 1
WIDTH 169171
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 169171
DATA binary
............

Image segmentation

Each image corresponds to a segmentation result file in RGBA 32-bit mode PNG format. The pixel values (R, G, B) store the number of the segmentation object to which the current point belongs. The number is R + G × 256 + B × 256 ^ 2. If there is no attribution, it is 0.

Dataset Import/Export

For Datasets with a large amount of data, if a single JSON file is sampled, the file will be very large, consuming a lot of resources when opened, and even unable to be opened. Especially for point cloud segmentation scenes, the amount of data is even larger. Therefore, JSON files will be divided by Data and then made into a Compressed Packet.

  1. When importing results, you need to import data at the same time, and linking results to existing data is not supported.
  2. For big data sets, only export data information, not data files, otherwise the Compressed Packet will be very large. If necessary, you can download it based on the address in the data information.
  3. It does not support importing based on data information because it requires downloading a large number of files from the network, which takes a long time and is prone to errors.

Point cloud dataset

lidar_point_cloud_0 must have.

.
├── camera_config // Camera config, more details can reference "Point Cloud Camera Config" section
│   ├── data1.json
│   └── data2.json
├── camera_image_0 // Camer image 0
│   ├── data1.jpg
│   └── data2.jpg
├── camera_image_1 // Camer image 1
│   ├── data1.jpg
│   └── data2.jpg
├── camera_image_2 // Camer image 2
│   ├── data1.jpg
│   └── data2.jpg
├── lidar_config // Lidar config
│   ├── data1.json
│   └── data2.json
├── lidar_point_cloud_0 // Lidar point cloud 0
│   ├── data1.pcd
│   └── data2.pcd
├── lidar_point_cloud_1 // Lidar point cloud 1
│   ├── data1.pcd
│   └── data2.pcd
├── radar_config // Radar config
│   ├── data1.json
│   └── data2.json
├── radar_point_cloud_0 // Radar point cloud 0
│   ├── data1.pcd
│   └── data2.pcd
├── radar_point_cloud_1 // Radar point cloud 1
│   ├── data1.pcd
│   └── data2.pcd
├── gps // GPS position of collection car
│   ├── data1.json
│   └── data2.json
├── data // Data info, only for exporting, more details can reference "Data Info" section
│   ├── data1.json
│   └── data2.json
├── result // Annotation result, more details can reference "Data Annotation Result" section
│   ├── data1.json
│   ├── data1_lidar_point_cloud_0_segmentation.pcd
│   ├── data2.json
│   └── data2_lidar_point_cloud_0_segmentation.pcd
├── scene_1 // Scene, the structure is similiar to the root directory
│   ├── camera_config
│   ├── ...
│   ├── data
│   └── result
└── batch1 // Batch, the structure is similiar to the root directory
    ├── camera_config
    ├── ...
    ├── data
    ├── result
    └── scene_1

Image dataset

image_0 Yes, MultiModal Machine Learning data is not currently supported. If the file in the uploaded zip package is missing image_0 directory hierarchy, the handler will automatically add it.

.
├── image_0 // Image 0
│   ├── data1.jpg
│   └── data2.jpg
├── data // Data info, only for exporting, more details can reference "Data Info" section
│   ├── data1.json
│   └── data2.json
├── result // Annotation result, more details can reference "Data Annotation Result" section
│   ├── data1.json
│   ├── data1_image_0_segmentation.png
│   ├── data2.json
│   └── data2_image_0_segmentation.png
└── scene_1 // Scene, the structure is similiar to the root directory
│   ├── image_0
│   ├── ...
│   ├── data
│   └── result
└── batch1 // Batch, the structure is similiar to the root directory
    ├── image_0
    ├── ...
    ├── data
    ├── result
    └── scene_1

Audio & video datasets

av_0 Yes, MultiModal Machine Learning data is not currently supported. If the file in the uploaded zip package is missing av_0 directory hierarchy, the handler will automatically add it.

.
├── av_0 // Audio & video 0
│   ├── data1.mp4
│   └── data2.mp4
├── data // Data info, only for exporting, more details can reference "Data Info" section
│   ├── data1.json
│   └── data2.json
├── result // Annotation result, more details can reference "Data Annotation Result" section
│   ├── data1.json
│   └── data2.json
└── batch1 // Batch, the structure is similiar to the root directory
    ├── av_0
    ├── data
    └── result

Medical image dataset(Coming Soon)

A Study contains one or more Series, a Series contains one or more Instances, and one Instance is stored in a DICOM file. Each Instance (i.e. Image) contains one or more Frames, divided into single-frame images and multi-frame images. Multi-frame images are relatively rare and supported by few systems, so they are not considered for now.

The naming of the Study, Series, Instance directories or files here is for reference only. As long as the hierarchical structure is correct, the user-specified Data layer number will be searched upward from the bottom DICOM file when processing the Compressed Packet (because there may be more additional directories on the top, so the number of Data layers desired by the user cannot be automatically detected). The data division will ultimately be based on the top-level directory found, so a Data may be a Study, Series, or Instance, or even contain any set of DICOM files. The actual information used for Study, Series, and Instance comes from the metadata extracted from the DICOM file, rather than the directory or file name here, which is more accurate and maintains the flexibility of the directory structure.

.
├── study_0 // Study 0
│   ├── series_0 // Series 0
│   │   ├── instance_0.dcm // Instance 0
│   │   └── instance_1.dcm // Instance 1
│   └── series_1 // Series 1
├── study_1 // Study 1
├── data // Data info, only for exporting, more details can reference "Data Info" section
│   ├── study_0.json
│   └── study_1.json
├── result // Annotation result, more details can reference "Data Annotation Result" section
│   ├── study_0.json
│   └── study_1.json
└── batch1 // Batch, the structure is similiar to the root directory
    ├── study_0
    ├── ...
    ├── data
    └── result

Data information

Due to the large amount of data in a single dataset, it is not possible to directly export data files. Only data information can be exported, which includes the download addresses of various data files. Different types of data contain different data files. For details, please refer to "Dataset annotation result format for multiple JSON files".

{
  // Data ID, ignored when importing
  "dataId": 1,
  // Type, LIDAR_BASIC、LIDAR_FUSION、IMAGE、AV etc.
  "type": "LIDAR_FUSION",
  // Name
  "name": "01",
  // Camera config file
  "cameraConfig": {
    // Filename
    "filename": "01.json",
    // Download url
    "url": "",
    // Path in zip package, only exist when uploading by zip package, ignored when importing
    "zipPath": ""
  },
  // Camera image files
  "cameraImages": [
    {
      "filename": "01.jpg",
      "url": "",
      "zipPath": "",
      "width": 1920,
      "height": 1080
    }
  ],
  // Lidar config file
  "lidarConfig": {
    "filename": "01.json",
    "url": "",
    "zipPath": ""
  },
  // Lidar point cloud files
  "lidarPointClouds": [
    {
      "filename": "01.pcd",
      "url": "",
      "binaryUrl": "",
      "zipPath": ""
    }
  ],
  // Radar config file
  "radarConfig": {
    "filename": "01.json",
    "url": "",
    "zipPath": ""
  },
  // Radar point cloud files
  "radarPointClouds": [
    {
      "filename": "01.pcd",
      "url": "",
      // Binary file converted from original file, only exist when original file is ascii format
      "binaryUrl": "",
      "zipPath": ""
    }
  ],
  // Image files
  "images": [
    {
      "filename": "01.jpg",
      "url": "",
      "zipPath": "",
      "width": 1920,
      "height": 1080
    }
  ],
  // Text files
  "texts": [
    {
      "filename": "01.txt",
      "url": "",
      "zipPath": ""
    }
  ],
  // Audio & video files
  "avs": [
    {
      "filename": "01.wav",
      "url": "",
      "zipPath": ""
    }
  ],
  // DICOM files
  "dicoms": [
    {
      "filename": "instance_0.dcm",
      "url": "",
      "zipPath": ""
    }
  ]
}

Point cloud camera configs

[
  {
    // Internal params
    "camera_internal": {
      "fx": 382.06535583,
      "cx": 326.66902661,
      "fy": 421.05123478,
      "cy": 254.70249315
    },
    // External params
    "camera_external": [
      0.76866726,
      0.04361939,
      0.63815985,
      -1.59,
      -0.63870827,
      -0.00174367,
      0.76944701,
      0.91,
      0.03467555,
      -0.9990467,
      0.02651976,
      0.96,
      0,
      0,
      0,
      1
    ],
    // Whether external params is row major or not, default false
    "rowMajor": true,
    // Distortion K params, up to 8, optional
    "distortionK": [
      -0.30912646651268,
      0.0669714063405991
    ],
    // Distortion P params, up to 2, optional
    "distortionP": [
      0.00262697599828243,
      0.00106896553188562
    ],
    // Distortion InvP params, optional
    "distortionInvP": [
      800.836,
      515.212,
      -36.9548,
      39.5822,
      85.4095,
      -23.9415,
      -40.625,
      32.0152,
      37.9534,
      9.22325
    ],
    // Image width, optional
    "width": 1920,
    // Image height, optional
    "height": 1280
  }
]

Please refer to Camera Calibration Theory for distortion algorithm.