yfeng95 / DECA

DECA: Detailed Expression Capture and Animation (SIGGRAPH 2021)
Other
2.06k stars 417 forks source link

Calculate median distance #206

Open asw91666 opened 7 months ago

asw91666 commented 7 months ago

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?