Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the problem when i test on kitti ? #17

Closed
slz929 opened this issue Nov 23, 2020 · 3 comments
Closed

what is the problem when i test on kitti ? #17

slz929 opened this issue Nov 23, 2020 · 3 comments

Comments

@slz929
Copy link

slz929 commented Nov 23, 2020

I use the example script for kitti dataset test.
Depth image is from the kitti stereo 2015 dataset ground truth (disparity image not the depth) and corresponding to the rgb image.
I set the camera parameters unchanged, and the depth caculation from disparity as below:

        depth_image= depth_image.astype(np.float32)
        row= depth_image.shape[0]
        col= depth_image.shape[1]
        depth_image= np.true_divide(np.ones((row,col)), depth_image)
        depth_image= depth_image * 721.5377* 0.537 * 256.0 

        normal = sne_model(torch.tensor(depth_image.astype(np.float32)), camParam

This is the example depth:
image
The example result:
image

My disparity image:
image
And my result:( It looks not smooth and filled with noise)
image

I wonder what dose the upper half green part of the result mean?

but the result normal map is not good as example, would you please help me ?

@hlwang1124
Copy link
Owner

Hi, @slz929 . Thank you for your attention.
Following your description, I used 000005_10 in the kitti stereo 2015 testing set. The corresponding disparity image is generated by GANet. I also added your code into run_example.py. The results are shown as follows.

The disparity image:
000005_10
The normal result:
normal
The freespace segmentation result:
prob_map

These results are ok for me. Grateful if you can provide your images to help me further check this problem.
Moreover, the upper half part is green in the normal image because we set the depth of this area (above the camera) as 0. The corresponding code is Line 22 & 23 in sne_model.py. It's ok for freespace segmentation, since they are generally below the camera.

@slz929
Copy link
Author

slz929 commented Nov 26, 2020

@hlwang1124 Thanks for your detailed anwser. I like your work.
I re-check my code, My depth is predicted from one CNN and the other is also the same as yours. I found I made a stupid mistake which I read depth image as rgb image and read rgb image as depth image, so that the result normal is noisy like above. Sorry...
But when I am debugging, I also find it is important to read the depth by RIGHT cv2.imread MODE:

depth_image = cv2.imread(depth_path, cv2.IMREAD_UNCHANGED)

will get uint16 and single channel disparity image.
Thanks for helping me analyse and solve. Hope your consistent great work.

@hlwang1124
Copy link
Owner

Hi, @slz929 . Glad to hear that you have solved it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants