colmap icon indicating copy to clipboard operation
colmap copied to clipboard

Power BA - Speedup for large number of images

Open Dawars opened this issue 9 months ago • 4 comments

Bundle adjustments slows down as the number of images increases. Currently the DENSE_SCHUR is used below 100 images, SPARSE_SCHUR below 1000 images and an iterative solver is used above that.

The Power Bundle Adjustment paper proposes an approximation based on the truncated power series expansion of the Schur matrix to speed up bundle adjustment for large scale SfM: https://arxiv.org/abs/2204.12834 by @simonwebertum @NikolausDemmel

This is implemented in ceres 2.2+ and enabling is very simple: http://ceres-solver.org/nnls_solving.html#schur-power-series-expansion

The hyperparameters might need some tuning, haven't benchmarked accuracy.

Also, if the accuracy is satisfactory, it might make sense to enable PowerBA for the 100+ images case as well.

My benchmark comparing the runtime to the current implementation: image

I made 2 docker images for the experiment: dawars/colmap:torch2.3.0-cu11.8-powerba for PowerBA and dawars/colmap:torch2.3.0-cu11.8-baseline for the baseline.

Dawars avatar May 17 '24 19:05 Dawars