Supervisely
Overview
Easily import your pointcloud episodes with annotations in the Supervisely format. The Supervisely json-based annotation format supports cuboid_3d
shape figures. It is a universal format that supports various types of annotations and is used in the Supervisely platform.
All information about the Supervisely JSON format can be found here
Format description
Supported point cloud format: .pcd
With annotations: yes
Supported annotation format: .json
.
Data structure: Information is provided below.
Input files structure
Example data: download ⬇️.
Both directory and archive are supported.
Recommended directory structure:
Root folder for the project named project name
meta.json
filekey_id_map.json
fileDataset folders, that represents single episode. Each named
dataset_name
, which contains:annotation.json
- file with whole episode annotationframe_pointcloud_map.json
- file with pointcloud to episode frame mappingpointcloud
folder, contains source point cloud files, for exampleframe1.pcd, frame2.pcd
related_images
optional folder, contains photo-context data:Frame folder, each named according to pointcloud (
/related_images/frame1/
), which contains:image files (
.png \ .jpg
)photo context image annotation file (
.json
) - json files, named according to image name (1.png -> 1.png.json
). Read more in the "Photo context image annotation file" section below.
Format of Annotations
Optional fields and loading These fields are optional and are not needed when loading the project. The server can automatically fill in these fields while project is loading.
id
- unique identifier of the current objectclassId
- unique class identifier of the current objectlabelerLogin
- string - the name of user who created the current figurecreatedAt
- string - date and time of figure creationupdatedAt
- string - date and time of the last figure update
Main idea of key
fields and id
you can see below in "Key id map file" section.
Fields definitions:
description
- string - (optional) - this field is used to store the text to assign to the sequence.key
- string, unique key for a given sequence (used in key_id_map.json to get the sequence ID)tags
- list of strings that will be interpreted as episode tagsobjects
- list of objects that may be present on the episodeframes
- list of frames of which the episode consists. List contains only frames with an object from the 'objects' fieldindex
- integer - number of the current framefigures
- list of figures in the current frame.
framesCount
- integer - total number of frames in the episodegeometryType
- "cuboid_3d" - class shape
Fields definitions for objects
field:
key
- string - unique key for a given object (used in key_id_map.json)classTitle
- string - the title of a class. It's used to identify the class shape from themeta.json
filetags
- list of strings that will be interpreted as object tags (can be empty)
Fields description for figures
field:
key
- string - unique key for a given figure (used in key_id_map.json)objectKey
- string - unique key to link figure to object (used in key_id_map.json)geometryType
- "cuboid_3d" -class shapegeometry
- geometry of the object
Description for geometry
field:
position
3D vector X, Y, Z values matches the axes on world coordinates, defined in global frame of reference as:+x - forward in the direction of travel ego vehicle
+y - left
+z - up
dimensions
is 3D vector with:x - width
y - length
z - height
rotation
is 3D Vector with:x - pitch
y - roll
z - yaw (direction)
Rotation values bound inside [-pi ; pi ] When yaw = 0
box direction will be strict +y
Key id map file
You can avoid using key-id-map directly with API and SDK to create your own file structure.
The basic idea behind key-id-map is that it maps the unique identifiers of the object to the frame on which the shape is located. The server works with an identifier, but the file system of the loaded project stores these identifiers and object keys on disk, which is necessary for navigation and use of the high-level API and applications.
When loading a dataset
(sequence), the system returns its identifier, after which it is saved to a file on disk, along with the key of the loaded sequence in key-id-map file.
When uploading objects
to the server, a sequence ID is required (to determine which sequence the object belongs to), and it can be read from the key-id-map file by key. The system then returns the IDs of the successfully loaded objects.
Then, while figures
uploading to the server, an object identifier is required (which loaded object the shape belongs to), which can again be read from the key-id-map file.
While annotating the episode inside Supervisely interface key-id-map file is created automatically, and will be downloaded with the entire project. Json format of key_id_map.json:
objects
- dictionary, where the key is a unique string, generated inside Supervisely environment to set correspondence of current object in annotation, and values are unique integer ID corresponding to the current objectfigures
- dictionary, where the key is a unique string, generated inside Supervisely environment to set correspondence of object on current frame in annotation, and values are unique integer ID corresponding to the current framevideos
- dictionary, where the key is unique string, generated inside Supervisely environment to set correspondence of sequence (dataset) in annotation, and value is a unique integer ID corresponding to the current sequencetags
- dictionary, where the keys are unique strings, generated inside Supervisely environment to set correspondence of tag on current frame in annotation, and values are a unique integer ID corresponding to the current tagKey - generated by python3 function
uuid.uuid4().hex
. The unique string. All key values and id's should be unique inside single project and can not be shared between frames\sequences.Value - returned by server integer identifier while uploading object / figure / sequence / tag
Format of frame_pointcloud_map.json
This file set mapping between pointcloud files and annotation frames in the correct order.
Keys - frame order number Values - point cloud name (with extension)
Photo context image annotation file
Fields description:
name - string - Name of image file
Id - (OPTIONAL) - integer >= 1 ID of the photo in the system. It is not required when upload and is filled in automatically when the project is loaded.
entityId (OPTIONAL) - integer >= 1 ID of the Point Cloud in the system, that photo attached to. Doesn't required while uploading.
deviceId - string- Device ID or name.
timestamp - string - Time when the frame occurred in ISO 8601 format
sensorsData - Sensors data such as Pinhole camera model parameters. See wiki: Pinhole camera model and OpenCV docs for 3D reconstruction.
intrinsicMatrix - Array of number - 3x3 flatten matrix (dropped last zeros column) of intrinsic parameters in row-major order, also called camera matrix. It's used to denote camera calibration parameters. See Intrinsic parameters.
extrinsicMatrix - Array of number - 4x3 flatten matrix (dropped last zeros column) of extrinsic parameters in row-major order, also called joint rotation-translation matrix. It's used to denote the coordinate system transformations from 3D world coordinates to 3D camera coordinates. See Extrinsic_parameters.
Useful links
Last updated