BA-Net
Tang 2019 · Paper
One-line summary — BA-Net (ICLR 2019) made bundle adjustment a differentiable network layer, solving dense SfM via feature-metric BA with a learned feature pyramid and a compact basis-depth-map parameterization, trained end-to-end.
Problem
Traditional SfM pipelines are modular — feature extraction, matching, and bundle adjustment are designed and optimized independently — so the features are never optimized for the geometric estimation they serve. Geometric BA uses only corners/blobs and suffers from matching outliers; photometric (direct) BA uses all pixels but its objective is highly non-convex, so it is sensitive to initialization, exposure changes, and moving objects. The obstacle to unifying learning and BA is that BA is an iterative Levenberg–Marquardt (LM) procedure with two non-differentiable if-else decisions: the convergence-threshold termination and the raise/lower update of the damping factor . BA-Net asks: can dense SfM be solved through a differentiable BA layer, so gradients from the reconstruction loss train the features themselves?
Method & architecture
The network takes multiple images and outputs camera poses and a dense depth map ; a shared DRN-54 backbone feeds two heads, whose outputs meet in the BA-Layer.
- Feature pyramid (what BA aligns). An FPN-style top-down pathway with lateral connections upsamples backbone maps by 2, concatenates with , and applies a conv reducing to 128 channels, giving pyramid per image. BA minimizes the feature-metric error instead of intensity or reprojection error:
where projects 3D points to the image, is a normalized pixel in image with depth , and the pose of image . Trained through BA, the learned features develop a clear global minimum with a smooth basin (unlike RGB distance or pretrained-classification features), enlarging the convergence radius.
- Basis depth maps (what BA optimizes). Per-pixel depth (k unknowns at ) is replaced by a learned monocular encoder–decoder whose last feature maps serve as 128 basis depth maps (a matrix):
so BA optimizes only the combination weights (with a learned initial ), while ReLU keeps depth non-negative and dense per-pixel depth is still recovered.
- BA-Layer (differentiable LM). Each iteration computes residuals , Jacobian , the Gauss–Newton Hessian and its diagonal , then takes a standard LM step
The two non-differentiable decisions are removed by (i) fixing the iteration count (“incomplete optimization”: 5 LM iterations per pyramid level, coarse-to-fine over 3 levels = 15 total, with feature warping each iteration), and (ii) predicting with an MLP: global average pooling of over pixels gives a 128-D vector fed to four FC layers with ReLU. Each step is then a differentiable function , and the solution update (addition for depth weights, SE(3) exponential map for poses) backpropagates from poses/depth to the feature pyramids. Poses are initialized to identity rotation and zero translation.
- Training. Supervised: quaternion rotation loss , translation loss , and berHu depth loss; ADAM with initial learning rate 0.001, backbone initialized from DRN-54.
Results
- ScanNet (1,413 training / 100 testing sequences; 547,991 training and 2,000 testing pairs): BA-Net reaches 1.018° rotation / 3.39 cm translation error vs DeMoN 3.791° / 15.5 cm, photometric BA 4.409° / 21.40 cm, and geometric BA 8.56° / 36.995 cm; depth abs-rel 0.161 and RMSE (linear) 0.346 vs DeMoN 0.231 / 0.761. It beats DeMoN whether trained on ScanNet or on DeMoN’s own training data.
- KITTI (Eigen split; 5-frame snippets on odometry sequences 09/10): depth abs-rel 0.083, sqr-rel 0.025, RMSE 3.640, RMSE-log 0.134 — better than supervised (Eigen 0.203 abs-rel) and unsupervised (Zhou 0.208, Wang 0.151, Godard 0.148) methods; ATE 0.019 vs 0.045 (Wang 2018) and 0.063 (Zhou 2017).
- Ablations in the appendix compare learned vs pre-trained features, BA vs direct SE(3) pose regression, differentiable LM vs Gauss–Newton, and predicted vs constant — each component helps; appendix also reports multi-view SfM up to 5 views and comparisons with CodeSLAM.
Why it matters for SLAM
BA-Net is the founding paper of “differentiable bundle adjustment”: it demonstrated that the classical geometric optimization at the heart of SfM/SLAM can live inside a network and be trained through, hard-coding multi-view geometry as structure while learning only what geometry cannot supply (features and depth basis). This recipe became the backbone of DROID-SLAM and DPVO (differentiable dense BA layers) and general differentiable optimization libraries like Theseus, and the low-dimensional optimizable-depth idea is closely related to CodeSLAM-style latent depth codes. If you want to understand modern learned SLAM back-ends, start here.