~/satyajit

DeepBA and TFD-SfM: bundle adjustment from a cold start, learned and relaxed

mdjsonmcp

2026-11-20 · 33 min · 3d · slam · benchmarks · diffusion

A 2:40 narrated explainer, drawn in code. Every number and picture in it is this article's own; the sources are below.

› transcript

Every camera starts at the same spot. Every depth map is flat. A small network nudges them, step after step, until a ring of cameras stands around the scene. Hi, I'm Lambda. Two papers from one lab take away bundle adjustment's two crutches: the good first guess, and the point tracks. Bundle adjustment moves every camera and every point to fit the pixels. Its normal matrix is shaped like an arrow. Each point only talks to itself, so its little block is cheap to invert. Eliminate the points first. What's left is a system in the cameras alone. Solve that, then recover each point on its own. That's every serious solver, and it needs to start close. In my flatland toy, with a walk that turns ninety degrees, a start five degrees off reaches the minimum in all twenty scenes. A cold start, in six. TFD-SfM drops the shared point. Each side of a match gets its own Gaussian, with its own variance. A match that can't be fitted grows its variance and stops pulling. As the ring resolves, the two discs merge. From identity cameras, classical bundle adjustment gets almost nothing right on ETH3D. Gaussian landmarks alone lift it to forty-five. Chaining each pose to its parent in a spanning tree adds about thirty points. Down-weighting unreliable image pairs takes it to ninety. Object scans have a mirror trap: the reflected shape projects almost the same. So it optimises both worlds and keeps the likelier one. DeepBA keeps that state, poses and depth maps, and replaces the solver with a graph network that predicts each update. Cameras, image pairs and matches pass messages. It sees residuals, never pixels, which is why two million parameters are enough. Side by side, the optimiser wins the big scenes, and the network wins small bags of tourist photos. The protocols differ, so read it as a map. And it's fast. On two hundred ninety-two images, its solver takes fifty-six seconds. COLMAP's takes nine hundred eighty-eight. UGG comes from the other side: a video model that also generates depth and camera rays, fourteen point eight billion parameters of it. Its pose tables leave out the models people actually use. A learned cold start, then a classical finish. DeepBA's own ablation says so. Neither paper has released code yet. Thanks for watching! Every source is in the full article. I'm Lambda. Bye!

Why read this

Notabletop 60%

Classical BA derived, both TUM papers checked table by table and set side by side, a toy reproduced, and UGG's weights header counted.

  • Interactive explanations
  • Original analysis
  • A lasting reference

3D & spatialNothing to runResearch paper

How this was scored
Is it new?
2 of 3: A real new idea, method or capability
Can I trust it?
2 of 3: Measures key facts from files, code or configs
Can I run it?
0 of 3: Closed, nothing to run
Will I understand it?
3 of 3: Mechanism carried by interactives built from real code or data
Can I act on it?
2 of 3: A concrete recipe, numbers or comparison
Will it last?
2 of 3: A reference for a year or more
Does it affect many?
1 of 3: A specialist community
Only here?
2 of 3: A teardown or measurement few others did

Score 65 of 100, ranked 316 of 773 rated articles. Each question is answered 0–3 by hand, and a 3 is rare. How articles are scored

Three posts in one afternoon (DeepBA, TFD-SfM, UGG) asked the same thing from different ends. Where should the optimiser in a 3D reconstruction pipeline go? Hector Andrade-Loarca posted two papers from Daniel Cremers' group at TUM, one after the other. TFD-SfM, accepted at WACV 2027, runs structure from motion "from identity cameras and unit depths, without building a single point track". DeepBA asks whether a 2M-parameter network can learn bundle adjustment. An hour earlier, Amani Kiruga posted UGG (NeurIPS 2026), a video diffusion model that generates frames, depth and camera motion together.

I spend my time turning 360 and fisheye site walks into metric point clouds for BIM, and bundle adjustment sits at the centre of that pipeline. The last reconstruction roundup ended on "put a bundle adjustment after it". These two papers ask what happens if you take the classical solver's two crutches away: the good initial guess and the point tracks. So this piece starts with what bundle adjustment does, because both papers only make sense against it.

What bundle adjustment minimises

Take NN images. Camera ii has a rotation RiR_i, a translation tit_i and intrinsics KiK_i. Scene point jj is Xj∈R3X_j \in \mathbb{R}^3. A feature matcher says that point jj shows up at pixel uiju_{ij} in image ii. Bundle adjustment picks every camera and every point at once to make the projections agree with the pixels:

min⁡{Ri,ti,Ki}, {Xj}  12∑(i,j)ρ ⁣(∥π ⁣(Ki(RiXj+ti))−uij∥2)\min_{\{R_i, t_i, K_i\},\,\{X_j\}} \; \frac{1}{2} \sum_{(i,j)} \rho\!\left( \big\lVert \pi\!\big(K_i (R_i X_j + t_i)\big) - u_{ij} \big\rVert^2 \right)

Here π([x,y,z])=[x/z, y/z]\pi([x, y, z]) = [x/z,\, y/z] is the perspective divide and ρ\rho is a robust loss (Huber or Cauchy) so one bad match cannot pull the whole solution. The residual is measured in pixels, which is where the noise actually lives. That is why BA beats any closed-form triangulation given the same inputs: it minimises the right error.

Two properties make this hard. The objective is non-convex, because of the divide by depth and the rotations. And it has a gauge: you can rotate, translate and scale the whole scene and every residual stays the same, so seven directions of the solution are free.

The second hidden assumption is in the index (i,j)(i, j). The same 3D point jj has to be recognised in every image that sees it. That chain of observations is a track, and a classical pipeline builds tracks before it optimises anything: COLMAP links pairwise matches with union-find into multi-view tracks and drops the inconsistent ones.

Gauss-Newton, Levenberg-Marquardt and the arrow-shaped matrix

Stack every residual into a vector r(x)r(x), where xx holds all camera and point parameters, and linearise around the current guess: r(x+δ)≈r+Jδr(x + \delta) \approx r + J\delta. Minimising 12∥r+Jδ∥2\tfrac12\lVert r + J\delta\rVert^2 gives the Gauss-Newton step,

(J⊤J) δ=−J⊤r.(J^\top J)\,\delta = -J^\top r .

Gauss-Newton trusts that linearisation completely. Levenberg-Marquardt adds a damping term, (J⊤J+λ diag(J⊤J)) δ=−J⊤r(J^\top J + \lambda\,\mathrm{diag}(J^\top J))\,\delta = -J^\top r, and adapts it: if a step lowers the cost, accept it and shrink λ\lambda (closer to Gauss-Newton); if not, reject it and grow λ\lambda (closer to a short gradient step). The damping also makes the matrix invertible despite the gauge, whose directions are exactly the zero eigenvalues of J⊤JJ^\top J.

The trick that makes BA fast is the shape of J⊤JJ^\top J. Each residual touches one camera and one point, so ordering the cameras first,

J⊤J=[BEE⊤C],J^\top J = \begin{bmatrix} B & E \\ E^\top & C \end{bmatrix},

where BB couples cameras, EE couples cameras to the points they see, and CC is block-diagonal: each point only talks to itself, in a 3×3 block. Inverting CC is trivial, so eliminate the points first. The Schur complement

S=B−E C−1E⊤S = B - E\,C^{-1}E^\top

is a system in the camera parameters alone. Solve S δc=−(gc−EC−1gp)S\,\delta_c = -(g_c - E C^{-1} g_p), then recover every point update independently from δp=C−1(−gp−E⊤δc)\delta_p = C^{-1}(-g_p - E^\top \delta_c). A scene with 300 cameras and three million points becomes a dense solve in 1,800 camera unknowns plus three million tiny 3×3 inversions. Ceres, COLMAP and every serious SLAM back end do this.

The widget below is that solver in flatland: five 1D cameras (each sees a point as a single coordinate u=x/zu = x/z) with full poses, and thirty points. Camera 0 is held fixed, which removes three of the four gauge freedoms of a 2D similarity; scale stays free on purpose, and the damping copes. On the right is the J⊤JJ^\top J of the current step and the 12×12 camera system that actually gets factored.

From a start near the truth it converges in a handful of steps. The cost drops by orders of magnitude and λ\lambda falls while steps succeed; once there is nothing left to gain, every trial step is rejected and λ\lambda climbs, which is LM's way of stopping. Then press "cold start", which puts every camera on camera 0 and every point one unit down the first ray that sees it, and turn the walk to 90°. This first scene still gets there; press "new scene" once and the cold start ends with its headings more than 140° off.

Over 20 random scenes with 1 px of noise, I counted how often LM reached the same minimum it reaches from the true poses. With a walk that turns 40°, the cold start gets there in all 20, and a start 30° off in 7. With a 90° turn, the cold start gets there in 6 of 20, a 5° perturbation in 20 and a 15° one in 19. In this toy the identity is a decent guess as long as the cameras all roughly face the same way, which is why forward-facing captures forgive a lot. The more the views turn around the scene, the closer Gauss-Newton needs to start.

So classical SfM is mostly machinery for getting a good start. COLMAP picks a well-conditioned image pair, registers images one at a time and re-runs BA after each. GLOMAP averages pairwise rotations first, then solves for positions. And both need tracks, which is where modern dense matchers hurt them. In TFD-SfM's Table 1, COLMAP on SIFT reaches RTA@5° of 89.2 on ETH3D. Feed it DKM's dense matches instead (through the detector-free SfM track builder) and it falls to 59.3. More, better matches made it worse, because the track builder could not cope with their noise.

TFD-SfM: give every match its own Gaussian

TFD-SfM drops the shared point. For a match between pixel uu in image ii and pixel vv in image jj, each pixel gets its own landmark: it is lifted to a depth dud_u in its own camera, pu=π−1(u,du,Ki)p_u = \pi^{-1}(u, d_u, K_i), and modelled as an isotropic Gaussian with its own variance σu2\sigma_u^2. Depths and variances are read from per-image 32×32 maps, so the parameter count stays small.

TFD-SfM pipeline in five panels: input images of a red sphere; view-graph construction where LoFTR estimates overlap and a spanning tree is built with cam_5 as root; dense correspondences between connected images by DKM; the optimisation at t=0s, 20s, 100s and 200s, with cameras fanning out and edges turning from red to green; and the outputs: intrinsics, poses and a 3D reconstruction.
TFD-SfM's pipeline: coarse LoFTR scores which image pairs overlap, a spanning tree and extra edges form the view graph, DKM matches the connected pairs densely, and the optimisation runs from identity cameras for about 200 seconds on this scene (TFD-SfM paper, Figure 2).

Two terms score each match. The 2D term projects uu's Gaussian into image jj and asks how likely the matched pixel is, with the projected covariance Σ2D=σu2JJ⊤\Sigma_{2D} = \sigma_u^2 J J^\top (JJ is the Jacobian of the projection):

L2Di→j=12 r⊤Σ2D−1r+12log⁡det⁡Σ2D.\mathcal{L}_{2D}^{i\to j} = \tfrac12\, r^\top \Sigma_{2D}^{-1} r + \tfrac12 \log\det \Sigma_{2D} .

The 3D term asks the two Gaussians to overlap: L3D=12∥pu→j−pv∥2/(σu2+σv2)+32log⁡(σu2+σv2)\mathcal{L}_{3D} = \tfrac12 \lVert p_{u\to j} - p_v\rVert^2 / (\sigma_u^2 + \sigma_v^2) + \tfrac32\log(\sigma_u^2+\sigma_v^2). The loss per edge is both 2D directions plus the 3D term, summed over its matches.

Read the NLL as a reweighted least squares. The quadratic part is the classical residual divided by a variance the optimiser chooses. A match that cannot be fitted gets a large σ2\sigma^2, which shrinks its pull; the log term charges for that, so variances cannot grow for free. This is the same thing a robust kernel does in classical BA, with the weight a free variable per match instead of a fixed function of the residual. Early on, when every variance is large, the loss surface is smooth, and that is what lets it start cold.

One match, two Gaussians: as the ring of cameras resolves, the two discs move together and their variance collapses. Iteration counts are on screen (video from @hectorandradel's post on X).

Three more pieces make it work on real scenes:

Two rows of reconstructions of DTU objects. Top row, a toy figure reconstructed as a distorted concave shell with cameras on the wrong side, labelled NLL of solution 1: 1.47, and next to it the correct convex reconstruction under a dome of cameras, NLL 0.56. Bottom row, a set of packaged goods, mirrored solution with NLL 1.36 and correct solution with NLL 0.33.
The mirror ambiguity on DTU: the reflected reconstruction (left) and the true one (right) both fit, but the true one has the lower NLL (TFD-SfM paper, Figure 4).
The two worlds side by side: the mirrored hypothesis ends with a higher 2D NLL and is discarded (video from @hectorandradel's post on X).

The ablation in Table 3 is the clearest evidence in the paper. On ETH3D, classical BA from the same cold start reaches RTA@5° of 1.6. The Gaussian 2D term alone takes it to 45.1, adding the 3D overlap to 53.9, chained poses to 86.4 and edge weighting to 90.1.

The optimiser is plain AdamW at a learning rate of 0.0016 for 30,000 iterations, in a custom CUDA implementation on one H100, from identity poses, a 45° field of view and every depth and variance at 1. One step takes about 2 ms at real-scene match counts; a full Mip-NeRF 360 run, including matching, takes 10 to 25 minutes.

Four TFD-SfM reconstructions with red camera frustums: a pig figurine under a dome of cameras, a room seen from above, a pipe assembly, and St Paul's cathedral facade, each beside small panels of sparse COLMAP and COLMAP plus DKM results with their RTA at 5 degrees.
TFD-SfM against COLMAP and COLMAP with DKM matches on four kinds of scene, with RTA@5° in the corners (image from @hectorandradel's post on X; TFD-SfM paper, Figure 1).
Cameras and dense geometry emerging from a cold start over 10,000 iterations (video from @hectorandradel's post on X).

My reimplementation of the toy

Section 3.2 tests the objective on a synthetic scene that Appendix A.6 fully specifies: 100 landmarks on a sphere of radius 1.3, cameras on an orbit of radius 4 spaced 15° apart, each landmark seen by a contiguous run of four to six cameras, pixel noise, and every run started at identity poses and unit depth. The paper crosses absolute against chained poses with shared points against Gaussians, and reports that only chained poses with Gaussians recover the cameras, across the full 360° ring.

I wrote that experiment from the paper's text: the same scene, Eq. 4 as the loss, plain Adam at 0.0016 for 15,000 steps, three seeds at 1 and 4 px of noise. One choice is mine. Nothing in Eq. 4 fixes the scale, and the log-variance terms reward shrinking the whole scene, so I hold the mean log-depth at zero.

The replay is seed 1, which happens to show the paper's pattern on the 75° arc: chained poses with Gaussians converge, absolute poses with Gaussians don't. Across all six runs at that arc the two came out even.

Part of the claim reproduces and part does not. Shared points (classical BA's model, here optimised by the same Adam, not by LM) never recovered at any arc length, in any seed. Gaussians did, on the shortest arc: with six cameras over 75°, chained poses with Gaussians reached a mean relative-rotation error under 1.4° in four of six runs. But absolute poses with Gaussians did too, in four of six, so I could not separate the two pose parameterisations. From nine cameras (120°) on, nothing converged in my runs, and every run on the full 24-camera ring ended at least 69° off. Running 30,000 steps instead of 15,000, or dropping my scale term, rescued none of the runs I tried it on. Something in the paper's setup that the text doesn't pin down (the scale handling, the step count, a schedule) may well be the difference. I'd want the code before reading Figure 3 as a basin-of-attraction result for wide arcs.

Four 3D panels of a camera ring experiment. Absolute poses with shared landmarks, absolute poses with Gaussian landmarks and chained poses with shared landmarks all show cameras collapsed near one spot with points scattered; chained poses with Gaussian landmarks shows the full ring of cameras recovered around a cluster of points.
The paper's version of the toy on the full 24-camera ring: only chained poses with Gaussian landmarks recover it (TFD-SfM paper, Figure 3).

My first attempt was a 2D version, with 1D cameras, and it failed for a reason worth knowing. Two 1D cameras impose no constraint on each other: two rays in a plane always intersect. A pairwise, track-free loss has nothing to grip in flatland. In 3D two rays generally miss, and that miss is the epipolar constraint every pairwise method lives on.

DeepBA: learn the update instead of solving for it

DeepBA keeps TFD-SfM's track-free state: per image, an absolute pose, a log field of view and a 32×32 log-depth map; per image pair, a relative pose stored as a rotation vector and a unit translation direction. Then it throws away the solver. A graph neural network looks at the current state and predicts a change to it, sk+1=sk⊞Δsks_{k+1} = s_k \boxplus \Delta s_k, and that is applied 100 times from the same trivial start: identity poses, zero log-FOV, zero log-depth.

Left, a view graph of camera nodes joined by match edges, labelled as input. Right, the full 240-camera counter scene of Mip-NeRF 360: a dense point cloud of a kitchen counter with a ring of green estimated cameras around it, and per-image depth maps.
DeepBA on the full 240-camera Mip-NeRF 360 counter scene: a view graph from any matcher in, cameras, intrinsics and depth out, from a trivial start (DeepBA paper, Figure 1).
DeepBA architecture. Left, a state refinement block: hidden states for cameras, pairs and matches enter an MPC block repeated L times and are decoded into changes of absolute pose, focal length, relative pose and depth, which are added to the state; the whole block repeats K times. Right, the Match-Pair-Camera block: blue camera nodes, orange pair nodes and yellow-green match nodes, with three steps of message passing between them along covisibility edges.
One refinement iteration: geometric features of the current state go in, four Match-Pair-Camera blocks mix them over the view graph, heads emit the state change; the same weights run at every iteration (DeepBA paper, Figure 2).

The inputs are recomputed from scratch at every iteration, in closed form:

Camera states start from one learned embedding shared by every camera. Four Match-Pair-Camera blocks then pass messages: cameras broadcast to their pairs and matches, matches are pooled into their pair by 4-head attention, and pairs are attended into their cameras. Heads decode a pose change per camera, a focal change, a relative-pose change per pair (antisymmetric by construction) and a depth update, scattered from the match features onto each image's grid. The hidden width is 128. The whole thing is 2.04M parameters.

No hidden state crosses iterations. Each step sees only the geometry, the way a Gauss-Newton step sees only JJ and rr. That makes the iteration count a test-time knob: the paper trains with 100 iterations, backpropagates through 24 of them, and runs 100 at test.

A banner titled The difference: classical BA updates by minus J transpose J inverse J transpose r, an analytic solve that needs a good init, with state cameras plus 3D points from tracks; DeepBA updates by a weight-shared GNN of the state and graph, learned, with a trivial init and state poses plus focal plus depth, no tracks.
The authors' one-line summary of the difference: the same update loop, with the Gauss-Newton solve swapped for a network (image from @hectorandradel's post on X).
DeepBA from a cold start: at iteration 0 every depth map is flat and every camera at the identity; by iteration 20 the ring of cameras is there (video from @hectorandradel's post on X).

Training is the clever part. Supervising absolute poses would need a common frame and a metric scale, which a mix of MegaDepth, CO3Dv2, ScanNet, BlendedMVS, DL3DV and Calle does not share. So DeepBA supervises only relative rotations and translation directions against ground truth, with a scale-free distance, and ties the absolute poses to the relative ones through a stop-gradient: a learned pose-graph optimisation. Scale comes from self-consistency losses on the 2D reprojection and 3D residuals, weighted per match by a Cauchy kernel on the ground-truth Sampson distance so outliers are ignored. A last term penalises the size of each update, because a trained refiner otherwise keeps drifting the scene by pure gauge motions after it has converged.

Why 2M parameters can stand in for a solver

The question in the post sounds like it asks whether 2M parameters can hold a 3D reconstruction. They don't have to. DeepBA's state, the poses and depth maps, is explicit and lives outside the network. The network is an update rule, and update rules are small: the Gauss-Newton step −(J⊤J)−1J⊤r-(J^\top J)^{-1}J^\top r has zero learned parameters and still solves BA from a good start. What the 2.04M parameters buy is everything GN does not have. They decide how far to trust each residual (the robust weighting), how big a step to take (the damping), and how to move when the linearisation is useless, as it is from a cold start. VGGT's 1.2B parameters, by contrast, have to see pixels and turn them into geometry; DeepBA is handed matches by eLoFTR and only has to reconcile them. The ~590× ratio in the post compares a solver with a perception model. A widely shared Japanese summary by @tokufxug puts it as 2.04M parameters "approaching" VGGT's 1.2B, over a recut of the authors' clips; the comparison is fair only in that sense.

The paper's own results show where the analogy stops, though.

A 3D reconstruction of the bonsai scene with a ring of green estimated cameras and grey ground-truth cameras; the green ring is tilted relative to the grey one.
The bonsai failure: DeepBA's cameras (green) all pitch up by about the same angle against the ground truth (grey), a drift of the learned update itself (DeepBA paper, Figure 10b).

The numbers, side by side

DeepBA's headline comparison is Table 1, ten frames per scene:

CO3Dv2 and RealEstate10K, 10 framesParamsCO3Dv2 RRA@15°CO3Dv2 AUC@30°RE10K AUC@30°Time on one H100
COLMAP (SIFT)–86.374.946.5~2 + 3 s
COLMAP (same eLoFTR matches)–89.777.080.9~7 + 11 s
GASfM (eLoFTR, given true intrinsics)145.2M79.971.282.8~7 + 2 s
VGGT~1.2B99.385.185.3~0.2 s
DeepBA2.04M97.478.684.0~7 + 3 s

The post's "97.4 vs 99.3 RRA@15 on CO3Dv2" is in that table. So is the fact that VGGT leads AUC@30°, the stricter joint metric, by 6.5 points on CO3Dv2. On RealEstate10K DeepBA is within 1.3 of it. Against the classical pipelines on the same matches, DeepBA wins every column here.

A grid of reconstructions, four rows (DTU scan82 with 49 images, Mip-NeRF 360 bicycle with 194, ETH3D delivery_area with 44, IMC2021 london_bridge with 25) by four columns (COLMAP with eLoFTR, RESfM, GASfM, DeepBA), showing points with green estimated and grey true cameras.
The same eLoFTR matches through COLMAP, RESfM, GASfM and DeepBA; the number after each dataset is the image count (DeepBA paper, Figure 3).

The four multi-view benchmarks in Table 2 are tighter, and there the picture turns. On ETH3D, COLMAP with the same eLoFTR matches reaches RTA@10° of 75.5 against DeepBA's 49.1, and COLMAP on SIFT 96.4. On Mip-NeRF 360, with 125 to 311 images a scene, both classical mappers are at 100 RRA@10° and DeepBA at 73.5. DeepBA's best showing is DTU and IMC2021, where it comes close to the mappers at 10° and falls behind at 3°.

What the DeepBA paper never prints is its own group's other method. TFD-SfM reports the same four benchmarks. Here they are at 5°, from TFD-SfM's Table 1 and DeepBA's Table 2:

RRA@5° / RTA@5°DTUMip-NeRF 360ETH3DIMC2021
TFD-SfM (DKM matches)97.9 / 83.199.6 / 98.596.9 / 90.171.2 / 39.5
DeepBA (eLoFTR)95.6 / 90.866.7 / 68.253.4 / 28.895.6 / 68.9
DeepBA (DKM, Table 5)92.9 / 95.768.9 / 71.352.4 / 41.495.2 / 70.3

Three caveats before reading it. The matchers differ, so I added DeepBA's DKM row from its Table 5. The metrics are defined differently: TFD-SfM's appendix counts poses, DeepBA's counts all image pairs. And the two papers do not even agree on a shared baseline: VGGT's ETH3D RTA@5° is 81.1 in TFD-SfM's table and 65.0 in DeepBA's. So this is a rough map, not a ranking.

The map is still clear. The per-scene optimiser is far more accurate on the big, wide scenes: ETH3D and Mip-NeRF 360. The thread's "best on ETH3D" is narrow, though: TFD-SfM's ETH3D AUC@10° is 85.0 against COLMAP's 84.8, COLMAP leads at 1° (90.5 / 80.1 against 86.3 / 77.4), and on IMC2021 COLMAP's 85.3 / 65.3 at 5° is well ahead of TFD-SfM's 71.2 / 39.5. The learned refiner is better on IMC2021's small bags of five to 25 tourist photos with different cameras, which is exactly where TFD-SfM's focal-depth ambiguity bites and where amortised experience helps.

On time, the two are closer than they look. TFD-SfM quotes 10 to 25 minutes a Mip-NeRF 360 scene end to end, but at about 2 ms a step its 30,000 steps are about a minute of optimisation (my arithmetic on its numbers); the rest is LoFTR and DKM matching. DeepBA's runtime figure times the solvers alone on the same eLoFTR matches of bonsai: at 292 images and 3.4M matches, 100 iterations take 56 s with a 24 GB memory peak, against 988 s for COLMAP and 793 s for GLOMAP. Matching itself takes 279 s there, so DeepBA's end to end is about 335 s. Against COLMAP the solver gap is real; against TFD-SfM it is the front end that differs. The post says DeepBA is faster "beyond ~15 views"; the paper says from 10 on. The per-iteration cost is linear, 25 ms plus 155 ns per match.

Two log-log plots. Left, time in seconds after matching against number of images N for DeepBA, COLMAP and GLOMAP on the same matches, plus eLoFTR matching time dashed: COLMAP and GLOMAP rise to about 1,000 seconds at around 300 images, DeepBA to about 60. Right, milliseconds per iteration against number of matches, a straight line rising to about 550 ms at 3.4 million matches.
Solver time on the first N images of bonsai with the same eLoFTR matches on one H100, and DeepBA's per-iteration cost against match count (DeepBA paper, Figure 5).

Against VGGT plus bundle adjustment

The last roundup checked a slide showing VGGT with a BA on top: 85.3 to 93.5 AUC@30° on RealEstate10K and 88.2 to 91.8 on CO3Dv2, VGGT's own Table 1. It is tempting to set those beside DeepBA's 84.0 and 78.6. Don't. DeepBA's table runs feed-forward VGGT on its own frame lists and gets 85.1 on CO3Dv2, not 88.2, so the protocols differ by three points before any BA. The like-for-like row is DeepBA's own ablation: with a classical BA started from its output, 78.6 becomes 84.6 on CO3Dv2. The lesson matches the roundup's. A learned stage gets you into the basin, and a real bundle adjustment finishes the job.

A camera on a frozen map

DeepBA's state is explicit geometry, so part of it can be frozen. Build a map, hold its cameras and depths fixed, and run the same network on a new image: it registers the query from the mean pose of the map cameras, without its intrinsics and without PnP.

Localising one camera against a frozen 25-image map: from the mean map pose to 3.4° of rotation error in 50 iterations (video from @hectorandradel's post on X).

On 7-Scenes (Table 6), with a 200-image DeepBA map, DeepBA localises chess to a median 3 cm and 1.66°. Focal-solving PnPf with RANSAC on the same map gets 6 cm and 1.66°; PnP given the true intrinsics, 12 cm and 1.91°. HLoc on its usual map of about 4,000 images gets 2 cm and 0.79°. The fair reading is that DeepBA is a better registration step on a small map, not a better localiser.

UGG: the same geometry, from a video model

UGG comes at the problem from the other side. Its authors take a video diffusion model, Wan2.2-TI2V-5B, and teach it to produce depth and cameras as two more "videos" alongside RGB. Cameras become images through Plücker ray maps: each pixel stores its ray direction dd and moment m=o×dm = o \times d, so a camera is a six-channel image aligned with the RGB frame.

UGG architecture: RGB, depth and ray-map inputs, some tokens hatched as noisy, enter a unified model repeated L times with separate QKV projections per modality, joint multi-modal self-attention, cross-attention to text and separate feed-forward networks per modality, with a diffusion timestep modulating each; outputs are RGB frames, depth maps and ray maps.
UGG's mixture-of-transformers: separate projections and feed-forward layers per modality, one shared self-attention, and a timestep per token (UGG paper, Figure 2).

Every token has its own noise level. Observed tokens are clean; missing ones are noise to denoise. That one rule (Diffusion Forcing, extended across modalities) turns a generator into an any-to-any model: give it a video and it fills in depth and cameras, give it two photos and a camera path and it fills in the frames between, give it only a camera path and it imagines a scene. It also lets one model train on datasets that lack depth or cameras: the missing modality is simply left out of the loss.

A table of tasks as noise patterns: text-to-4D generation, image-conditioned generation, camera-conditioned generation and geometric prediction, each a row of text, RGB, depth and ray-map tokens with the observed ones clean and the rest hatched as noisy, all feeding a Unified Generative Geometry Model that outputs a completed scene.
Every task is a pattern of clean and noisy tokens over text, RGB, depth and ray maps (image from @AmaniKiruga's thread on X; UGG paper).
Heterogeneous training: four datasets with RGB, depth and camera columns, where datasets B, C and D have depth or camera masked, all feeding UGG with a masked loss.
Datasets missing depth or cameras still train the model: the missing modality is masked out of the loss (image from @AmaniKiruga's thread on X).
The first 15 seconds of UGG's overview: depth and pose from a casual video, then views the video never showed (video from @AmaniKiruga's post on X).

The thread says "one model". The weights are larger than the base. I read the header of ugg_release.safetensors from Hugging Face by HTTP range request: 2,340 tensors, 14,820,947,808 parameters, all bf16. Each of the 30 blocks carries three copies of the query, key, value and output projections and of the feed-forward network (width 3,072, hidden 14,336), one per modality. So it is three 5B-scale experts sharing attention, about 14.8B in all, with roughly 5B active per token. That is what "each modality gets its own projections and FFNs" means in parameters, and why the README asks for an 80 GB GPU.

The geometry results are real but come with a narrow baseline set. In Table 2 (dense video), UGG cuts ATE on ScanNet++ from Geo4D's 0.190 to 0.087, and it leads ATE and translational RPE across all five datasets. The baselines are Geo4D, RayDiffusion, Gen3R and Aether. There is no VGGT, no MASt3R, no COLMAP, though VGGT is in the reference list. "Beats models built only for pose estimation" is true of RayDiffusion; it is untested against the models people actually use for poses. With only the first and last frame, rotation error is still 21 to 43° on Sintel, ScanNetV2 and ScanNet++.

Test-time search is the one idea here that classical SfM cannot copy: sample 16 completions and keep the one whose depth and cameras best agree with RAFT flow between the observed frames. It helps sparse depth and pose on all five benchmarks. It is a proxy, though; on dense ScanNet++ it makes rotation error worse, 3.861 to 4.105 degrees.

Test-time search: an input photo of a room goes into UGG, which produces 16 parallel generations scored for 3D consistency without ground-truth depth or camera; the best candidate, outlined in green, is picked.
Test-time search: 16 completions, scored against the observed frames, the most consistent kept (image from @AmaniKiruga's thread on X).
Video to 4D: a handheld clip in, depth and a camera path out (video from @AmaniKiruga's thread on X).
Two photos and a camera path in, the walk between them out, with depth (video from @AmaniKiruga's thread on X).
Generating what the video never showed, and a scene from a camera path alone (video from @AmaniKiruga's thread on X).

The costs are a different order from the TUM papers: training on 128 H200s for two weeks, inference at 288×384 on 50-frame clips, about 20 seconds per clip for 40 denoising steps on one H100. The authors' own limitations section says specialised geometry models stay stronger on several indoor depth metrics. The code is public at amanikiruga/UGG and the weights at amanim71/UGG.

amanim71/UGG@4263e78 · snapshot 2026-11-23
repo size
29.64 GB
task
any-to-any
library
pytorch
license
mit
safetensors
1 shard
largest file
29.64 GB
files
3
downloads
0
likes
3
4dvideo-generationdepth-estimationcamera-pose-estimationnovel-view-synthesisworld-model

repo last modified 2026-11-11

What this changes for a 360 walk to BIM

My captures are Insta360 dual-fisheye walks through buildings under construction, solved as a rig with IMU scale and gravity, for scan-to-BIM. Read against that, both TUM papers hit their own limitations sections almost one for one.

ETH3D terrains: two wall-facing views and one corridor view on top; below, DeepBA's reconstruction in red over the ground truth in grey, with the wall-facing cameras placed too far from the wall and their estimated focal lengths larger than the true ones.
The focal-depth ambiguity on ETH3D terrains: views facing a flat wall get too long a focal length and are pushed back from it (DeepBA paper, Figure 8).

The 24 GB peak at 292 views is exactly an RTX 3090's memory, so a site walk of a few hundred frames would sit at the limit of a consumer card. The part I would take now is TFD-SfM's idea rather than either method: the per-match variance as a free variable is a robust kernel that adapts per match, and that could sit inside a rig BA that already uses the IMU for scale and gravity.

My position: DeepBA is the more interesting paper and TFD-SfM the more accurate method. DeepBA shows a small, explicit-state refiner can get from nothing to the basin of attraction in seconds, then lose to a classical finisher on the tight thresholds, as its own ablation admits. For a capture pipeline that is the right division of labour: learned cold start, classical finish. Until either releases code, it stays a paper result. UGG is a strong demo of one model doing generation and geometry, but I would not take its pose claims seriously until it is measured against VGGT.

For more on the pipeline side, see Gaussian-splat capture in practice, GoFish's fisheye splatting, and two other learned solvers: Solv3R and HiP3R.

Cite this article

For attribution, please use the following reference or BibTeX:

Satyajit Ghana, "DeepBA and TFD-SfM: bundle adjustment from a cold start, learned and relaxed", ai.satyajit.si, November 2026.

bibtex
@misc{ghana2026deepbatfdsfm,
  author = {Satyajit Ghana},
  title  = {DeepBA and TFD-SfM: bundle adjustment from a cold start, learned and relaxed},
  url    = {https://ai.satyajit.si/articles/deepba-tfd-sfm},
  year   = {2026}
}
share