Upload ZOD data
This tutorial will guide you through uploading different scene types using the Zenseact Open Dataset (ZOD). The purpose of this page is to show you some of the steps that might be needed to convert recordings into Kognic scenes.
This guide follows the process of uploading scenes using ZOD data, using the example code from the Kognic IO ZOD examples repository which contains the complete source files for all of the snippets in this page. The examples are runnable, if you have the data available and have Kognic authentication set up.
This example follows the same structure as the LiDAR-and-camera sequence example.
Aggregated scenes are a special case of LiDAR + camera sequence scenes where the LiDAR data is aggregated across frames into a single pointcloud. This gives a dense, static pointcloud that represents the entire scene across all frames.
Aggregated scenes may be created by providing a pointcloud on every frame and allowing the Kognic platform to handle aggregation, or, they may be pre-aggregated and uploaded by specifying a pointcloud on the first frame, then nothing on subsequent frames.
In the case of ZOD data, we only have per-frame pointclouds, so the example uploads a pointcloud on every frame and leaves aggregation to the platform. As such it is very similar to the LiDAR-and-camera sequence example, except that:
1. The scene type is different: AggregatedLidarsAndCamerasSequence instead of LidarsAndCamerasSequence.
def convert_scene(zod_sequence: ZodSequence, external_id: str, max_nr_frames: int) -> AggregatedLidarsAndCamerasSequence:
frames = convert_frames(zod_sequence, max_nr_frames)
return AggregatedLidarsAndCamerasSequence(external_id=external_id, frames=frames, calibration_id="<to be set later>")2. The Frames are of an aggregated-scene specific type
frames.append(
ALCSFrame(
relative_timestamp=ns_to_ms(frame_ts_ns) - start_ts_ms,
frame_id=str(frame_ts_ns),
images=[convert_zod_camera_frame_to_image(camera_frame)],
point_clouds=[point_cloud],
ego_vehicle_pose=convert_to_ego_vehicle_pose(ego_pose),
unix_timestamp=frame_ts_ns,
)
)3. Ego pose data is required
Otherwise the two approaches are very similar - refer to the Lidars and Cameras Sequence tab.