Closed MShahzebKhan closed 4 years ago
Hi! Thank you to highlight this issue, the "convert_disps_to_depths_kitti" function is wrong. However, we never use it for the Eigen testing split evaluation (it's a typo from an wrong older version using the KITTI training split). The disparity values are properly scaled in the main.py file (line 236):
disp = cv2.resize(disp[0], (width, height), interpolation=cv2.INTER_LINEAR) * (width/args.width)
and this is the reason why in the eigen condition of the evaluate_kitti.py is not scaled.
@fabiotosi92 I think there is a disparity scalling error in the convert_disps_to_depths_kitti function. After resizing the pred_disp, it should be scaled by dividing it with the pred_disp width before resizing and multiplying with the pred_disp current width. Whereas, in current case it is divided and multiplied by the same width size.
Similarly, the pred_disp variable in evluate_kitty.py in the eigen condition of if statement is not scaled at all after resizing.
`def convert_disps_to_depths_kitti(gt_disparities, pred_disparities, width): gt_depths = [] pred_depths = [] pred_disparities_resized = []
` for t_id in range(num_samples): pred_disparities.append(np.load(os.path.join(args.disp_folder, str(t_id) + '.npy')))