ayushjain1144 / odin

Code for the paper: "ODIN: A Single Model for 2D and 3D Segmentation" (CVPR 2024)
https://odin-seg.github.io
MIT License
125 stars 10 forks source link

Script of generating the RGB-D point cloud using the sequences of RGB-D images #2

Closed ZCMax closed 6 months ago

ZCMax commented 7 months ago

Thanks for your code release, I want to know whether can I obtain the script of generating the RGB-D point cloud using RGB-D images for ScanNet

ayushjain1144 commented 7 months ago

Hi, it happens in the data loader, you can refer to the relevant part of the code here: https://github.com/ayushjain1144/odin/blob/main/odin/data_video/dataset_mapper_scannet.py#L264-L269

ZCMax commented 6 months ago

Thanks for your answer, another question is that for the scannet intrinsic matrix. I see that your code has provided the intrinsic matrix for scannet data:

def get_scannet_intrinsic(image_size, intrinsic_file=None):
    scannet_intrinsic = np.array([[577.871,   0.       , 319.5, 0.],
                                  [  0.       , 577.871, 239.5, 0.],
                                  [  0.       ,   0.       ,   1., 0. ],
                                  [0., 0., 0., 1.0]
                                ])
    scannet_intrinsic[0] /= 480 / image_size[0]
    scannet_intrinsic[1] /= 640 / image_size[1]
    return scannet_intrinsic

It's a little diffferent from the original scannet depth intrinsic matrix:

575.491882 0.000000 321.158966 0.000000
0.000000 578.235840 242.023804 0.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000000 1.000000

May I know the reasons behind the difference?

ZCMax commented 6 months ago

Besides, I didn't find any inference script in the repo, only training script found. May I know when will the inference script be released? Thanks so much!

ayushjain1144 commented 6 months ago

Hi, I don't remember exactly where I took this intrinsics from, but it was from some prior codebase I believe. Feel free to use the different intrinsics, I don't think they would make any difference (but let me know if they do make a difference!)

For evaluation, you basically need to add --eval-only flag (and use the right checkpoints as referenced in the readme). let me know if the readme is unclear/confusing in some aspect.