facebookresearch / PoseDiffusion

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

About the guidance gradient during the reversing process #31

Closed songlin closed 11 months ago

songlin commented 11 months ago

Hello, Thanks for the great work and sharing the code. I have a question related to the gradient $\nabla_{x_t}logp(I|x_t)$, which appears in the Fig.3 and Eqn 8. From the text of the paper, this gradient should be added to the predicted mean during reversing process. However, from the code, it seems replaces the predicted mean $\mu$.

https://github.com/facebookresearch/PoseDiffusion/blob/1664194a2e9b021f38459aa0bd1b49b8f5045fa4/pose_diffusion/models/gaussian_diffuser.py#L266-L280

Can you elaborate more? Thank you.

jytime commented 11 months ago

Hi Songlin,

Thanks for your interest. The detailed implementation of GGS (Eq. 8) can be found here, which corresponds to cond_fn of the code shared above. We can see that we gradually optimize model_mean (which is the camera parameter vector) to approach a geometery consistent solution. Each optimization step will slightly change model_mean, and can be viewed as adding a residual there. Hope this can solve your question.

Best, Jianyuan

songlin commented 11 months ago

Hi Jianyuan,

Thank you for the kind explanation which make perfectly sense to me.