cleinc / bts

From Big to Small: Multi-Scale Local Planar Guidance for Monocular Depth Estimation
GNU General Public License v3.0
628 stars 177 forks source link

Question - Output Size for KITTI Bechmark #70

Open csBob123 opened 4 years ago

csBob123 commented 4 years ago

Hi,

I am following your work and thank you very much for your code. I found your code outputs a depth image with the same image size 3521216, but the problem is that if you want to submit your result to KITTI benchmark, you need to keep the same size with the original image(unusually 375 1242 or xx).

Could I get the code for this operation or know how to solve this problem?

Many thanks

cogaplex-bts commented 4 years ago

@csBob123 Hello. In pytorch/bts_eval.py, there are lines to deal with it:

if args.do_kb_crop: height, width = gt_depth.shape top_margin = int(height - 352) left_margin = int((width - 1216) / 2) pred_depth_uncropped = np.zeros((height, width), dtype=np.float32) pred_depth_uncropped[top_margin:top_margin + 352, left_margin:left_margin + 1216] = pred_depth pred_depth = pred_depth_uncropped

Owen-Liuyuxuan commented 4 years ago

In KITTI benchmark, the provided test images have been cropped to 352 x 1216.