DECA
DECA copied to clipboard
Calculate median distance
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?