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

Transformation between opf geographic coordinates and nerfstudio coordinates #13

Open
Wjppppp opened this issue Dec 3, 2024 · 2 comments · May be fixed by #14
Open

Transformation between opf geographic coordinates and nerfstudio coordinates #13

Wjppppp opened this issue Dec 3, 2024 · 2 comments · May be fixed by #14
Assignees

Comments

@Wjppppp
Copy link

Wjppppp commented Dec 3, 2024

Hi,

thank you so much for providing opf conversion tools! This is very helpful.

I used opf2nerf project.opf --out-dir out_dir/ --nerfstudio to convert opf folder to a folder ready-for-use in nerfstudio.

Then I trained the model in nerfstudio, exported the outputs as point clouds with the arguement --save-world-frame. However, I found the exported point cloud's coordinates can not match neither the geographic coordinates nor coordinates in colmap/points3D.txt. I struggled a lot to find the correct transformation.

Then I dive into opf2nerf/converter.py, I found the scale, avg_pos are not written out anywhere.

def rescale_position(

But these two variables are actually needed to convert the point clouds derived out of nerfstudio into geographic coordinates through an inverse transformation like:

geo_position = (nerf_position * scale) + avg_pos

please let me know if I was wrong.

Could you please also improve the tool, enabling to explicitly write out the scale and avg_pos to some place when using opf2nerf --nerfstudio? It would be nice to mention how to correctly use --cam-aabb-size as well.

Thank you!

@pani-vishal
Copy link

Hi there,

The --cam-aabb-size is used to rescale the camera positions so that they are in a 8x8x8 cube. This was done to match the original NeRF experiments on the synthetic datasets which places the cameras on a 4m radius circle. Since the original NeRF implementation models foreground within a fixed length box (please refer here), this ensured compatibility with previous NeRF implementations that we were targeting before nerfstudio.

It seems that nerfstudio doesn't require it anymore.

However, the transformation to get back the geographic coordinates looks correct! To maintain back-compatibility we are working on writing out the scale and avg_pos to help you get back the geographic coordinates :)

@krahenbuhl krahenbuhl linked a pull request Dec 11, 2024 that will close this issue
@krahenbuhl
Copy link
Contributor

#14 should hopefully help with your issue @Wjppppp

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

Successfully merging a pull request may close this issue.

4 participants