facebookresearch / PoseDiffusion

[ICCV 2023] PoseDiffusion: Solving Pose Estimation via Diffusion-aided Bundle Adjustment
Other
718 stars 42 forks source link

about intrinsic #36

Closed wuqun-tju closed 5 months ago

wuqun-tju commented 6 months ago

Hello, Thank you for your excellent work! I wonder if the optical center of intrinsics are fixed as image center like as [width / 2, height / 2]

jytime commented 6 months ago

Hi yes, the principal point is defaulted as the image center. Please note if you are using pixel coordinate, you need to convert them to the normalized coordinate. You can check how to do this in

https://github.com/facebookresearch/PoseDiffusion/blob/41d1cf89dc9fa8bfa134ae511bffcab84094dd83/pose_diffusion/datasets/re10k.py#L267-L275

wuqun-tju commented 6 months ago

Thank you for your quick reply! There is no principal point in the output, so the model only adjust focal_length?

jytime commented 6 months ago

The model only predicts focal_length, and assumes the principal point is the image center (usually this is the truth for daily usage like iphone photos). So you can just use the image center as the principal point in your application.

wuqun-tju commented 6 months ago

Thank you for your reply! If I want to use the fixed principal point and focal_length that are calibrated by chessbord and don't adjust them ine the model , do you have any advice?

jytime commented 6 months ago

Hi you could first try using the predicted rotation and translation with calibrated principal point and focal_length. During GGS, just detach focal_length (remove its gradients) and use the value of your calibrated one. It should not affect too much (but anyway a little).

If you want to have very accurate camera poses, you could try what we have done in vggsfm, where you could optimize camera pose by bundle adjustment with the principal point and focal_length fixed at the same time (you need to assign some flags there).