MegBA: A GPU-Based Distributed Library for Large-Scale Bundle Adjustment