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

Point Cloud generation with the KITTI dataset #50

Open
roa0762 opened this issue Sep 5, 2022 · 1 comment
Open

Point Cloud generation with the KITTI dataset #50

roa0762 opened this issue Sep 5, 2022 · 1 comment

Comments

@roa0762
Copy link

roa0762 commented Sep 5, 2022

Hi Zhenyu,

the point cloud generation script
https://github.com/zhyever/Monocular-Depth-Estimation-Toolbox/blob/main/tools/misc/visualize_point-cloud.py

seems to be specific for the NYU dataset. It would be great to have the script also for the KITTI dataset.
I have mananged to adapt it to the KITTI dataset with the following changes:

    h, w = 375 - 23, 1242 - 26
    fx = 721.5377
    fy = 721.5377
    cx = 609.5593
    cy = 172.854

    img_tensor = torch.tensor(img[11:375-12, 13:1242-13, :], dtype=torch.uint8)  #NOT sure here whether 11:375 - 12 or 12:375 - 11

One also needs an eval_pipeline for KITTI in

https://github.com/zhyever/Monocular-Depth-Estimation-Toolbox/blob/main/configs/_base_/datasets/kitti.py

I have choses the following one:

eval_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadKITTICamIntrinsic'),
dict(type='KBCrop', depth=False),
dict(type='RandomFlip', prob=0.0), # set to zero
dict(type='Normalize', **img_norm_cfg),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect',
keys=['img'],
meta_keys=('filename', 'ori_filename', 'ori_shape',
'img_shape', 'pad_shape', 'scale_factor',
'flip', 'flip_direction', 'img_norm_cfg',
'cam_intrinsic')),
]

It would be great if you could check my adaptation and include them on main. Thank you very much.

@zhyever
Copy link
Owner

zhyever commented Sep 8, 2022

Thanks a lot for your contributions. I will consider it carefully and enhance this toolbox! To be honest, it is interesting to visualize the depth results, which makes the model training not only evaluation numbers.

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