Description
Description
I noticed a potential issue in the calculation of the Chamfer Distance within the codebase. Specifically, the current implementation sums the mean distances rather than taking the average.
Current Implementation
In the current implementation, the Chamfer Distance is calculated as follows:
Issue
The Chamfer Distance is typically defined as the average of the mean distances, not the sum. This is in fact, what is written in the project's documentation:
The current method calculates the sum of the mean distances, thus performing the following computation instead:
(notice the change in the denominators with respect to the original equation)
Proposed Fix
The correct calculation should take the average of these distances:
cham_dist = (np.mean(dists_x_to_y) + np.mean(dists_y_to_x)) / 2