-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add bal dataloader to test SBT #251
base: sparse/pr
Are you sure you want to change the base?
Conversation
As discussed with Zitong, I will add a PyTorch SGD based BA algorithm to test the dataloader and also serve as a simple baseline for sparse LM based BA. Also thank Zitong for going through the SBT implementations and sparse Jacobian plans with me, which helps me to catch up to speed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only reviewed the bal_loader.py. Need some more time on ba_dense.py.
Thanks for your review @huyaoyu |
The CI failure looks weird, as commit |
Addressed all comments regarding bal_loader.py. Added a new file bal_utils.py for a custom reprojerr function that considers radial distortions k1 and k2. These two files are ready for review:
Meanwhile, I will keep working towards a bal_dense.py and a jupyter notebook example that is colab ready. Cheers. |
Hi, the following two files are ready for review, and nothing else is on the workbench.
You can try the jupyter notebook example through google colab by clicking on the "Open in Colab" tab in the README. Here is a visualization of loss before and after optimization:![]() Here is a visualization of the loss history:![]() Cheers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some simple comments.
Need a quick call for discussion.
Thank you!
Returns: | ||
Per-pixel reprojection error. The shape is (..., N). | ||
""" | ||
# convert to camera coordinates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a quick meeting to discuss how to do proper comments to this function.
I have a hard time understanding the magic dimension numbers used in this function. I think future users might try to take a look at how projection errors are implemented and they might run into the same problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a discussion, Yaoyu and I reached the conclusion that we should integrate the image undistortion function into pypose's geometry module, and then simply call pypose native functions here. This will avoid exposing the complexity of raw dimension manipulations to the users and also strengthen pypose's API library.
A refactor is on the way.
Hello! Thanks for your review. I am up to a call after the monthly developer meeting through Slack or Zoom. My email is [email protected]. Update: we had a nice in person discussion |
This PR adds a BAL dataset loader at
pypose/examples/sparse/bal_loader.py
. fix: #235This change includes 4 components:
bal_loader.py
bal_utils.py
ba_dense.py
ba_example.ipynb
(Demo)