nerfmm
nerfmm copied to clipboard
`nerfmm/spiral.py` bug if trained with colmap initialized pose
Hi,
Thanks for you great work!
One bug I have encountered here is if train with:
--start_refine_pose_epoch 1000
--start_refine_focal_epoch 1000
There will be a field named init_c2ws
in the models state dict of LearnPose
.
However if use spiral for inference, the default action is to initialize a LearnPose with self.init_c2ws as None, which leads to Unexpected key(s) in state_dict: "init_c2w".
when load it in spiral.py
.
Maybe this can be fixed by add a arg that controlls whether the R, t in LearnPose is learnt from scratch or the offset from COLMAP ones in nerfmm/spiral.py
Hi @SuX97,
Thanks for pointing this out. I'll have a look and fix this later.
Best, Zirui
Hi @SuX97,
Just found a quick fix for now, you can simply add an arg strict=False
in spiral.py L179, it should look like this:
pose_param_net = load_ckpt_to_net(os.path.join(args.ckpt_dir, 'latest_pose.pth'), pose_param_net, map_location=my_devices, strict=False)
Best, Zirui
Thanks for you great work! It says in the code,the poses from Colmap are in different Spaces. How to convert colmap pose to standard NERF Thanks!
Hi @cugwzl ,
You can use a Sim(3) transformation to align two trajectories in two spaces. ATE toolbox has this function built in.
Thanks for you great work! It says in the code,the poses from Colmap are in different Spaces. How to convert colmap pose to standard NERF Thanks!
May I ask whether it has been solved,
We didn't fix the bug in this issue yet. About converting colmap pose to nerf, just use ATE toolbox with Sim(3)
Thank you for your good work and your quick reply
We didn't fix the bug in this issue yet. About converting colmap pose to nerf, just use ATE toolbox with Sim(3)
and i wonder whether the learned camera pose space is different from the COLMAP estimated camera pose space when visualising estimated poses in 3d, or just different in computing image quality metrics, thank you!
We didn't fix the bug in this issue yet. About converting colmap pose to nerf, just use ATE toolbox with Sim(3)
I don't understand the question. There is a quick fix above for the bug in this issue.