Add option to pass initial model to robust solvers.#136
Add option to pass initial model to robust solvers.#136pablospe merged 1 commit intoPoseLib:masterfrom
Conversation
26c4b44 to
eba8315
Compare
| BundleOptions bundle_opt_scaled = bundle_opt; | ||
| bundle_opt_scaled.loss_scale /= scale; | ||
| if (ransac_opt.score_initial_model) { | ||
| *F = T2.transpose().inverse() * (*F) * T1.inverse(); |
There was a problem hiding this comment.
Please check that this normalization is correct (and for H below).
Are there other estimators that I missed for which the input model has to be normalized?
There was a problem hiding this comment.
Probably estimate_shared_focal_relative_pose (the focal length)?
There was a problem hiding this comment.
Yes I think this should probably be normalized as well. Perhaps re-initializing the cameras similar to
image_pair->camera1 = Camera("SIMPLE_PINHOLE", std::vector<double>{image_pair->camera1.focal() / scale, 0.0, 0.0}, -1, -1);
image_pair->camera2 = Camera("SIMPLE_PINHOLE", std::vector<double>{image_pair->camera2.focal() / scale, 0.0, 0.0}, -1, -1);
or something similar.
|
Some results from posebench where I first ran the estimators as usual and the re-ran with the estimated model as the initial one: The AUC values are very similar and the runtime goes down a bit when using the initial model. I did not change the |
|
@ghanning this looks good to me. Are there any changes planned or is it ready to merge? |
|
@vlarsson Ready to merge. |
See #134.
In C++ this is controlled by the new
score_initial_modelflag inRansacOptions.When using the Python bindings the user should pass the initial model as an optional argument.