nuScenes annotation format

Driving scenes stored as JSON tables linked by tokens: samples, sensor data, 3D boxes, instances, categories and attributes.

Data
Point clouds
Labels
CuboidsTags
Files
.json, .pcd.bin, .jpg
Import / export
Yes / Yes
The format

What is the nuScenes format?

nuScenes is a large public dataset for autonomous driving developed by Motional: 1,000 driving scenes of 20 seconds from Boston and Singapore, with camera, LiDAR and radar data and 3D boxes for 23 object classes.

The annotations are JSON tables linked by tokens. A scene is a sequence of sample records (annotated keyframes at 2 Hz); a sample_annotation is one 3D box with translation, size (width, length, height) and rotation as a quaternion, and points to its instance, its category and its attribute records. LiDAR scans are .pcd.bin files in samples/LIDAR_TOP and sweeps/LIDAR_TOP.

Files

Folder structure and an example

Folder structure for import
pointcloud_project
└── dataset1
    ├── maps
    ├── samples
    │   ├── CAM_BACK
    │   ├── CAM_FRONT
    │   ├── LIDAR_TOP
    │   ├── RADAR_FRONT
    │   └── ...
    ├── sweeps
    │   ├── CAM_BACK
    │   ├── LIDAR_TOP
    │   └── ...
    └── v1.0-mini
        ├── attribute.json
        ├── calibrated_sensor.json
        ├── category.json
        ├── ego_pose.json
        ├── instance.json
        ├── sample.json
        ├── sample_annotation.json
        ├── sample_data.json
        ├── scene.json
        └── ...
sample_annotation.json, one record (schema)
{
   "token":            <str> -- Unique record identifier.
   "sample_token":     <str> -- Foreign key to the sample.
   "instance_token":   <str> -- Foreign key: which object instance this box annotates.
   "attribute_tokens": <str> [n] -- Foreign keys to the attributes of this box.
   "visibility_token": <str> -- Foreign key to the visibility level.
   "translation":      <float> [3] -- Box centre in metres: center_x, center_y, center_z.
   "size":             <float> [3] -- Box size in metres: width, length, height.
   "rotation":         <float> [4] -- Box orientation as a quaternion: w, x, y, z.
   "num_lidar_pts":    <int> -- LiDAR points in the box.
   "num_radar_pts":    <int> -- Radar points in the box.
   "next":             <str> -- Next annotation of the same instance.
   "prev":             <str> -- Previous annotation of the same instance.
}
In and out

Import and export nuScenes in Supervisely

Import nuScenes into Supervisely

Export from Supervisely to nuScenes

All apps are in the Ecosystem, under Import and Export. Every project is stored in Supervisely JSON in between.

Conversion

Converting nuScenes to and from Supervisely JSON

nuScenesSupervisely JSONNotes
sceneepisode (a dataset of the episodes project)
sample with its LIDAR_TOP scanframe with a point cloud
instanceobject of the episodeIts boxes in every frame are figures of one object.
sample_annotationcuboid_3d figuretranslation → position, size → dimensions, the quaternion yaw → rotation.z.
categoryclass with the cuboid_3d shapeThe category description is kept.
attributetag without a valueSuch as a vehicle being parked or moving.