Closed kuaiqushangzixiba closed 3 months ago
Hello @kuaiqushangzixiba If you know the camera poses in advance, you can set them with the following: https://github.com/naver/dust3r/blob/517a4301745c650730f65482fb6de9889c0b2db9/dust3r/cloud_opt/optimizer.py#L66 The same can be done with focals and principal points https://github.com/naver/dust3r/blob/517a4301745c650730f65482fb6de9889c0b2db9/dust3r/cloud_opt/optimizer.py#L82 https://github.com/naver/dust3r/blob/517a4301745c650730f65482fb6de9889c0b2db9/dust3r/cloud_opt/optimizer.py#L91
Note that if you only care about having all reconstructions living in the same reference frame, you can get the output camera poses and parameters after processing the first sequence and set them manually for the rest of the reconstructions. Note that setting inaccurate camera poses might hinder the quality of the output in some cases.
Best
https://github.com/naver/dust3r/blob/517a4301745c650730f65482fb6de9889c0b2db9/demo.py#L91 return _convert_scene_output_to_glb(outdir, rgbimg, pts3d, msk, focals, cams2world, as_pointcloud=as_pointcloud, transparent_cams=transparent_cams, cam_size=cam_size)
Thanks a lot! When should I set it up? When you initialize global_aligner, or after get_3D_model_from_scene...
And when I set preset_pose(), I got the following error, I found that the declaration of this method was not defined in the code
AttributeError: 'PointCloudOptimizer' object has no attribute '_get_msk_indices'
A very good job! I have a fixed use of the scene, 4 cameras fixed to shoot an object, but I find that each time the output camera is not in the same position, can you give some prior conditions or modify the code to fix the camera pose?