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
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.
Folder structure and an example
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
└── ...{
"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.
}Import and export nuScenes in Supervisely
Import nuScenes into Supervisely
- Import data as point cloud episodes
The built-in converter turns each scene into an episode, keeping objects across frames.
- Import data as point clouds
The same data as separate point clouds, without the link between frames.
Export from Supervisely to nuScenes
- Export Point Clouds to NuScenes
Exports point cloud and point cloud episode projects to nuScenes; the archive reads with the official nuScenes devkit.
All apps are in the Ecosystem, under Import and Export. Every project is stored in Supervisely JSON in between.
Converting nuScenes to and from Supervisely JSON
| nuScenes | Supervisely JSON | Notes |
|---|---|---|
scene | episode (a dataset of the episodes project) | |
sample with its LIDAR_TOP scan | frame with a point cloud | |
instance | object of the episode | Its boxes in every frame are figures of one object. |
sample_annotation | cuboid_3d figure | translation → position, size → dimensions, the quaternion yaw → rotation.z. |
category | class with the cuboid_3d shape | The category description is kept. |
attribute | tag without a value | Such as a vehicle being parked or moving. |