PoseLib icon indicating copy to clipboard operation
PoseLib copied to clipboard

Refined P3P solver, and a new implementation for rel_pose_upright_3pt

Open yaqding opened this issue 1 year ago • 5 comments

Refined P3P_ding solver. Compare with default solver with Newton refinement: Screenshot from 2024-02-14 22-25-14 without Newton refinement: Screenshot from 2024-02-14 22-25-43 Performance on real dataset. Slight improvements over the existing solvers. First sequence AUC5 89.57 vs 89.48 and more efficient. Latest implementation: Screenshot from 2024-02-14 17-25-23 Default P3P solver: Screenshot from 2024-02-14 17-25-53 Original p3p_ding by Mark Shachkov: Screenshot from 2024-02-14 18-07-12

A new implementation for rel_pose_upright_3pt solver based on intersections of conics. Default solver: thumbnail_image New implementation: Screenshot from 2024-02-14 22-01-52

yaqding avatar Feb 14 '24 21:02 yaqding

Check C++ formatting: https://github.com/PoseLib/PoseLib/actions/runs/7908740484/job/21612424100?pr=93

You can run this line at the top-level in the repo: https://github.com/PoseLib/PoseLib/actions/runs/7876199471/workflow?pr=92#L31

pablospe avatar Feb 15 '24 14:02 pablospe

Thanks! It should be fine now.

yaqding avatar Feb 15 '24 14:02 yaqding

@yaqding thanks for refinement!

I took a quick look over changes and found out that ensuring BC is largest is enough to make current implementation as stable as lambda twist (according to poselib internal benchmark).

Regarding posebench results - i failed to reproduce numbers you posted, all 4 implementation yielded the same AUC5=89.48 on eth3d_130_dusmanu, but it looks a strange given that current implementation is a bit less stable then lambda twist. I will try to find some time to recheck that.

S-o-T avatar Feb 16 '24 00:02 S-o-T

@S-o-T The little difference in the posebench is possibly due to the different random samples in different machines. After using std::array instead of std::vector, now the runtime is ~209ns.

yaqding avatar Feb 16 '24 08:02 yaqding

It seems it is still complaining about the formatting. https://github.com/PoseLib/PoseLib/actions/runs/7927921250/job/21649068111?pr=93

pablospe avatar Feb 16 '24 10:02 pablospe