l5kit.data.zarr_utils module

l5kit.data.zarr_utils.zarr_concat(input_zarrs: List[str], output_zarr: str) None

Concat many zarr into a single one. Takes care of updating indices for frames and agents.

Parameters
  • input_zarrs (List[str]) – a list of paths to input zarrs

  • output_zarr (str) – the path to the output zarr

Returns:

l5kit.data.zarr_utils.zarr_scenes_chop(input_zarr: str, output_zarr: str, num_frames_to_copy: int) None

Copy num_frames_to_keep from each scene in input_zarr and paste them into output_zarr

Parameters
  • input_zarr (str) – path to the input zarr

  • output_zarr (str) – path to the output zarr

  • num_frames_to_copy (int) – how many frames to copy from the start of each scene

Returns:

l5kit.data.zarr_utils.zarr_split(input_zarr: str, output_path: str, split_infos: List[dict]) List[Tuple[int, int]]

Split the input zarr into many zarrs. Names and sizes can be passed using the split_infos arg.

Parameters
  • input_zarr (str) – path of the original zarr

  • output_path (str) – base destination path

  • split_infos (List[dict]) – list of dict. Each element should have name (final path is output_path+name)

  • collect (and split_size_GB with the size of the split. Last element must have split_size_GB set to -1 to) –

  • input_zarrr. (the last part of the) –

Returns

indices of scenes where a split occurred

Return type

List[Tuple[int, int]]