Skip to content

Commit

Permalink
Merged commit includes the following changes:
Browse files Browse the repository at this point in the history
557327568  by Waymo Research:

    Update version of the rules_python blaze rules to use py_binary targets.

--
555668128  by Waymo Research:

    Expose data loading examples from GCP bucket

--
554969726  by Waymo Research:

    Add support for different types of filtered aligned types

--
554910323  by Waymo Research:

    Internal change.

--
554784143  by Waymo Research:

    Internal Code Change

--
554488132  by Waymo Research:

    Fix typo in docstring (description of wosac attribute shape)

--

PiperOrigin-RevId: 557327568
  • Loading branch information
Waymo Research authored and Alexander Gorban committed Aug 16, 2023
1 parent 0f661b7 commit 1fd8cf4
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 64 deletions.
10 changes: 7 additions & 3 deletions src/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ bind(
actual = "@six_archive//:six",
)

SHA = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841"

VERSION = "0.23.1"

http_archive(
name = "rules_python",
sha256 = "ffc7b877c95413c82bfd5482c017edcf759a6250d8b24e82f41f3c8b8d9e287e",
strip_prefix = "rules_python-0.19.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.19.0/rules_python-0.19.0.tar.gz",
sha256 = SHA,
strip_prefix = "rules_python-0.23.1".format(VERSION),
url = "https://github.com/bazelbuild/rules_python/releases/download/{}/rules_python-{}.tar.gz".format(VERSION, VERSION),
)

http_archive(
Expand Down
1 change: 1 addition & 0 deletions src/waymo_open_dataset/latency/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:py_binary.bzl", "py_binary")
load("@wod_deps//:requirements.bzl", "requirement")

package(
Expand Down
29 changes: 26 additions & 3 deletions src/waymo_open_dataset/metrics/iou.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ Label::Box AlignedPredictionBox(
aligned_prediction_box.set_center_x(ground_truth_box.center_x());
aligned_prediction_box.set_center_y(ground_truth_box.center_y());
break;
case Config::LongitudinalErrorTolerantConfig::
TYPE_ANY_CLOSER_ONLY_RANGE_ALIGNED:
case Config::LongitudinalErrorTolerantConfig::
TYPE_FURTHER_ONLY_RANGE_ALIGNED:
case Config::LongitudinalErrorTolerantConfig::
TYPE_BETWEEN_ORIGIN_AND_GT_ONLY_RANGE_ALIGNED:
case Config::LongitudinalErrorTolerantConfig::TYPE_RANGE_ALIGNED: {
// To move the prediction box's center along the line of sight so that
// it has the closest distance to the ground truth box's center, the
Expand All @@ -311,12 +317,29 @@ Label::Box AlignedPredictionBox(
const double pd_range_sq =
std::max(CenterVectorLengthSquare(prediction_box), kEpsilon);
const double range_multiplier = gt_dot_pd / pd_range_sq;
double clamped_multiplier = range_multiplier;
if (align_type == Config::LongitudinalErrorTolerantConfig::
TYPE_FURTHER_ONLY_RANGE_ALIGNED) {
clamped_multiplier = range_multiplier < 1.0 && range_multiplier >= 0.0
? range_multiplier
: 1.0;
} else if (align_type == Config::LongitudinalErrorTolerantConfig::
TYPE_ANY_CLOSER_ONLY_RANGE_ALIGNED) {
clamped_multiplier = range_multiplier < 1.0 && range_multiplier >= 0.0
? 1.0
: range_multiplier;
} else if (align_type ==
Config::LongitudinalErrorTolerantConfig::
TYPE_BETWEEN_ORIGIN_AND_GT_ONLY_RANGE_ALIGNED) {
clamped_multiplier = std::max(range_multiplier, 1.0);
}

aligned_prediction_box.set_center_x(prediction_box.center_x() *
range_multiplier);
clamped_multiplier);
aligned_prediction_box.set_center_y(prediction_box.center_y() *
range_multiplier);
clamped_multiplier);
aligned_prediction_box.set_center_z(prediction_box.center_z() *
range_multiplier);
clamped_multiplier);
break;
}
case Config::LongitudinalErrorTolerantConfig::TYPE_UNKNOWN:
Expand Down
Loading

0 comments on commit 1fd8cf4

Please sign in to comment.