From a7ff34ed291013917a77695ef4a41b2beb996195 Mon Sep 17 00:00:00 2001 From: Waymo Research Date: Wed, 15 Mar 2023 20:54:01 -0700 Subject: [PATCH] Merged commit includes the following changes: 517007585 by Waymo Research: Fix test errors. -- 516987144 by Waymo Research: Fix a typo. -- 516984381 by Waymo Research: Update license headers. -- 516984214 by Waymo Research: Internal change. -- 516975261 by Waymo Research: Fix Docker/PIP build. -- 516973092 by Waymo Research: Update readme -- 516947665 by Waymo Research: Adopt WOD matcher which is consistent with other WOPD tasks. -- 516939776 by Waymo Research: Add python API for open dataset perception object matcher. -- PiperOrigin-RevId: 517007585 --- README.md | 18 +- configure.sh | 2 +- pip_pkg_scripts/build.Dockerfile | 2 +- pip_pkg_scripts/build.sh | 2 +- pip_pkg_scripts/build_pip_pkg.sh | 2 +- pip_pkg_scripts/docker_build_all.sh | 2 +- pip_pkg_scripts/setup.py.in | 3 +- third_party/auditwheel_wrapper.py | 2 +- third_party/camera/camera_model.cc | 32 +-- third_party/camera/ops/camera_model_ops.cc | 16 +- .../camera_segmentation_metrics.py | 6 +- .../camera_segmentation_metrics_test.py | 2 +- third_party/sim_agents_metrics/estimators.py | 2 +- .../sim_agents_metrics/estimators_test.py | 2 +- .../interaction_features.py | 2 +- .../interaction_features_test.py | 2 +- .../sim_agents_metrics/map_metric_features.py | 2 +- .../map_metric_features_test.py | 2 +- .../sim_agents_metrics/metric_features.py | 2 +- .../metric_features_test.py | 2 +- third_party/sim_agents_metrics/metrics.py | 2 +- .../sim_agents_metrics/metrics_test.py | 2 +- .../sim_agents_metrics/trajectory_features.py | 2 +- .../trajectory_features_test.py | 2 +- .../bin/crosstool_wrapper_driver_is_not_gcc | 2 +- .../windows/msvc_wrapper_for_nvcc.py | 2 +- tutorial/jupyter_kernel.py | 2 +- waymo_open_dataset/common/status.cc | 2 +- waymo_open_dataset/common/status.h | 2 +- waymo_open_dataset/data_conversion/BUILD | 1 + .../data_conversion/scenario_conversion.cc | 13 +- .../data_conversion/scenario_conversion.h | 2 +- .../scenario_conversion_test.cc | 2 +- waymo_open_dataset/dataset.proto | 2 +- waymo_open_dataset/label.proto | 2 +- ...compare_objects_file_to_submission_main.cc | 2 +- .../wod_latency_submission/__init__.py | 2 +- .../wod_latency_submission/__init__.py | 2 +- .../wod_latency_submission/model.py | 2 +- .../lib/wod_latency_submission/__init__.py | 2 +- .../wod_latency_submission/__init__.py | 2 +- .../wod_latency_submission/model.py | 2 +- .../wod_latency_submission/__init__.py | 2 +- .../wod_latency_submission/model.py | 2 +- .../latency/run_latency_evaluation.sh | 2 +- .../latency/wod_latency_evaluator.py | 2 +- waymo_open_dataset/math/aabox2d.h | 2 +- waymo_open_dataset/math/aabox2d_test.cc | 2 +- waymo_open_dataset/math/box2d.cc | 4 +- waymo_open_dataset/math/box2d.h | 2 +- waymo_open_dataset/math/box2d_test.cc | 2 +- waymo_open_dataset/math/exactfloat.cc | 32 +-- waymo_open_dataset/math/exactfloat.h | 2 +- waymo_open_dataset/math/exactfloat_test.cc | 2 +- waymo_open_dataset/math/math_util.h | 2 +- waymo_open_dataset/math/polygon2d.cc | 8 +- waymo_open_dataset/math/polygon2d.h | 4 +- waymo_open_dataset/math/polygon2d_test.cc | 2 +- waymo_open_dataset/math/segment2d.cc | 10 +- waymo_open_dataset/math/segment2d.h | 2 +- waymo_open_dataset/math/vec2d.h | 2 +- waymo_open_dataset/math/vec2d_test.cc | 2 +- waymo_open_dataset/math/vec3d.h | 2 +- waymo_open_dataset/math/vec3d_test.cc | 2 +- .../metrics/breakdown_generator.cc | 18 +- .../metrics/breakdown_generator.h | 2 +- .../metrics/breakdown_generator_test.cc | 2 +- waymo_open_dataset/metrics/config_util.cc | 2 +- waymo_open_dataset/metrics/config_util.h | 2 +- .../metrics/detection_metrics.cc | 36 +-- .../metrics/detection_metrics.h | 2 +- .../metrics/detection_metrics_test.cc | 2 +- waymo_open_dataset/metrics/hungarian.cc | 18 +- waymo_open_dataset/metrics/hungarian.h | 2 +- waymo_open_dataset/metrics/hungarian_test.cc | 2 +- waymo_open_dataset/metrics/iou.cc | 46 ++-- waymo_open_dataset/metrics/iou.h | 2 +- waymo_open_dataset/metrics/iou_test.cc | 2 +- waymo_open_dataset/metrics/matcher.cc | 30 +- waymo_open_dataset/metrics/matcher.h | 14 +- waymo_open_dataset/metrics/matcher_test.cc | 14 +- waymo_open_dataset/metrics/metrics_utils.cc | 38 +-- waymo_open_dataset/metrics/metrics_utils.h | 2 +- .../metrics/metrics_utils_test.cc | 2 +- waymo_open_dataset/metrics/mot.cc | 26 +- waymo_open_dataset/metrics/mot.h | 2 +- waymo_open_dataset/metrics/mot_test.cc | 2 +- waymo_open_dataset/metrics/motion_metrics.cc | 8 +- waymo_open_dataset/metrics/motion_metrics.h | 2 +- .../metrics/motion_metrics_test.cc | 40 +-- .../metrics/motion_metrics_utils.cc | 2 +- .../metrics/motion_metrics_utils.h | 2 +- .../metrics/motion_metrics_utils_test.cc | 30 +- waymo_open_dataset/metrics/ops/BUILD | 2 + .../metrics/ops/detection_metrics_ops.cc | 19 +- .../metrics/ops/detection_metrics_ops_test.py | 2 +- waymo_open_dataset/metrics/ops/matcher_ops.cc | 258 ++++++++++++++++++ waymo_open_dataset/metrics/ops/metrics_ops.cc | 28 +- .../metrics/ops/motion_metrics_ops.cc | 5 +- .../metrics/ops/motion_metrics_ops_test.py | 2 +- .../metrics/ops/py_metrics_ops.py | 7 +- .../metrics/ops/tracking_metrics_ops.cc | 3 +- .../metrics/ops/tracking_metrics_ops_test.py | 2 +- waymo_open_dataset/metrics/ops/utils.cc | 106 +++---- waymo_open_dataset/metrics/ops/utils.h | 2 +- waymo_open_dataset/metrics/python/BUILD | 25 +- .../metrics/python/config_util_py.py | 2 +- .../metrics/python/config_util_test.py | 2 +- .../metrics/python/detection_metrics.py | 2 +- .../metrics/python/detection_metrics_test.py | 2 +- .../metrics/python/keypoint_metrics.py | 64 ++--- .../metrics/python/keypoint_metrics_test.py | 76 ++---- waymo_open_dataset/metrics/python/matcher.py | 120 ++++++++ .../metrics/python/matcher_test.py | 233 ++++++++++++++++ .../metrics/python/motion_metrics.py | 2 +- .../metrics/python/motion_metrics_test.py | 2 +- .../metrics/python/tracking_metrics.py | 2 +- .../metrics/python/tracking_metrics_test.py | 2 +- .../metrics/python/wod_detection_evaluator.py | 2 +- .../python/wod_detection_evaluator_test.py | 2 +- .../metrics/segmentation_metrics.cc | 8 +- .../metrics/segmentation_metrics.h | 2 +- .../metrics/segmentation_metrics_test.cc | 2 +- waymo_open_dataset/metrics/test_utils.cc | 2 +- waymo_open_dataset/metrics/test_utils.h | 2 +- .../compute_detection_let_metrics_main.cc | 6 +- .../tools/compute_detection_metrics_main.cc | 2 +- .../compute_segmentation_metrics_main.cc | 10 +- .../tools/compute_tracking_metrics_main.cc | 2 +- .../tools/create_prediction_file_example.py | 2 +- ...te_segmentation_prediction_file_example.py | 2 +- .../metrics/tools/create_submission.cc | 14 +- .../metrics/tracking_metrics.cc | 34 +-- waymo_open_dataset/metrics/tracking_metrics.h | 2 +- .../metrics/tracking_metrics_test.cc | 2 +- waymo_open_dataset/protos/box.proto | 2 +- waymo_open_dataset/protos/breakdown.proto | 2 +- .../protos/camera_segmentation.proto | 2 +- .../protos/camera_segmentation_metrics.proto | 2 +- .../camera_segmentation_submission.proto | 2 +- .../protos/compressed_lidar.proto | 2 +- .../protos/conversion_config.proto | 2 +- waymo_open_dataset/protos/keypoint.proto | 2 +- .../protos/keypoints_metrics.proto | 2 +- .../protos/keypoints_submission.proto | 2 +- waymo_open_dataset/protos/map.proto | 2 +- waymo_open_dataset/protos/metrics.proto | 2 +- .../protos/motion_metrics.proto | 2 +- .../protos/motion_submission.proto | 2 +- .../protos/occupancy_flow_metrics.proto | 2 +- .../protos/occupancy_flow_submission.proto | 2 +- waymo_open_dataset/protos/scenario.proto | 2 +- waymo_open_dataset/protos/segmentation.proto | 2 +- .../protos/segmentation_metrics.proto | 2 +- .../protos/segmentation_submission.proto | 2 +- .../protos/sim_agents_metrics.proto | 2 +- .../protos/sim_agents_submission.proto | 2 +- waymo_open_dataset/protos/submission.proto | 2 +- waymo_open_dataset/protos/vector.proto | 2 +- waymo_open_dataset/utils/box_utils.py | 2 +- waymo_open_dataset/utils/box_utils_test.py | 2 +- .../utils/camera_segmentation_utils.py | 2 +- .../utils/camera_segmentation_utils_test.py | 2 +- .../utils/compression/delta_encoder.py | 2 +- .../utils/compression/delta_encoder_test.py | 2 +- waymo_open_dataset/utils/frame_utils.py | 2 +- waymo_open_dataset/utils/geometry_utils.py | 2 +- .../utils/geometry_utils_test.py | 2 +- waymo_open_dataset/utils/keypoint_data.py | 2 +- .../utils/keypoint_data_test.py | 2 +- waymo_open_dataset/utils/keypoint_draw.py | 2 +- .../utils/keypoint_draw_test.py | 2 +- .../utils/keypoint_test_util.py | 2 +- .../utils/occupancy_flow_data.py | 2 +- .../utils/occupancy_flow_data_test.py | 2 +- .../utils/occupancy_flow_grids.py | 2 +- .../utils/occupancy_flow_grids_test.py | 2 +- .../utils/occupancy_flow_metrics.py | 2 +- .../utils/occupancy_flow_metrics_test.py | 2 +- .../utils/occupancy_flow_renderer.py | 2 +- .../utils/occupancy_flow_renderer_test.py | 2 +- .../utils/occupancy_flow_test_util.py | 2 +- .../utils/occupancy_flow_test_util_test.py | 2 +- .../utils/occupancy_flow_vis.py | 2 +- .../utils/occupancy_flow_vis_test.py | 2 +- waymo_open_dataset/utils/plot_maps.py | 2 +- waymo_open_dataset/utils/plot_maps_test.py | 2 +- waymo_open_dataset/utils/range_image_utils.py | 2 +- .../utils/range_image_utils_test.py | 2 +- .../utils/sim_agents/converters.py | 2 +- .../utils/sim_agents/converters_test.py | 2 +- .../utils/sim_agents/submission_specs.py | 2 +- .../utils/sim_agents/submission_specs_test.py | 2 +- .../utils/sim_agents/test_utils.py | 2 +- .../utils/sim_agents/visualizations.py | 2 +- waymo_open_dataset/utils/test_utils.py | 2 +- waymo_open_dataset/utils/trajectory_utils.py | 2 +- .../utils/trajectory_utils_test.py | 2 +- waymo_open_dataset/utils/transform_utils.py | 2 +- .../utils/transform_utils_test.py | 2 +- waymo_open_dataset/utils/womd_lidar_utils.py | 2 +- .../utils/womd_lidar_utils_test.py | 11 +- waymo_open_dataset/v2/__init__.py | 2 +- waymo_open_dataset/v2/column_types.py | 2 +- waymo_open_dataset/v2/component.py | 2 +- waymo_open_dataset/v2/component_test.py | 2 +- waymo_open_dataset/v2/dataframe_utils.py | 2 +- waymo_open_dataset/v2/dataframe_utils_test.py | 2 +- waymo_open_dataset/v2/perception/base.py | 2 +- waymo_open_dataset/v2/perception/box.py | 2 +- waymo_open_dataset/v2/perception/box_test.py | 2 +- .../v2/perception/camera_image.py | 2 +- .../v2/perception/camera_image_test.py | 2 +- .../v2/perception/compat_v1/box.py | 2 +- .../v2/perception/compat_v1/box_test.py | 2 +- .../v2/perception/compat_v1/camera_image.py | 2 +- .../perception/compat_v1/camera_image_test.py | 2 +- .../v2/perception/compat_v1/context.py | 2 +- .../v2/perception/compat_v1/context_test.py | 2 +- .../v2/perception/compat_v1/interfaces.py | 2 +- .../perception/compat_v1/interfaces_test.py | 2 +- .../v2/perception/compat_v1/keypoints.py | 2 +- .../v2/perception/compat_v1/keypoints_test.py | 2 +- .../v2/perception/compat_v1/lidar.py | 2 +- .../v2/perception/compat_v1/lidar_test.py | 2 +- .../v2/perception/compat_v1/pose.py | 2 +- .../v2/perception/compat_v1/pose_test.py | 2 +- .../v2/perception/compat_v1/segmentation.py | 2 +- .../perception/compat_v1/segmentation_test.py | 2 +- waymo_open_dataset/v2/perception/context.py | 2 +- .../v2/perception/context_test.py | 2 +- waymo_open_dataset/v2/perception/keypoints.py | 2 +- .../v2/perception/keypoints_test.py | 2 +- waymo_open_dataset/v2/perception/lidar.py | 2 +- .../v2/perception/lidar_test.py | 2 +- waymo_open_dataset/v2/perception/pose.py | 2 +- waymo_open_dataset/v2/perception/pose_test.py | 2 +- .../v2/perception/segmentation.py | 2 +- .../v2/perception/segmentation_test.py | 2 +- .../v2/perception/utils/lidar_utils.py | 2 +- .../v2/perception/utils/lidar_utils_test.py | 2 +- waymo_open_dataset/v2/typing_utils.py | 2 +- waymo_open_dataset/v2/typing_utils_test.py | 2 +- 243 files changed, 1261 insertions(+), 633 deletions(-) create mode 100644 waymo_open_dataset/metrics/ops/matcher_ops.cc create mode 100644 waymo_open_dataset/metrics/python/matcher.py create mode 100644 waymo_open_dataset/metrics/python/matcher_test.py diff --git a/README.md b/README.md index 4509fce..91dc470 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,22 @@ This major update includes supporting code to four challenges at waymo.com/open, v2.0.0 of the Perception Dataset - Introduced the dataset in modular format, enabling users to selectively download only the components they need. - Includes all features in v1.4.2 of the Perception Dataset except maps. - - Added a [tutorial](waymo-open-dataset/tutorial/tutorial_v2.ipynb) and supporting code. + - Added a [tutorial](tutorial/tutorial_v2.ipynb) and supporting code. v1.4.2 of the Perception Dataset - For the 2D video panoptic segmentation labels, added a mask to indicate the number of cameras covering each pixel. - Added 3D map data as polylines or polygons. v1.2.0 of the Motion Dataset - - Added Lidar data for the training set (first 1s of each 9s windows), and the corresponding [tutorial](waymo_open_dataset/tutorial/tutorial_womd_lidar.ipynb) and supporting code. + - Added Lidar data for the training set (first 1s of each 9s windows), and the corresponding [tutorial](tutorial/tutorial_womd_lidar.ipynb) and supporting code. - Added driveway entrances to the map data. Adjusted some road edge boundary height estimates. - Increased the max number of map points in tf_examples to 30k and reduced sampling to 1.0m to increase map coverage, so the coverage equalizes that of the dataset in scenario proto format. Added conversion code from scenario proto format to tf_examples format. Added supporting code for the four 2023 Waymo Open Dataset Challenges - - Sim Agents Challenge, with a [tutorial](waymo_open_dataset/tutorial/tutorial_sim_agents.ipynb) - - Pose Estimation Challenge, with a [tutorial](waymo_open_dataset/tutorial/tutorial_keypoints.ipynb) - - 2D Video Panoptic Segmentation Challenge, with a [tutorial](waymo_open_dataset/tutorial/tutorial_2d_pvps.ipynb) - - Motion Prediction Challenge, with a [tutorial](waymo_open_dataset/tutorial/tutorial_motion.ipynb) + - Sim Agents Challenge, with a [tutorial](tutorial/tutorial_sim_agents.ipynb) + - Pose Estimation Challenge, with a [tutorial](tutorial/tutorial_keypoints.ipynb) + - 2D Video Panoptic Segmentation Challenge, with a [tutorial](tutorial/tutorial_2d_pvps.ipynb) + - Motion Prediction Challenge, with a [tutorial](tutorial/tutorial_motion.ipynb) ## December 2022 Update We released v1.4.1 of the Perception dataset. @@ -36,8 +36,8 @@ We released v1.4.0 of the Perception dataset. - Added 2D video panoptic segmentation labels and supporting code. ## May 2022 Update (part 2) - - Released a [tutorial](waymo-open-dataset/tutorial/tutorial_camera_only.ipynb) for the 3D Camera-Only Detection Challenge. - - Added support for computing 3D-LET-APL in Python metrics ops. See `Compute Metrics` in the [tutorial](waymo-open-dataset/tutorial/tutorial_camera_only.ipynb). + - Released a [tutorial](tutorial/tutorial_camera_only.ipynb) for the 3D Camera-Only Detection Challenge. + - Added support for computing 3D-LET-APL in Python metrics ops. See `Compute Metrics` in the [tutorial](tutorial/tutorial_camera_only.ipynb). - Fixed a bug in the metrics implementation for the Occupancy and Flow Challenge. ## May 2022 Update @@ -53,7 +53,7 @@ We released v1.3.1 of the Perception dataset to support the 2022 Challenges and - Added z-axis speed and acceleration in [lidar label metadata](waymo_open_dataset/label.proto#L53-L60). - Fixed some inconsistencies in `projected_lidar_labels` in [dataset.proto](waymo_open_dataset/dataset.proto). - Updated the default configuration for the Occupancy and Flow Challenge, switching from aggregate waypoints to [subsampled waypoints](waymo_open_dataset/protos/occupancy_flow_metrics.proto#L38-L55). - - Updated the [tutorial](waymo-open-dataset/tutorial/tutorial_3d_semseg.ipynb) for 3D Semantic Segmentation Challenge with more detailed instructions. + - Updated the [tutorial](tutorial/tutorial_3d_semseg.ipynb) for 3D Semantic Segmentation Challenge with more detailed instructions. ## March 2022 Update diff --git a/configure.sh b/configure.sh index 48b8f63..976178d 100755 --- a/configure.sh +++ b/configure.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pip_pkg_scripts/build.Dockerfile b/pip_pkg_scripts/build.Dockerfile index 0f63985..86334aa 100644 --- a/pip_pkg_scripts/build.Dockerfile +++ b/pip_pkg_scripts/build.Dockerfile @@ -38,7 +38,7 @@ RUN for python in python3.7 python3.8 python3.9; do \ $python get-pip.py && \ $python -m pip install --upgrade pip setuptools auditwheel && \ $python -m pip install --upgrade grpcio>=1.24.3; \ - $python -m pip install --upgrade matplotlib plotly scikit-image immutabledict scipy absl-py pandas==1.4 pyarrow dask; \ + $python -m pip install --upgrade matplotlib plotly scikit-image immutabledict scipy sklearn absl-py pandas==1.4 numpy pyarrow dask[array]; \ $python -m pip install --upgrade tensorflow==${TF_VERSION} OpenEXR==1.3.2 tensorflow_graphics; \ done diff --git a/pip_pkg_scripts/build.sh b/pip_pkg_scripts/build.sh index 93eaf0c..58fe4aa 100755 --- a/pip_pkg_scripts/build.sh +++ b/pip_pkg_scripts/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pip_pkg_scripts/build_pip_pkg.sh b/pip_pkg_scripts/build_pip_pkg.sh index 918865f..968be14 100755 --- a/pip_pkg_scripts/build_pip_pkg.sh +++ b/pip_pkg_scripts/build_pip_pkg.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pip_pkg_scripts/docker_build_all.sh b/pip_pkg_scripts/docker_build_all.sh index ce1b784..7195d2e 100755 --- a/pip_pkg_scripts/docker_build_all.sh +++ b/pip_pkg_scripts/docker_build_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pip_pkg_scripts/setup.py.in b/pip_pkg_scripts/setup.py.in index 1483316..4f7eee2 100644 --- a/pip_pkg_scripts/setup.py.in +++ b/pip_pkg_scripts/setup.py.in @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ REQUIRED_PACKAGES = [ 'tensorflow==' + '.'.join('TF_VERSION'.split('-')), 'plotly>=5.5.0', 'matplotlib>=3.2.2', + 'sklearn', 'scikit-image>=0.17.2', 'immutabledict>=2.0.0', 'scipy>=1.9.3', diff --git a/third_party/auditwheel_wrapper.py b/third_party/auditwheel_wrapper.py index 9937b83..03ef27c 100644 --- a/third_party/auditwheel_wrapper.py +++ b/third_party/auditwheel_wrapper.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/camera/camera_model.cc b/third_party/camera/camera_model.cc index 7e9b245..a065366 100644 --- a/third_party/camera/camera_model.cc +++ b/third_party/camera/camera_model.cc @@ -108,8 +108,8 @@ double GetPixelTimestamp( // In normalized camera, undistorts point coordinates via iteration. void IterateUndistortion(const CameraCalibration& calibration, double u_nd, double v_nd, double* u_n, double* v_n) { - /* CHECK(u_n); */ - /* CHECK(v_n); */ + CHECK(u_n); + CHECK(v_n); const double f_u = calibration.intrinsic(0); const double f_v = calibration.intrinsic(1); const double k1 = calibration.intrinsic(4); @@ -125,8 +125,8 @@ void IterateUndistortion(const CameraCalibration& calibration, double u_nd, u = u_nd; v = v_nd; - /* CHECK_GT(f_u, 0.0); */ - /* CHECK_GT(f_v, 0.0); */ + CHECK_GT(f_u, 0.0); + CHECK_GT(f_v, 0.0); // Minimum required squared delta before terminating. Note that it is set in // normalized camera coordinates at a fraction of a pixel^2. The threshold @@ -473,9 +473,9 @@ void CameraModel::ImageToWorld(double u_d, double v_d, double depth, double* x, void CameraModel::ImageToWorldGlobalShutter(double u_d, double v_d, double depth, double* x, double* y, double* z) const { - /* CHECK(x); */ - /* CHECK(y); */ - /* CHECK(z); */ + CHECK(x); + CHECK(y); + CHECK(z); double u_n = 0.0, v_n = 0.0; ImageToDirection(u_d, v_d, &u_n, &v_n); const Eigen::Vector3d wp = global_shutter_state_->n_tfm_cam0 * @@ -488,10 +488,10 @@ void CameraModel::ImageToWorldGlobalShutter(double u_d, double v_d, void CameraModel::ImageToVehicleGlobalShutter(double u_d, double v_d, double depth, double* x, double* y, double* z) const { - /* CHECK(x); */ - /* CHECK(y); */ - /* CHECK(z); */ - /* CHECK(global_shutter_state_) << "Please call PrepareProjection() first."; */ + CHECK(x); + CHECK(y); + CHECK(z); + CHECK(global_shutter_state_) << "Please call PrepareProjection() first."; double u_n = 0.0, v_n = 0.0; ImageToDirection(u_d, v_d, &u_n, &v_n); const Eigen::Vector3d wp = global_shutter_state_->vehicle_tfm_cam * @@ -542,8 +542,8 @@ bool CameraModel::WorldToImageWithDepthGlobalShutter(double x, double y, bool check_image_bounds, double* u_d, double* v_d, double* depth) const { - /* CHECK(u_d); */ - /* CHECK(v_d); */ + CHECK(u_d); + CHECK(v_d); const Eigen::Vector3d cp = global_shutter_state_->cam_tfm_n * Eigen::Vector3d(x, y, z); return CameraToImageWithDepth(cp(0), cp(1), cp(2), check_image_bounds, u_d, @@ -624,9 +624,9 @@ bool CameraModel::ComputeDepthResidualAndJacobian( double* jacobian) const { // The jacobian is allowed to be a nullptr. // The depth is allowed to be a nullptr. - /* CHECK(normalized_coord); */ - /* CHECK(residual); */ - /* CHECK(rolling_shutter_state_); */ + CHECK(normalized_coord); + CHECK(residual); + CHECK(rolling_shutter_state_); const RollingShutterState& rolling_shutter_state = *rolling_shutter_state_; const Eigen::Matrix3d cam_dcm_n = rolling_shutter_state.cam0_dcm_n + diff --git a/third_party/camera/ops/camera_model_ops.cc b/third_party/camera/ops/camera_model_ops.cc index fa33084..81bebd2 100644 --- a/third_party/camera/ops/camera_model_ops.cc +++ b/third_party/camera/ops/camera_model_ops.cc @@ -66,7 +66,7 @@ DataType GetTensorflowType() { if (std::is_same, float>::value) { return DT_FLOAT; } - /* CHECK(false) << "Unsupported type."; */ + CHECK(false) << "Unsupported type."; } // Parse input tensors to protos. @@ -76,25 +76,25 @@ void ParseInput(const Input& input, co::CameraCalibration* calibration_ptr, auto& calibration = *calibration_ptr; auto& image = *image_ptr; - /* CHECK_EQ(input.extrinsic->dim_size(0), 4); */ - /* CHECK_EQ(input.extrinsic->dim_size(1), 4); */ + CHECK_EQ(input.extrinsic->dim_size(0), 4); + CHECK_EQ(input.extrinsic->dim_size(1), 4); for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { calibration.mutable_extrinsic()->add_transform( input.extrinsic->matrix()(i, j)); } } - /* CHECK_EQ(input.intrinsic->dim_size(0), kIntrinsicLen); */ + CHECK_EQ(input.intrinsic->dim_size(0), kIntrinsicLen); for (int i = 0; i < kIntrinsicLen; ++i) { calibration.add_intrinsic(input.intrinsic->vec()(i)); } - /* CHECK_EQ(input.metadata->dim_size(0), kMetadataLen); */ + CHECK_EQ(input.metadata->dim_size(0), kMetadataLen); calibration.set_width(input.metadata->vec()(0)); calibration.set_height(input.metadata->vec()(1)); calibration.set_rolling_shutter_direction( static_cast( input.metadata->vec()(2))); - /* CHECK_EQ(input.camera_image_metadata->dim_size(0), kCameraImageMedataLen); */ + CHECK_EQ(input.camera_image_metadata->dim_size(0), kCameraImageMedataLen); int idx = 0; const auto& cim = input.camera_image_metadata->vec(); for (; idx < 16; ++idx) { @@ -138,7 +138,7 @@ class WorldToImageOp : public OpKernel { const int num_points = input.input_coordinate->dim_size(0); const int out_channel = 3 + return_depth_; - /* CHECK_EQ(3, input.input_coordinate->dim_size(1)); */ + CHECK_EQ(3, input.input_coordinate->dim_size(1)); Tensor image_coordinates(GetTensorflowType(), {num_points, out_channel}); for (int i = 0; i < num_points; ++i) { double u_d = 0.0; @@ -191,7 +191,7 @@ class ImageToWorldOp final : public OpKernel { model.PrepareProjection(image); const int num_points = input.input_coordinate->dim_size(0); - /* CHECK_EQ(3, input.input_coordinate->dim_size(1)); */ + CHECK_EQ(3, input.input_coordinate->dim_size(1)); Tensor global_coordinates(GetTensorflowType(), {num_points, 3}); for (int i = 0; i < num_points; ++i) { double x = 0.0; diff --git a/third_party/camera_segmentation/camera_segmentation_metrics.py b/third_party/camera_segmentation/camera_segmentation_metrics.py index c1160ac..bf7f2bc 100644 --- a/third_party/camera_segmentation/camera_segmentation_metrics.py +++ b/third_party/camera_segmentation/camera_segmentation_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import numpy as np -from deeplab2.deeplab.deeplab2.data import dataset -from deeplab2.deeplab.deeplab2.evaluation import segmentation_and_tracking_quality +from deeplab2..data import dataset +from deeplab2..evaluation import segmentation_and_tracking_quality from waymo_open_dataset.protos import camera_segmentation_metrics_pb2 diff --git a/third_party/camera_segmentation/camera_segmentation_metrics_test.py b/third_party/camera_segmentation/camera_segmentation_metrics_test.py index 684d2cb..a8a2b60 100644 --- a/third_party/camera_segmentation/camera_segmentation_metrics_test.py +++ b/third_party/camera_segmentation/camera_segmentation_metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/estimators.py b/third_party/sim_agents_metrics/estimators.py index 154d413..2f4e900 100644 --- a/third_party/sim_agents_metrics/estimators.py +++ b/third_party/sim_agents_metrics/estimators.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/estimators_test.py b/third_party/sim_agents_metrics/estimators_test.py index 00a38d5..fbf1973 100644 --- a/third_party/sim_agents_metrics/estimators_test.py +++ b/third_party/sim_agents_metrics/estimators_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/interaction_features.py b/third_party/sim_agents_metrics/interaction_features.py index 4c08bc1..2692760 100644 --- a/third_party/sim_agents_metrics/interaction_features.py +++ b/third_party/sim_agents_metrics/interaction_features.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/interaction_features_test.py b/third_party/sim_agents_metrics/interaction_features_test.py index ec03836..c2d27fc 100644 --- a/third_party/sim_agents_metrics/interaction_features_test.py +++ b/third_party/sim_agents_metrics/interaction_features_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/map_metric_features.py b/third_party/sim_agents_metrics/map_metric_features.py index 8c4cb71..afadc13 100644 --- a/third_party/sim_agents_metrics/map_metric_features.py +++ b/third_party/sim_agents_metrics/map_metric_features.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/map_metric_features_test.py b/third_party/sim_agents_metrics/map_metric_features_test.py index 2949bd7..f7a2c53 100644 --- a/third_party/sim_agents_metrics/map_metric_features_test.py +++ b/third_party/sim_agents_metrics/map_metric_features_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/metric_features.py b/third_party/sim_agents_metrics/metric_features.py index 28365f2..91c638f 100644 --- a/third_party/sim_agents_metrics/metric_features.py +++ b/third_party/sim_agents_metrics/metric_features.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/metric_features_test.py b/third_party/sim_agents_metrics/metric_features_test.py index 5c77116..8fc10f0 100644 --- a/third_party/sim_agents_metrics/metric_features_test.py +++ b/third_party/sim_agents_metrics/metric_features_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/metrics.py b/third_party/sim_agents_metrics/metrics.py index b021ee0..445cac2 100644 --- a/third_party/sim_agents_metrics/metrics.py +++ b/third_party/sim_agents_metrics/metrics.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/metrics_test.py b/third_party/sim_agents_metrics/metrics_test.py index ff8184c..d804637 100644 --- a/third_party/sim_agents_metrics/metrics_test.py +++ b/third_party/sim_agents_metrics/metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/trajectory_features.py b/third_party/sim_agents_metrics/trajectory_features.py index ae4559d..a74e01b 100644 --- a/third_party/sim_agents_metrics/trajectory_features.py +++ b/third_party/sim_agents_metrics/trajectory_features.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/sim_agents_metrics/trajectory_features_test.py b/third_party/sim_agents_metrics/trajectory_features_test.py index 60e0cd1..345f060 100644 --- a/third_party/sim_agents_metrics/trajectory_features_test.py +++ b/third_party/sim_agents_metrics/trajectory_features_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/clang/bin/crosstool_wrapper_driver_is_not_gcc b/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/clang/bin/crosstool_wrapper_driver_is_not_gcc index 1243dbb..cbc4773 100755 --- a/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/clang/bin/crosstool_wrapper_driver_is_not_gcc +++ b/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/clang/bin/crosstool_wrapper_driver_is_not_gcc @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2015 The TensorFlow Authors. All Rights Reserved. +# Copyright 2015 The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/windows/msvc_wrapper_for_nvcc.py b/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/windows/msvc_wrapper_for_nvcc.py index 9c0b8b6..0139586 100755 --- a/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/windows/msvc_wrapper_for_nvcc.py +++ b/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.0/windows/msvc_wrapper_for_nvcc.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2015 The TensorFlow Authors. All Rights Reserved. +# Copyright 2015 The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tutorial/jupyter_kernel.py b/tutorial/jupyter_kernel.py index 090339c..86e2bd6 100644 --- a/tutorial/jupyter_kernel.py +++ b/tutorial/jupyter_kernel.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/common/status.cc b/waymo_open_dataset/common/status.cc index baab645..d28214b 100644 --- a/waymo_open_dataset/common/status.cc +++ b/waymo_open_dataset/common/status.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/common/status.h b/waymo_open_dataset/common/status.h index 3370bab..1e4903e 100644 --- a/waymo_open_dataset/common/status.h +++ b/waymo_open_dataset/common/status.h @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/data_conversion/BUILD b/waymo_open_dataset/data_conversion/BUILD index 19ed558..7473c43 100644 --- a/waymo_open_dataset/data_conversion/BUILD +++ b/waymo_open_dataset/data_conversion/BUILD @@ -28,6 +28,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_glog//:glog", "@com_google_protobuf//:protobuf_lite", "@local_config_tf//:libtensorflow_framework", "@local_config_tf//:tf_header_lib", diff --git a/waymo_open_dataset/data_conversion/scenario_conversion.cc b/waymo_open_dataset/data_conversion/scenario_conversion.cc index 18236d5..263da52 100644 --- a/waymo_open_dataset/data_conversion/scenario_conversion.cc +++ b/waymo_open_dataset/data_conversion/scenario_conversion.cc @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ limitations under the License. #include +#include #include "google/protobuf/repeated_field.h" #include "absl/container/flat_hash_set.h" #include "absl/status/status.h" @@ -369,10 +370,10 @@ void AddRoadgraphData( const std::vector& direction_vectors, const int valid, const std::string& prefix, absl::flat_hash_map* features) { - /* CHECK(prefix == "roadgraph_samples/" || prefix == "roadgraph_segments/"); */ + CHECK(prefix == "roadgraph_samples/" || prefix == "roadgraph_segments/"); const int num_points = points.size(); - /* CHECK_EQ(direction_vectors.size(), num_points); */ + CHECK_EQ(direction_vectors.size(), num_points); // Add each point and direction vector to the features. for (int i = 0; i < num_points; ++i) { @@ -601,7 +602,7 @@ absl::flat_hash_set GetModeledAgents( // be included in the modeled agents. for (const auto& required_tracks : scenario.tracks_to_predict()) { const int track_to_predict = required_tracks.track_index(); - /* CHECK_LT(track_to_predict, scenario.tracks_size()); */ + CHECK_LT(track_to_predict, scenario.tracks_size()); const Track* track = &(scenario.tracks()[track_to_predict]); if (track->states()[current_timestamp_steps].valid() && @@ -621,7 +622,7 @@ void AddStateFeatures( int difficulty_level, absl::flat_hash_map* features, std::map* counters) { - /* CHECK(prefix == "sdc/" || prefix == "state/"); */ + CHECK(prefix == "sdc/" || prefix == "state/"); const bool padded_feature = (track == nullptr); const bool is_sdc_state = prefix == "sdc/"; @@ -766,7 +767,7 @@ void AddSinglePointFeature( const int64_t id, const int64_t type, const MapPoint& map_point, const MapPoint& next_map_point, const int valid, const std::string& prefix, absl::flat_hash_map* features) { - /* CHECK(prefix == "roadgraph_samples/" || prefix == "roadgraph_segments/"); */ + CHECK(prefix == "roadgraph_samples/" || prefix == "roadgraph_segments/"); AddInt64Feature(absl::StrCat(prefix, "id"), id, features); AddInt64Feature(absl::StrCat(prefix, "type"), type, features); diff --git a/waymo_open_dataset/data_conversion/scenario_conversion.h b/waymo_open_dataset/data_conversion/scenario_conversion.h index 4e7416f..5b6f754 100644 --- a/waymo_open_dataset/data_conversion/scenario_conversion.h +++ b/waymo_open_dataset/data_conversion/scenario_conversion.h @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/data_conversion/scenario_conversion_test.cc b/waymo_open_dataset/data_conversion/scenario_conversion_test.cc index 00eeaa3..c5c6c95 100644 --- a/waymo_open_dataset/data_conversion/scenario_conversion_test.cc +++ b/waymo_open_dataset/data_conversion/scenario_conversion_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/dataset.proto b/waymo_open_dataset/dataset.proto index 04fa914..d6d4a32 100644 --- a/waymo_open_dataset/dataset.proto +++ b/waymo_open_dataset/dataset.proto @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/label.proto b/waymo_open_dataset/label.proto index e99c25a..908f7a1 100644 --- a/waymo_open_dataset/label.proto +++ b/waymo_open_dataset/label.proto @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/compare_objects_file_to_submission_main.cc b/waymo_open_dataset/latency/compare_objects_file_to_submission_main.cc index 529c373..4d95374 100644 --- a/waymo_open_dataset/latency/compare_objects_file_to_submission_main.cc +++ b/waymo_open_dataset/latency/compare_objects_file_to_submission_main.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/2d_challenge/pytorch/wod_latency_submission/__init__.py b/waymo_open_dataset/latency/examples/2d_challenge/pytorch/wod_latency_submission/__init__.py index b86aec7..34480c3 100644 --- a/waymo_open_dataset/latency/examples/2d_challenge/pytorch/wod_latency_submission/__init__.py +++ b/waymo_open_dataset/latency/examples/2d_challenge/pytorch/wod_latency_submission/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/__init__.py b/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/__init__.py index c5a6cf7..8b454b3 100644 --- a/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/__init__.py +++ b/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/model.py b/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/model.py index 456de5d..7440de0 100644 --- a/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/model.py +++ b/waymo_open_dataset/latency/examples/2d_challenge/tensorflow/wod_latency_submission/model.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/pytorch/from_saved_model/submission/lib/wod_latency_submission/__init__.py b/waymo_open_dataset/latency/examples/pytorch/from_saved_model/submission/lib/wod_latency_submission/__init__.py index 509545c..e7b2fc1 100644 --- a/waymo_open_dataset/latency/examples/pytorch/from_saved_model/submission/lib/wod_latency_submission/__init__.py +++ b/waymo_open_dataset/latency/examples/pytorch/from_saved_model/submission/lib/wod_latency_submission/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/__init__.py b/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/__init__.py index c5a6cf7..8b454b3 100644 --- a/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/__init__.py +++ b/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/model.py b/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/model.py index 3fdfc9e..7c9b6ed 100644 --- a/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/model.py +++ b/waymo_open_dataset/latency/examples/tensorflow/from_saved_model/wod_latency_submission/model.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py b/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py index c5a6cf7..8b454b3 100644 --- a/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py +++ b/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/model.py b/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/model.py index 20d9c77..0eb1a5b 100644 --- a/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/model.py +++ b/waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/model.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/run_latency_evaluation.sh b/waymo_open_dataset/latency/run_latency_evaluation.sh index 16ddc15..c2a3bc3 100644 --- a/waymo_open_dataset/latency/run_latency_evaluation.sh +++ b/waymo_open_dataset/latency/run_latency_evaluation.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/latency/wod_latency_evaluator.py b/waymo_open_dataset/latency/wod_latency_evaluator.py index bdc728d..f376fde 100644 --- a/waymo_open_dataset/latency/wod_latency_evaluator.py +++ b/waymo_open_dataset/latency/wod_latency_evaluator.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/aabox2d.h b/waymo_open_dataset/math/aabox2d.h index 2f81aab..7c25ce5 100644 --- a/waymo_open_dataset/math/aabox2d.h +++ b/waymo_open_dataset/math/aabox2d.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/aabox2d_test.cc b/waymo_open_dataset/math/aabox2d_test.cc index 9ba79ea..8821cc6 100644 --- a/waymo_open_dataset/math/aabox2d_test.cc +++ b/waymo_open_dataset/math/aabox2d_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/box2d.cc b/waymo_open_dataset/math/box2d.cc index baa3801..b4214cc 100644 --- a/waymo_open_dataset/math/box2d.cc +++ b/waymo_open_dataset/math/box2d.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ void Box2d::Set(const Vec2d bottom_left, const Vec2d top_right) { Vec2d center((bottom_left + top_right) / 2.0); axis_ = Segment2d(center, heading, std::max(length_x, length_y)); width_ = std::min(length_x, length_y); - /* CHECK_LE(0.0, width_); */ + CHECK_LE(0.0, width_); } void Box2d::GetCorners(double *xx, double *yy) const { diff --git a/waymo_open_dataset/math/box2d.h b/waymo_open_dataset/math/box2d.h index 9cc2435..d117bad 100644 --- a/waymo_open_dataset/math/box2d.h +++ b/waymo_open_dataset/math/box2d.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/box2d_test.cc b/waymo_open_dataset/math/box2d_test.cc index 359f917..e3cfbe5 100644 --- a/waymo_open_dataset/math/box2d_test.cc +++ b/waymo_open_dataset/math/box2d_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/exactfloat.cc b/waymo_open_dataset/math/exactfloat.cc index 25c6f93..2d2d684 100644 --- a/waymo_open_dataset/math/exactfloat.cc +++ b/waymo_open_dataset/math/exactfloat.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -64,7 +64,7 @@ static_assert(ExactFloat::kMaxExp <= INT_MAX / 2 && // These are just thin wrappers for BoringSSL. inline static void BN_ext_set_uint64(BIGNUM* bn, uint64 v) { - /* CHECK(BN_set_u64(bn, v)); */ + CHECK(BN_set_u64(bn, v)); } // Return the absolute value of a BIGNUM as a 64-bit unsigned integer. @@ -108,7 +108,7 @@ ExactFloat::ExactFloat(int v) { sign_ = (v >= 0) ? 1 : -1; // Note that this works even for INT_MIN because the parameter type for // BN_set_word() is unsigned. - /* CHECK(BN_set_word(bn_.get(), std::abs(v))); */ + CHECK(BN_set_word(bn_.get(), std::abs(v))); bn_exp_ = 0; Canonicalize(); } @@ -250,9 +250,9 @@ ExactFloat ExactFloat::RoundToPowerOf2(int bit_exp, RoundingMode mode) const { } } r.bn_exp_ = bn_exp_ + shift; - /* CHECK(BN_rshift(r.bn_.get(), bn_.get(), shift)); */ + CHECK(BN_rshift(r.bn_.get(), bn_.get(), shift)); if (increment) { - /* CHECK(BN_add_word(r.bn_.get(), 1)); */ + CHECK(BN_add_word(r.bn_.get(), 1)); } r.sign_ = sign_; r.Canonicalize(); @@ -362,17 +362,17 @@ int ExactFloat::GetDecimalDigits(int max_digits, std::string* digits) const { int bn_exp10; if (bn_exp_ >= 0) { // The easy case: bn = bn_ * (2 ** bn_exp_)), bn_exp10 = 0. - /* CHECK(BN_lshift(bn, bn_.get(), bn_exp_)); */ + CHECK(BN_lshift(bn, bn_.get(), bn_exp_)); bn_exp10 = 0; } else { // Set bn = bn_ * (5 ** -bn_exp_) and bn_exp10 = bn_exp_. This is // equivalent to the original value of (bn_ * (2 ** bn_exp_)). BIGNUM* power = BN_new(); - /* CHECK(BN_set_word(power, -bn_exp_)); */ - /* CHECK(BN_set_word(bn, 5)); */ + CHECK(BN_set_word(power, -bn_exp_)); + CHECK(BN_set_word(bn, 5)); BN_CTX* ctx = BN_CTX_new(); - /* CHECK(BN_exp(bn, bn, power, ctx)); */ - /* CHECK(BN_mul(bn, bn, bn_.get(), ctx)); */ + CHECK(BN_exp(bn, bn, power, ctx)); + CHECK(BN_mul(bn, bn, bn_.get(), ctx)); BN_CTX_free(ctx); BN_free(power); bn_exp10 = bn_exp_; @@ -474,18 +474,18 @@ ExactFloat ExactFloat::SignedSum(int a_sign, const ExactFloat* a, int b_sign, // Shift "a" if necessary so that both values have the same bn_exp_. ExactFloat r; if (a->bn_exp_ > b->bn_exp_) { - /* CHECK(BN_lshift(r.bn_.get(), a->bn_.get(), a->bn_exp_ - b->bn_exp_)); */ + CHECK(BN_lshift(r.bn_.get(), a->bn_.get(), a->bn_exp_ - b->bn_exp_)); a = &r; // The only field of "a" used below is bn_. } r.bn_exp_ = b->bn_exp_; if (a_sign == b_sign) { - /* CHECK(BN_add(r.bn_.get(), a->bn_.get(), b->bn_.get())); */ + CHECK(BN_add(r.bn_.get(), a->bn_.get(), b->bn_.get())); r.sign_ = a_sign; } else { // Note that the BIGNUM documentation is out of date -- all methods now // allow the result to be the same as any input argument, so it is okay if // (a == &r) due to the shift above. - /* CHECK(BN_sub(r.bn_.get(), a->bn_.get(), b->bn_.get())); */ + CHECK(BN_sub(r.bn_.get(), a->bn_.get(), b->bn_.get())); if (BN_is_zero(r.bn_.get())) { r.sign_ = +1; } else if (BN_is_negative(r.bn_.get())) { @@ -516,7 +516,7 @@ void ExactFloat::Canonicalize() { DCHECK(!BN_is_zero(bn_.get())); int shift = BN_ext_count_low_zero_bits(bn_.get()); if (shift > 0) { - /* CHECK(BN_rshift(bn_.get(), bn_.get(), shift)); */ + CHECK(BN_rshift(bn_.get(), bn_.get(), shift)); bn_exp_ += shift; } } @@ -549,7 +549,7 @@ ExactFloat operator*(const ExactFloat& a, const ExactFloat& b) { r.sign_ = result_sign; r.bn_exp_ = a.bn_exp_ + b.bn_exp_; BN_CTX* ctx = BN_CTX_new(); - /* CHECK(BN_mul(r.bn_.get(), a.bn_.get(), b.bn_.get(), ctx)); */ + CHECK(BN_mul(r.bn_.get(), a.bn_.get(), b.bn_.get(), ctx)); BN_CTX_free(ctx); r.Canonicalize(); return r; @@ -574,7 +574,7 @@ bool operator==(const ExactFloat& a, const ExactFloat& b) { int ExactFloat::ScaleAndCompare(const ExactFloat& b) const { DCHECK(is_normal() && b.is_normal() && bn_exp_ >= b.bn_exp_); ExactFloat tmp = *this; - /* CHECK(BN_lshift(tmp.bn_.get(), tmp.bn_.get(), bn_exp_ - b.bn_exp_)); */ + CHECK(BN_lshift(tmp.bn_.get(), tmp.bn_.get(), bn_exp_ - b.bn_exp_)); return BN_ucmp(tmp.bn_.get(), b.bn_.get()); } diff --git a/waymo_open_dataset/math/exactfloat.h b/waymo_open_dataset/math/exactfloat.h index 97395e6..a079ae5 100644 --- a/waymo_open_dataset/math/exactfloat.h +++ b/waymo_open_dataset/math/exactfloat.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/exactfloat_test.cc b/waymo_open_dataset/math/exactfloat_test.cc index 0062720..3a883b2 100644 --- a/waymo_open_dataset/math/exactfloat_test.cc +++ b/waymo_open_dataset/math/exactfloat_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/math_util.h b/waymo_open_dataset/math/math_util.h index 546f537..eca8525 100644 --- a/waymo_open_dataset/math/math_util.h +++ b/waymo_open_dataset/math/math_util.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/polygon2d.cc b/waymo_open_dataset/math/polygon2d.cc index 25dfca5..bdf5549 100644 --- a/waymo_open_dataset/math/polygon2d.cc +++ b/waymo_open_dataset/math/polygon2d.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -132,7 +132,7 @@ void RemoveConsecutiveDuplicatePoints(std::vector* points) { } // namespace Polygon2d::Polygon2d(std::vector points) : points_(std::move(points)) { - /* CHECK_GT(points_.size(), 2); */ + CHECK_GT(points_.size(), 2); bool counter_clockwise = true; DCHECK(IsConvexHull(points_, &counter_clockwise)) << "Is counter clockwise? " << counter_clockwise @@ -145,7 +145,7 @@ Polygon2d::Polygon2d(std::vector points) : points_(std::move(points)) { void Polygon2d::BuildFromPoints() { // Note: This function assumes that the input points_ vector is non empty. - /* CHECK_GT(points_.size(), 0); */ + CHECK_GT(points_.size(), 0); // In case of the polygon has zero area, create some fake points to make sure // num_points >= 3, but most member functions are not guaranteed to be working // as expected. @@ -440,7 +440,7 @@ bool Polygon2d::MaybeHasIntersectionWith(const Polygon2d& other) const { void Polygon2d::AxisAlignedBoundingBox(Vec2d* bottom_left, Vec2d* top_right) const { - /* CHECK_GT(num_points_, 2); */ + CHECK_GT(num_points_, 2); Vec2d min_point = points_[0]; Vec2d max_point = points_[0]; for (int i = 1, n = points_.size(); i < n; ++i) { diff --git a/waymo_open_dataset/math/polygon2d.h b/waymo_open_dataset/math/polygon2d.h index 3e15087..1c95ade 100644 --- a/waymo_open_dataset/math/polygon2d.h +++ b/waymo_open_dataset/math/polygon2d.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ class Polygon2d { // Create a polygon from the given box. explicit Polygon2d(const Box2d &box) { box.GetCornersInVectorCounterClockwise(&points_); - /* CHECK_EQ(points_.size(), 4); */ + CHECK_EQ(points_.size(), 4); BuildFromPoints(); } diff --git a/waymo_open_dataset/math/polygon2d_test.cc b/waymo_open_dataset/math/polygon2d_test.cc index 7a37407..6226a11 100644 --- a/waymo_open_dataset/math/polygon2d_test.cc +++ b/waymo_open_dataset/math/polygon2d_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/segment2d.cc b/waymo_open_dataset/math/segment2d.cc index 7103fbd..9e3b9de 100644 --- a/waymo_open_dataset/math/segment2d.cc +++ b/waymo_open_dataset/math/segment2d.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -162,11 +162,11 @@ bool Segment2d::IntersectOrCoincide(const Segment2d &other) const { } bool Segment2d::Sample(double dist, Vec2d *point) const { - /* CHECK(point); */ - /* CHECK_LE(0, dist); */ + CHECK(point); + CHECK_LE(0, dist); const Vec2d dp = end_ - start_; const double len = length(); - /* CHECK_LE(0, len); */ + CHECK_LE(0, len); if (len == 0) { *point = start_; return false; @@ -178,7 +178,7 @@ bool Segment2d::Sample(double dist, Vec2d *point) const { std::vector Segment2d::SamplePoints(const Vec2d &start, const Vec2d &end, double dist) { - /* CHECK_LT(0, dist); */ + CHECK_LT(0, dist); const Vec2d dp = end - start; const double len = dp.Length(); if (len == 0) { diff --git a/waymo_open_dataset/math/segment2d.h b/waymo_open_dataset/math/segment2d.h index 78f0aa7..e04a7a8 100644 --- a/waymo_open_dataset/math/segment2d.h +++ b/waymo_open_dataset/math/segment2d.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/vec2d.h b/waymo_open_dataset/math/vec2d.h index 9a02e69..a4a438a 100644 --- a/waymo_open_dataset/math/vec2d.h +++ b/waymo_open_dataset/math/vec2d.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/vec2d_test.cc b/waymo_open_dataset/math/vec2d_test.cc index 2955725..cb59488 100644 --- a/waymo_open_dataset/math/vec2d_test.cc +++ b/waymo_open_dataset/math/vec2d_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/vec3d.h b/waymo_open_dataset/math/vec3d.h index 7840b7d..2cd2a44 100644 --- a/waymo_open_dataset/math/vec3d.h +++ b/waymo_open_dataset/math/vec3d.h @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/math/vec3d_test.cc b/waymo_open_dataset/math/vec3d_test.cc index 9ffb265..d34a379 100644 --- a/waymo_open_dataset/math/vec3d_test.cc +++ b/waymo_open_dataset/math/vec3d_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/breakdown_generator.cc b/waymo_open_dataset/metrics/breakdown_generator.cc index e6c4177..ea1e39e 100644 --- a/waymo_open_dataset/metrics/breakdown_generator.cc +++ b/waymo_open_dataset/metrics/breakdown_generator.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -138,8 +138,8 @@ class BreakdownGeneratorRange : public BreakdownGenerator { std::string ShardName(int shard) const override { const Label::Type object_type = static_cast(shard / 3 + 1); - /* CHECK_LE(object_type, Label::Type_MAX) << shard; */ - /* CHECK_GE(object_type, 1) << shard; */ + CHECK_LE(object_type, Label::Type_MAX) << shard; + CHECK_GE(object_type, 1) << shard; const std::string prefix = absl::StrCat(Breakdown::GeneratorId_Name(Id()), "_", Label::Type_Name(object_type)); @@ -190,8 +190,8 @@ class BreakdownGeneratorSize : public BreakdownGenerator { std::string ShardName(int shard) const override { const Label::Type object_type = static_cast(shard / 2 + 1); - /* CHECK_LE(object_type, Label::Type_MAX) << shard; */ - /* CHECK_GE(object_type, 1) << shard; */ + CHECK_LE(object_type, Label::Type_MAX) << shard; + CHECK_GE(object_type, 1) << shard; const std::string prefix = absl::StrCat(Breakdown::GeneratorId_Name(Id()), "_", Label::Type_Name(object_type)); @@ -268,8 +268,8 @@ class BreakdownGeneratorVelocity : public BreakdownGenerator { std::string ShardName(int shard) const override { const Label::Type object_type = static_cast(shard / 5 + 1); - /* CHECK_LE(object_type, Label::Type_MAX) << shard; */ - /* CHECK_GE(object_type, 1) << shard; */ + CHECK_LE(object_type, Label::Type_MAX) << shard; + CHECK_GE(object_type, 1) << shard; const std::string prefix = absl::StrCat(Breakdown::GeneratorId_Name(Id()), "_", Label::Type_Name(object_type)); @@ -362,8 +362,8 @@ class BreakdownGeneratorCamera : public BreakdownGenerator { std::string ShardName(int shard) const override { const Label::Type object_type = static_cast(shard / kNumCameras + 1); - /* CHECK_LE(object_type, Label::Type_MAX) << shard; */ - /* CHECK_GE(object_type, 1) << shard; */ + CHECK_LE(object_type, Label::Type_MAX) << shard; + CHECK_GE(object_type, 1) << shard; const std::string prefix = absl::StrCat(Breakdown::GeneratorId_Name(Id()), "_", Label::Type_Name(object_type)); diff --git a/waymo_open_dataset/metrics/breakdown_generator.h b/waymo_open_dataset/metrics/breakdown_generator.h index e8cb538..066c195 100644 --- a/waymo_open_dataset/metrics/breakdown_generator.h +++ b/waymo_open_dataset/metrics/breakdown_generator.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/breakdown_generator_test.cc b/waymo_open_dataset/metrics/breakdown_generator_test.cc index d10d484..7c0c38d 100644 --- a/waymo_open_dataset/metrics/breakdown_generator_test.cc +++ b/waymo_open_dataset/metrics/breakdown_generator_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/config_util.cc b/waymo_open_dataset/metrics/config_util.cc index 914bdac..fbf802a 100644 --- a/waymo_open_dataset/metrics/config_util.cc +++ b/waymo_open_dataset/metrics/config_util.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/config_util.h b/waymo_open_dataset/metrics/config_util.h index 6c831b8..5c5b997 100644 --- a/waymo_open_dataset/metrics/config_util.h +++ b/waymo_open_dataset/metrics/config_util.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/detection_metrics.cc b/waymo_open_dataset/metrics/detection_metrics.cc index 544e77a..f3f61e5 100644 --- a/waymo_open_dataset/metrics/detection_metrics.cc +++ b/waymo_open_dataset/metrics/detection_metrics.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -151,9 +151,9 @@ std::vector ComputeDetectionMeasurementsPerBreakdownShard( const Config& config, const internal::BreakdownShardSubset& pd_subset, const internal::BreakdownShardSubset& gt_subset, Matcher* matcher) { - /* CHECK(matcher != nullptr); */ + CHECK(matcher != nullptr); std::vector measurements; - /* CHECK(!gt_subset.indices.empty()); */ + CHECK(!gt_subset.indices.empty()); matcher->SetGroundTruthSubset(gt_subset.indices[0]); const std::vector difficulty_levels = internal::GetDifficultyLevels(config, @@ -196,7 +196,7 @@ DetectionMeasurement MergeDetectionMeasurement(const DetectionMeasurement& m1, const DetectionMeasurement& m2) { if (!m1.has_score_cutoff()) return m2; if (!m2.has_score_cutoff()) return m1; - /* CHECK_EQ(m1.score_cutoff(), m2.score_cutoff()); */ + CHECK_EQ(m1.score_cutoff(), m2.score_cutoff()); DetectionMeasurement m; #define ADD_FIELD(FIELD_NAME) \ @@ -222,16 +222,16 @@ DetectionMeasurement MergeDetectionMeasurement(const DetectionMeasurement& m1, // Merges new_m to m. void MergeDetectionMeasurements(const DetectionMeasurements& new_m, DetectionMeasurements* m) { - /* CHECK(m != nullptr); */ + CHECK(m != nullptr); if (m->measurements_size() == 0) { *m = new_m; return; } - /* CHECK_EQ(m->measurements_size(), new_m.measurements_size()); */ - /* CHECK_EQ(m->breakdown().generator_id(), new_m.breakdown().generator_id()); */ - /* CHECK_EQ(m->breakdown().shard(), new_m.breakdown().shard()); */ - /* CHECK_EQ(m->breakdown().difficulty_level(), - new_m.breakdown().difficulty_level()); */ + CHECK_EQ(m->measurements_size(), new_m.measurements_size()); + CHECK_EQ(m->breakdown().generator_id(), new_m.breakdown().generator_id()); + CHECK_EQ(m->breakdown().shard(), new_m.breakdown().shard()); + CHECK_EQ(m->breakdown().difficulty_level(), + new_m.breakdown().difficulty_level()); for (int i = 0, sz = m->measurements_size(); i < sz; ++i) { *m->mutable_measurements(i) = MergeDetectionMeasurement(m->measurements(i), new_m.measurements(i)); @@ -242,13 +242,13 @@ void MergeDetectionMeasurements(const DetectionMeasurements& new_m, void MergeDetectionMeasurementsVector( const std::vector& new_m, std::vector* m) { - /* CHECK(m != nullptr); */ + CHECK(m != nullptr); if (m->empty()) { *m = new_m; return; } - /* CHECK_EQ(new_m.size(), m->size()); */ + CHECK_EQ(new_m.size(), m->size()); for (int i = 0, sz = m->size(); i < sz; ++i) { MergeDetectionMeasurements(new_m[i], &(*m)[i]); } @@ -355,8 +355,8 @@ DetectionMetrics ToDetectionMetrics(const Config& config, std::vector ComputeDetectionMeasurements( const Config& config, const std::vector& pds, const std::vector& gts, ComputeIoUFunc custom_iou_func) { - /* CHECK_GT(config.score_cutoffs_size(), 0) - << "config.scores() must be populated: " << config.DebugString(); */ + CHECK_GT(config.score_cutoffs_size(), 0) + << "config.scores() must be populated: " << config.DebugString(); std::unique_ptr matcher = Matcher::Create(config); matcher->SetGroundTruths(gts); if (custom_iou_func != nullptr) { @@ -377,7 +377,7 @@ std::vector ComputeDetectionMeasurements( const std::vector gt_subsets = internal::BuildSubsets(config, matcher->ground_truths(), /*is_gt=*/true, /*is_detection=*/true); - /* CHECK_EQ(pd_subsets.size(), gt_subsets.size()); */ + CHECK_EQ(pd_subsets.size(), gt_subsets.size()); for (int i = 0, sz = pd_subsets.size(); i < sz; ++i) { const internal::BreakdownShardSubset& pd_subset = pd_subsets[i]; @@ -400,7 +400,7 @@ std::vector ComputeDetectionMetrics( const std::vector>& gts, ComputeIoUFunc custom_iou_func) { std::vector measurements; - /* CHECK_EQ(pds.size(), gts.size()); */ + CHECK_EQ(pds.size(), gts.size()); const int num_frames = pds.size(); const Config config_copy = config.score_cutoffs_size() > 0 ? config @@ -446,8 +446,8 @@ std::vector ComputeDetectionMetrics( Config EstimateScoreCutoffs(const Config& config, const std::vector>& pds, const std::vector>& gts) { - /* CHECK_EQ(pds.size(), gts.size()); */ - /* CHECK_EQ(config.score_cutoffs_size(), 0); */ + CHECK_EQ(pds.size(), gts.size()); + CHECK_EQ(config.score_cutoffs_size(), 0); std::vector pd_scores; const int num_frames = pds.size(); Config config_copy(config); diff --git a/waymo_open_dataset/metrics/detection_metrics.h b/waymo_open_dataset/metrics/detection_metrics.h index e334751..ce0c456 100644 --- a/waymo_open_dataset/metrics/detection_metrics.h +++ b/waymo_open_dataset/metrics/detection_metrics.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/detection_metrics_test.cc b/waymo_open_dataset/metrics/detection_metrics_test.cc index 1245c33..87d2639 100644 --- a/waymo_open_dataset/metrics/detection_metrics_test.cc +++ b/waymo_open_dataset/metrics/detection_metrics_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/hungarian.cc b/waymo_open_dataset/metrics/hungarian.cc index 9dfc06e..91ac23f 100644 --- a/waymo_open_dataset/metrics/hungarian.cc +++ b/waymo_open_dataset/metrics/hungarian.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -171,11 +171,11 @@ void ImproveFeasibleLabeling(int n, const weight_t* edge, // parentT[k] is an index into S of the parent of T[k]. void AugmentMatching(const std::vector& S, const OrderedSet& T, const std::vector& parentT, Matching* m) { - /* CHECK(S.size() == T.size()); */ + CHECK(S.size() == T.size()); // The leaf of the alternating tree. It should be unmatched. int j = T[T.size() - 1]; - /* CHECK_EQ(m->GetI(j), -1); */ + CHECK_EQ(m->GetI(j), -1); // Find an alternating path from the leaf to the root. // An alternating path is a path in which the edges alternate @@ -194,7 +194,7 @@ void AugmentMatching(const std::vector& S, const OrderedSet& T, // If we have reached the root of the alternating tree, we are done. if (ii == 0) { // Checks that the root was unmatched when we got to it. - /* CHECK_EQ(tmp_j, -1); */ + CHECK_EQ(tmp_j, -1); return; } } @@ -225,11 +225,11 @@ void Hungarian(int n, const weight_t* edge, int* perm) { void Hungarian(int n, const weight_t* edge, int* perm, weight_t* lx, weight_t* ly) { - /* CHECK_GT(n, 0); */ - /* CHECK(edge); */ - /* CHECK(perm); */ - /* CHECK(lx); */ - /* CHECK(ly); */ + CHECK_GT(n, 0); + CHECK(edge); + CHECK(perm); + CHECK(lx); + CHECK(ly); // Find initial feasible labeling: lx[i] + ly[j] >= edge[i][j] for all (i, j). for (int i = 0; i < n; ++i) { diff --git a/waymo_open_dataset/metrics/hungarian.h b/waymo_open_dataset/metrics/hungarian.h index 25cfc05..cd51241 100644 --- a/waymo_open_dataset/metrics/hungarian.h +++ b/waymo_open_dataset/metrics/hungarian.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/hungarian_test.cc b/waymo_open_dataset/metrics/hungarian_test.cc index 504878b..25ca517 100644 --- a/waymo_open_dataset/metrics/hungarian_test.cc +++ b/waymo_open_dataset/metrics/hungarian_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/iou.cc b/waymo_open_dataset/metrics/iou.cc index 9c447ba..4ab3c70 100644 --- a/waymo_open_dataset/metrics/iou.cc +++ b/waymo_open_dataset/metrics/iou.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -51,8 +51,8 @@ T Clamp(const T& v, const T& lo, const T& hi) { template bool ClosedRangesOverlap(T min1, T max1, T min2, T max2, T* overlap_min = nullptr, T* overlap_max = nullptr) { - /* CHECK_LE(min1, max1); */ - /* CHECK_LE(min2, max2); */ + CHECK_LE(min1, max1); + CHECK_LE(min2, max2); T min = std::max(min1, min2); T max = std::min(max1, max2); if (overlap_min != nullptr) { @@ -127,12 +127,12 @@ double ComputeIoU2d(const Label::Box& b1, const Label::Box& b2) { const double union_area = p1_area + p2_area - intersection_area; if (union_area <= kEpsilon) return 0.0; const double iou = intersection_area / union_area; - /* CHECK(!std::isnan(iou)) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_GE(iou, -kEpsilon) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_LE(iou, 1.0 + kEpsilon) - << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); */ + CHECK(!std::isnan(iou)) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_GE(iou, -kEpsilon) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_LE(iou, 1.0 + kEpsilon) + << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); return std::max(std::min(iou, 1.0), 0.0); } @@ -155,12 +155,12 @@ double ComputeIoUAA2d(const Label::Box& b1, const Label::Box& b2) { const double union_area = b1_area + b2_area - intersection_area; if (union_area <= kEpsilon) return 0.0; const double iou = intersection_area / union_area; - /* CHECK(!std::isnan(iou)) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_GE(iou, -kEpsilon) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_LE(iou, 1.0 + kEpsilon) - << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); */ + CHECK(!std::isnan(iou)) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_GE(iou, -kEpsilon) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_LE(iou, 1.0 + kEpsilon) + << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); return std::max(std::min(iou, 1.0), 0.0); } @@ -195,12 +195,12 @@ double ComputeIoU3d(const Label::Box& b1, const Label::Box& b2) { const double union_volume = b1_volume + b2_volume - intersection_volume; if (union_volume <= kEpsilon) return 0.0; const double iou = intersection_volume / union_volume; - /* CHECK(!std::isnan(iou)) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_GE(iou, -kEpsilon) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_LE(iou, 1.0 + kEpsilon) - << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); */ + CHECK(!std::isnan(iou)) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_GE(iou, -kEpsilon) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_LE(iou, 1.0 + kEpsilon) + << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); return std::max(std::min(iou, 1.0), 0.0); } @@ -326,10 +326,10 @@ double ComputeLetIoU( const Config::LongitudinalErrorTolerantConfig::Location3D& sensor_location, Config::LongitudinalErrorTolerantConfig::AlignType align_type, Label::Box::Type box_type) { - /* CHECK(box_type == Label::Box::TYPE_3D || box_type == Label::Box::TYPE_2D) + CHECK(box_type == Label::Box::TYPE_3D || box_type == Label::Box::TYPE_2D) << "Only TYPE_3D and TYPE_2D boxes are supported in LET IoU, current " "type: " - << Label::Box::Type_Name(box_type); */ + << Label::Box::Type_Name(box_type); // Transform the boxes into the sensor coordinate system. const Label::Box calibrated_prediction_box = TranslateBox(prediction_box, -sensor_location.x(), -sensor_location.y(), diff --git a/waymo_open_dataset/metrics/iou.h b/waymo_open_dataset/metrics/iou.h index 1804780..37b98ff 100644 --- a/waymo_open_dataset/metrics/iou.h +++ b/waymo_open_dataset/metrics/iou.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/iou_test.cc b/waymo_open_dataset/metrics/iou_test.cc index eb7f72d..1976a71 100644 --- a/waymo_open_dataset/metrics/iou_test.cc +++ b/waymo_open_dataset/metrics/iou_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/matcher.cc b/waymo_open_dataset/metrics/matcher.cc index 4616290..d1c7a17 100644 --- a/waymo_open_dataset/metrics/matcher.cc +++ b/waymo_open_dataset/metrics/matcher.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -35,9 +35,9 @@ namespace open_dataset { std::unique_ptr Matcher::Create( MatcherProto_Type matcher_type, const std::vector& iou_thresholds, Label::Box::Type box_type) { - /* CHECK_EQ(iou_thresholds.size(), Label::Type_MAX + 1) - << "Must specifiy IoU thresholds for every label type."; */ - /* CHECK_NE(box_type, Label::Box::TYPE_UNKNOWN); */ + CHECK_EQ(iou_thresholds.size(), Label::Type_MAX + 1) + << "Must specifiy IoU thresholds for every label type."; + CHECK_NE(box_type, Label::Box::TYPE_UNKNOWN); switch (matcher_type) { case MatcherProto::TYPE_HUNGARIAN: @@ -116,10 +116,10 @@ float Matcher::LongitudinalAffinity(int prediction_index, longitudinal_affinity = custom_longitudinal_affinity_func_( predictions()[prediction_index].object().box(), ground_truths()[ground_truth_index].object().box()); - /* CHECK_GE(longitudinal_affinity, 0.0) + CHECK_GE(longitudinal_affinity, 0.0) << "prediction_index: " << prediction_index - << ", ground_truth_index: " << ground_truth_index; */ - /* CHECK_LE(longitudinal_affinity, 1.0); */ + << ", ground_truth_index: " << ground_truth_index; + CHECK_LE(longitudinal_affinity, 1.0); } // Store the result in the cache. longitudinal_affinity_caches_[prediction_index][ground_truth_index] = @@ -155,9 +155,9 @@ float Matcher::IoU(int prediction_index, int ground_truth_index) const { ground_truths()[ground_truth_index].object().box()); } - /* CHECK_GE(iou, 0.0) << "prediction_index: " << prediction_index - << ", ground_truth_index: " << ground_truth_index; */ - /* CHECK_LE(iou, 1.0); */ + CHECK_GE(iou, 0.0) << "prediction_index: " << prediction_index + << ", ground_truth_index: " << ground_truth_index; + CHECK_LE(iou, 1.0); // Store the result in the cache. iou_caches_[prediction_index][ground_truth_index] = iou; } @@ -167,7 +167,7 @@ float Matcher::IoU(int prediction_index, int ground_truth_index) const { bool Matcher::CanMatch(int prediction_index, int ground_truth_index) const { const Label::Type object_type = predictions()[prediction_index].object().type(); - /* CHECK_NE(object_type, Label::TYPE_UNKNOWN); */ + CHECK_NE(object_type, Label::TYPE_UNKNOWN); // If custom CanMatch function is set, return the custom result. if (custom_can_match_func_ != nullptr) return custom_can_match_func_(*this, prediction_index, ground_truth_index); @@ -227,8 +227,8 @@ void HungarianMatcher::Match(std::vector* prediction_matches, for (int i = 0; i < prediction_subset_size; ++i) { const int prediction_subset_index = i; int ground_truth_subset_index = matching[i]; - /* CHECK_GE(ground_truth_subset_index, 0); */ - /* CHECK_LT(ground_truth_subset_index, num_vertices); */ + CHECK_GE(ground_truth_subset_index, 0); + CHECK_LT(ground_truth_subset_index, num_vertices); bool can_match = false; if (ground_truth_subset_index >= ground_truth_subset_size) { ground_truth_subset_index = -1; @@ -251,8 +251,8 @@ void HungarianMatcher::Match(std::vector* prediction_matches, void ScoreFirstMatcher::Match(std::vector* prediction_matches, std::vector* ground_truth_matches) { - /* CHECK(prediction_matches); */ - /* CHECK(ground_truth_matches); */ + CHECK(prediction_matches); + CHECK(ground_truth_matches); const int prediction_subset_size = prediction_subset().size(); const int ground_truth_subset_size = ground_truth_subset().size(); diff --git a/waymo_open_dataset/metrics/matcher.h b/waymo_open_dataset/metrics/matcher.h index f8400a6..337cea8 100644 --- a/waymo_open_dataset/metrics/matcher.h +++ b/waymo_open_dataset/metrics/matcher.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -156,11 +156,11 @@ class Matcher { // Accessors. const std::vector& predictions() const { - /* CHECK(predictions_ != nullptr); */ + CHECK(predictions_ != nullptr); return *predictions_; } const std::vector& ground_truths() const { - /* CHECK(ground_truths_ != nullptr); */ + CHECK(ground_truths_ != nullptr); return *ground_truths_; } const std::vector& prediction_subset() const { @@ -172,14 +172,14 @@ class Matcher { // Validates the prediction_index. void ValidPredictionIndex(int prediction_index) const { - /* CHECK_GE(prediction_index, 0); */ - /* CHECK_LT(prediction_index, predictions().size()); */ + CHECK_GE(prediction_index, 0); + CHECK_LT(prediction_index, predictions().size()); } // Validates the ground_truth_index. void ValidGroundTruthIndex(int ground_truth_index) const { - /* CHECK_GE(ground_truth_index, 0); */ - /* CHECK_LT(ground_truth_index, ground_truths().size()); */ + CHECK_GE(ground_truth_index, 0); + CHECK_LT(ground_truth_index, ground_truths().size()); } // Performs the match operation. diff --git a/waymo_open_dataset/metrics/matcher_test.cc b/waymo_open_dataset/metrics/matcher_test.cc index 3190604..42892d7 100644 --- a/waymo_open_dataset/metrics/matcher_test.cc +++ b/waymo_open_dataset/metrics/matcher_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -80,12 +80,12 @@ double ComputeIoU2dMin(const Label::Box& b1, const Label::Box& b2) { const double min_area = std::min(p1_area, p2_area); if (min_area <= kEpsilon) return 0.0; const double iom = intersection_area / min_area; - /* CHECK(!std::isnan(iom)) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_GE(iom, -kEpsilon) << "b1: " << b1.DebugString() - << "\nb2: " << b2.DebugString(); */ - /* CHECK_LE(iom, 1.0 + kEpsilon) - << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); */ + CHECK(!std::isnan(iom)) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_GE(iom, -kEpsilon) << "b1: " << b1.DebugString() + << "\nb2: " << b2.DebugString(); + CHECK_LE(iom, 1.0 + kEpsilon) + << "b1: " << b1.DebugString() << "\nb2: " << b2.DebugString(); return std::max(std::min(iom, 1.0), 0.0); } diff --git a/waymo_open_dataset/metrics/metrics_utils.cc b/waymo_open_dataset/metrics/metrics_utils.cc index 7e3ae00..4cf91ae 100644 --- a/waymo_open_dataset/metrics/metrics_utils.cc +++ b/waymo_open_dataset/metrics/metrics_utils.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -61,14 +61,14 @@ inline T NormalizeAngle(T rad) { } bool IsTP(const std::vector& pd_matches, int i) { - /* CHECK_GE(i, 0); */ - /* CHECK_LE(i, pd_matches.size()); */ + CHECK_GE(i, 0); + CHECK_LE(i, pd_matches.size()); return pd_matches[i] >= 0; } bool IsFP(const Matcher& matcher, const std::vector& pd_matches, int i) { - /* CHECK_GE(i, 0); */ - /* CHECK_LE(i, pd_matches.size()); */ + CHECK_GE(i, 0); + CHECK_LE(i, pd_matches.size()); return pd_matches[i] < 0 && !matcher.predictions()[matcher.prediction_subset()[i]] .overlap_with_nlz(); @@ -76,8 +76,8 @@ bool IsFP(const Matcher& matcher, const std::vector& pd_matches, int i) { bool IsDetectionFN(const Matcher& matcher, const std::vector& gt_matches, int i, Label::DifficultyLevel level) { - /* CHECK_GE(i, 0); */ - /* CHECK_LE(i, gt_matches.size()); */ + CHECK_GE(i, 0); + CHECK_LE(i, gt_matches.size()); if (gt_matches[i] >= 0) return false; const Object& object = @@ -88,8 +88,8 @@ bool IsDetectionFN(const Matcher& matcher, const std::vector& gt_matches, bool IsTrackingFN(const Matcher& matcher, const std::vector& gt_matches, int i, Label::DifficultyLevel level) { - /* CHECK_GE(i, 0); */ - /* CHECK_LE(i, gt_matches.size()); */ + CHECK_GE(i, 0); + CHECK_LE(i, gt_matches.size()); if (gt_matches[i] >= 0) return false; const Object& object = @@ -129,13 +129,13 @@ std::vector BuildSubsets( const std::vector shards = breakdown_generator->ShardsForMatching(objects[i]); for (int s : shards) { - /* CHECK_GE(s, 0); */ - /* CHECK_LT(s, num_shards); */ + CHECK_GE(s, 0); + CHECK_LT(s, num_shards); breakdown_subsets[s].push_back(i); } } else { const int shard = breakdown_generator->Shard(objects[i]); - /* CHECK_LT(shard, num_shards); */ + CHECK_LT(shard, num_shards); if (shard >= 0) { breakdown_subsets[shard].push_back(i); } @@ -208,7 +208,7 @@ std::vector Sequence(float start, float end, float delta) { std::vector DecideScoreCutoffs(const std::vector& scores, int num_desired_cutoffs) { - /* CHECK_GT(num_desired_cutoffs, 0); */ + CHECK_GT(num_desired_cutoffs, 0); if (num_desired_cutoffs == 1) { return {0.0}; } @@ -238,16 +238,16 @@ std::vector DecideScoreCutoffs(const std::vector& scores, last_idx = last_idx + bucket_sizes[i]; } cutoffs.push_back(1.0); - /* CHECK_EQ(cutoffs.size(), num_desired_cutoffs); */ + CHECK_EQ(cutoffs.size(), num_desired_cutoffs); return cutoffs; } float ComputeMeanAveragePrecision(const std::vector& precisions, const std::vector& recalls, float max_recall_delta) { - /* CHECK_EQ(precisions.size(), recalls.size()); */ - /* CHECK_GT(max_recall_delta, 0.0); */ - /* CHECK_LE(max_recall_delta, 1.0); */ + CHECK_EQ(precisions.size(), recalls.size()); + CHECK_GT(max_recall_delta, 0.0); + CHECK_LE(max_recall_delta, 1.0); if (precisions.empty()) return 0.0; // Recall to precision mapping. @@ -305,7 +305,7 @@ namespace { inline float Sqr(float x) { return x * x; } int Argmin(const std::vector& nums) { - /* CHECK(!nums.empty()); */ + CHECK(!nums.empty()); int i = 0; for (int j = 1; j < nums.size(); ++j) { if (nums[j] < nums[i]) { @@ -356,7 +356,7 @@ std::vector EstimateObjectSpeed(const std::vector& pds, std::vector> EstimateObjectSpeed( const std::vector>& pds, const std::vector>& gts) { - /* CHECK_EQ(pds.size(), gts.size()); */ + CHECK_EQ(pds.size(), gts.size()); std::vector> pds_with_velocity(pds.size()); for (int i = 0, sz = pds.size(); i < sz; ++i) { pds_with_velocity[i] = EstimateObjectSpeed(pds[i], gts[i]); diff --git a/waymo_open_dataset/metrics/metrics_utils.h b/waymo_open_dataset/metrics/metrics_utils.h index c2f4343..e1605c0 100644 --- a/waymo_open_dataset/metrics/metrics_utils.h +++ b/waymo_open_dataset/metrics/metrics_utils.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/metrics_utils_test.cc b/waymo_open_dataset/metrics/metrics_utils_test.cc index f35335a..763c60e 100644 --- a/waymo_open_dataset/metrics/metrics_utils_test.cc +++ b/waymo_open_dataset/metrics/metrics_utils_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/mot.cc b/waymo_open_dataset/metrics/mot.cc index fad38fc..ebe0dea 100644 --- a/waymo_open_dataset/metrics/mot.cc +++ b/waymo_open_dataset/metrics/mot.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -36,8 +36,8 @@ namespace { void BuildTrackingIdToDetectionBoxIndexMaps( const Matcher& matcher, absl::flat_hash_map* pd_map, absl::flat_hash_map* gt_map) { - /* CHECK(pd_map != nullptr); */ - /* CHECK(gt_map != nullptr); */ + CHECK(pd_map != nullptr); + CHECK(gt_map != nullptr); for (int i = 0, sz = matcher.prediction_subset().size(); i < sz; ++i) { const std::string& id = matcher.predictions()[matcher.prediction_subset()[i]].object().id(); @@ -66,7 +66,7 @@ void BuildTrackingIdToDetectionBoxIndexMaps( void MOT::Eval(Matcher* matcher_ptr, Label::DifficultyLevel difficulty_level, bool include_details_in_measurements) { - /* CHECK(matcher_ptr != nullptr); */ + CHECK(matcher_ptr != nullptr); Matcher& matcher = *matcher_ptr; // The implementation follows the 'Mapping procedure' in the paper. // Some comments below are copied from the paper. @@ -96,8 +96,8 @@ void MOT::Eval(Matcher* matcher_ptr, Label::DifficultyLevel difficulty_level, { absl::flat_hash_set pd_ids; for (const auto& kv : gt_pd_new_matchings) { - /* CHECK(pd_ids.insert(kv.second).second) - << "Duplicate prediction found for " << kv.second << "."; */ + CHECK(pd_ids.insert(kv.second).second) + << "Duplicate prediction found for " << kv.second << "."; } } @@ -130,8 +130,8 @@ void MOT::Eval(Matcher* matcher_ptr, Label::DifficultyLevel difficulty_level, } pd_gt_matchings_.clear(); for (const auto& kv : gt_pd_matchings_) { - /* CHECK(pd_gt_matchings_.emplace(kv.second, kv.first).second) - << kv.first << " " << kv.second; */ + CHECK(pd_gt_matchings_.emplace(kv.second, kv.first).second) + << kv.first << " " << kv.second; } if (include_details_in_measurements) { @@ -180,8 +180,8 @@ void MOT::Eval(Matcher* matcher_ptr, Label::DifficultyLevel difficulty_level, absl::flat_hash_map MOT::InitializeNewMapping( const Matcher& matcher, absl::flat_hash_map* pd_map, absl::flat_hash_map* gt_map) { - /* CHECK(pd_map != nullptr); */ - /* CHECK(gt_map != nullptr); */ + CHECK(pd_map != nullptr); + CHECK(gt_map != nullptr); // New ground truth -> prediction mapping. absl::flat_hash_map gt_pd_new_matchings; @@ -214,7 +214,7 @@ MOT::MatchResult MOT::Match(const absl::flat_hash_map& pd_map, const absl::flat_hash_map& gt_map, Label::DifficultyLevel difficulty_level, Matcher* matcher) { - /* CHECK(matcher != nullptr); */ + CHECK(matcher != nullptr); // For all objects for which no correspondence was made yet, try to find a // matching hypothesis. Allow only one-to-one matches, and pairs for which the // distance does not exceed T. The matching should be made in a way that @@ -276,8 +276,8 @@ MOT::MatchResult MOT::Match(const absl::flat_hash_map& pd_map, { absl::flat_hash_set pd_ids; for (const auto& kv : result.gt_pd_matchings) { - /* CHECK(pd_ids.insert(kv.second).second) - << "Duplicate prediction found for " << kv.second << "."; */ + CHECK(pd_ids.insert(kv.second).second) + << "Duplicate prediction found for " << kv.second << "."; } } return result; diff --git a/waymo_open_dataset/metrics/mot.h b/waymo_open_dataset/metrics/mot.h index 9c101b7..b8e059e 100644 --- a/waymo_open_dataset/metrics/mot.h +++ b/waymo_open_dataset/metrics/mot.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/mot_test.cc b/waymo_open_dataset/metrics/mot_test.cc index 01f2230..48d4e34 100644 --- a/waymo_open_dataset/metrics/mot_test.cc +++ b/waymo_open_dataset/metrics/mot_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/motion_metrics.cc b/waymo_open_dataset/metrics/motion_metrics.cc index 9cab6a2..dc8bb37 100644 --- a/waymo_open_dataset/metrics/motion_metrics.cc +++ b/waymo_open_dataset/metrics/motion_metrics.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -902,7 +902,7 @@ void MeanAveragePrecisionStats::Accumulate( if (pr_buckets.empty()) { pr_buckets.resize(mean_ap_stats.pr_buckets.size()); } - /* CHECK_EQ(pr_buckets.size(), mean_ap_stats.pr_buckets.size()); */ + CHECK_EQ(pr_buckets.size(), mean_ap_stats.pr_buckets.size()); for (int i = 0; i < pr_buckets.size(); ++i) { pr_buckets[i].Accumulate(mean_ap_stats.pr_buckets[i]); } @@ -931,7 +931,7 @@ std::map BucketedMetricsStats::AccumulateAcrossTypes() { // that for samples with identical confidences the false positives are listed // first. void SortSamples(std::vector* samples_ptr) { - /* CHECK(samples_ptr != nullptr); */ + CHECK(samples_ptr != nullptr); std::vector& samples = *samples_ptr; std::sort( samples.begin(), samples.end(), @@ -1125,7 +1125,7 @@ MotionMetricsConfig GetChallengeConfig() { )"; MotionMetricsConfig result; - /* CHECK(google::protobuf::TextFormat::ParseFromString(scenario_str, &result)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(scenario_str, &result)); return result; } diff --git a/waymo_open_dataset/metrics/motion_metrics.h b/waymo_open_dataset/metrics/motion_metrics.h index 3895c11..39358fd 100644 --- a/waymo_open_dataset/metrics/motion_metrics.h +++ b/waymo_open_dataset/metrics/motion_metrics.h @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/motion_metrics_test.cc b/waymo_open_dataset/metrics/motion_metrics_test.cc index 8440e36..0a8040f 100644 --- a/waymo_open_dataset/metrics/motion_metrics_test.cc +++ b/waymo_open_dataset/metrics/motion_metrics_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,12 +37,12 @@ namespace { ScenarioPredictions CreateTestSubmissionProto( const Scenario& scenario, std::vector offsets = {1, 2, 3, 4}, std::vector confidences = {0.8f, 0.2f, 0.2f, 0.2f}) { - /* CHECK_EQ(offsets.size(), confidences.size()); */ + CHECK_EQ(offsets.size(), confidences.size()); ScenarioPredictions submission; submission.set_scenario_id(scenario.scenario_id()); for (const auto& required_track : scenario.tracks_to_predict()) { const int track_index = required_track.track_index(); - /* CHECK_LT(track_index, scenario.tracks_size()); */ + CHECK_LT(track_index, scenario.tracks_size()); const Track& track = scenario.tracks(track_index); auto* prediction = submission.add_multi_modal_predictions(); @@ -98,7 +98,7 @@ ScenarioPredictions CreateTestPredictions() { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); return predictions; } @@ -189,7 +189,7 @@ Scenario CreateTestScenario() { } )"; Scenario scenario; - /* CHECK(google::protobuf::TextFormat::ParseFromString(scenario_str, &scenario)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(scenario_str, &scenario)); return scenario; } @@ -213,7 +213,7 @@ MotionMetricsConfig GetTestConfig() { max_predictions: 6 )"; MotionMetricsConfig config; - /* CHECK(google::protobuf::TextFormat::ParseFromString(scenario_str, &config)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(scenario_str, &config)); return config; } @@ -265,7 +265,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeMissRateLateral_2) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -297,7 +297,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeMissRateLateral_1) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -329,7 +329,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeMissRateLongitudinal_2) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -361,7 +361,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeMissRateLongitudinal_1) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -393,7 +393,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeNoMissLongitudinal_1) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -430,7 +430,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeVelocityScalingLatitudinal) { config.set_speed_scale_upper(1.0); config.set_speed_lower_bound(1.0); config.set_speed_upper_bound(3.0); - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config, predictions, scenario_, &metrics_stats); @@ -493,7 +493,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeVelocityScalingLongitudinal) { config.set_speed_scale_upper(1.0); config.set_speed_lower_bound(1.0); config.set_speed_upper_bound(3.0); - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = @@ -553,7 +553,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeNoMissLateral_2) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -598,7 +598,7 @@ TEST_F(TestJointMetricsSynthetic, TwoJointPredictionsNoMiss) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -643,7 +643,7 @@ TEST_F(TestJointMetricsSynthetic, TwoJointPredictionsObjectAndTrajectoryTypes) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); Scenario scenario = scenario_; // Change the first track to something boring (STATIC) so that the track_type @@ -710,7 +710,7 @@ TEST_F(TestJointMetricsSynthetic, TwoJointPredictionsMiss) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -755,7 +755,7 @@ TEST_F(TestJointMetricsSynthetic, InvalidJointPredictions) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = @@ -783,7 +783,7 @@ TEST_F(TestJointMetricsSynthetic, MissingObjectPredictions) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); @@ -823,7 +823,7 @@ TEST_F(TestJointMetricsSynthetic, ComputeMinADE) { } )"; ScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); BucketedMetricsStats metrics_stats; Status status = ComputeMetricsStats(config_, predictions, scenario_, &metrics_stats); diff --git a/waymo_open_dataset/metrics/motion_metrics_utils.cc b/waymo_open_dataset/metrics/motion_metrics_utils.cc index 80d942c..62da3ff 100644 --- a/waymo_open_dataset/metrics/motion_metrics_utils.cc +++ b/waymo_open_dataset/metrics/motion_metrics_utils.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/motion_metrics_utils.h b/waymo_open_dataset/metrics/motion_metrics_utils.h index c5b09fd..4980c10 100644 --- a/waymo_open_dataset/metrics/motion_metrics_utils.h +++ b/waymo_open_dataset/metrics/motion_metrics_utils.h @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/motion_metrics_utils_test.cc b/waymo_open_dataset/metrics/motion_metrics_utils_test.cc index 8ff4449..0290693 100644 --- a/waymo_open_dataset/metrics/motion_metrics_utils_test.cc +++ b/waymo_open_dataset/metrics/motion_metrics_utils_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -218,7 +218,7 @@ TEST(MotionMetricsUtils, SubmissionToPredictionsSingle) { } )"; ChallengeScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); ScenarioPredictions result; Status status = ConvertChallengePredictions(predictions, &result); ASSERT_TRUE(status.ok()); @@ -255,7 +255,7 @@ TEST(MotionMetricsUtils, SubmissionToPredictionsSingle) { } )"; ScenarioPredictions expected_result; - /* CHECK(google::protobuf::TextFormat::ParseFromString(results_str, &expected_result)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(results_str, &expected_result)); EXPECT_TRUE( google::protobuf::util::MessageDifferencer::Equals(result, expected_result)); } @@ -301,7 +301,7 @@ TEST(MotionMetricsUtils, SubmissionToPredictionsJoint) { } )"; ChallengeScenarioPredictions predictions; - /* CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(predictions_str, &predictions)); ScenarioPredictions result; Status status = ConvertChallengePredictions(predictions, &result); ASSERT_TRUE(status.ok()); @@ -338,47 +338,47 @@ TEST(MotionMetricsUtils, SubmissionToPredictionsJoint) { } )"; ScenarioPredictions expected_result; - /* CHECK(google::protobuf::TextFormat::ParseFromString(results_str, &expected_result)); */ + CHECK(google::protobuf::TextFormat::ParseFromString(results_str, &expected_result)); EXPECT_TRUE( google::protobuf::util::MessageDifferencer::Equals(result, expected_result)); } TEST(MotionMetricsUtils, PredictionToTrackStep) { MotionMetricsConfig metrics_config; - /* CHECK(google::protobuf::TextFormat::ParseFromString(R"( + CHECK(google::protobuf::TextFormat::ParseFromString(R"( track_steps_per_second: 10 prediction_steps_per_second: 2 track_history_samples: 5 track_future_samples: 80 )", - &metrics_config)); */ + &metrics_config)); EXPECT_EQ(PredictionToTrackStep(metrics_config, 1), 15); } TEST(MotionMetricsUtils, CurrentTrackStep) { MotionMetricsConfig metrics_config; - /* CHECK(google::protobuf::TextFormat::ParseFromString(R"( + CHECK(google::protobuf::TextFormat::ParseFromString(R"( track_steps_per_second: 10 prediction_steps_per_second: 2 track_history_samples: 5 track_future_samples: 80 )", - &metrics_config)); */ + &metrics_config)); EXPECT_EQ(CurrentTrackStep(metrics_config), 5); } TEST(MotionMetricsUtils, PredictionToPolygon) { MotionMetricsConfig metrics_config; - /* CHECK(google::protobuf::TextFormat::ParseFromString(R"( + CHECK(google::protobuf::TextFormat::ParseFromString(R"( track_steps_per_second: 1 prediction_steps_per_second: 1 track_history_samples: 1 track_future_samples: 1 )", - &metrics_config)); */ + &metrics_config)); Track track; - /* CHECK(google::protobuf::TextFormat::ParseFromString(R"( + CHECK(google::protobuf::TextFormat::ParseFromString(R"( object_type: TYPE_VEHICLE states { length: 2 @@ -396,13 +396,13 @@ TEST(MotionMetricsUtils, PredictionToPolygon) { valid: true } )", - &track)); */ + &track)); SingleTrajectory trajectory; - /* CHECK(google::protobuf::TextFormat::ParseFromString(R"( + CHECK(google::protobuf::TextFormat::ParseFromString(R"( center_x: [1, 2, 3] center_y: [0, 0, 0] )", - &trajectory)); */ + &trajectory)); const int trajectory_step = 0; { diff --git a/waymo_open_dataset/metrics/ops/BUILD b/waymo_open_dataset/metrics/ops/BUILD index b807c2f..c496289 100644 --- a/waymo_open_dataset/metrics/ops/BUILD +++ b/waymo_open_dataset/metrics/ops/BUILD @@ -39,6 +39,7 @@ cc_binary( name = "metrics_ops.so", srcs = [ "detection_metrics_ops.cc", + "matcher_ops.cc", "metrics_ops.cc", "motion_metrics_ops.cc", "tracking_metrics_ops.cc", @@ -52,6 +53,7 @@ cc_binary( "//waymo_open_dataset:label_cc_proto", "//waymo_open_dataset/metrics:config_util", "//waymo_open_dataset/metrics:detection_metrics", + "//waymo_open_dataset/metrics:matcher", "//waymo_open_dataset/metrics:motion_metrics", "//waymo_open_dataset/metrics:tracking_metrics", "//waymo_open_dataset/protos:breakdown_cc_proto", diff --git a/waymo_open_dataset/metrics/ops/detection_metrics_ops.cc b/waymo_open_dataset/metrics/ops/detection_metrics_ops.cc index af65a16..2e8b440 100644 --- a/waymo_open_dataset/metrics/ops/detection_metrics_ops.cc +++ b/waymo_open_dataset/metrics/ops/detection_metrics_ops.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ limitations under the License. #include #include +#include #include "absl/container/flat_hash_map.h" #include "absl/strings/escaping.h" #include "absl/types/optional.h" @@ -145,14 +146,14 @@ class DetectionMetricsOp final : public OpKernel { output.breakdown.matrix()(i, 2) = metrics[i].breakdown().difficulty_level(); - /* CHECK_EQ(metrics[i].precisions_size(), num_score_cutoffs); */ - /* CHECK_EQ(metrics[i].recalls_size(), num_score_cutoffs); */ - /* CHECK_EQ(metrics[i].precisions_ha_weighted_size(), num_score_cutoffs); */ - /* CHECK_EQ(metrics[i].recalls_ha_weighted_size(), num_score_cutoffs); */ - /* CHECK_EQ(metrics[i].precisions_longitudinal_affinity_weighted_size(), - num_score_cutoffs); */ - /* CHECK_EQ(metrics[i].recalls_longitudinal_affinity_weighted_size(), - num_score_cutoffs); */ + CHECK_EQ(metrics[i].precisions_size(), num_score_cutoffs); + CHECK_EQ(metrics[i].recalls_size(), num_score_cutoffs); + CHECK_EQ(metrics[i].precisions_ha_weighted_size(), num_score_cutoffs); + CHECK_EQ(metrics[i].recalls_ha_weighted_size(), num_score_cutoffs); + CHECK_EQ(metrics[i].precisions_longitudinal_affinity_weighted_size(), + num_score_cutoffs); + CHECK_EQ(metrics[i].recalls_longitudinal_affinity_weighted_size(), + num_score_cutoffs); for (int j = 0; j < num_score_cutoffs; ++j) { output.precision_recall.tensor()(i, j, 0) = metrics[i].precisions(j); diff --git a/waymo_open_dataset/metrics/ops/detection_metrics_ops_test.py b/waymo_open_dataset/metrics/ops/detection_metrics_ops_test.py index 7608219..782f02b 100644 --- a/waymo_open_dataset/metrics/ops/detection_metrics_ops_test.py +++ b/waymo_open_dataset/metrics/ops/detection_metrics_ops_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/ops/matcher_ops.cc b/waymo_open_dataset/metrics/ops/matcher_ops.cc new file mode 100644 index 0000000..adc4798 --- /dev/null +++ b/waymo_open_dataset/metrics/ops/matcher_ops.cc @@ -0,0 +1,258 @@ +/* Copyright 2023 The Waymo Open Dataset Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +// cc_library does not have a header, and clang-format is not able to find an +// include ordering consistent with the style guide. + +// clang-format off +#include +#include + + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/op_requires.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/errors.h" +#include "waymo_open_dataset/label.pb.h" +#include "waymo_open_dataset/metrics/matcher.h" +#include "waymo_open_dataset/protos/metrics.pb.h" +// clang-format on + +namespace tf = tensorflow; + +namespace tensorflow { +namespace { +namespace co = ::waymo::open_dataset; + +// Returns true if the box has nonzero extents. +// Inputs to the kernel is a zero-padded tensor of boxes, and we do not need +// to bother trying to match these invalid boxes. They already get discarded by +// ComputeIoU2d and ComputeIoU3d; this filtering just avoids extra work and +// logging. +bool IsValidBox(const co::Label::Box& box, + co::Label::Box::Type box_type) { + switch (box_type) { + case co::Label::Box::TYPE_3D: + return box.width() > 0 && box.length() > 0 && box.height() > 0; + case co::Label::Box::TYPE_2D: + case co::Label::Box::TYPE_AA_2D: + return box.width() > 0 && box.length() > 0; + case co::Label::Box::TYPE_UNKNOWN: + LOG(FATAL) << "Invalid (unknown) box type. "; + return false; + } +} + +co::Object ParseBoxTensor(const tf::Tensor& input, int id) { + int num_elements = input.NumElements(); + CHECK(num_elements == 7 || num_elements == 5 || num_elements == 4) + << "Wrong size: " << input.shape().DebugString(); + co::Object output; + output.set_score(1.0); + co::Label* label = output.mutable_object(); + co::Label::Box* box = label->mutable_box(); + label->set_type(co::Label::TYPE_VEHICLE); + label->set_id(absl::StrCat(id)); + const auto input_data = input.unaligned_flat(); + if (num_elements == 7) { + box->set_center_x(input_data(0)); + box->set_center_y(input_data(1)); + box->set_center_z(input_data(2) + input_data(5) / 2.0); + box->set_length(input_data(3)); + box->set_width(input_data(4)); + box->set_height(input_data(5)); + box->set_heading(input_data(6)); + } else if (num_elements == 5) { + box->set_center_x(input_data(0)); + box->set_center_y(input_data(1)); + box->set_length(input_data(2)); + box->set_width(input_data(3)); + box->set_heading(input_data(4)); + } else { + box->set_center_x(input_data(0)); + box->set_center_y(input_data(1)); + box->set_length(input_data(2)); + box->set_width(input_data(3)); + } + return output; +} + +struct MatchResult { + int prediction_index; + int ground_truth_index; + float iou; + float longitudinal_affinity; +}; + +std::vector MatchBoxes( + const std::vector predictions, + const std::vector& ground_truths, + const co::Config& config) { + auto matcher = co::Matcher::Create(config); + CHECK(matcher != nullptr); + matcher->SetPredictions(predictions); + matcher->SetGroundTruths(ground_truths); + std::vector valid_prediction_index; + valid_prediction_index.reserve(predictions.size()); + for (int i = 0; i < predictions.size(); ++i) { + if (IsValidBox(predictions[i].object().box(), config.box_type())) + valid_prediction_index.push_back(i); + } + + std::vector valid_ground_truth_index; + valid_ground_truth_index.reserve(ground_truths.size()); + for (int i = 0; i < ground_truths.size(); ++i) { + if (IsValidBox(ground_truths[i].object().box(), config.box_type())) { + valid_ground_truth_index.push_back(i); + } + } + std::vector prediction_index; + matcher->SetPredictionSubset(valid_prediction_index); + matcher->SetGroundTruthSubset(valid_ground_truth_index); + matcher->Match(&prediction_index, nullptr); + CHECK_EQ(matcher->prediction_subset().size(), prediction_index.size()); + std::vector output; + for (int i = 0; i < prediction_index.size(); ++i) { + if (prediction_index[i] == -1.0) continue; // Object was not matched. + int pd_idx = matcher->prediction_subset()[i]; + int gt_idx = matcher->ground_truth_subset()[prediction_index[i]]; + output.push_back({ + .prediction_index = pd_idx, + .ground_truth_index = gt_idx, + .iou = matcher->IoU(pd_idx, gt_idx), + .longitudinal_affinity = matcher->LongitudinalAffinity(pd_idx, gt_idx), + }); + } + return output; +} + +std::vector> ParseBoxesTensor( + const tf::Tensor& batched_inputs) { + int batch_size = batched_inputs.shape().dim_size(0); + int num_boxes = batched_inputs.shape().dim_size(1); + std::vector> output; + output.reserve(batch_size); + for (int batch_idx = 0; batch_idx < batch_size; ++batch_idx) { + tf::Tensor inputs = batched_inputs.SubSlice(batch_idx); + std::vector objects; + objects.reserve(num_boxes); + for (int box_idx = 0; box_idx < num_boxes; ++box_idx) { + objects.push_back(ParseBoxTensor(inputs.SubSlice(box_idx), box_idx)); + } + output.push_back(objects); + } + return output; +} + +class OpenDatasetMatcherOp : public tf::OpKernel { + public: + explicit OpenDatasetMatcherOp(tf::OpKernelConstruction* ctx) + : tf::OpKernel(ctx) { + std::string config_str; + OP_REQUIRES_OK(ctx, ctx->GetAttr("config", &config_str)); + OP_REQUIRES(ctx, config_.ParseFromString(config_str), + errors::InvalidArgument( + "Could not parse input proto config from string.")); + } + + void Compute(tf::OpKernelContext* ctx) override { + const tf::Tensor& predictions = ctx->input(0); + const tf::Tensor& ground_truths = ctx->input(1); + // Check that the dimensions of the two inputs are valid. + OP_REQUIRES(ctx, predictions.dims() == 3, + errors::InvalidArgument("Not a batched vector of boxes: ", + predictions.shape().DebugString())); + OP_REQUIRES(ctx, ground_truths.dims() == 3, + errors::InvalidArgument("Not a batched vector of boxes")); + OP_REQUIRES(ctx, predictions.dim_size(2) == ground_truths.dim_size(2), + errors::InvalidArgument("Box dimensions are incompatible: ", + ground_truths.shape().DebugString(), + predictions.shape().DebugString())); + OP_REQUIRES(ctx, ground_truths.dim_size(0) == predictions.dim_size(0), + errors::InvalidArgument("Batch sizes don't match: ", + predictions.shape().DebugString(), + ground_truths.shape().DebugString())); + { + using Box = co::Label::Box; + int dim_size = predictions.dim_size(2); + auto box_type = config_.box_type(); + OP_REQUIRES( + ctx, + (box_type == Box::TYPE_AA_2D && dim_size == 4) || + (box_type == Box::TYPE_2D && (dim_size == 5 || dim_size == 7)) || + (box_type == Box::TYPE_3D && dim_size == 7), + errors::InvalidArgument("Box dim=", dim_size, + ", but requested matching was ", + Box::Type_Name(box_type))); + } + OP_REQUIRES( + ctx, + predictions.dtype() == tf::DT_FLOAT && + ground_truths.dtype() == tf::DT_FLOAT, + errors::InvalidArgument("Invalid input dtypes: [", + tf::DataTypeString(predictions.dtype()), ", ", + tf::DataTypeString(ground_truths.dtype()), + "], expected float32.")); + const int batch_size = predictions.dim_size(0); + const int num_predicted_boxes = predictions.dim_size(1); + const int num_ground_truth_boxes = ground_truths.dim_size(1); + + // Parse input boxes and run matching. + std::vector> batch_boxes_pd = + ParseBoxesTensor(predictions); + std::vector> batch_boxes_gt = + ParseBoxesTensor(ground_truths); + std::vector> all_match_results; + int num_matches = 0; + for (int idx_batch = 0; idx_batch < batch_size; ++idx_batch) { + all_match_results.push_back(MatchBoxes( + batch_boxes_pd[idx_batch], batch_boxes_gt[idx_batch], config_)); + num_matches += all_match_results.back().size(); + } + + // Allocate and fill output tensors. + tf::Tensor* out_predicted_idx = nullptr; + OP_REQUIRES_OK(ctx, + ctx->allocate_output(0, {num_matches}, &out_predicted_idx)); + tf::Tensor* out_ground_truth_idx = nullptr; + OP_REQUIRES_OK( + ctx, ctx->allocate_output(1, {num_matches}, &out_ground_truth_idx)); + tf::Tensor* out_iou = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(2, {num_matches}, &out_iou)); + tf::Tensor* out_la = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(3, {num_matches}, &out_la)); + int idx = 0; + for (int batch_idx = 0; batch_idx < batch_size; ++batch_idx) { + for (const MatchResult& match : all_match_results[batch_idx]) { + out_predicted_idx->flat()(idx) = + match.prediction_index + batch_idx * num_predicted_boxes; + out_ground_truth_idx->flat()(idx) = + match.ground_truth_index + batch_idx * num_ground_truth_boxes; + out_iou->flat()(idx) = match.iou; + out_la->flat()(idx) = match.longitudinal_affinity; + idx++; + } + } + } + + private: + co::Config config_; +}; + +REGISTER_KERNEL_BUILDER(Name("Match").Device(DEVICE_CPU), + OpenDatasetMatcherOp); + +} // namespace +} // namespace tensorflow diff --git a/waymo_open_dataset/metrics/ops/metrics_ops.cc b/waymo_open_dataset/metrics/ops/metrics_ops.cc index 9ffee74..f55ae4d 100644 --- a/waymo_open_dataset/metrics/ops/metrics_ops.cc +++ b/waymo_open_dataset/metrics/ops/metrics_ops.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -222,5 +222,31 @@ breakdown: [B, 3]. [generator_id, shard, difficulty] uint8 tuple for each config: a string serialized proto of metrics configuration protobuf. )doc"); +REGISTER_OP("Match") + .Input("prediction_boxes: float") + .Input("groundtruth_boxes: float") + .Attr("config: string") + .Output("prediction_ids: int32") + .Output("groundtruth_ids: int32") + .Output("ious: float") + .Output("longitudinal_affinities: float") + .SetShapeFn([](::tensorflow::shape_inference::InferenceContext* c) { + for (int i = 0; i < 4; ++i) { + c->set_output(i, c->MakeShape({-1})); + } + return ::tensorflow::OkStatus(); + }).Doc(R"doc( +Computes bipartite matching between prediction and groundtruth objects. + +prediction_boxes: [B, N, D] tensor. +groundtruth_boxes: [B, M, D] tensor. +config: a string serialized proto of metrics configuration protobuf. + +prediction_ids: [B] the matched prediction ids. +groundtruth_ids: [B] the matched groundtruth ids. +ious: [B] the iou of all matched pairs. +longitudinal_affinities: [B] the longitudinal affinities of all matched pairs. +)doc"); + } // namespace } // namespace tensorflow diff --git a/waymo_open_dataset/metrics/ops/motion_metrics_ops.cc b/waymo_open_dataset/metrics/ops/motion_metrics_ops.cc index a67716e..b21b9dd 100644 --- a/waymo_open_dataset/metrics/ops/motion_metrics_ops.cc +++ b/waymo_open_dataset/metrics/ops/motion_metrics_ops.cc @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ limitations under the License. #include #include +#include #include "absl/container/flat_hash_map.h" #include "absl/strings/escaping.h" #include "absl/types/optional.h" @@ -207,7 +208,7 @@ class MotionMetricsOp final : public OpKernel { co::BucketedMetricsStats total_stats; for (const auto& s : stats) { - /* CHECK(s.first.ok()) << s.first.message(); */ + CHECK(s.first.ok()) << s.first.message(); total_stats.Accumulate(s.second); } diff --git a/waymo_open_dataset/metrics/ops/motion_metrics_ops_test.py b/waymo_open_dataset/metrics/ops/motion_metrics_ops_test.py index b28fad1..47fc026 100644 --- a/waymo_open_dataset/metrics/ops/motion_metrics_ops_test.py +++ b/waymo_open_dataset/metrics/ops/motion_metrics_ops_test.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/ops/py_metrics_ops.py b/waymo_open_dataset/metrics/ops/py_metrics_ops.py index 0275eb8..ed1ffc4 100644 --- a/waymo_open_dataset/metrics/ops/py_metrics_ops.py +++ b/waymo_open_dataset/metrics/ops/py_metrics_ops.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -127,3 +127,8 @@ def tracking_metrics(prediction_bbox, ground_truth_difficulty=ground_truth_difficulty, ground_truth_speed=ground_truth_speed, config=config) + + +def match(prediction_boxes, groundtruth_boxes, config): + """Wraps match. See metrics_ops.cc for full documentation.""" + return metrics_module.match(prediction_boxes, groundtruth_boxes, config) diff --git a/waymo_open_dataset/metrics/ops/tracking_metrics_ops.cc b/waymo_open_dataset/metrics/ops/tracking_metrics_ops.cc index 73adcde..0216be0 100644 --- a/waymo_open_dataset/metrics/ops/tracking_metrics_ops.cc +++ b/waymo_open_dataset/metrics/ops/tracking_metrics_ops.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ limitations under the License. #include #include +#include #include "absl/container/flat_hash_map.h" #include "absl/strings/escaping.h" #include "absl/types/optional.h" diff --git a/waymo_open_dataset/metrics/ops/tracking_metrics_ops_test.py b/waymo_open_dataset/metrics/ops/tracking_metrics_ops_test.py index 0bf74a1..9c0eff0 100644 --- a/waymo_open_dataset/metrics/ops/tracking_metrics_ops_test.py +++ b/waymo_open_dataset/metrics/ops/tracking_metrics_ops_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/ops/utils.cc b/waymo_open_dataset/metrics/ops/utils.cc index 1a1acaa..0a30180 100644 --- a/waymo_open_dataset/metrics/ops/utils.cc +++ b/waymo_open_dataset/metrics/ops/utils.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -122,22 +122,22 @@ absl::flat_hash_map> ParseObjectFromTensors( const absl::optional& detection_difficulty, const absl::optional& tracking_difficulty, const absl::optional& object_speed) { - /* CHECK_EQ(bbox.dim_size(0), type.dim_size(0)); */ - /* CHECK_EQ(bbox.dim_size(0), frame_id.dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), type.dim_size(0)); + CHECK_EQ(bbox.dim_size(0), frame_id.dim_size(0)); if (score.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), score.value().dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), score.value().dim_size(0)); } if (overlap_nlz.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), overlap_nlz->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), overlap_nlz->dim_size(0)); } if (detection_difficulty.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), detection_difficulty->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), detection_difficulty->dim_size(0)); } if (tracking_difficulty.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), tracking_difficulty->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), tracking_difficulty->dim_size(0)); } if (object_speed.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), object_speed->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), object_speed->dim_size(0)); } absl::flat_hash_map> objects; @@ -185,24 +185,24 @@ ParseObjectGroupedBySequenceFromTensors( const absl::optional& detection_difficulty, const absl::optional& tracking_difficulty, const absl::optional& object_speed) { - /* CHECK_EQ(bbox.dim_size(0), type.dim_size(0)); */ - /* CHECK_EQ(bbox.dim_size(0), frame_id.dim_size(0)); */ - /* CHECK_EQ(bbox.dim_size(0), sequence_id.dim_size(0)); */ - /* CHECK_EQ(bbox.dim_size(0), object_id.dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), type.dim_size(0)); + CHECK_EQ(bbox.dim_size(0), frame_id.dim_size(0)); + CHECK_EQ(bbox.dim_size(0), sequence_id.dim_size(0)); + CHECK_EQ(bbox.dim_size(0), object_id.dim_size(0)); if (score.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), score.value().dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), score.value().dim_size(0)); } if (overlap_nlz.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), overlap_nlz->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), overlap_nlz->dim_size(0)); } if (detection_difficulty.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), detection_difficulty->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), detection_difficulty->dim_size(0)); } if (tracking_difficulty.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), tracking_difficulty->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), tracking_difficulty->dim_size(0)); } if (object_speed.has_value()) { - /* CHECK_EQ(bbox.dim_size(0), object_speed->dim_size(0)); */ + CHECK_EQ(bbox.dim_size(0), object_speed->dim_size(0)); } // Map of sequence ids to (map of frame ids to list of objects in that frame). @@ -275,15 +275,15 @@ ParseScenarioAndPredictonsFromTensors( const tensorflow::Tensor& pred_gt_indices_mask, const tensorflow::Tensor& object_type, const tensorflow::Tensor& object_id, const tensorflow::Tensor& scenario_id) { - /* CHECK_EQ(pred_trajectory.dims(), 6); */ - /* CHECK_EQ(pred_score.dims(), 3); */ - /* CHECK_EQ(gt_trajectory.dims(), 4); */ - /* CHECK_EQ(gt_is_valid.dims(), 3); */ - /* CHECK_EQ(pred_gt_indices.dims(), 3); */ - /* CHECK_EQ(pred_gt_indices_mask.dims(), 3); */ - /* CHECK_EQ(object_type.dims(), 2); */ - /* CHECK_EQ(object_id.dims(), 2); */ - /* CHECK_EQ(scenario_id.dims(), 1); */ + CHECK_EQ(pred_trajectory.dims(), 6); + CHECK_EQ(pred_score.dims(), 3); + CHECK_EQ(gt_trajectory.dims(), 4); + CHECK_EQ(gt_is_valid.dims(), 3); + CHECK_EQ(pred_gt_indices.dims(), 3); + CHECK_EQ(pred_gt_indices_mask.dims(), 3); + CHECK_EQ(object_type.dims(), 2); + CHECK_EQ(object_id.dims(), 2); + CHECK_EQ(scenario_id.dims(), 1); const int batch_size = pred_trajectory.dim_size(0); const int num_pred_groups = pred_trajectory.dim_size(1); @@ -293,25 +293,25 @@ ParseScenarioAndPredictonsFromTensors( const int num_total_agents = gt_trajectory.dim_size(1); const int num_gt_steps = gt_trajectory.dim_size(2); - /* CHECK_EQ(pred_score.dim_size(0), batch_size); */ - /* CHECK_EQ(pred_score.dim_size(1), num_pred_groups); */ - /* CHECK_EQ(pred_score.dim_size(2), top_k); */ - /* CHECK_EQ(gt_trajectory.dim_size(0), batch_size); */ - /* CHECK_EQ(gt_trajectory.dim_size(3), 7); */ - /* CHECK_EQ(gt_is_valid.dim_size(0), batch_size); */ - /* CHECK_EQ(gt_is_valid.dim_size(1), num_total_agents); */ - /* CHECK_EQ(gt_is_valid.dim_size(2), num_gt_steps); */ - /* CHECK_EQ(pred_gt_indices.dim_size(0), batch_size); */ - /* CHECK_EQ(pred_gt_indices.dim_size(1), num_pred_groups); */ - /* CHECK_EQ(pred_gt_indices.dim_size(2), num_agents_per_group); */ - /* CHECK_EQ(pred_gt_indices_mask.dim_size(0), batch_size); */ - /* CHECK_EQ(pred_gt_indices_mask.dim_size(1), num_pred_groups); */ - /* CHECK_EQ(pred_gt_indices_mask.dim_size(2), num_agents_per_group); */ - /* CHECK_EQ(object_type.dim_size(0), batch_size); */ - /* CHECK_EQ(object_type.dim_size(1), num_total_agents); */ - /* CHECK_EQ(scenario_id.dim_size(0), batch_size); */ - /* CHECK_EQ(object_id.dim_size(0), batch_size); */ - /* CHECK_EQ(object_id.dim_size(1), num_total_agents); */ + CHECK_EQ(pred_score.dim_size(0), batch_size); + CHECK_EQ(pred_score.dim_size(1), num_pred_groups); + CHECK_EQ(pred_score.dim_size(2), top_k); + CHECK_EQ(gt_trajectory.dim_size(0), batch_size); + CHECK_EQ(gt_trajectory.dim_size(3), 7); + CHECK_EQ(gt_is_valid.dim_size(0), batch_size); + CHECK_EQ(gt_is_valid.dim_size(1), num_total_agents); + CHECK_EQ(gt_is_valid.dim_size(2), num_gt_steps); + CHECK_EQ(pred_gt_indices.dim_size(0), batch_size); + CHECK_EQ(pred_gt_indices.dim_size(1), num_pred_groups); + CHECK_EQ(pred_gt_indices.dim_size(2), num_agents_per_group); + CHECK_EQ(pred_gt_indices_mask.dim_size(0), batch_size); + CHECK_EQ(pred_gt_indices_mask.dim_size(1), num_pred_groups); + CHECK_EQ(pred_gt_indices_mask.dim_size(2), num_agents_per_group); + CHECK_EQ(object_type.dim_size(0), batch_size); + CHECK_EQ(object_type.dim_size(1), num_total_agents); + CHECK_EQ(scenario_id.dim_size(0), batch_size); + CHECK_EQ(object_id.dim_size(0), batch_size); + CHECK_EQ(object_id.dim_size(1), num_total_agents); absl::flat_hash_map> results; @@ -365,12 +365,12 @@ ParseScenarioAndPredictonsFromTensors( pred_group_valid[m] = true; int64 gt_index = pred_gt_indices.tensor()(i, m, n); - /* CHECK_GE(gt_index, 0); */ - /* CHECK_LT(gt_index, num_total_agents); */ + CHECK_GE(gt_index, 0); + CHECK_LT(gt_index, num_total_agents); // Get the track index for that ground truth agent. int64 track_index = gt_idx_to_track_idx[gt_index]; - /* CHECK_GE(track_index, 0); */ - /* CHECK_LT(track_index, scenario->tracks_size()); */ + CHECK_GE(track_index, 0); + CHECK_LT(track_index, scenario->tracks_size()); RequiredPrediction& required_track = *scenario->add_tracks_to_predict(); required_track.set_track_index(track_index); @@ -400,12 +400,12 @@ ParseScenarioAndPredictonsFromTensors( if (pred_gt_indices_mask.tensor()(i, m, j)) { auto new_trajectory = joint_prediction->add_trajectories(); int64 gt_index = pred_gt_indices.tensor()(i, m, j); - /* CHECK_GE(gt_index, 0); */ - /* CHECK_LT(gt_index, num_total_agents); */ + CHECK_GE(gt_index, 0); + CHECK_LT(gt_index, num_total_agents); // Get the track index for that ground truth agent. int64 track_index = gt_idx_to_track_idx[gt_index]; - /* CHECK_GE(track_index, 0); */ - /* CHECK_LT(track_index, scenario->tracks_size()); */ + CHECK_GE(track_index, 0); + CHECK_LT(track_index, scenario->tracks_size()); new_trajectory->set_object_id(scenario->tracks(track_index).id()); for (int t = 0; t < num_pred_steps; ++t) { diff --git a/waymo_open_dataset/metrics/ops/utils.h b/waymo_open_dataset/metrics/ops/utils.h index 558a883..5e31a80 100644 --- a/waymo_open_dataset/metrics/ops/utils.h +++ b/waymo_open_dataset/metrics/ops/utils.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/BUILD b/waymo_open_dataset/metrics/python/BUILD index 2d18a9b..26cd2ce 100644 --- a/waymo_open_dataset/metrics/python/BUILD +++ b/waymo_open_dataset/metrics/python/BUILD @@ -94,9 +94,11 @@ py_library( name = "keypoint_metrics", srcs = ["keypoint_metrics.py"], deps = [ + ":matcher", + "//waymo_open_dataset:label_proto_py_pb2", "//waymo_open_dataset/protos:keypoint_proto_py_pb2", + "//waymo_open_dataset/protos:metrics_proto_py_pb2", "//waymo_open_dataset/utils:keypoint_data", - "@keras_cv//keras_cv", ], ) @@ -113,3 +115,24 @@ py_test( ) + +py_library( + name = "matcher", + srcs = ["matcher.py"], + deps = [ + "//waymo_open_dataset:label_proto_py_pb2", + + "//waymo_open_dataset/metrics/ops:py_metrics_ops", + "//waymo_open_dataset/protos:breakdown_proto_py_pb2", + "//waymo_open_dataset/protos:metrics_proto_py_pb2", + ], +) + +py_test( + name = "matcher_test", + srcs = ["matcher_test.py"], + deps = [ + ":matcher", + "//waymo_open_dataset/protos:metrics_proto_py_pb2", + ], +) diff --git a/waymo_open_dataset/metrics/python/config_util_py.py b/waymo_open_dataset/metrics/python/config_util_py.py index 354fdbd..03cebbf 100644 --- a/waymo_open_dataset/metrics/python/config_util_py.py +++ b/waymo_open_dataset/metrics/python/config_util_py.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/config_util_test.py b/waymo_open_dataset/metrics/python/config_util_test.py index 8cf6404..9aea078 100644 --- a/waymo_open_dataset/metrics/python/config_util_test.py +++ b/waymo_open_dataset/metrics/python/config_util_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/detection_metrics.py b/waymo_open_dataset/metrics/python/detection_metrics.py index bf2c55c..ee8ad78 100644 --- a/waymo_open_dataset/metrics/python/detection_metrics.py +++ b/waymo_open_dataset/metrics/python/detection_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/detection_metrics_test.py b/waymo_open_dataset/metrics/python/detection_metrics_test.py index ac97966..335995f 100644 --- a/waymo_open_dataset/metrics/python/detection_metrics_test.py +++ b/waymo_open_dataset/metrics/python/detection_metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/keypoint_metrics.py b/waymo_open_dataset/metrics/python/keypoint_metrics.py index 012c3b8..3512085 100644 --- a/waymo_open_dataset/metrics/python/keypoint_metrics.py +++ b/waymo_open_dataset/metrics/python/keypoint_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,15 +16,15 @@ import abc import dataclasses -import enum from typing import Callable, Collection, Dict, List, Mapping, Optional, Tuple import immutabledict -import keras_cv -from scipy import optimize import tensorflow as tf +from waymo_open_dataset import label_pb2 +from waymo_open_dataset.metrics.python import matcher from waymo_open_dataset.protos import keypoint_pb2 +from waymo_open_dataset.protos import metrics_pb2 from waymo_open_dataset.utils import keypoint_data as _data @@ -818,47 +818,19 @@ def _create_pck(subset: str) -> KeypointsMetric: return CombinedMetric([mpjpe, pck, oks]) -class MatchingMethod(enum.Enum): - HUNGARIAN = 1 - - @dataclasses.dataclass(frozen=True) class MatchingConfig: - method: MatchingMethod = MatchingMethod.HUNGARIAN + method: metrics_pb2.MatcherProto.Type = ( + metrics_pb2.MatcherProto.TYPE_HUNGARIAN + ) iou_threshold: float = 0.5 -def _box_to_keras_cv(b: _data.BoundingBoxTensors) -> tf.Tensor: - # Boxes should have the format CENTER_XYZ_DXDYDZ_PHI. Details - # https://github.com/keras-team/keras-cv/blob/master/keras_cv/bounding_box_3d/formats.py +def _box_to_tensor(b: _data.BoundingBoxTensors) -> tf.Tensor: + # Boxes should have the format CENTER_XYZ_DXDYDZ_PHI. return tf.concat([b.center, b.size, tf.expand_dims(b.heading, axis=-1)], -1) -def hungarian_assignment( - iou: tf.Tensor, min_iou: float = 0.5 -) -> tuple[tf.Tensor, tf.Tensor]: - """Performs assignment using Hungarian algorithm. - - It's just a wrapper for linear_sum_assignment in SciPy. - NOTE: It is not differentiable. - - Args: - iou: an [M, N] matrix with pairwise IoU scores iou_ij = iou(lhs_i, rhs_j) - min_iou: minimal value for the IoU to consider a match. - - Returns: - a 2-tuple (lhs_ids, rhs_ids), where `lhs_ids' and 'rhs_ids` are indices - which maximize the IoU of the assignment. Both are tensors with shape [K], - where K=min(M,N). - """ - fn = lambda iou: optimize.linear_sum_assignment(iou.numpy(), maximize=True) - # Shape of both `lhs` and `rhs` is [K], where K=min(M,N). - lhs, rhs = tf.py_function(func=fn, inp=[iou], Tout=(tf.int32, tf.int32)) - # Shape of `mask`: [K]. - mask = tf.gather_nd(iou, tf.stack([lhs, rhs], axis=1)) > min_iou - return tf.boolean_mask(lhs, mask, axis=0), tf.boolean_mask(rhs, mask, axis=0) - - def missing_ids(ids: tf.Tensor, count: int) -> tf.Tensor: """Returns a list of ids, missing in the input. @@ -951,12 +923,18 @@ def match_pose_estimations( and the 3D coordinate of the j-th keypoint for the i-th ground truth object will correspond to pr.keypoints.location[i, j]. """ - # Compute IoU between ground truth and predicted boxes. - gt_box = _box_to_keras_cv(gt.box) - pr_box = _box_to_keras_cv(pr.box) - iou = keras_cv.ops.iou_3d(gt_box, pr_box) - # Identify indices of ground truth and prediction boxes that match. - gt_ids, pr_ids = hungarian_assignment(iou, min_iou=config.iou_threshold) + # Run bipartite matching between prediction and groundtruth boxes. + gt_box = _box_to_tensor(gt.box) + pr_box = _box_to_tensor(pr.box) + match_results = matcher.match( + prediction_boxes=pr_box, + groundtruth_boxes=gt_box, + iou=config.iou_threshold, + box_type=label_pb2.Label.Box.TYPE_3D, + matcher_type=config.method, + ) + gt_ids = match_results.groundtruth_ids + pr_ids = match_results.prediction_ids # Indices of false negative ground truth objects. fn_ids = missing_ids(gt_ids, count=gt.box.center.shape[0]) # Indices of false positive predicted objects. diff --git a/waymo_open_dataset/metrics/python/keypoint_metrics_test.py b/waymo_open_dataset/metrics/python/keypoint_metrics_test.py index 1ce1a01..332567e 100644 --- a/waymo_open_dataset/metrics/python/keypoint_metrics_test.py +++ b/waymo_open_dataset/metrics/python/keypoint_metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ import json import math +import numpy as np import tensorflow as tf # copybara removed file resource import @@ -601,44 +602,6 @@ def test_all_metrics_for_all_returns_expected_number_of_results(self): self.assertCountEqual(result.keys(), _ALL_METRIC_NAMES) -class HungarianAssignmentTest(tf.test.TestCase): - - def test_returns_continious_range_for_eye(self): - iou = tf.constant([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=tf.float32) - - lhs, rhs = _lib.hungarian_assignment(iou) - - self.assertAllEqual(lhs, [0, 1, 2]) - self.assertAllEqual(rhs, [0, 1, 2]) - - def test_reorders_shuffled_elements(self): - iou = tf.constant([[0, 1, 0], [0, 0, 1], [1, 0, 0]], dtype=tf.float32) - - lhs, rhs = _lib.hungarian_assignment(iou) - - self.assertAllEqual(lhs, [0, 1, 2]) - self.assertAllEqual(rhs, [1, 2, 0]) - - def test_sets_mask_to_false_for_unmatched(self): - # iou[2, :] = iou[:,2] = 0 - there is no match for both of them. - iou = tf.constant([[1, 0, 0], [0, 1, 0], [0, 0, 0]], dtype=tf.float32) - - lhs, rhs = _lib.hungarian_assignment(iou) - - # We don't care about the last element, because it is not matched. - self.assertAllEqual(lhs, [0, 1]) - self.assertAllEqual(rhs, [0, 1]) - - def test_supports_different_number_of_elements(self): - # 2 ground truth, 3 predictions - iou = tf.constant([[1, 0, 0], [0, 1, 0]], dtype=tf.float32) - - lhs, rhs = _lib.hungarian_assignment(iou) - - self.assertAllEqual(lhs, [0, 1]) - self.assertAllEqual(rhs, [0, 1]) - - class MissingIdsTest(tf.test.TestCase): def test_missing_ids_empty_if_nothing_is_missing(self): @@ -716,11 +679,23 @@ def test_reorders_pr_to_match_gr(self): gtm, prm = _lib.match_pose_estimations(gt, pr) - self.assertAllClose(gtm.keypoints.location, gt.keypoints.location) - self.assertAllClose(gtm.keypoints.visibility, gt.keypoints.visibility) - self.assertAllClose(gtm.box.center, gt.box.center) - self.assertAllClose(gtm.box.size, gt.box.size) - self.assertAllClose(gtm.box.heading, gt.box.heading) + self.assertCountEqual( + gtm.keypoints.location.numpy().flatten(), + gt.keypoints.location.numpy().flatten(), + ) + self.assertCountEqual( + gtm.keypoints.visibility.numpy().flatten(), + gt.keypoints.visibility.numpy().flatten(), + ) + self.assertCountEqual( + gtm.box.center.numpy().flatten(), gt.box.center.numpy().flatten() + ) + self.assertCountEqual( + gtm.box.size.numpy().flatten(), gt.box.size.numpy().flatten() + ) + self.assertCountEqual( + gtm.box.heading.numpy().flatten(), gt.box.heading.numpy().flatten() + ) self.assertAllClose(gtm.keypoints.location, prm.keypoints.location) self.assertAllClose(gtm.keypoints.visibility, prm.keypoints.visibility) self.assertAllClose(gtm.box.center, prm.box.center) @@ -751,7 +726,7 @@ def test_inexact_pr_to_gr_match(self): visibility=tf.constant([[2], [2], [2]]), ) pr_box = _data.BoundingBoxTensors( - center=tf.constant([[7.1, 7.1, 7.1], [0.9, 1.1, 1.2], [3.9, 4, 4.1]]), + center=tf.constant([[7.1, 7.1, 7.1], [0.9, 1.1, 1.1], [3.9, 4, 4.1]]), size=tf.constant([[1.2] * 3, [1.2] * 3, [1.2] * 3], dtype=tf.float32), heading=tf.constant([0.1, 0.1, 0.1], dtype=tf.float32), ) @@ -760,10 +735,13 @@ def test_inexact_pr_to_gr_match(self): gt_m, pr_m = _lib.match_pose_estimations(gt, pr) # Spot checking coordinates to assert the order of objects. - self.assertAllClose(gt_m.keypoints.location[:, 0, 0], [1, 4, 7]) - self.assertAllClose(gt_m.box.center[:, 0], [1, 4, 7]) - self.assertAllClose(pr_m.keypoints.location[:, 0, 0], [1, 4, 7]) - self.assertAllClose(pr_m.box.center[:, 0], [0.9, 3.9, 7.1]) + self.assertCountEqual(gt_m.keypoints.location[:, 0, 0].numpy(), [1, 4, 7]) + self.assertCountEqual(gt_m.box.center[:, 0].numpy(), [1, 4, 7]) + self.assertCountEqual(pr_m.keypoints.location[:, 0, 0].numpy(), [1, 4, 7]) + self.assertCountEqual( + pr_m.box.center[:, 0].numpy(), np.asarray([0.9, 3.9, 7.1], np.float32) + ) + self.assertAllClose(gt_m.keypoints.location, pr_m.keypoints.location) def test_appends_false_negatives_and_false_positives(self): # 2 object with 1 keypoint each: diff --git a/waymo_open_dataset/metrics/python/matcher.py b/waymo_open_dataset/metrics/python/matcher.py new file mode 100644 index 0000000..4b6a115 --- /dev/null +++ b/waymo_open_dataset/metrics/python/matcher.py @@ -0,0 +1,120 @@ +# Copyright 2023 The Waymo Open Dataset Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== +"""Tools for computing box matching using Open Dataset criteria.""" +import dataclasses +from typing import Optional + +import tensorflow as tf + +from waymo_open_dataset import label_pb2 +from waymo_open_dataset.metrics.ops import py_metrics_ops +from waymo_open_dataset.protos import breakdown_pb2 +from waymo_open_dataset.protos import metrics_pb2 + +TensorLike = tf.types.experimental.TensorLike +Type = label_pb2.Label.Box.Type +LongitudinalErrorTolerantConfig = ( + metrics_pb2.Config.LongitudinalErrorTolerantConfig +) + + +@dataclasses.dataclass +class MatchResult: + """Object holding matching result. + + A single i-th element in each tensor describes a match between predicted and + groundtruth box, the associated IOU (2D IOU, 3D IOU, or the LET variant), and + the index in the batch where the batch was made. + """ + + # Indices into the prediction boxes, as if boxes were reshaped as [-1, dim]. + prediction_ids: TensorLike # [N] + # Indices into the groundtruth boxes, as if boxes were reshaped as [-1, dim]. + groundtruth_ids: TensorLike # [N] + # Matching quality (IOU variant depends on the matching config). + ious: TensorLike # [N] + # Longitudinal affinity for a given match. + longitudinal_affinities: TensorLike # [N] + + +def match( + prediction_boxes: TensorLike, + groundtruth_boxes: TensorLike, + iou: float, + box_type: 'label_pb2.Label.Box.Type', + matcher_type: metrics_pb2.MatcherProto.Type = metrics_pb2.MatcherProto.TYPE_HUNGARIAN, + let_metric_config: Optional[LongitudinalErrorTolerantConfig] = None, +) -> MatchResult: + """Returns a matching between predicted and groundtruth boxes. + + Matching criteria and thresholds are specified through the config. Boxes are + represented as [center_x, center_y, bottom_z, length, width, height, heading]. + The function treats "zeros(D)" as an invalid box and will not try to match it. + + Args: + prediction_boxes: [B, N, D] or [N, D] tensor. + groundtruth_boxes: [B, M, D] or [N, D] tensor. + iou: IOU threshold to use for matching. + box_type: whether to perform matching in 2D or 3D. + matcher_type: the matching algorithm for the matcher. Default to Hungarian. + let_metric_config: Optional config describing how LET matching should be + done. + + Returns: + A match result struct with flattened tensors where i-th element describes a + match between predicted and groundtruth box, the associated IOU + (AA_2D, 2D IOU, 3D IOU, or the LET variant), and the index in the batch + where the match was made: + - indices of predicted boxes [Q] + - corresponding indices of groundtruth boxes [Q] + - IOUs for each match. [Q] + - index in the input batch [Q] with values in {0, ..., B-1}. + """ + with tf.name_scope('open_dataset_matcher/match'): + config = _create_config(iou, box_type, matcher_type, let_metric_config) + if tf.rank(prediction_boxes) == 2: + prediction_boxes = tf.expand_dims(prediction_boxes, 0) + if tf.rank(groundtruth_boxes) == 2: + groundtruth_boxes = tf.expand_dims(groundtruth_boxes, 0) + tf.debugging.assert_shapes([ + (prediction_boxes, ('b', 'n', 'd')), + (groundtruth_boxes, ('b', 'm', 'd')), + ]) + pred_ids, gt_ids, ious, la = py_metrics_ops.match( + prediction_boxes, groundtruth_boxes, config=config.SerializeToString() + ) + return MatchResult( + prediction_ids=pred_ids, + groundtruth_ids=gt_ids, + ious=ious, + longitudinal_affinities=la, + ) + + +def _create_config( + iou: float, + box_type: 'label_pb2.Label.Box.Type', + matcher_type: metrics_pb2.MatcherProto.Type, + let_metric_config: Optional[LongitudinalErrorTolerantConfig] = None, +) -> metrics_pb2.Config: + return metrics_pb2.Config( + score_cutoffs=[0.0], + box_type=box_type, + difficulties=[metrics_pb2.Difficulty(levels=[])], + breakdown_generator_ids=[breakdown_pb2.Breakdown.ONE_SHARD], + matcher_type=matcher_type, + iou_thresholds=[0, iou, iou, iou, iou], + let_metric_config=let_metric_config, + ) diff --git a/waymo_open_dataset/metrics/python/matcher_test.py b/waymo_open_dataset/metrics/python/matcher_test.py new file mode 100644 index 0000000..d9b3a9f --- /dev/null +++ b/waymo_open_dataset/metrics/python/matcher_test.py @@ -0,0 +1,233 @@ +# Copyright 2023 The Waymo Open Dataset Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== +"""Tests for matcher.py.""" + +import dataclasses +from typing import Tuple + +import numpy as np +import tensorflow as tf + +from waymo_open_dataset.metrics.python import matcher +from waymo_open_dataset.protos import metrics_pb2 + + +def get_let_metric_config() -> ( + metrics_pb2.Config.LongitudinalErrorTolerantConfig +): + return metrics_pb2.Config.LongitudinalErrorTolerantConfig( + enabled=True, + sensor_location={'x': 0, 'y': 0, 'z': 0}, + longitudinal_tolerance_percentage=0.15, + min_longitudinal_tolerance_meter=2.0, + ) + + +def create_shuffled_boxes( + num_boxes: int, batch_size: int +) -> Tuple[tf.Tensor, tf.Tensor, tf.Tensor]: + boxes, shuffled_boxes, permutations = [], [], [] + for _ in range(batch_size): + a = tf.random.uniform([1, num_boxes, 7], minval=0.1, maxval=1.0) + permutation = tf.random.shuffle(tf.range(0, num_boxes)) + b = tf.gather(a, permutation, axis=1) + boxes.append(a) + shuffled_boxes.append(b) + permutations.append(permutation) + boxes = tf.concat(boxes, axis=0) + shuffled_boxes = tf.concat(shuffled_boxes, axis=0) + permutations = tf.stack(permutations, axis=0) + return boxes, shuffled_boxes, permutations + + +def asdict(obj): + return dataclasses.asdict(obj) + + +class OpenDatasetMatcherTest(tf.test.TestCase): + + def setUp(self): + super().setUp() + tf.random.set_seed(0) + self.config_dict = { + 'iou': 0.3, + 'box_type': matcher.Type.TYPE_2D, + 'let_metric_config': get_let_metric_config(), + } + + def test_aa_2d_boxes_match(self): + box_type = matcher.Type.TYPE_AA_2D + boxes1 = tf.reshape(np.array([2, 2, 10, 2], np.float32), [1, 1, 4]) + boxes2 = tf.reshape(np.array([2, 1, 10, 2], np.float32), [1, 1, 4]) + self.assertAllClose( + asdict(matcher.MatchResult([0], [0], [1.0 / 3.0], [1])), + asdict(matcher.match(boxes1, boxes2, 0.3, box_type)), + ) + + def test_pair_of_boxes_with_perfect_iou(self): + box1 = np.array([0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0]) + box2 = np.array([5.0, 5.0, 0.0, 1.0, 1.0, 1.0, 0.0]) + + boxes1 = np.zeros([3, 2, 7], np.float32) + boxes2 = np.zeros([3, 2, 7], np.float32) + boxes1[1, :, :] = np.stack([box1, box2], axis=0) + boxes2[1, :, :] = np.stack([box2, box1], axis=0) + boxes1[2, :, :] = np.stack([box2, box1], axis=0) + boxes2[2, :, :] = np.stack([box1, box2], axis=0) + + result = matcher.match(boxes1, boxes2, **self.config_dict) + self.assertAllClose(tf.ones([4]), result.ious) + self.assertAllClose(tf.ones([4]), result.longitudinal_affinities) + self.assertAllEqual([2, 3, 4, 5], result.prediction_ids) + self.assertAllEqual([3, 2, 5, 4], result.groundtruth_ids) + + def test_with_random_permutations_without_batching(self): + boxes, boxes_shuffled, permutations = create_shuffled_boxes( + num_boxes=10, batch_size=1 + ) + result = matcher.match(boxes, boxes_shuffled, **self.config_dict) + self.assertAllClose(tf.ones([10]), result.ious) + self.assertAllClose(tf.ones([10]), result.longitudinal_affinities) + self.assertAllEqual(tf.range(0, 10), result.prediction_ids) + self.assertAllEqual( + tf.math.invert_permutation(permutations[0]), result.groundtruth_ids + ) + + def test_with_random_permutations_with_batching(self): + num_boxes, batch_size = 10, 3 + boxes, boxes_shuffled, permutations = create_shuffled_boxes( + num_boxes, batch_size + ) + result = matcher.match(boxes, boxes_shuffled, **self.config_dict) + self.assertAllClose(tf.ones([num_boxes * batch_size]), result.ious) + self.assertAllEqual( + tf.range(0, num_boxes * batch_size), result.prediction_ids + ) + for i in range(batch_size): + self.assertAllEqual( + tf.math.invert_permutation(permutations[i]) + i * num_boxes, + result.groundtruth_ids[i * num_boxes : (i + 1) * num_boxes], + ) + + def test_imperfect_iou_with_batching(self): + box1 = np.array([0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0]) + box2 = np.array([0.25, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0]) + boxes1, boxes2 = np.zeros([1, 2, 7]), np.zeros([1, 3, 7]) + boxes1[0, 0, :], boxes2[0, 2, :] = box1, box2 + + result = matcher.match( + boxes1, boxes2, iou=0.3, box_type=matcher.Type.TYPE_2D + ) + self.assertAllClose([0.6], result.ious, 1e-2) + + result = matcher.match(boxes1, boxes2, **self.config_dict) + self.assertAllClose([0.6], result.ious, 1e-2) + self.assertAllClose([0.944], result.longitudinal_affinities, 1e-2) + + def test_invalid_box_handling(self): + boxes = tf.reshape(np.array([0, 0, 0, 1, 1, 0, 0], np.float32), [1, 1, 7]) + no_match_result = matcher.MatchResult([], [], [], []) + # A 'slip of paper' is considered invalid for 3D matching. + self.assertAllClose( + asdict(no_match_result), + asdict(matcher.match(boxes, boxes, 0.3, matcher.Type.TYPE_3D)), + ) + # ...but is valid for 2D AND AA_2D matching. + box_type = matcher.Type.TYPE_2D + self.assertAllClose( + asdict(matcher.MatchResult([0], [0], [1], [1])), + asdict(matcher.match(boxes, boxes, 0.3, box_type)), + ) + box_type = matcher.Type.TYPE_AA_2D + boxes_aa2d = tf.stack( + [boxes[..., 0], boxes[..., 1], boxes[..., 3], boxes[..., 4]], axis=-1 + ) + self.assertAllClose( + asdict(matcher.MatchResult([0], [0], [1], [1])), + asdict((matcher.match(boxes_aa2d, boxes_aa2d, 0.3, box_type))), + ) + + # ...a 'line segment' is invalid in either. + boxes = tf.reshape(np.array([0, 0, 0, 0, 1, 0, 0], np.float32), [1, 1, 7]) + for box_type in ( + matcher.Type.TYPE_2D, + matcher.Type.TYPE_3D, + ): + self.assertAllClose( + asdict(no_match_result), + asdict(matcher.match(boxes, boxes, 0.3, box_type)), + ) + box_type = matcher.Type.TYPE_AA_2D + boxes_aa2d = tf.reshape(np.array([0, 0, 1, 0], np.float32), [1, 1, 4]) + self.assertAllClose( + asdict(no_match_result), + asdict(matcher.match(boxes_aa2d, boxes_aa2d, 0.3, box_type)), + ) + + def test_no_matching_possible(self): + no_match_result = matcher.MatchResult([], [], [], []) + boxes = tf.constant([[[0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0]]]) + self.assertAllClose( + asdict(no_match_result), + asdict( + matcher.match( + boxes, tf.zeros([1, 0, 7], tf.float32), **self.config_dict + ) + ), + ) + + self.assertAllClose( + asdict(no_match_result), + asdict( + matcher.match( + tf.zeros([1, 0, 7], tf.float32), boxes, **self.config_dict + ) + ), + ) + + self.assertAllClose( + asdict(no_match_result), + asdict( + matcher.match( + tf.zeros([1, 0, 7], tf.float32), + tf.zeros([1, 0, 7], tf.float32), + **self.config_dict, + ) + ), + ) + + self.assertAllClose( + asdict(no_match_result), + asdict( + matcher.match( + tf.zeros([1, 1, 7], tf.float32), + tf.zeros([1, 1, 7], tf.float32), + **self.config_dict, + ) + ), + ) + + def test_invalid_arguments(self): + for a, b in [ + (tf.zeros([1, 1, 8]), tf.zeros([1, 1, 8])), + (tf.zeros([1, 1, 7]), tf.zeros([1, 1, 7], dtype=tf.int32)), + (tf.zeros([2, 1, 7]), tf.zeros([1, 1, 7])), + ]: + with self.assertRaises((ValueError, tf.errors.InvalidArgumentError)): + matcher.match(a, b, **self.config_dict) + + +if __name__ == '__main__': + tf.test.main() diff --git a/waymo_open_dataset/metrics/python/motion_metrics.py b/waymo_open_dataset/metrics/python/motion_metrics.py index 0477d21..33c6afb 100644 --- a/waymo_open_dataset/metrics/python/motion_metrics.py +++ b/waymo_open_dataset/metrics/python/motion_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/motion_metrics_test.py b/waymo_open_dataset/metrics/python/motion_metrics_test.py index 85031d5..1f1881f 100644 --- a/waymo_open_dataset/metrics/python/motion_metrics_test.py +++ b/waymo_open_dataset/metrics/python/motion_metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2021 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/tracking_metrics.py b/waymo_open_dataset/metrics/python/tracking_metrics.py index 5524f86..5e9682c 100644 --- a/waymo_open_dataset/metrics/python/tracking_metrics.py +++ b/waymo_open_dataset/metrics/python/tracking_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/tracking_metrics_test.py b/waymo_open_dataset/metrics/python/tracking_metrics_test.py index 3e49091..400e0ec 100644 --- a/waymo_open_dataset/metrics/python/tracking_metrics_test.py +++ b/waymo_open_dataset/metrics/python/tracking_metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/wod_detection_evaluator.py b/waymo_open_dataset/metrics/python/wod_detection_evaluator.py index 4dbd305..b114f7e 100644 --- a/waymo_open_dataset/metrics/python/wod_detection_evaluator.py +++ b/waymo_open_dataset/metrics/python/wod_detection_evaluator.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/python/wod_detection_evaluator_test.py b/waymo_open_dataset/metrics/python/wod_detection_evaluator_test.py index 274be83..0049852 100644 --- a/waymo_open_dataset/metrics/python/wod_detection_evaluator_test.py +++ b/waymo_open_dataset/metrics/python/wod_detection_evaluator_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/segmentation_metrics.cc b/waymo_open_dataset/metrics/segmentation_metrics.cc index 5779b46..fce6828 100644 --- a/waymo_open_dataset/metrics/segmentation_metrics.cc +++ b/waymo_open_dataset/metrics/segmentation_metrics.cc @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ SegmentationMetricsIOU::SegmentationMetricsIOU( auto index = segmentation_type_mapper_.find(static_cast( segmentation_metrics_config_.segmentation_types()[i])); // Input list of segmentation typs should not have duplicates. - /* CHECK(index == segmentation_type_mapper_.end()); */ + CHECK(index == segmentation_type_mapper_.end()); segmentation_type_mapper_.insert( {static_cast( segmentation_metrics_config_.segmentation_types()[i]), @@ -116,8 +116,8 @@ SegmentationMetrics SegmentationMetricsIOU::MergeResults( std::vector num_intersections(num_classes_, 0); std::vector num_unions(num_classes_, 0); for (const auto& result : results) { - /* CHECK(result.unions_size() == num_classes_); */ - /* CHECK(result.intersections_size() == num_classes_); */ + CHECK(result.unions_size() == num_classes_); + CHECK(result.intersections_size() == num_classes_); for (int i = 0; i < num_classes_; ++i) { num_intersections[i] += result.intersections()[i]; num_unions[i] += result.unions()[i]; diff --git a/waymo_open_dataset/metrics/segmentation_metrics.h b/waymo_open_dataset/metrics/segmentation_metrics.h index 3e54ece..47deb83 100644 --- a/waymo_open_dataset/metrics/segmentation_metrics.h +++ b/waymo_open_dataset/metrics/segmentation_metrics.h @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/segmentation_metrics_test.cc b/waymo_open_dataset/metrics/segmentation_metrics_test.cc index 61e0f0f..f5280fa 100644 --- a/waymo_open_dataset/metrics/segmentation_metrics_test.cc +++ b/waymo_open_dataset/metrics/segmentation_metrics_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/test_utils.cc b/waymo_open_dataset/metrics/test_utils.cc index fa16d65..c4e5bf4 100644 --- a/waymo_open_dataset/metrics/test_utils.cc +++ b/waymo_open_dataset/metrics/test_utils.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/test_utils.h b/waymo_open_dataset/metrics/test_utils.h index 698dab2..f47f450 100644 --- a/waymo_open_dataset/metrics/test_utils.h +++ b/waymo_open_dataset/metrics/test_utils.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/tools/compute_detection_let_metrics_main.cc b/waymo_open_dataset/metrics/tools/compute_detection_let_metrics_main.cc index b07ede8..373fd55 100644 --- a/waymo_open_dataset/metrics/tools/compute_detection_let_metrics_main.cc +++ b/waymo_open_dataset/metrics/tools/compute_detection_let_metrics_main.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -195,10 +195,10 @@ void Compute(const std::string& pd_str, const std::string& gt_str) { continue; } CameraName::Name camera_name; - /* CHECK(CameraName::Name_Parse(o.object().most_visible_camera_name(), + CHECK(CameraName::Name_Parse(o.object().most_visible_camera_name(), &camera_name)) << "Object has invalid `most_visible_camera_name` " - << o.object().most_visible_camera_name(); */ + << o.object().most_visible_camera_name(); // Replace the label box with the camera-synced box. In the 3D Camera-Only // Detection Challenge, we use camera-synced boxes as the ground truth boxes // as well as the evaluation target boxes. diff --git a/waymo_open_dataset/metrics/tools/compute_detection_metrics_main.cc b/waymo_open_dataset/metrics/tools/compute_detection_metrics_main.cc index b1b5a1c..bfa3bac 100644 --- a/waymo_open_dataset/metrics/tools/compute_detection_metrics_main.cc +++ b/waymo_open_dataset/metrics/tools/compute_detection_metrics_main.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/tools/compute_segmentation_metrics_main.cc b/waymo_open_dataset/metrics/tools/compute_segmentation_metrics_main.cc index 8f9af37..d085b70 100644 --- a/waymo_open_dataset/metrics/tools/compute_segmentation_metrics_main.cc +++ b/waymo_open_dataset/metrics/tools/compute_segmentation_metrics_main.cc @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -197,8 +197,8 @@ void Compute(const std::string& pd_str, const std::string& gt_str) { } else { pd_vector = CreateEmptyPrediction(num_points); } - /* CHECK(miou.Update(pd_vector, Flatten(gt_matrix)).ok()) - << "Prediction and Groundtruth lengths do not match"; */ + CHECK(miou.Update(pd_vector, Flatten(gt_matrix)).ok()) + << "Prediction and Groundtruth lengths do not match"; // Measure the second return range image. gt_matrix.ParseFromString(Uncompress(gt_it->second.segmentation_labels()[0] .ri_return2() @@ -213,8 +213,8 @@ void Compute(const std::string& pd_str, const std::string& gt_str) { } else { pd_vector = CreateEmptyPrediction(num_points); } - /* CHECK(miou.Update(pd_vector, Flatten(gt_matrix)).ok()) - << "Prediction and Groundtruth length do not match"; */ + CHECK(miou.Update(pd_vector, Flatten(gt_matrix)).ok()) + << "Prediction and Groundtruth length do not match"; } const SegmentationMetrics segmentation_metrics = miou.ComputeIOU(); for (auto it = segmentation_metrics.per_class_iou().begin(); diff --git a/waymo_open_dataset/metrics/tools/compute_tracking_metrics_main.cc b/waymo_open_dataset/metrics/tools/compute_tracking_metrics_main.cc index 3cee272..6d74d83 100644 --- a/waymo_open_dataset/metrics/tools/compute_tracking_metrics_main.cc +++ b/waymo_open_dataset/metrics/tools/compute_tracking_metrics_main.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/tools/create_prediction_file_example.py b/waymo_open_dataset/metrics/tools/create_prediction_file_example.py index 575790d..511bbe5 100644 --- a/waymo_open_dataset/metrics/tools/create_prediction_file_example.py +++ b/waymo_open_dataset/metrics/tools/create_prediction_file_example.py @@ -1,4 +1,4 @@ -# Copyright 2020 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2020 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/tools/create_segmentation_prediction_file_example.py b/waymo_open_dataset/metrics/tools/create_segmentation_prediction_file_example.py index cb1d957..e3b54ec 100644 --- a/waymo_open_dataset/metrics/tools/create_segmentation_prediction_file_example.py +++ b/waymo_open_dataset/metrics/tools/create_segmentation_prediction_file_example.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/tools/create_submission.cc b/waymo_open_dataset/metrics/tools/create_submission.cc index 6936373..d63d680 100644 --- a/waymo_open_dataset/metrics/tools/create_submission.cc +++ b/waymo_open_dataset/metrics/tools/create_submission.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -126,7 +126,7 @@ void ValidateFlags() { // Read all content in a file to a string. std::string ReadFileToString(const std::string& filename) { std::ifstream s(filename.c_str()); - /* CHECK(s.is_open()) << filename << " does not exist."; */ + CHECK(s.is_open()) << filename << " does not exist."; const std::string content((std::istreambuf_iterator(s)), std::istreambuf_iterator()); s.close(); @@ -151,19 +151,19 @@ void Run() { if (content.back() == '\n') { content.pop_back(); } - /* CHECK(objects_all[i].ParseFromString(content)); */ + CHECK(objects_all[i].ParseFromString(content)); i++; } const std::string submission_content = ReadFileToString(absl::GetFlag(FLAGS_submission_filename)); Submission submission; - /* CHECK(google::protobuf::TextFormat::ParseFromString(submission_content, &submission)) - << "Failed to parse " << submission_content; */ - /* CHECK(!submission.unique_method_name().empty() && + CHECK(google::protobuf::TextFormat::ParseFromString(submission_content, &submission)) + << "Failed to parse " << submission_content; + CHECK(!submission.unique_method_name().empty() && !submission.account_name().empty()) << "unique_method_name and account_name must be set in " - "--submission_filename."; */ + "--submission_filename."; std::vector submissions(absl::GetFlag(FLAGS_num_shards), submission); diff --git a/waymo_open_dataset/metrics/tracking_metrics.cc b/waymo_open_dataset/metrics/tracking_metrics.cc index 88b1770..0df0db7 100644 --- a/waymo_open_dataset/metrics/tracking_metrics.cc +++ b/waymo_open_dataset/metrics/tracking_metrics.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -45,7 +45,7 @@ std::vector ComputeTrackingMeasurementPerBreakdownShard( const std::vector>& gt_subsets, int breakdown_shard_index, std::vector>* matcher_ptrs) { - /* CHECK(matcher_ptrs != nullptr); */ + CHECK(matcher_ptrs != nullptr); std::vector>& matchers = *matcher_ptrs; const int num_frames = pd_subsets.size(); if (num_frames <= 0) return {}; @@ -93,7 +93,7 @@ std::vector ComputeTrackingMeasurementPerBreakdownShard( // Merges two tracking measurements. TrackingMeasurement MergeTrackingMeasurement(const TrackingMeasurement& m1, const TrackingMeasurement& m2) { - /* CHECK_EQ(m1.score_cutoff(), m2.score_cutoff()); */ + CHECK_EQ(m1.score_cutoff(), m2.score_cutoff()); TrackingMeasurement m; #define ADD_FIELD(FIELD_NAME) \ m.set_##FIELD_NAME(m1.FIELD_NAME() + m2.FIELD_NAME()) @@ -111,18 +111,18 @@ TrackingMeasurement MergeTrackingMeasurement(const TrackingMeasurement& m1, // Merges new_m to m element by element. void MergeTrackingMeasurements(const TrackingMeasurements& new_m, TrackingMeasurements* m) { - /* CHECK(m != nullptr); */ + CHECK(m != nullptr); if (m->measurements_size() == 0) { *m = new_m; return; } - /* CHECK_EQ(m->measurements_size(), new_m.measurements_size()); */ - /* CHECK_EQ(m->breakdown().generator_id(), new_m.breakdown().generator_id()); */ - /* CHECK_EQ(m->breakdown().shard(), new_m.breakdown().shard()); */ - /* CHECK_EQ(m->breakdown().difficulty_level(), - new_m.breakdown().difficulty_level()); */ + CHECK_EQ(m->measurements_size(), new_m.measurements_size()); + CHECK_EQ(m->breakdown().generator_id(), new_m.breakdown().generator_id()); + CHECK_EQ(m->breakdown().shard(), new_m.breakdown().shard()); + CHECK_EQ(m->breakdown().difficulty_level(), + new_m.breakdown().difficulty_level()); - /* CHECK_EQ(m->measurements_size(), new_m.measurements_size()); */ + CHECK_EQ(m->measurements_size(), new_m.measurements_size()); for (int i = 0, sz = m->measurements_size(); i < sz; ++i) { *m->mutable_measurements(i) = MergeTrackingMeasurement(m->measurements(i), new_m.measurements(i)); @@ -133,7 +133,7 @@ void MergeTrackingMeasurements(const TrackingMeasurements& new_m, void MergeTrackingMeasurementsVector( const std::vector& new_m, std::vector* m) { - /* CHECK(m != nullptr); */ + CHECK(m != nullptr); if (m->empty()) { *m = new_m; return; @@ -141,7 +141,7 @@ void MergeTrackingMeasurementsVector( if (new_m.empty()) { return; } - /* CHECK_EQ(new_m.size(), m->size()); */ + CHECK_EQ(new_m.size(), m->size()); for (int i = 0, sz = m->size(); i < sz; ++i) { MergeTrackingMeasurements(new_m[i], &(*m)[i]); } @@ -196,7 +196,7 @@ std::vector ComputeTrackingMeasurements( // Create one matcher per frame. std::vector> matchers; const int num_frames = pds.size(); - /* CHECK_EQ(num_frames, gts.size()); */ + CHECK_EQ(num_frames, gts.size()); matchers.reserve(num_frames); for (int i = 0; i < num_frames; ++i) { @@ -232,8 +232,8 @@ std::vector ComputeTrackingMeasurements( } // Subsets in every frame must have the same size. - /* CHECK_EQ(num_breakdown_shards, pd_subsets[i].size()); */ - /* CHECK_EQ(num_breakdown_shards, gt_subsets[i].size()); */ + CHECK_EQ(num_breakdown_shards, pd_subsets[i].size()); + CHECK_EQ(num_breakdown_shards, gt_subsets[i].size()); } std::vector measurements; @@ -293,12 +293,12 @@ Config EstimateScoreCutoffs( const Config& config, const std::vector>>& pds, const std::vector>>& gts) { - /* CHECK_EQ(pds.size(), gts.size()); */ + CHECK_EQ(pds.size(), gts.size()); const int num_scenes = pds.size(); if (num_scenes == 0) return {}; Config config_copy(config); if (config.score_cutoffs_size() == 0) { - /* CHECK_GT(config.num_desired_score_cutoffs(), 0); */ + CHECK_GT(config.num_desired_score_cutoffs(), 0); std::vector pd_scores; for (int scene_idx = 0; scene_idx < num_scenes; ++scene_idx) { const int num_frames = pds[scene_idx].size(); diff --git a/waymo_open_dataset/metrics/tracking_metrics.h b/waymo_open_dataset/metrics/tracking_metrics.h index b7c86cd..95a4500 100644 --- a/waymo_open_dataset/metrics/tracking_metrics.h +++ b/waymo_open_dataset/metrics/tracking_metrics.h @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/metrics/tracking_metrics_test.cc b/waymo_open_dataset/metrics/tracking_metrics_test.cc index 22208da..fc26637 100644 --- a/waymo_open_dataset/metrics/tracking_metrics_test.cc +++ b/waymo_open_dataset/metrics/tracking_metrics_test.cc @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/box.proto b/waymo_open_dataset/protos/box.proto index f5a559b..0b0f303 100644 --- a/waymo_open_dataset/protos/box.proto +++ b/waymo_open_dataset/protos/box.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/breakdown.proto b/waymo_open_dataset/protos/breakdown.proto index 890bacb..c78492d 100644 --- a/waymo_open_dataset/protos/breakdown.proto +++ b/waymo_open_dataset/protos/breakdown.proto @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/camera_segmentation.proto b/waymo_open_dataset/protos/camera_segmentation.proto index acd3971..053937d 100644 --- a/waymo_open_dataset/protos/camera_segmentation.proto +++ b/waymo_open_dataset/protos/camera_segmentation.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/camera_segmentation_metrics.proto b/waymo_open_dataset/protos/camera_segmentation_metrics.proto index 77c6df4..296d573 100644 --- a/waymo_open_dataset/protos/camera_segmentation_metrics.proto +++ b/waymo_open_dataset/protos/camera_segmentation_metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/waymo_open_dataset/protos/camera_segmentation_submission.proto b/waymo_open_dataset/protos/camera_segmentation_submission.proto index aca0f90..8d0c233 100644 --- a/waymo_open_dataset/protos/camera_segmentation_submission.proto +++ b/waymo_open_dataset/protos/camera_segmentation_submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/compressed_lidar.proto b/waymo_open_dataset/protos/compressed_lidar.proto index b8a753e..0b4c1c2 100644 --- a/waymo_open_dataset/protos/compressed_lidar.proto +++ b/waymo_open_dataset/protos/compressed_lidar.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/conversion_config.proto b/waymo_open_dataset/protos/conversion_config.proto index d767b21..f5c0056 100644 --- a/waymo_open_dataset/protos/conversion_config.proto +++ b/waymo_open_dataset/protos/conversion_config.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/keypoint.proto b/waymo_open_dataset/protos/keypoint.proto index 75cdc14..b335981 100644 --- a/waymo_open_dataset/protos/keypoint.proto +++ b/waymo_open_dataset/protos/keypoint.proto @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/keypoints_metrics.proto b/waymo_open_dataset/protos/keypoints_metrics.proto index 00eba62..4e19b58 100644 --- a/waymo_open_dataset/protos/keypoints_metrics.proto +++ b/waymo_open_dataset/protos/keypoints_metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/keypoints_submission.proto b/waymo_open_dataset/protos/keypoints_submission.proto index b744c9e..bb5a828 100644 --- a/waymo_open_dataset/protos/keypoints_submission.proto +++ b/waymo_open_dataset/protos/keypoints_submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/map.proto b/waymo_open_dataset/protos/map.proto index 5067e0e..0e93fb3 100644 --- a/waymo_open_dataset/protos/map.proto +++ b/waymo_open_dataset/protos/map.proto @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/metrics.proto b/waymo_open_dataset/protos/metrics.proto index 592ae6e..7e18d32 100644 --- a/waymo_open_dataset/protos/metrics.proto +++ b/waymo_open_dataset/protos/metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/waymo_open_dataset/protos/motion_metrics.proto b/waymo_open_dataset/protos/motion_metrics.proto index ac9f356..bdfd78f 100644 --- a/waymo_open_dataset/protos/motion_metrics.proto +++ b/waymo_open_dataset/protos/motion_metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/motion_submission.proto b/waymo_open_dataset/protos/motion_submission.proto index 51f544f..c9d8458 100644 --- a/waymo_open_dataset/protos/motion_submission.proto +++ b/waymo_open_dataset/protos/motion_submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/occupancy_flow_metrics.proto b/waymo_open_dataset/protos/occupancy_flow_metrics.proto index 704f0d2..711286b 100644 --- a/waymo_open_dataset/protos/occupancy_flow_metrics.proto +++ b/waymo_open_dataset/protos/occupancy_flow_metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/occupancy_flow_submission.proto b/waymo_open_dataset/protos/occupancy_flow_submission.proto index 72b672e..18acf9e 100644 --- a/waymo_open_dataset/protos/occupancy_flow_submission.proto +++ b/waymo_open_dataset/protos/occupancy_flow_submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/scenario.proto b/waymo_open_dataset/protos/scenario.proto index 608bc0f..a80dd4f 100644 --- a/waymo_open_dataset/protos/scenario.proto +++ b/waymo_open_dataset/protos/scenario.proto @@ -1,4 +1,4 @@ -/* Copyright 2021 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2021 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/segmentation.proto b/waymo_open_dataset/protos/segmentation.proto index 33fbc66..67635ff 100644 --- a/waymo_open_dataset/protos/segmentation.proto +++ b/waymo_open_dataset/protos/segmentation.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/segmentation_metrics.proto b/waymo_open_dataset/protos/segmentation_metrics.proto index aed33c0..1e48f60 100644 --- a/waymo_open_dataset/protos/segmentation_metrics.proto +++ b/waymo_open_dataset/protos/segmentation_metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/waymo_open_dataset/protos/segmentation_submission.proto b/waymo_open_dataset/protos/segmentation_submission.proto index e494338..2d5b406 100644 --- a/waymo_open_dataset/protos/segmentation_submission.proto +++ b/waymo_open_dataset/protos/segmentation_submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2022 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/sim_agents_metrics.proto b/waymo_open_dataset/protos/sim_agents_metrics.proto index 8e6bcfe..8ac68b4 100644 --- a/waymo_open_dataset/protos/sim_agents_metrics.proto +++ b/waymo_open_dataset/protos/sim_agents_metrics.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/sim_agents_submission.proto b/waymo_open_dataset/protos/sim_agents_submission.proto index 00e31a3..117773b 100644 --- a/waymo_open_dataset/protos/sim_agents_submission.proto +++ b/waymo_open_dataset/protos/sim_agents_submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/submission.proto b/waymo_open_dataset/protos/submission.proto index 000b155..a63f8da 100644 --- a/waymo_open_dataset/protos/submission.proto +++ b/waymo_open_dataset/protos/submission.proto @@ -1,4 +1,4 @@ -/* Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2019 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/protos/vector.proto b/waymo_open_dataset/protos/vector.proto index d42a5a9..0e70e95 100644 --- a/waymo_open_dataset/protos/vector.proto +++ b/waymo_open_dataset/protos/vector.proto @@ -1,4 +1,4 @@ -/* Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +/* Copyright 2023 The Waymo Open Dataset Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/box_utils.py b/waymo_open_dataset/utils/box_utils.py index c52a67d..3b287a9 100644 --- a/waymo_open_dataset/utils/box_utils.py +++ b/waymo_open_dataset/utils/box_utils.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/box_utils_test.py b/waymo_open_dataset/utils/box_utils_test.py index 1775295..760461e 100644 --- a/waymo_open_dataset/utils/box_utils_test.py +++ b/waymo_open_dataset/utils/box_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/camera_segmentation_utils.py b/waymo_open_dataset/utils/camera_segmentation_utils.py index b0fa7a1..dfd9f76 100644 --- a/waymo_open_dataset/utils/camera_segmentation_utils.py +++ b/waymo_open_dataset/utils/camera_segmentation_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/camera_segmentation_utils_test.py b/waymo_open_dataset/utils/camera_segmentation_utils_test.py index e3d4555..b45d46e 100644 --- a/waymo_open_dataset/utils/camera_segmentation_utils_test.py +++ b/waymo_open_dataset/utils/camera_segmentation_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/compression/delta_encoder.py b/waymo_open_dataset/utils/compression/delta_encoder.py index b2470ef..ab562c2 100644 --- a/waymo_open_dataset/utils/compression/delta_encoder.py +++ b/waymo_open_dataset/utils/compression/delta_encoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/compression/delta_encoder_test.py b/waymo_open_dataset/utils/compression/delta_encoder_test.py index 943f5ae..1b9b5d4 100644 --- a/waymo_open_dataset/utils/compression/delta_encoder_test.py +++ b/waymo_open_dataset/utils/compression/delta_encoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/frame_utils.py b/waymo_open_dataset/utils/frame_utils.py index d565cf6..c973016 100644 --- a/waymo_open_dataset/utils/frame_utils.py +++ b/waymo_open_dataset/utils/frame_utils.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/geometry_utils.py b/waymo_open_dataset/utils/geometry_utils.py index 3af14ca..e6fc19a 100644 --- a/waymo_open_dataset/utils/geometry_utils.py +++ b/waymo_open_dataset/utils/geometry_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/geometry_utils_test.py b/waymo_open_dataset/utils/geometry_utils_test.py index c18e3a2..2ffb7b4 100644 --- a/waymo_open_dataset/utils/geometry_utils_test.py +++ b/waymo_open_dataset/utils/geometry_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/keypoint_data.py b/waymo_open_dataset/utils/keypoint_data.py index e93aab2..29eb282 100644 --- a/waymo_open_dataset/utils/keypoint_data.py +++ b/waymo_open_dataset/utils/keypoint_data.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/keypoint_data_test.py b/waymo_open_dataset/utils/keypoint_data_test.py index 01dcd3c..f34d8bc 100644 --- a/waymo_open_dataset/utils/keypoint_data_test.py +++ b/waymo_open_dataset/utils/keypoint_data_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/keypoint_draw.py b/waymo_open_dataset/utils/keypoint_draw.py index 7cd0dc2..9585f97 100644 --- a/waymo_open_dataset/utils/keypoint_draw.py +++ b/waymo_open_dataset/utils/keypoint_draw.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/keypoint_draw_test.py b/waymo_open_dataset/utils/keypoint_draw_test.py index 0c3b8bb..a641ce1 100644 --- a/waymo_open_dataset/utils/keypoint_draw_test.py +++ b/waymo_open_dataset/utils/keypoint_draw_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/keypoint_test_util.py b/waymo_open_dataset/utils/keypoint_test_util.py index 6ef8ed5..54bc0e9 100644 --- a/waymo_open_dataset/utils/keypoint_test_util.py +++ b/waymo_open_dataset/utils/keypoint_test_util.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_data.py b/waymo_open_dataset/utils/occupancy_flow_data.py index e84606d..42ebcfa 100644 --- a/waymo_open_dataset/utils/occupancy_flow_data.py +++ b/waymo_open_dataset/utils/occupancy_flow_data.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_data_test.py b/waymo_open_dataset/utils/occupancy_flow_data_test.py index 3fa358c..39938a3 100644 --- a/waymo_open_dataset/utils/occupancy_flow_data_test.py +++ b/waymo_open_dataset/utils/occupancy_flow_data_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_grids.py b/waymo_open_dataset/utils/occupancy_flow_grids.py index 92340d1..68915af 100644 --- a/waymo_open_dataset/utils/occupancy_flow_grids.py +++ b/waymo_open_dataset/utils/occupancy_flow_grids.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_grids_test.py b/waymo_open_dataset/utils/occupancy_flow_grids_test.py index 3385e7e..13d47f5 100644 --- a/waymo_open_dataset/utils/occupancy_flow_grids_test.py +++ b/waymo_open_dataset/utils/occupancy_flow_grids_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_metrics.py b/waymo_open_dataset/utils/occupancy_flow_metrics.py index 2682a0d..70802f3 100644 --- a/waymo_open_dataset/utils/occupancy_flow_metrics.py +++ b/waymo_open_dataset/utils/occupancy_flow_metrics.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_metrics_test.py b/waymo_open_dataset/utils/occupancy_flow_metrics_test.py index b5688e3..a85b60e 100644 --- a/waymo_open_dataset/utils/occupancy_flow_metrics_test.py +++ b/waymo_open_dataset/utils/occupancy_flow_metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_renderer.py b/waymo_open_dataset/utils/occupancy_flow_renderer.py index e2c38b4..3ca9b79 100644 --- a/waymo_open_dataset/utils/occupancy_flow_renderer.py +++ b/waymo_open_dataset/utils/occupancy_flow_renderer.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_renderer_test.py b/waymo_open_dataset/utils/occupancy_flow_renderer_test.py index 1d2cb83..4109a72 100644 --- a/waymo_open_dataset/utils/occupancy_flow_renderer_test.py +++ b/waymo_open_dataset/utils/occupancy_flow_renderer_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_test_util.py b/waymo_open_dataset/utils/occupancy_flow_test_util.py index 7265e5a..1ceb3a3 100644 --- a/waymo_open_dataset/utils/occupancy_flow_test_util.py +++ b/waymo_open_dataset/utils/occupancy_flow_test_util.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_test_util_test.py b/waymo_open_dataset/utils/occupancy_flow_test_util_test.py index 7454e0e..06a9fe6 100644 --- a/waymo_open_dataset/utils/occupancy_flow_test_util_test.py +++ b/waymo_open_dataset/utils/occupancy_flow_test_util_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_vis.py b/waymo_open_dataset/utils/occupancy_flow_vis.py index e5edabc..e080b7d 100644 --- a/waymo_open_dataset/utils/occupancy_flow_vis.py +++ b/waymo_open_dataset/utils/occupancy_flow_vis.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/occupancy_flow_vis_test.py b/waymo_open_dataset/utils/occupancy_flow_vis_test.py index 1705940..675d3fc 100644 --- a/waymo_open_dataset/utils/occupancy_flow_vis_test.py +++ b/waymo_open_dataset/utils/occupancy_flow_vis_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2022 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/plot_maps.py b/waymo_open_dataset/utils/plot_maps.py index ddf968c..cd18fd6 100644 --- a/waymo_open_dataset/utils/plot_maps.py +++ b/waymo_open_dataset/utils/plot_maps.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/plot_maps_test.py b/waymo_open_dataset/utils/plot_maps_test.py index 282f889..e696c2c 100644 --- a/waymo_open_dataset/utils/plot_maps_test.py +++ b/waymo_open_dataset/utils/plot_maps_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/range_image_utils.py b/waymo_open_dataset/utils/range_image_utils.py index b1485f8..5edb7f4 100644 --- a/waymo_open_dataset/utils/range_image_utils.py +++ b/waymo_open_dataset/utils/range_image_utils.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/range_image_utils_test.py b/waymo_open_dataset/utils/range_image_utils_test.py index 1eda4e6..3363b5f 100644 --- a/waymo_open_dataset/utils/range_image_utils_test.py +++ b/waymo_open_dataset/utils/range_image_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/sim_agents/converters.py b/waymo_open_dataset/utils/sim_agents/converters.py index 80ea3a4..9db8a04 100644 --- a/waymo_open_dataset/utils/sim_agents/converters.py +++ b/waymo_open_dataset/utils/sim_agents/converters.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/sim_agents/converters_test.py b/waymo_open_dataset/utils/sim_agents/converters_test.py index 46bd44f..f73acdd 100644 --- a/waymo_open_dataset/utils/sim_agents/converters_test.py +++ b/waymo_open_dataset/utils/sim_agents/converters_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/sim_agents/submission_specs.py b/waymo_open_dataset/utils/sim_agents/submission_specs.py index 2639078..f79c99a 100644 --- a/waymo_open_dataset/utils/sim_agents/submission_specs.py +++ b/waymo_open_dataset/utils/sim_agents/submission_specs.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/sim_agents/submission_specs_test.py b/waymo_open_dataset/utils/sim_agents/submission_specs_test.py index 68681a7..86696e1 100644 --- a/waymo_open_dataset/utils/sim_agents/submission_specs_test.py +++ b/waymo_open_dataset/utils/sim_agents/submission_specs_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/sim_agents/test_utils.py b/waymo_open_dataset/utils/sim_agents/test_utils.py index b0dd9a6..256e6e4 100644 --- a/waymo_open_dataset/utils/sim_agents/test_utils.py +++ b/waymo_open_dataset/utils/sim_agents/test_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/sim_agents/visualizations.py b/waymo_open_dataset/utils/sim_agents/visualizations.py index 57a6fcc..c8853e2 100644 --- a/waymo_open_dataset/utils/sim_agents/visualizations.py +++ b/waymo_open_dataset/utils/sim_agents/visualizations.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/test_utils.py b/waymo_open_dataset/utils/test_utils.py index deb55a9..04820d1 100644 --- a/waymo_open_dataset/utils/test_utils.py +++ b/waymo_open_dataset/utils/test_utils.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/trajectory_utils.py b/waymo_open_dataset/utils/trajectory_utils.py index d0db6f1..63b7391 100644 --- a/waymo_open_dataset/utils/trajectory_utils.py +++ b/waymo_open_dataset/utils/trajectory_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/trajectory_utils_test.py b/waymo_open_dataset/utils/trajectory_utils_test.py index 26697a2..be91ac8 100644 --- a/waymo_open_dataset/utils/trajectory_utils_test.py +++ b/waymo_open_dataset/utils/trajectory_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/transform_utils.py b/waymo_open_dataset/utils/transform_utils.py index 696ee32..f965b24 100644 --- a/waymo_open_dataset/utils/transform_utils.py +++ b/waymo_open_dataset/utils/transform_utils.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/transform_utils_test.py b/waymo_open_dataset/utils/transform_utils_test.py index bc157b0..c5538fd 100644 --- a/waymo_open_dataset/utils/transform_utils_test.py +++ b/waymo_open_dataset/utils/transform_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2019 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/womd_lidar_utils.py b/waymo_open_dataset/utils/womd_lidar_utils.py index b819049..ab06074 100644 --- a/waymo_open_dataset/utils/womd_lidar_utils.py +++ b/waymo_open_dataset/utils/womd_lidar_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/utils/womd_lidar_utils_test.py b/waymo_open_dataset/utils/womd_lidar_utils_test.py index e09479e..5ed1b81 100644 --- a/waymo_open_dataset/utils/womd_lidar_utils_test.py +++ b/waymo_open_dataset/utils/womd_lidar_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -85,8 +85,8 @@ def test_extract_top_lidar_points(self): _get_point_xyz_and_feature_from_laser(frame_lasers, True)) self.assertAllEqual(points_xyz_ri1.shape, tf.TensorShape([138378, 3])) self.assertAllEqual(points_xyz_ri2.shape, tf.TensorShape([6532, 3])) - self.assertShapeEqual(points_xyz_ri1, points_feature_ri1) - self.assertShapeEqual(points_xyz_ri2, points_feature_ri2) + self.assertAllEqual(points_xyz_ri1.shape, points_feature_ri1.shape) + self.assertAllEqual(points_xyz_ri2.shape, points_feature_ri2.shape) def test_extract_side_lidar_points(self): """Test of extract_side_lidar_points.""" @@ -99,9 +99,8 @@ def test_extract_side_lidar_points(self): _get_point_xyz_and_feature_from_laser(frame_lasers, False)) self.assertAllEqual(points_xyz_ri1.shape, tf.TensorShape([3911, 3])) self.assertAllEqual(points_xyz_ri2.shape, tf.TensorShape([60, 3])) - self.assertShapeEqual(points_xyz_ri1, points_feature_ri1) - self.assertShapeEqual(points_xyz_ri2, points_feature_ri2) - + self.assertAllEqual(points_xyz_ri1.shape, points_feature_ri1.shape) + self.assertAllEqual(points_xyz_ri2.shape, points_feature_ri2.shape) if __name__ == '__main__': tf.test.main() diff --git a/waymo_open_dataset/v2/__init__.py b/waymo_open_dataset/v2/__init__.py index 0a46c3a..420ce09 100644 --- a/waymo_open_dataset/v2/__init__.py +++ b/waymo_open_dataset/v2/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/column_types.py b/waymo_open_dataset/v2/column_types.py index 3d35ff1..74d46db 100644 --- a/waymo_open_dataset/v2/column_types.py +++ b/waymo_open_dataset/v2/column_types.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/component.py b/waymo_open_dataset/v2/component.py index 6734113..4cc7148 100644 --- a/waymo_open_dataset/v2/component.py +++ b/waymo_open_dataset/v2/component.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/component_test.py b/waymo_open_dataset/v2/component_test.py index fcc2c9a..654b04a 100644 --- a/waymo_open_dataset/v2/component_test.py +++ b/waymo_open_dataset/v2/component_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/dataframe_utils.py b/waymo_open_dataset/v2/dataframe_utils.py index 2027d74..00b0bf7 100644 --- a/waymo_open_dataset/v2/dataframe_utils.py +++ b/waymo_open_dataset/v2/dataframe_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/dataframe_utils_test.py b/waymo_open_dataset/v2/dataframe_utils_test.py index ad2e40a..411bae3 100644 --- a/waymo_open_dataset/v2/dataframe_utils_test.py +++ b/waymo_open_dataset/v2/dataframe_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/base.py b/waymo_open_dataset/v2/perception/base.py index e570778..f0a8f69 100644 --- a/waymo_open_dataset/v2/perception/base.py +++ b/waymo_open_dataset/v2/perception/base.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/box.py b/waymo_open_dataset/v2/perception/box.py index 39242e4..7f41f9d 100644 --- a/waymo_open_dataset/v2/perception/box.py +++ b/waymo_open_dataset/v2/perception/box.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/box_test.py b/waymo_open_dataset/v2/perception/box_test.py index 91172c5..c9ac649 100644 --- a/waymo_open_dataset/v2/perception/box_test.py +++ b/waymo_open_dataset/v2/perception/box_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/camera_image.py b/waymo_open_dataset/v2/perception/camera_image.py index 1a95c4f..0feb90a 100644 --- a/waymo_open_dataset/v2/perception/camera_image.py +++ b/waymo_open_dataset/v2/perception/camera_image.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/camera_image_test.py b/waymo_open_dataset/v2/perception/camera_image_test.py index 8bf6359..41bb81a 100644 --- a/waymo_open_dataset/v2/perception/camera_image_test.py +++ b/waymo_open_dataset/v2/perception/camera_image_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/box.py b/waymo_open_dataset/v2/perception/compat_v1/box.py index 79fbb6a..6e3e058 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/box.py +++ b/waymo_open_dataset/v2/perception/compat_v1/box.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/box_test.py b/waymo_open_dataset/v2/perception/compat_v1/box_test.py index 1979f75..3ffe574 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/box_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/box_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/camera_image.py b/waymo_open_dataset/v2/perception/compat_v1/camera_image.py index 3382c69..4d7eb26 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/camera_image.py +++ b/waymo_open_dataset/v2/perception/compat_v1/camera_image.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/camera_image_test.py b/waymo_open_dataset/v2/perception/compat_v1/camera_image_test.py index 66a9cdb..fa44d9d 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/camera_image_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/camera_image_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/context.py b/waymo_open_dataset/v2/perception/compat_v1/context.py index aedb852..b69d946 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/context.py +++ b/waymo_open_dataset/v2/perception/compat_v1/context.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/context_test.py b/waymo_open_dataset/v2/perception/compat_v1/context_test.py index 2684b4a..c8df526 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/context_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/context_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/interfaces.py b/waymo_open_dataset/v2/perception/compat_v1/interfaces.py index 5cd6019..4cc7621 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/interfaces.py +++ b/waymo_open_dataset/v2/perception/compat_v1/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/interfaces_test.py b/waymo_open_dataset/v2/perception/compat_v1/interfaces_test.py index 8a4cc76..f15164c 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/interfaces_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/interfaces_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/keypoints.py b/waymo_open_dataset/v2/perception/compat_v1/keypoints.py index c0471a4..22d380d 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/keypoints.py +++ b/waymo_open_dataset/v2/perception/compat_v1/keypoints.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/keypoints_test.py b/waymo_open_dataset/v2/perception/compat_v1/keypoints_test.py index 78d6c85..9518450 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/keypoints_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/keypoints_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/lidar.py b/waymo_open_dataset/v2/perception/compat_v1/lidar.py index da50ad7..b7ed0d8 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/lidar.py +++ b/waymo_open_dataset/v2/perception/compat_v1/lidar.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/lidar_test.py b/waymo_open_dataset/v2/perception/compat_v1/lidar_test.py index 9666638..399ffe2 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/lidar_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/lidar_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/pose.py b/waymo_open_dataset/v2/perception/compat_v1/pose.py index 3ee51da..b9bccab 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/pose.py +++ b/waymo_open_dataset/v2/perception/compat_v1/pose.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/pose_test.py b/waymo_open_dataset/v2/perception/compat_v1/pose_test.py index 00193ff..0447552 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/pose_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/pose_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/segmentation.py b/waymo_open_dataset/v2/perception/compat_v1/segmentation.py index 8dd3d54..adfa04a 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/segmentation.py +++ b/waymo_open_dataset/v2/perception/compat_v1/segmentation.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/compat_v1/segmentation_test.py b/waymo_open_dataset/v2/perception/compat_v1/segmentation_test.py index f5c93e6..72a70c9 100644 --- a/waymo_open_dataset/v2/perception/compat_v1/segmentation_test.py +++ b/waymo_open_dataset/v2/perception/compat_v1/segmentation_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/context.py b/waymo_open_dataset/v2/perception/context.py index 3db8c3c..d81f6a4 100644 --- a/waymo_open_dataset/v2/perception/context.py +++ b/waymo_open_dataset/v2/perception/context.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/context_test.py b/waymo_open_dataset/v2/perception/context_test.py index f6748bf..bf83e89 100644 --- a/waymo_open_dataset/v2/perception/context_test.py +++ b/waymo_open_dataset/v2/perception/context_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/keypoints.py b/waymo_open_dataset/v2/perception/keypoints.py index bb32a68..a9cdd74 100644 --- a/waymo_open_dataset/v2/perception/keypoints.py +++ b/waymo_open_dataset/v2/perception/keypoints.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/keypoints_test.py b/waymo_open_dataset/v2/perception/keypoints_test.py index 29abb02..0b7325f 100644 --- a/waymo_open_dataset/v2/perception/keypoints_test.py +++ b/waymo_open_dataset/v2/perception/keypoints_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/lidar.py b/waymo_open_dataset/v2/perception/lidar.py index 8822e83..2d91558 100644 --- a/waymo_open_dataset/v2/perception/lidar.py +++ b/waymo_open_dataset/v2/perception/lidar.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/lidar_test.py b/waymo_open_dataset/v2/perception/lidar_test.py index a769757..8a75229 100644 --- a/waymo_open_dataset/v2/perception/lidar_test.py +++ b/waymo_open_dataset/v2/perception/lidar_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/pose.py b/waymo_open_dataset/v2/perception/pose.py index c5a9228..3de7589 100644 --- a/waymo_open_dataset/v2/perception/pose.py +++ b/waymo_open_dataset/v2/perception/pose.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/pose_test.py b/waymo_open_dataset/v2/perception/pose_test.py index a666958..8623010 100644 --- a/waymo_open_dataset/v2/perception/pose_test.py +++ b/waymo_open_dataset/v2/perception/pose_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/segmentation.py b/waymo_open_dataset/v2/perception/segmentation.py index 99c2f91..f86fb7b 100644 --- a/waymo_open_dataset/v2/perception/segmentation.py +++ b/waymo_open_dataset/v2/perception/segmentation.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/segmentation_test.py b/waymo_open_dataset/v2/perception/segmentation_test.py index 8e70b72..be199e3 100644 --- a/waymo_open_dataset/v2/perception/segmentation_test.py +++ b/waymo_open_dataset/v2/perception/segmentation_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/utils/lidar_utils.py b/waymo_open_dataset/v2/perception/utils/lidar_utils.py index e9729ed..2213187 100644 --- a/waymo_open_dataset/v2/perception/utils/lidar_utils.py +++ b/waymo_open_dataset/v2/perception/utils/lidar_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/perception/utils/lidar_utils_test.py b/waymo_open_dataset/v2/perception/utils/lidar_utils_test.py index 5164e16..ff616fa 100644 --- a/waymo_open_dataset/v2/perception/utils/lidar_utils_test.py +++ b/waymo_open_dataset/v2/perception/utils/lidar_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/typing_utils.py b/waymo_open_dataset/v2/typing_utils.py index d127949..d0728be 100644 --- a/waymo_open_dataset/v2/typing_utils.py +++ b/waymo_open_dataset/v2/typing_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/waymo_open_dataset/v2/typing_utils_test.py b/waymo_open_dataset/v2/typing_utils_test.py index b177c8b..c6e3019 100644 --- a/waymo_open_dataset/v2/typing_utils_test.py +++ b/waymo_open_dataset/v2/typing_utils_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The Waymo Open Dataset Authors. All Rights Reserved. +# Copyright 2023 The Waymo Open Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.