tjiiv-cprg / EPro-PnP

[CVPR 2022 Oral, Best Student Paper] EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Estimation
https://www.youtube.com/watch?v=TonBodQ6EUU
Apache License 2.0
1.1k stars 105 forks source link

How to use the p(y|X) to obtain the y*? #19

Open jichaofeng opened 2 years ago

jichaofeng commented 2 years ago

Thank you for sharing your code. During inference, when we obtain the pose distribution p(y|X) by the probabilistic PnP layer, how to use the p(y|X) to obtain the y*? We can not understand the Section 3.4.

Lakonik commented 2 years ago

Hi! By definition, y* = argmax p(y|X), which is equivalent to solving the optimization problem in Eq. (1). We use Levenberg-Marquardt or Gauss-Newton algorithm to solve the optimization.

jichaofeng commented 2 years ago

Thank you for your answer. y* = argmax p(y|X), which is equivalent to solving the optimization problem in Eq. (1). Are these two optimization function is equivalent? Please excuse my poor math.

Lakonik commented 2 years ago

Yes they are equivalent. y* = argmax p(y|X) = argmin -log p(y|X) = argmin -log p(X|y) + const

jichaofeng commented 2 years ago

I probably understand the process. EPro-PnP is a differentiable loss function to supervise the correspondences X. During inference, the learned X is used to obtain the y*, and EPro-PnP is no longer used. Is this understanding right?

Lakonik commented 2 years ago

Yes that's right