Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refined P3P solver, and a new implementation for rel_pose_upright_3pt #93

Merged
merged 15 commits into from
Oct 20, 2024

Conversation

yaqding
Copy link
Contributor

@yaqding yaqding commented Feb 14, 2024

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

Refine the P3P solver. A new implementation for the relative pose with known rotation axis.
@pablospe
Copy link
Collaborator

pablospe commented Feb 15, 2024

@yaqding
Copy link
Contributor Author

yaqding commented Feb 15, 2024

Thanks! It should be fine now.

@S-o-T
Copy link
Contributor

S-o-T commented Feb 16, 2024

@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.

PoseLib/solvers/p3p_ding.cc Outdated Show resolved Hide resolved
replaced std::vector with std::array
@yaqding
Copy link
Contributor Author

yaqding commented Feb 16, 2024

@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.

@pablospe
Copy link
Collaborator

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

@yaqding yaqding requested a review from vlarsson October 8, 2024 14:30
Copy link
Collaborator

@vlarsson vlarsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We could potentially switch this to be the default p3p solver.

@yaqding
Copy link
Contributor Author

yaqding commented Oct 18, 2024

Did minor changes to set as default solver.

@vlarsson
Copy link
Collaborator

Maybe make the older solver available as p3p_lambdatwist as well.

lambdatwist included
@yaqding
Copy link
Contributor Author

yaqding commented Oct 18, 2024

added now

PoseLib/solvers/relpose_upright_3pt.cc Outdated Show resolved Hide resolved
fixed the same issue, email removed.
@pablospe pablospe merged commit c86d70d into PoseLib:master Oct 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants