Waymo Dataset Parse

Last updated on a month ago

Waymo Dataset Parse

for any native environment which can not install waymo-open-dataset(like macOS or Windows)

Easy Way

https://github.com/xixioba/waymo_easy_convert

Detail Way

  1. clone https://github.com/waymo-research/waymo-open-dataset

    1
    git clone https://github.com/waymo-research/waymo-open-dataset
  2. compile *.proto(need install google protoc manually)

    1
    2
    3
    protoc ./waymo_open_dataset/dataset.proto --python_out=.
    protoc ./waymo_open_dataset/label.proto --python_out=.
    protoc waymo_open_dataset/protos/*.proto --python_out=.
  3. [optional] fix from google.protobuf.internal import builder as _builder
    refer to: https://stackoverflow.com/a/72494013

    1
    2
    3
    4
    5
    6
    #install newest protobuf
    pip install --upgrade protobuf
    #Backup builder.py in google.protobuf.internal
    #install compatible protobuf(3.19.4 is good to me)
    pip uninstall protobuf
    pip install protobuf==3.19.4
  4. Now you can start convert, detail see https://github.com/xixioba/waymo_easy_convert#convert-to-kitti-format

TroubleShoot

  • Error in parse_range_image_and_camera_projection

    1
    2
    3
    4
    Traceback (most recent call last):
    ...
    range_images, camera_projections, range_image_top_pose = parse_range_image_and_camera_projection(
    ValueError: too many values to unpack (expected 3)

    parse_range_image_and_camera_projection return 4 value, see in frame_utils.py

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    def parse_range_image_and_camera_projection(
    frame: dataset_pb2.Frame) -> ParsedFrame:
    """Parse range images and camera projections given a frame.

    Args:
    frame: open dataset frame proto

    Returns:
    range_images: A dict of {laser_name,
    [range_image_first_return, range_image_second_return]}.
    camera_projections: A dict of {laser_name,
    [camera_projection_from_first_return,
    camera_projection_from_second_return]}.
    seg_labels: segmentation labels, a dict of {laser_name,
    [seg_label_first_return, seg_label_second_return]}
    range_image_top_pose: range image pixel pose for top lidar.
    """