colmap / pycolmap

Python bindings for COLMAP
BSD 3-Clause "New" or "Revised" License
858 stars 125 forks source link

Bind Iterative Global SfM #273

Closed jytime closed 2 months ago

jytime commented 2 months ago

Hi,

I was wondering is it possible to bind the IterativeGlobalRefinement function or something similar? We are currently using the bundle adjustment of pycolmap for the iterative_global_BA function in our repository. The function is called here.

It works well and the performance is reasonable. However, since pycolmap.bundle_adjustment currently does not cover the operations like Retriangulate or FilterPoints, we are compelled to convert the data between PyTorch tensors and pycolmap objects for each iteration. We suspect this might not be the most efficient approach.

I have observed that this appears to be a common use case for many users (e.g., #269, #272). I could help write this if it is helpful.

Best, Jianyuan

sarlinpe commented 2 months ago

Hi Jianyuan, This binding is actually available in COLMAP's main branch since https://github.com/colmap/colmap/commit/0ea2d5ceee1360bba427b2ef61f1351e59a46f91. If you need more fine-grained control over the BA setup, feel free to try https://github.com/colmap/colmap/pull/2509 and to leave comments if you have suggestions.

jytime commented 2 months ago

Hi thanks for the quick update! I will look at it :)