MICA icon indicating copy to clipboard operation
MICA copied to clipboard

how to calculate median distance?

Open asw91666 opened this issue 1 year ago • 1 comments

Hello!

I have a question regarding the method of calculating the median distance. When computing the median distance, do you perform the np.median() operation along both the vertices axis and the batch axis?

For example, let's say we have pred_vertices with the shape [100,5023,3], and we've identified the corresponding ground truth vertices, which is in the shape of [100,5023,3].

then I can get median distance through this code:

l2_norm = np.sqrt(np.sum((pred_vertices - gt_vertices) ** 2, axis=2)) # [B,5023]
median_distance = np.median(np.median(l2_norm, axis=1), axis=0)

Is that right?

asw91666 avatar Nov 07 '23 06:11 asw91666

I think it is right, as to find the median distance between points in a point cloud, you should calculate the pairwise distances between all points and then find the median of these distances.

May I ask you, how are you going employ median distance?

Zvyozdo4ka avatar Jan 19 '24 09:01 Zvyozdo4ka