It is possible (in fact, likely) that the metric produces exploding loss near the original position.
Clipping the denominator at a minimum of ~15 degrees and a few hundred meters would resolve.
(Note that the score.py links to a metric that divides the distance by “range” and scales the angle to between 0 and 2, for a well-calibrated normalized range of 0-4.)
@isms I think @_NQ is referring to that you use a relative error. When the angle/distance between the reference and target is small, a very small mistake (for example 1deg rot error) can yield very large error in such cases. It’s a bit problematic, because it seemingly encourages you to make no prediction in such cases to avoid large errors.