Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

598 B
Raw Blame

kornia.metrics.root_mean_squared_disparity_error now has a finite gradient where the prediction matches the target exactly. The derivative of the square root is infinite at a zero error, so an exact match used to get a NaN gradient: every matching pixel under reduction='none', and every pixel of a perfect prediction under 'mean' or 'sum', even where a valid_mask excluded the differing pixels. It now gets 0, as aepe does since #6299. A pixel that valid_mask excludes because its ground truth is NaN or inf also gets a 0 gradient instead of NaN. The value is unchanged.