SfmLearner-Pytorch icon indicating copy to clipboard operation
SfmLearner-Pytorch copied to clipboard

Weird results from pretrained model on KITTI images

Open a961009 opened this issue 3 years ago • 4 comments

Thanks for the PyTorch codes! When I use the pretrained model (https://drive.google.com/drive/folders/1H1AFqSS8wr_YzwG2xWwAQHTfXN5Moxmx) to inference disp and depth on Kitti images, the disp and the depth result looks weird. The disp and the depth change very sharply. The main part of the disp is either 255 or 0, with almost no intermediate value. 2011_09_26_drive_0011_sync_03-0000000000_disp 0000000000 2011_09_26_drive_0011_sync_03-0000000000_depth

a961009 avatar Mar 05 '22 08:03 a961009

Here are more results at different scenes 2011_09_26_drive_0001_sync_02-0000000039_displayImage 2011_09_26_drive_0009_sync_02-0000000375_displayImage 2011_09_26_drive_0015_sync_02-0000000266_displayImage

a961009 avatar Mar 05 '22 08:03 a961009

https://github.com/ClementPinard/SfmLearner-Pytorch/blob/c2374d50f816e976c6889eb5e07198749d953bc6/run_inference.py#L66 should be tensor_img = ((tensor_img/255 - 0.5)/0.5).to(device)

a961009 avatar Mar 05 '22 09:03 a961009

Hi, see #125 as to why we don't divide by 255.

You results are indeed a bit weird. I'll try to reproduce the results to see if something is wrong, will keep you updated.

ClementPinard avatar Mar 05 '22 21:03 ClementPinard

Thanks for your quick reply. After dividing by 255, the results become reasonable as mentioned in original paper. I'll keep you updated, when i find something.

a961009 avatar Mar 06 '22 02:03 a961009