Closed ThomasParistech closed 1 year ago
Hi @ThomasParistech,
indeed this use case is not supported atm, but would be great to have. I think this should be quite simple to implement, just make reference
a dataclass (like here), add a setter for Reference.descriptor
, and then implement loading/writing references from a separate .h5 file in python. If you have time to implement this please submit a PR, otherwise I can have a look into it soon.
Thanks for the fast reply, Sounds great. To be honest I posted the issue just before one week off. I'll have a look when I come back :)
Hi @Phil26AT, I submitted a PR: https://github.com/cvg/pixel-perfect-sfm/pull/76
I first run a triangulation with Bundle Adjustment on my PixSfM model and then call the QueryLocalizer to localize an image within it.
However, (for specific reasons) I need to do this in two separate Python runs but want to avoid the computational cost of re-extracting the features references at the QueryLocalizer init.
Here's what I do:
...
I'd prefer to use the constructor below directly to skip the redundant extraction. But I don't see how to serialize the references I got during triangulation:
outputs["BA"]["references"]
The bindings don't provide a constructor for "Reference" and its attributes aren't pickable.
Do you have any advice?
Many thanks :)