Parskatt / micro-bundle-adjustment

A minimal PyTorch implementation of Bundle Adjustment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Micro Bundle Adjustment 🌱

Getting into bundle adjustment solvers can be hard. To make it easier, I have made a very basic pure Pytorch implementation, useful for teaching/learning. Despite being less than 100 lines of code, it can handle 10^6 3D points with ease, due to utilizing sparsity and GPU.

Features

  • Basic Implementation of two-view bundle adjustment for any type of camera

TODO List

  • Example with residual function
  • Generalize implementation to K-views
  • [1/2] Clean up and document code
  • []

Usage

See demos.

Basically you define a (non-batched) function for your residuals, which takes in your observations, camera params, and 3D points and outputs the residual. Sending this together with an initial guess is all you need to do! Gradients are computed automatically, and you can use arbitrary camera models.

About

A minimal PyTorch implementation of Bundle Adjustment


Languages

Language:Python 100.0%