-
Notifications
You must be signed in to change notification settings - Fork 696
Description
Hi,
I found a potential mistake in the evaluation code for the tracking task, it would be nice if you could double-check it.
Problem description
When loading tracks for evaluation, for each track (both from GT and prediction), the code does an automatic linear interpolation to fill the missing boxes. It uses the right ratio to define the weight of the right box for interpolation. The right ratio is proportional to the time difference between the interpolated box and the right box.
However, as shown in this function, the larger the right ratio is, the closer the interpolated box is to the right box, both location-wise and geometrically. This probably means the larger the time difference between the interpolated box and the right box is, the closer the interpolated tracking box is to the right box, which I find quite problematic.
In the extreme opposite case, where the interpolated timestamp is very close to the right timestamp, the right ratio would approach zero, which means the interpolated box almost overlaps with the left box, instead of the right one. This seems quite counter-intuitive to me because I think if the interpolated box is temporally closer to the right box, it should also be spatially closer.
Example proof
We take the extreme case mentioned above, where the time to be interpolated is rightmost. From right_ratio = float(right_timestamp - timestamp) / (right_timestamp - left_timestamp) ,
we can see that if timestamp == right_timestamp, then right_ratio = float(0) / (right_timestamp - left_timestamp) = 0.
From
- tracking_box = interpolate_tracking_boxes(left_tracking_box, right_tracking_box, right_ratio)
- translation=interp_list(left_box.translation, right_box.translation, right_ratio), size=interp_list(left_box.size, right_box.size, right_ratio)
- def interp_list(left, right, rratio): return tuple( (1.0 - rratio) * np.array(left, dtype=float) + rratio * np.array(right, dtype=float) )
We see that if right_ratio == 0 == rratio, the interpolated box would be the left box, instead of the right one. As the returned variable is tuple((1.0 - 0) * np.array(left, dtype=float) + 0 * np.array(right, dtype=float)) which simplifies to: tuple(np.array(left, dtype=float)).