-
Notifications
You must be signed in to change notification settings - Fork 51
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
DSF Track Estimation C++ #618
Conversation
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.
A few questions:
- What is the speedup youre getting?
- Can we use the gtsam data structures in other places in gtsfm, so that we can reduce the spike in memory usage by this module, and the time to copy from one to another? I think this should be possible for at least some of them.
Could you verify the results in the CI? Make sure everything works without any accuracy loss? |
Thanks for adding the unit test, @stepanyanhayk! I believe CI is failing:
Do you mind taking a look, and reformatting? |
Test and code looks great! Re @akshay-krishnan 's questions -- Hayk, could you attach a dashboard to this PR, showing the performance difference vs. master? Re benchmarking, you would see the greatest speedup on loftr, because it generates orders of magnitudes more tracks. |
By the way, the dashboard generation script is here: https://github.com/borglab/gtsfm/blob/master/gtsfm/evaluation/visualize_benchmark_comparison.py. It requires downloading the artifacts from a previous run on master (say the most recently landed PR), and the artifacts from this PR, and putting them in separate directories, and unzipping them. A report will be created, which looks like #594 (comment) |
Thanks a lot for the pointer, John. I will create the report today |
@stepanyanhayk friendy ping on this |
Sorry for the delay, @akshay-krishnan. These are the results I get from comparing the artifacts |
would mainly look at data association metrics. |
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.
Nitpicky comment on comments:
For example: "converting gtsfm Keypoints into gtsam Keypoints"
- Punctuation -> "Converting gtsfm Keypoints into gtsam Keypoints."
- Simple tense (like an instruction) -> "Convert gtsfm Keypoints into gtsam Keypoints."
Please refer to other comments in the file. I am personally flexible about these, but since its an open source project, I see some PRs fixing unrelated comments from other PRs. Better to write good comments to begin with :)
Interesting, thanks for the dashboard @stepanyanhayk! Yes, this change should be a no-op. To understand better if we're seeing stochasticity from gtsfm itself, vs. from the change, we could make the dashboard one more time, with a second run from the CI. I'll retrigger a new run also. Would you mind checking the visual quality on any of the datasets? Which master branch PR were you comparing with? (could you share a link?) |
I was comparing with this master PR. |
Hi @johnwlambert, @akshay-krishnan I have created a new dashboard with the recent run but it did not change the results, we still see the regression on the Data Association Metrics. In terms of visual quality, I do not see much difference between the master and cpp changes. To debug further I have created a small notebook comparing the results from DsfTracksEstimator.run() function calls on both master and cpp versions: only 72% of the resulting tracks are the same. So, the CPP implementation and Python implementation do not output the same 2D tracks. What are your thoughts on this? Do you think the issue might be from the CPP side? |
@johnwlambert please update the dashboard once we can use your C++ fixes |
This PR integrates gtsam's DSF track estimation into gtsfm. The main purpose of this change is to bring runtime speedup by using C++ instead of Python.