zju3dv / manhattan_sdf

Code for "Neural 3D Scene Reconstruction with the Manhattan-world Assumption" CVPR 2022 Oral
https://zju3dv.github.io/manhattan_sdf/
Other
491 stars 35 forks source link

Calculate the new intrinsic and pose matrix after resizing image #40

Closed weizhenFrank closed 1 year ago

weizhenFrank commented 1 year ago

Hi, developers. It's an excellent paper and very good code repo. I'm quite new for 3D indoor scene reconstruction, and I have a basic question here.

In your paper, you said, "Images are resized to 640 × 480 for both 2D semantic segmentation and scene reconstruction (4. Implementation details)". I have downloaded the original scannet data, and I found the original image size 1296*968. So I'm wondering how did you get the new intrinsic and pose matrix after resizing the image? I have surveyed a lot on the internet, but I'm still stuck here.

I've compared the intrinsic and pose matrix on the original scannet data and your provided data for the 4 scenes. I found that the intrinsic matrix didn't change. For pose matrix , as it's [R|t], I found only t , translation vector has changed, but I'm confused about why only translation vector t changed.

I would appreciate it a lot if you could help me!

ghy0324 commented 1 year ago

Hi! Thanks for your interest! In short, only intrinsic parameters are required to be changed after resizing images. For example, if you downscale image by factor s, then you need to divide fx, fy, cx, cy by s. Original ScanNet dataset provide intrinsic parameters of both color images and depth images, and they are different. The original depth images are of size 640x480, so our provided intrinsic parameters are same as them. And as you say, the translation vectors are changed, but it’s not because of resizing images. Please refer to this document for the reason.

weizhenFrank commented 1 year ago

Thanks so much! It helped a lot! If I just want to run your code on the other scenes of scannet data, can I directly use the script https://github.com/zju3dv/manhattan_sdf/blob/604944fd37cd8eb9045f4eb8ec4f994269981af4/docs/run_colmap/run.py, to directly get the pre-processed scannet scene data just as your provided 4 scenes https://zjueducn-my.sharepoint.com/:f:/g/personal/guohaoyu_zju_edu_cn/EqYvwsTjlcZIpA8CDlFYhKgBD57le2O_dHvpXF6zPv6Uyg?e=6FeMrC ?

ghy0324 commented 1 year ago

Yes, you can!