lmb-freiburg / flownet2

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks

Home Page:https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

High error rate for KITTI 2015 Training dataset

Diksha-Moolchandani opened this issue · comments

I ran the flownet2-kitti model provided in the repo. The dataset used was KITTI 2015 training dataset with left images in the image_2/ folder, right images in the image_3/ folder, and the ground truth disparity in the disp_occ_0/ folder. I have modified run-flownet-many.py with the Kitti dataloader.

I am getting an average error of 0.59 (averaged across the 200 images in the dataset).

The error is calculated using compareDisp(ground_truth, blob). This function is called after line 98 in run-flownet.py.
The function is described below.

def compareDisp(disp_L, flow):

disp = flow[:,:,0:1]
[height, width, channel] = flow.shape
disp = np.absolute(np.reshape(disp, (height, width)))
gt = disp_L
disp = torch.tensor(disp)
disp = torch.unsqueeze(disp,0)
mask = gt > 0
errmap = torch.abs(disp - gt)
err3 = ((errmap[mask] > 3.) & (errmap[mask] / gt[mask] > 0.05)).sum()
print((err3.float() / mask.sum().float()).item())
return (err3.float() / mask.sum().float()).item()

The error seems very large. Can anyone help me with this? Similar function is used in ISM algorithm (MICRO paper) and AnyNet code
I can share the modified python file, if needed.

If I read this correctly, the error is measured in pixels, right? 0.59 isn't a large pixel error, in fact it's probably very good, considering the fact that FlowNet2 is not specialized for disparity.
Did you check the results visually, e.g. by warping the right image onto the left and looking at the difference to the original left image?