xingyul/flownet3d

Evaluation for occluded points

hurjunhwa opened this issue · 1 comments

Hi, thanks for the great work!

I have a short question for the evaluation.
Do you evaluate the scene flow for all 3D points? or only non-occluded points?

It seems like it only evaluates the scene flow for non-occluded points by using the mask:

flownet3d/evaluate.py

Lines 105 to 121 in ca2a2cb

def scene_flow_EPE_np(pred, labels, mask):
error = np.sqrt(np.sum((pred - labels)**2, 2) + 1e-20)
gtflow_len = np.sqrt(np.sum(labels*labels, 2) + 1e-20) # B,N
acc1 = np.sum(np.logical_or((error <= 0.05)*mask, (error/gtflow_len <= 0.05)*mask), axis=1)
acc2 = np.sum(np.logical_or((error <= 0.1)*mask, (error/gtflow_len <= 0.1)*mask), axis=1)
mask_sum = np.sum(mask, 1)
acc1 = acc1[mask_sum > 0] / mask_sum[mask_sum > 0]
acc1 = np.mean(acc1)
acc2 = acc2[mask_sum > 0] / mask_sum[mask_sum > 0]
acc2 = np.mean(acc2)
EPE = np.sum(error * mask, 1)[mask_sum > 0] / mask_sum[mask_sum > 0]
EPE = np.mean(EPE)
return EPE, acc1, acc2

It will be appreciated if you can clarify this :)

For the EPE metric, I believe we evaluated it on all points during testing. During training, however, we only train the points that are not occluded. In order to evaluate it on all points, you probably need to slightly change the evaluation code.