Give π4 plain photos with no camera data. In one pass it returns the shape of the scene, every camera, the real size, and where each point moved. Its geometry model has 343M parameters and has the best average rank of 10 methods over 16 test settings. It tracks in 3D by a simple rule: find the pixel, then read the 3D point off the surface it already built. So every visible track point sits on that surface by construction.
Pick one of three ways to place a 3D track point, then slide the target view away from the query view. Watch which track leaves the surface. Then we build the whole model from zero: the outputs, the looped decoder, the losses, the lifting rule and the data.
You need what a camera pose is (where a camera stands and where it looks) and what attention does (tokens share information). We build the rest.
The green ring is the true point on the wall. The coloured dot is where the chosen method puts it.
Toy scene seen from above. Drift sizes are illustrative: Fig. 10 of the paper shows this effect in pictures, not numbers. The property that a lifted point lies on the reconstructed surface is the paper's (Eq. 5, Sec. 6.4). Benchmark numbers in the read-out: single-view tracking averages, Table 4a.
Chapter 0
See what it takes to turn loose photos into shape, cameras, real size and motion, and meet the two bets this paper makes
Take out your phone at a skate park. Shoot a few photos, then a short video of a skater. You did not measure anything. You do not know the lens data. The photos are in no special order.
Now ask four questions about that scene. What is its 3D shape? Where was the camera for each photo? How big is it, in metres? And where did each point on the skater go over time?
The first three questions are about geometry: shape, cameras and size. The last one is about motion. Three dimensions of space plus one of time make four. A model that answers all four questions does 4D scene perception. That is the 4 in π4.
The classic way to answer the geometry questions is slow and careful. A method called structure from motion finds the same spots in many photos. Then it solves a large optimisation for the cameras and the 3D points. It works well, but it takes minutes to hours, and it breaks when things move.
Since 2024 there is a second way. A feed-forward model is one neural network that takes the photos in and gives the answer out, in one pass. No optimisation loop runs at test time. DUSt3R did it for two photos. VGGT and π3 did it for many. Newer models such as ARROW and Track4World also follow points in 3D.
So what is left to do? Three things were still wrong.
The models were large. Most of the strong ones have more than one billion parameters. A parameter is one learned number inside the network. More parameters need more memory, so fewer photos fit in one pass.
The models that also track do not lead on geometry. Two of the compared models also track points: ARROW and Track4World. On the geometry tests of this paper they rank fifth and eighth of ten. The paper does not say why, so we do not guess.
The 3D trackers guessed too much at once. Most of them output the 3D position of a tracked point directly, as three numbers X, Y and Z. That one guess must be right about the match, the surface, the camera and the scene size, all at the same time. An error in any of these moves the point.
π4 makes two bets.
Bet one is about geometry. Keep the design of its parent, π3, which treats every photo the same way. Then replace a tall stack of different Transformer blocks with one pair of blocks that runs 16 times. The weights are shared, so the model is small. Spend the saved memory on training with up to 64 photos of one scene at once.
Bet two is about motion. Freeze the geometry. Train a second branch that answers only one question: which pixel in the other photo shows the same point? Then read the 3D position of that pixel from the surface the geometry branch already built. The paper calls this lifting. You played with it in the instrument at the top.
Did the bets pay? The paper compares π4 with nine other models on 16 test settings. For each setting it ranks the ten models from 1 (best) to 10. Then it averages the ranks. The plot below puts that average against the size of each model.
Each dot is one model. Left means fewer parameters. Up means a better average rank. Pick a group of tests and watch the dots move.
Average ranks and parameter counts from Table 2 of the paper: 4 groups, 16 settings, 10 methods. A lower rank is better. The 343M for π4 counts the geometry model used in this table. The full system with the motion branch has about 0.5B parameters.
Check the overall number by hand. The paper first averages the ranks inside each of the four groups. Then it gives each group the same weight. For π4 the four group ranks are 3.50, 2.33, 3.00 and 3.17.
(3.50 + 2.33 + 3.00 + 3.17) / 4 = 12.00 / 4 = 3.00
Do the same for Pi3X: 2.57, 3.10, 3.31 and 3.42 sum to 12.40, so its overall rank is 3.10. The lead is real, and it is small. An average rank near 3 also tells you that no model is first everywhere. On a typical setting, π4 is about third of ten.
Look at the left side of the plot. Only one model is smaller than π4: DVLT, with 117M parameters. DVLT is where the looping idea comes from. But DVLT ranks seventh overall. π4 is three times its size and still about a third of the size of most others.
Now switch to Single image. π4 drops to third place. Pi3X, a released variant of π3, is first there. A good lesson states this. The claim of the paper is the best overall average rank, 3.00 against 3.10 for Pi3X, and the lead in three of the four groups.
Here is the road. Each chapter builds one part of the instrument you saw at the top.
Chapter 1
Build one 3D point from a ray and a depth, place it with a pose, size it with one scale, then meet the outputs for motion
Before we open the model, we need to know what it must produce. The input is simple: N colour images, each H pixels high and W pixels wide. There is no lens data and no camera position. The images can be one photo, a loose set, or a video.
The output has many parts. We take them in the order the model builds them. Start with one pixel.
A camera is a small hole that light passes through. Each pixel looks out along one straight line, called a ray. Every 3D point on that ray lands on the same pixel. So a pixel alone does not tell you where a point is. You also need to know how far along the ray it sits.
π4 therefore predicts two things for each pixel: the ray, and a depth. Multiply them and you have a 3D point.
Try it with numbers. A pixel has the ray (0.5, 0.2, 1). The depth is 4. Multiply each part by 4.
P = 4 × (0.5, 0.2, 1) = (2, 0.8, 4)
The point is 2 units right, 0.8 down and 4 forward. Because the forward part of the ray is 1, the forward part of the point is exactly the depth. That is why the paper keeps the ray at this length.
A local pointmap is one such point for every pixel. Think of an image where each pixel stores X, Y and Z in place of red, green and blue. It has shape H × W × 3. The word local matters. Each image has its own pointmap in its own camera coordinates. The origin is that camera. Forward is where that camera looks.
So ten photos give ten small 3D models that do not yet fit together. To join them, the model predicts a pose for each camera. A pose is a rotation R (which way the camera faces) and a translation t (where the camera stands). Together they move a point from camera coordinates into one shared frame. The set of all such rigid moves is called SE(3).
One thing is still missing: size. From photos alone, a toy town and a real town look the same. So the model predicts one more number for the whole set of images, the scale m. It turns the model's own units into metres.
Continue the example. Our local point is (2, 0.8, 4). Say the camera is not turned, so R changes nothing. It stands at t = (1, 0, 0). The scale is 1.5.
X = 1.5 × ( (2, 0.8, 4) + (1, 0, 0) ) = 1.5 × (3, 0.8, 4) = (4.5, 1.2, 6) m
Now do it with your hands. The device below is a flat world seen from above. A camera looks at one point. Change the four things the model predicts and watch where the point lands.
The short bar in front of the camera is its image. Slide the pixel to pick a ray. Slide the depth to move along the ray. Then turn and move the camera, and change the scale.
A flat version of Eq. 2 and Eq. 4 of the paper: one sideways axis and one forward axis. The real model does this for every pixel of every image, with a second sideways axis. The values here are yours, not the paper's.
Notice two things. First, turn the camera and the local point does not change. Only its place in the shared frame changes. The model can be right about the shape in front of a camera and still wrong about where that camera stands. Chapter 2 uses this split.
Second, the scale changes every number in the last box and nothing in the picture. A real scene and a model railway give the same picture. Only m tells them apart.
The model also gives a confidence between 0 and 1 for each pixel. It says how much to trust that point. A low value marks a point the model is unsure about.
Those are the geometry outputs. For two or more images, there are also outputs for motion. You choose a query view q. For every pixel u of that view and for every other image i, the model answers one question: where is this same physical point in image i?
The answer is a pixel position in image i. The paper writes it Uq→i(u) and calls the full set a dense correspondence map. Along with it come two numbers per pixel. Visibility says if the point can be seen in image i or is hidden. Tracking confidence says how sure the match is.
The last output is a moving-object mask for each image. It marks the pixels of things that move in the scene, such as the skater. It does not depend on the query view.
| Output | Symbol | How many | What it holds |
|---|---|---|---|
| Local pointmap | Pi | one per image, H × W × 3 | a 3D point per pixel, in that camera's coordinates |
| Pose | Ti = (Ri, ti) | one per image | where the camera stands and faces |
| Confidence | ci(u) | one per pixel | trust in the point, from 0 to 1 |
| Scale | m | one per input set | model units to metres |
| Correspondence | Uq→i(u) | one pixel position per query pixel and image | where the query pixel's point appears in image i |
| Visibility, tracking confidence | with each correspondence | can the point be seen, and how sure is the match | |
| Moving-object mask | one per image | which pixels belong to things that move |
One output is missing from this table on purpose: the 3D track. The model does not predict it. It computes it from the correspondence and the metric points above. Chapter 6 shows how, and why that choice matters.
Chapter 2
Shuffle the photos and see why π4 picks no reference view, then compute a relative pose by hand
Chapter 1 used the words "shared frame". But which frame is that? The world has no arrow that says "origin here". Any choice of origin and direction is as good as any other.
Many models solve this with a rule: the first image is the reference view. Its camera is the origin. Everything else is given in the coordinates of that camera. VGGT works this way. It is simple, and it has a cost.
The cost is that the first image becomes special. Give the same photos in another order and the model sees a different problem. If the first photo is blurry, or shows a corner that no other photo shares, the whole result leans on a weak base.
π3 removed that rule, and π4 keeps the design. No image is marked as first. The network gets no tag that says which image came where. The paper calls this reference-free.
What does the model promise in return? If you reorder the inputs, the outputs reorder in the same way and do not change. The name for this is permutation equivariance. A permutation is a reordering.
Try it. The device shows four cameras around a small building, from above. The left panel is a model with a reference view. The right panel is a reference-free model.
Each camera has a letter that never changes and a number that shows its place in the input list. Press Shuffle. Then slide the world and watch the relative pose in the read-out.
An illustrative toy. The left panel shows only what a reference rule implies: the output frame is the frame of the first image. The right panel shows the property that the paper states for π4 (Sec. 3.3): reordering the images only reorders the predictions.
On the left, every shuffle that changes the first camera redraws the world. All the coordinates change, though the scene did not. On the right, only the small numbers move.
Now slide the world. The right panel turns as a whole. This is the freedom a reference-free model has: it may place the scene in any frame it likes. That sounds like a problem for training. If the frame is free, what is the correct answer for a camera pose?
The answer is to grade only what does not depend on the frame. The relative pose between two cameras is such a thing. It says where camera i stands and faces, as seen from camera j.
Work one by hand in the flat world. A pose is a turn by an angle and a position. Camera 1 has turn 0° and stands at (0, 0). Camera 2 has turn 90° and stands at (2, 0).
To undo the pose of camera 2, first subtract its position, then turn back by 90°. Apply that to camera 1.
turn: 0° − 90° = −90° position: turn−90°( (0, 0) − (2, 0) ) = turn−90°(−2, 0) = (0, 2)
A turn by −90° sends (x, y) to (y, −x). So (−2, 0) becomes (0, 2). As seen from camera 2, camera 1 is turned by −90° and stands 2 units along camera 2's second axis.
Now move the whole world by (5, 5). Camera 1 stands at (5, 5) and camera 2 at (7, 5). The difference is still (−2, 0). The relative pose is still −90° and (0, 2).
The world moved and the answer did not. Turn the world and the same thing holds. That is what the slider shows.
So π4 grades cameras in pairs. For every pair of different images in a training example, it compares the predicted relative pose with the true one. It measures the angle between the two rotations and the gap between the two translations. No absolute frame is ever needed. The network is free to choose a frame, and it learns to choose one that fits all pairs.
There is a second split in the same spirit. The model could predict one large pointmap with all points in the shared frame. It does not. As you saw in Chapter 1, it predicts local pointmaps and poses apart.
Why? Think of what an error in a global point means. The point can be wrong because the surface in front of the camera is wrong. Or the surface is right and the camera is placed wrong. A global pointmap mixes the two errors into one number.
The pixels of one photo say a lot about the local shape: this wall is flat, that pole is thin. They say less about where the camera stands among the others. With two outputs and two losses, the model can learn good local shape even while the camera positions are still uncertain. The paper states this reason in Section 6.4.
The paper also reports two smaller findings from its tests. One: this relative supervision trained faster than a pose regression tied to a chosen reference frame. Two: reading the pose from the patch tokens of an image gave lower losses than reading it from one extra token made for that purpose.
One problem remains. At the very start of training, the poses are random and relative-pose training is hard. The paper adds a helper task for that: match patches between images. Chapter 5 shows that loss.
Chapter 3
Step through the looped decoder, see what weight sharing saves, and read where the training memory goes
Now we open the model. The first part is an image encoder. It cuts each image into small square patches and turns each patch into a list of numbers called a token. π4 uses a pretrained encoder named DINOv3 for this. Both branches share it.
A small detail with a real effect: the encoder has many layers, and π4 does not use only the last one. It combines the outputs of layers 11 and 17. In the paper's tests this pair gave the best points and cameras of the pairs they tried. Earlier work (UFM) had found the same thing: for per-pixel outputs, middle layers of a frozen encoder can beat its last layer.
After the encoder we have a grid of tokens. Picture a table. Each row is one view. Each column is one patch position. So far, every token knows only about its own patch in its own image. To find shape, tokens must talk.
They talk through attention. In an attention step, each token looks at a group of other tokens. It takes a weighted mix of what they hold and adds it to what it holds. The model learns the weights.
The decoder uses two kinds of attention, and the only difference is the group.
Frame attention lets a token look at the tokens of its own image only. One row of the table talks. This is where a view works out its own content: this is a wall, that is a pole in front of it.
Cross-view attention lets a token look at the tokens of all images. The whole table talks. This is where views compare notes: your pole is my pole, so we must stand about here.
Count the work for the small table in the device below: 4 views with 6 tokens each. In frame attention, each token looks at the 6 tokens of its own view. In cross-view attention, each token looks at all 24.
frame: 4 × 6 × 6 = 144 looks cross-view: 24 × 24 = 576 looks
Cross-view attention costs 4 times more here, because there are 4 views. With N views it costs N times more than frame attention. With 64 views that factor is 64. Keep this in mind for the memory plot at the end of the chapter.
One frame block and then one cross-view block make a pair. VGGT and π3 stack many such pairs, each with its own weights. π4 follows a 2026 paper named Déjà View (its model is called DVLT) and does something else. It has one pair, and it runs that pair again and again.
A loop step is one pass through the pair. Press Step below and watch one happen.
Rows are views. Columns are patches. Each press runs half a loop step: first frame attention, then cross-view attention. The fill of a token shows how much it has heard from other views. On the right you see the blocks of weights the decoder owns.
The table, the fills and the lines are a drawing of Eq. 1, not measured values. The paper does not give the exact form of the step signal. The fractions shown, ℓ/L and (ℓ+1)/L, are our reading of "normalized current and next loop positions" (Sec. 3.2).
Switch to Stacked and look at the right side. For the same depth of 16 pairs, a stack owns 32 blocks of weights. The loop owns 2. It uses them 16 times.
That is weight sharing. It is a large part of why π4 is small. The geometry model has 343M parameters. π3, with a stacked decoder, has 959M.
But a block that runs 16 times has a problem. It does not know which pass it is in. Early passes should do rough work: which views overlap at all? Late passes should polish. A stack gets this for free, because block 3 and block 14 are different blocks. A loop has to be told.
That is the job of the step signal τ. Slide L in the device and watch the fractions. At step 4 of 8, the current position is 0.5. At step 8 of 16, it is also 0.5. The signal is a fraction of the whole loop, so "half way" looks the same for a short loop and a long one. That matters because training changes L from one batch to the next.
Does the signal help? The paper tested it. Both models were looped. The only difference was the step signal.
| Looped decoder with the step signal, against one without it | Change in validation loss |
|---|---|
| Local point loss | lower by 2.8% |
| Camera loss | lower by 10.2% |
The paper also compared a looped decoder with a stacked one over a long training run (its Figure 8). Early on, the curves run close together. The looped model with the step signal pulls ahead only late in training, after about 60,000 steps in that figure. A short test would have missed the gain.
So what does the saved memory buy? The paper gives its reason plainly: sharing the loop weights reduces memory use, and that frees room for larger sets of views in one training example.
This matters because of what the model must learn. Joining 64 views of one place is a different skill from joining 4. A model that never trains on large sets must guess how to handle them. π4 trains on single images, on short sets of 2 to 24 views, and on long sets of 32, 48 or 64 views.
The plot below shows what one training update costs in memory as the view count grows. The paper measured it on a GPU with 80 GB.
Slide the number of views in one training example. The bar on the right is one 80 GB GPU.
Values read off the plot in Fig. 9 of the paper, so each is "about". Setting: peak memory for one full update on an A800 80GB GPU, 512 × 512 inputs, BF16 precision, 16 loop steps, with activation recomputation.
Read the two ends. One view costs about 6 GiB. Sixty-four views cost about 58 GiB. That is ten times the memory for 64 times the views. Each added view costs less than 1 GiB, because the fixed costs are paid once.
And 58 GiB fits on one 80 GB card. That is the point of the whole design. A small looped decoder leaves enough room to train on 64 views of one scene together. Chapter 9 shows what that buys at test time, on routes of up to 800 frames.
The motion branch has a looped decoder of the same kind, with its own pair of blocks and 8 loop steps. The two branches do not share decoder weights. Sharing happens inside a branch, not between them. We meet the motion decoder in Chapter 7.
Chapter 4
Turn the final tokens into one 3D point for every pixel, then clean the surface where image neighbours are not real neighbours
The loop from the last chapter ends with a grid of tokens. Each token describes one image patch, and it has looked at every other view sixteen times. But a token is not a 3D point. A local pointmap needs three numbers for every pixel, not one vector for every patch.
So the geometry branch needs a part that reads the tokens and writes pixels. That part has to answer three questions. Which three numbers should it write? How does it grow a coarse patch grid into a full image? And what does it do at the edges of objects, where growing a grid goes wrong?
You met the pointmap in Chapter 1 as a ray times a depth. The point head predicts exactly those pieces. For each pixel it writes two ray coordinates and the logarithm of the depth.
Why split a point into a ray and a depth? Because they answer different questions. The ray says which way a pixel looks. That depends only on the lens. The depth says how far the surface is. That depends only on the scene.
With two separate outputs, each can get its own teacher. You will see the ray loss in the next chapter.
A desk is half a metre away. A mountain is five kilometres away. One network must write both numbers. If it wrote metres directly, an error of 10 cm would be a disaster on the desk and invisible on the mountain.
The logarithm fixes this. A step in log depth is a percentage step in depth. The same step means the same relative change at every distance. Try it.
Two surfaces sit at 2 m and at 40 m. Drag the step. Then switch how the step is applied and compare the two surfaces.
Arithmetic only. The paper states that the head predicts log z (Sec. 3.3). The two example depths are ours.
A worked number. Add 0.10 to log z. That multiplies the depth by e0.10, which is 1.105.
2 m → 2 × 1.105 = 2.21 m 40 m → 40 × 1.105 = 44.2 m
Both surfaces moved by 10.5%. There is a second gain. An exponential is never zero or negative, so the head cannot place a point behind the camera.
Two more outputs come from the same final tokens. A shallow camera decoder writes one pose for each image. It reads the patch tokens directly. In an early test the authors compared this with a dedicated register token as the readout, at matched parameter count. The patch tokens gave lower point and camera losses, so they stayed (Sec. 6.6).
The scale head is a small decoder that attends to the context of the whole input set. It writes one number for the set, a log scale ℓm. The scale is m = exp ℓm. One number is enough, because every view shows the same world, and that world has one size.
A newer design was on the table. A pixel-level head in the style of PXDepth and PixelDiT gives sharp monocular depth. The authors tried one in place of the convolutional head. It left artifacts aligned to the patch grid in the local points, most of all on inputs where the model was uncertain (Sec. 6.8). VGGT-Ω reports similar blocky artifacts for an all-MLP depth decoder.
So π4 keeps the standard convolutional head. It reads only the final decoder state. It does not fuse features from several depths of the network. The design stays simple, and the detail work goes to a separate stage.
Stand in front of a wall with a thin pole between you and it. In the image, a pole pixel and a wall pixel sit side by side. In the world they are four metres apart.
A convolutional head works on image neighbours. Near the edge of the pole it blends features from both sides. The blended depth lands between the pole and the wall, where there is only air. These are flying points. They smear every object edge into a ramp.
More smoothing in the image makes it worse, because the image is the wrong place to look for neighbours. The real neighbours of a pole point are other pole points. You find those in 3D. This is the idea π4 takes from MoGe-3: lift the coarse points into space, and run a sparse 3D U-Net over the occupied cells. A sparse network computes only where points exist, so empty air costs nothing.
You look down on one image row: a pole at 2 m in front of a wall at 6 m. The coarse head leaves points in the air at both edges. Add refinement steps. Then change where the refiner looks for neighbours, and what it is conditioned on.
Toy row with a scripted refiner. Depths, noise and the size of each correction are illustrative. From the paper: refinement updates log depth and keeps the rays (Eq. 3). A pretrained refiner with zeroed image conditioning cleans structure but raises mean normalised XYZ L1 error by 8.77% (Sec. 6.9, Fig. 11).
The refiner runs a few rounds. In each round it proposes a correction to the log depth of every point. The ray does not change.
Keeping the ray is a deliberate limit. A pixel looks in one direction, and the lens fixes that direction. The only honest question left is how far along that direction the surface is. So the refiner gets one degree of freedom for each point.
A worked number. A pixel on the pole edge has the ray r = (0.10, 0.00, 1). The coarse head put it at z = 3.8 m, in the air. The refiner proposes Δ = −0.64.
log 3.8 = 1.335 1.335 − 0.64 = 0.695 z = e0.695 = 2.0 m
P = 2.0 × (0.10, 0.00, 1) = (0.20, 0.00, 2.0): on the pole, on the same ray
Here is the test that shaped the design. The authors took the pretrained MoGe-3 refiner and gave it π4's coarse points. Then they removed its view of the image. They replaced its image-derived conditioning features with zeros, and in a second run with random noise.
The surfaces still improved to the eye. They became more coherent, and thin structures near depth edges lost their distortion (Fig. 11). A refiner has learned what real surfaces look like, and it can apply that without seeing the photo.
The numbers moved the other way. Against the coarse prediction, the mean normalised XYZ L1 error rose by 8.77% with zeros and by 7.47% with noise. The structure was cleaner, and the points were in slightly wrong places. Set the device above to Zeros to see that trade.
The lesson is that a shape prior is not evidence. So π4 conditions its refiner on projected geometry-decoder features. Those features carry what the images showed about this scene, and they guide each correction toward a location the images support.
Chapter 5
Build the geometry loss one term at a time, and see which mistake each term can catch
The geometry branch now writes four things: local pointmaps, poses, rays and a scale. Training needs a grade for each. A grade is a loss: one number that is zero when the output is right and grows as it gets worse.
The hard part is not the arithmetic. The hard part is that several different mistakes can hide behind each other. A pointmap can be perfect while its camera sits in the wrong place. A scene can be perfect in shape and wrong in size. Each term below exists to catch one mistake that the others miss.
A photo cannot tell a doll's house from a real house. So most training data carries no trustworthy size, and the model should not be punished for a size it cannot know. The loss removes size in two moves.
Move one: normalise. Measure how far the points are from their cameras, on average, over the whole sequence. Divide every point by that number. Do the same to the ground truth with its own number.
A worked number. The model predicts three points at distances 2, 4 and 6. The truth has them at 5, 10 and 15.
s(P) = (2 + 4 + 6) / 3 = 4 s(P*) = (5 + 10 + 15) / 3 = 10
normalised: 0.5, 1.0, 1.5 on both sides. The shapes match, so the loss is zero.
Move two: align. The mean is a blunt tool. A few far points can pull it. So the loss then fits one extra positive scale a, following π3. It picks the a that makes the predicted points lie closest to the truth under a depth-weighted L1 error, with no shift. The solver is the ROE solver from MoGe.
The loss multiplies the camera translations by the same a, so points and cameras stay in one consistent size.
From here on, a hat means "normalised and aligned prediction" and a star means "normalised ground truth".
A companion term grades the surface, not the single point. Point-gradient matching, from SurGe, compares the difference between neighbouring points with the same difference in the truth. It skips neighbourhoods that are invalid or that cross a real depth edge. It asks: is this wall as flat, and this corner as sharp, as it should be?
Now notice what Llocal cannot see. Each pointmap lives in its own camera frame. If the model puts camera B two metres from where it belongs, the local points of B do not change at all. The loss stays at zero. Something else must grade where the cameras are.
There is no reference view, so there is no "correct" world frame to compare a pose with. What does have a correct answer is the transform from one camera to another. For every distinct pair of cameras the loss forms the relative pose and compares it with the truth.
Two separate grades leave a gap. The points can be a little wrong one way and the cameras a little wrong another way, and the errors add when you put the scene together. The relative-point loss grades the combination. Take the points of view i. Carry them into camera j with the predicted relative pose. Compare with the truth carried the same way.
See all three terms at work. In the toy below, two cameras look at one wall. You control two mistakes: camera B in the wrong place, and B's depths too long or short.
Switch the terms on and off. Slide camera B away from its true place. With only the local term on, the total does not move. Then stretch B's depths and see which terms answer.
Toy scene in metres, flat, with unit weights and no normalising. The three terms follow Eq. 6, the relative pose loss and Eq. 7 of the paper. The values are computed live from the picture and are not the paper's.
The toy shows why the third term earns its place. The camera term sees a misplaced camera. The local term sees stretched depths. Only the relative-point term rises for both, and it rises in the units that matter in the end: metres between where a point is and where it should be.
The paper tested the weight of this term. Making it ten times larger lowered local point loss by 5.4% and camera loss by 2.3%. The authors also tried removing it and raising the local-point weight to compensate. That did not bring back the camera quality (Sec. 6.7).
Two more point terms use views that overlap. Cross-view point consistency carries a point into camera j and compares it with j's own predicted point at the true matching pixel. Relative point-gradient matching compares surface differences in a shared camera frame. Both need the point to be visible in both views, so they use visibility masks.
Rays. When the data has true camera intrinsics, the true ray of every pixel is known. The ray loss Lray is the mean absolute error between the predicted (rx, ry) and that target. It teaches the lens and nothing else, and it does not depend on scene size.
Matching. Early in training the poses are random, and relative-pose gradients say little. A direct question helps: for this patch in view i, which patch in view j shows the same thing? The model scores every destination patch and a softmax turns the row of scores into probabilities.
right patch gets probability 0.60 → loss = −log 0.60 = 0.51
right patch gets 0.05 → loss = 3.00. A confident wrong answer costs six times more.
Metric scale. Some datasets do know the real size. On those, the scale head is graded against the true scale m*.
m = 1.2, m* = 1.5: log 2.2 − log 2.5 = 0.788 − 0.916 = −0.128 squared = 0.016
This follows MoGe-2, which keeps scale apart from shape. The shape terms above never see m, so a wrong size cannot damage a right shape.
Each term runs only where its labels exist. A dataset with no intrinsics skips the ray term. A dataset with no real size skips the metric term. This is how forty very different datasets can train one model.
Go back to the normaliser s(P). The camera translations are divided by it too. That is right in the forward pass, because points and cameras must share one size. But think about the backward pass.
The camera loss wants a smaller translation error. It has two ways to get one. It can fix the translation. Or it can change s(P), which means moving thousands of predicted points to change their mean. The second way is a side door. It lets a camera mistake reshape the pointmap.
Solid lines carry values forward. Dashed lines carry gradient back from each loss. Switch the stop gradient on and off, and watch the path from the camera loss to the points.
A diagram of Eq. 11. The percentages are the paper's normalisation ablation (Sec. 6.6), relative changes in validation loss.
The result of closing the door: camera loss fell by 10.9%. Local point loss rose by 0.2%, which is about unchanged. The camera prediction itself is not detached. The two tasks still share a backbone and still help each other there.
Chapter 6
Compare three ways to say where a point went in 3D, and find which errors each one lets in
The geometry is done. Every view has a refined local pointmap, a pose and a shared scale. Now add time. A person walks along a wall. You tap them in one view, the query view. You want their 3D position in every other view, the target views.
The obvious plan is to ask a network for the answer directly: three numbers, X, Y and Z, for each target view. Several strong models do this. This chapter shows what that plan costs, and the cheaper plan that π4 uses.
Suppose the network must output the 3D endpoint of the walker in a fixed reference frame, such as the first camera. To get that number right, the motion part of the network must know four things at once.
Only the first item is about motion. The other three are the job of the geometry branch, and it has already done them. A network that regresses XYZ must redo that work inside its motion output. Its private version will differ a little from the real reconstruction. Every such difference shows up as a track that floats away from the scene.
There is a numerical problem too. In a small room the XYZ targets are a few metres. On a long street they are hundreds of metres. The same network must write both. A pixel coordinate has no such range. It is between 0 and the image width, in a doll's house and on a motorway alike.
π4 splits the question. The motion branch answers only item 1. It predicts the pixel. Then one line of arithmetic reads the 3D position out of the reconstruction.
This is lifting. Nothing new is learned in this step. It has no weights. It is a lookup followed by the rigid transform you already know.
One property follows at once. The answer is a point of the target view's pointmap. So a visible track point lies on the reconstructed surface. It cannot float in front of the wall or sink behind it. The paper's phrase is by construction.
The paper compares three ways to parameterise a 3D track (Fig. 10, Sec. 6.4). The device below puts all three on one scene so you can load each with errors and see where they go.
| Parameterisation | The network predicts | Used by | Errors that reach the track |
|---|---|---|---|
| XYZ regression | A 3D endpoint in a reference frame | ARROW | Its own estimate of correspondence, depth, camera and scale, all in one number |
| UV + own depth | A pixel and a separate tracking depth | MoSE3 | The pixel error, and a depth that may disagree with the reconstruction |
| UV + lifting | A pixel only | π4 | The pixel error, and every error of the reconstruction itself |
You look down on a street. A walker moves along the wall. The target camera slides away from the query view. Press Play, then pick a track to read. Raise each error and watch which tracks leave the blue reconstructed surface.
Toy scene, 20 m wide, with a 512 px wide image and a focal length of 300 px. All drift sizes are illustrative: Fig. 10 of the paper shows these effects in pictures, not numbers. From the paper (Sec. 6.4): XYZ endpoints degrade as target cameras move away from the query view. An independent depth can leave the reconstructed surface. Lifted visible points lie on it by construction.
Run four experiments on it.
One: move the target view to 64. The purple XYZ track drifts further from the wall the further the camera goes. The paper saw this in ARROW's native tracks. In its 64-frame example, late trajectories deviate visibly from the geometry of their own frames (Fig. 7). The yellow and teal tracks do not care how far the camera went, because a pixel is measured in the target image itself.
Two: raise the tracking depth error. Only the yellow track moves. It stays on the right line of sight and slides along it, off the wall. The global path still looks plausible from far away. Up close the track hangs in the air. That is the close-up row of Fig. 10.
Three: raise the pixel error. The teal point moves, but it moves along the wall. A wrong pixel still shows some part of the surface, so lifting returns a point on the surface. The gap to the reconstruction stays at zero.
Four: raise the reconstruction error. Now the blue surface itself leaves the true wall, and the teal track goes with it. This is the honest cost of lifting. The track is exactly as good as the geometry under it, and no better.
Switch the occluder on. A pillar now blocks the line of sight. The pixel is still correct, but the surface at that pixel is the pillar. Lifting reads the pillar.
This is why the rule is stated for visible points. The motion branch predicts a visibility flag and a tracking confidence for every correspondence. A point marked not visible has no surface to read in that view. The device draws it hollow.
Lifting is short enough to do by hand. Step through one track point. The pixel the motion branch predicts is rarely a whole number, so the lookup reads between the four nearest pixels. The paper says only that it samples the pointmap. Reading between pixels with bilinear weights is the standard way, and it is our choice here.
Press Next to run one operation at a time. Change the scale at any step and the last line updates.
All values are ours, chosen so the arithmetic is easy to check. The operations are Eq. 5 with Eq. 4 inside it.
Count the learned parts in that list. There is one: the pixel in step 2. Steps 3 to 6 are fixed arithmetic on outputs of the geometry branch. So the training target for motion is a pixel coordinate. It has the same range in every scene, and it does not contain the scene's scale.
Lifting guarantees registration. It does not guarantee the top score. Here are the single-view 3D tracking averages from Table 4a, for the three models in the table above.
| Model | Parameterisation | 2D AJ | 3D AJ |
|---|---|---|---|
| ARROW | XYZ regression | 52.44 | 48.61 |
| MoSE3 | UV + own depth | 57.41 | 46.97 |
| π4 | UV + lifting | 72.43 | 47.68 |
AJ is average Jaccard. It counts a point as right only if both its position and its visibility are right, so higher is better. π4 has the best 2D score of the three by a wide margin. On 3D it is second, one point behind ARROW. In the multiview test ARROW leads on 3D by more (3D APD 70.00 against 65.01). Chapter 10 has the full tables.
So read the claim narrowly. The 3D benchmark aligns each method's output to ground truth before scoring. It does not measure whether a track agrees with the method's own reconstruction. That agreement is what lifting gives, and it matters when you use both outputs together: a tracked hand that must touch the reconstructed table.
Chapter 7
Build the motion branch: a second loop that reads frozen geometry features, finds each pixel in every view, and marks what moves
Lifting needs one thing from the motion branch: for a pixel in the query view, the matching pixel in every target view. That sounds like a small job. It is not. The target view may be a later video frame, or a photo from across the street by a different camera.
Finding the same surface point across a wide change of viewpoint is a geometry problem. And the geometry branch has just spent sixteen loop steps solving it. This chapter is about how the motion branch reuses that work without damaging it.
The geometry branch is trained first, for about 300,000 updates. Then it is frozen: its weights no longer change. The motion branch trains for about 100,000 more updates on top of it.
Why not train both together? The paper gives one reason: to add motion without compromising reconstruction. Freezing guarantees that. Nothing in the geometry branch can move, so adding motion cannot cost any reconstruction quality. Our reading of the risk it avoids: the motion data leans on synthetic and game video, and its gradients could pull the geometry weights toward that data.
The features that pass from geometry to motion are also detached. They go through a stop gradient, the same tool as in Eq. 11. Values flow forward. No gradient flows back.
The motion decoder has the shape you know from Chapter 3. It starts from the image tokens of the shared DINOv3 encoder. It alternates frame attention and cross-view attention. It reuses one pair of blocks for M = 8 loop steps. Its weights are its own. Weight sharing happens across the steps of one branch, never between the two branches.
It leaves out one thing on purpose: temporal positional embeddings. Most video trackers tell the network that frame 7 follows frame 6. π4 does not. So the motion branch cannot assume its inputs are in time order. It handles a video, four cameras at one instant, or a shuffled pile of photos with the same weights.
The motion decoder must take in the geometry features at every loop step. The simplest way would be to add them to the tokens. π4 uses a stronger tool: spatial adaptive layer normalisation, or Spatial AdaLN.
Start with plain layer normalisation. It takes a token, subtracts the mean of its channels and divides by their spread. Every token then has the same overall level and contrast. Next, a normal layer applies one learned gain and one learned offset to each channel, the same for every token.
The adaptive version replaces those fixed numbers. A small network reads a condition and writes the gain and offset. In Spatial AdaLN the condition is the geometry feature at the same view and the same patch, with the loop progress. So every patch gets its own gain and offset, chosen by the geometry at that exact place.
The top row is a motion token with eight channels. The middle row is the same token after normalising. Drag the geometry feature and the loop progress. They set the gain and offset, and the bottom row changes.
Illustrative: eight channels, one scalar g, and a fixed toy mapping from g and the loop step to gain and offset. In the model g is a feature vector and the mapping is learned. M = 8 loop steps is the paper's value.
A worked number for one channel. The token's channels have mean 0.2 and spread 0.5. One channel holds 0.9.
norm = (0.9 − 0.2) / 0.5 = 1.4 with γ = 1.5, β = −0.3: 1.5 × 1.4 − 0.3 = 1.8
The layer sits inside both the attention and the feed-forward sublayers of the motion blocks. So geometry does not enter once at the door. It steers the computation at every loop step.
Does it help? In the paper's ablation, an identical motion model without geometry conditioning was the baseline. Adding the conditioning lowered the end-point error, the distance in pixels between the predicted and true matching pixel. It fell by 7.17 px overall and by 8.10 px on pairs with a large camera baseline (Sec. 6.5). The harder the viewpoint change, the more the borrowed geometry is worth.
After the loop, a readout within each image feeds the track head. The head is adapted from CoWTracker. For every pixel of the query view it must write a pixel in each target view.
It does not guess in one shot. It starts from zero displacement: the first estimate is "the point did not move, same pixel coordinates". Then it repeats one step. It warps the target features to the current estimate, compares them with the query features, and predicts a correction. Each round the estimate moves closer.
The head's input is the upsampled motion features, joined with 128-channel features from a shallow convolutional RGB encoder. The shallow encoder keeps fine image detail that patch tokens lose. As with the decoder, the authors removed CoWTracker's temporal position embeddings, so any view order works.
Left: the query view with one tapped point. Right: a target view. The estimate starts at the same pixel coordinates and moves with each iteration. Widen the camera baseline. Then switch geometry conditioning off and step again.
Toy images and a scripted update. The convergence speed and the leftover error are illustrative. From the paper: the head starts from zero displacement and refines by warping (Sec. 3.4). Geometry conditioning lowers end-point error by 7.17 px overall and 8.10 px on large-baseline pairs (Sec. 6.5).
Three details complete the head.
The anchor. Track the query view into itself and every pixel must map to itself: Uq→q(u) = u. The outputs satisfy this. It is a free sanity check, and it pins the map so that a displacement of zero really means "same place".
Dense first, sparse on demand. The head writes a full map, one target pixel for every query pixel. If you want 50 tracked points, the model samples that map at your 50 pixels.
Visibility and confidence. For each correspondence the head also writes whether the point is visible in the target view, and how sure it is. Chapter 6 showed why lifting needs that flag.
Training follows CoWTracker: a regression loss on the coordinates at every iteration, and binary cross-entropy on visibility and confidence. There is one extra source of labels. Where the scene is static, the true correspondence follows from ground-truth geometry and cameras alone. So every static dataset becomes tracking data as well.
The last output is a moving-object mask for each image: for every pixel, the probability that it belongs to something that moves. It does not depend on the query view.
The mask head takes the motion readout and joins it with features from a frozen SAM 2 image encoder. The motion features know what moved. The SAM features know where objects end. A convolutional decoder with higher-resolution SAM skip features writes a mask aligned to the image. The design is inspired by GMOS.
One choice about labels is easy to miss. An object counts as moving if it moves at any time in the sequence. It keeps that label in every frame where it appears, also while it stands still.
A car drives, waits, then drives on. A parked van never moves. Scrub through the frames and switch the labelling rule.
Illustrative scene. The rule is the paper's (Sec. 3.4): labels describe sequence-level object motion. An object that moves within the annotated sequence stays positive in each frame where it appears, including during pauses.
The sequence rule gives a stable target. With the other rule the car would blink off at the red light, and the model would be punished for knowing it is a car that drives. For a user the stable mask is also the useful one. It marks the things to leave out of a static map.
Chapter 8
Tilt the cameras, bend the lenses, and erase the moving foreground to make labels the model can trust
The last four chapters built the model. A model learns only what its training data shows it. So ask a plain question: what do most 3D datasets look like?
They look tidy. A person holds a phone upright and walks through a room. The camera has almost no roll. Every image comes from the same pinhole lens. The scene is a room or a single object on a table.
Photos in the wild are not tidy. A drone tilts. An action camera has a fisheye lens. A video of a dancer is mostly dancer, with a thin strip of wall behind. If the training data never shows these cases, the model fails on them. π4 fixes three gaps, one at a time: scenes, cameras and moving foregrounds.
The authors collect about 10,000 scene-level 3D assets from two online archives, Funes and Sketchfab. A scene-level asset is a full 3D model of a place: a building, a street, a courtyard. It is not a mug on a turntable. The assets allow views from outside and, where the model has an inside, views from inside too.
A 3D asset gives perfect labels for free. The renderer knows the exact depth of every pixel and the exact pose of every camera. The hard part is to choose where to put the cameras. The paper states its goal plainly: more variety of layouts and camera setups, not more rendered images.
The pipeline has four steps.
Step 3 needs one more rule. If you count only surface area, a huge flat floor wins every time. So the selection balances area with spread in position and in viewing direction. A small ornate doorway then still gets its views.
Here is step 3 with small numbers of our own. Three candidate views see 40, 35 and 30 square metres of surface. View A goes first: it sees the most. Now view B overlaps A on 30 of its 35 square metres, so it adds only 5. View C overlaps A on 5, so it adds 25. C goes second, although it saw the least alone. Coverage counts what is new.
Step 4 builds a view-overlap graph. Two views get an edge when a depth check shows that they see the same surface. A connected view chain is a walk along those edges.
Neighbours in a chain share geometry, so the model can match them. The two ends of the chain may share nothing at all. That is the point. It matches what a real photo collection looks like: no single image overlaps all the others, and the views do not follow a smooth video path. The model must pass information along the chain. In Chapter 3 you saw the part that does this: cross-view attention, repeated over 16 loop steps.
Each asset gets two independent sets of cameras. The natural set looks like a person with a phone: a small roll angle and one shared lens. The counterbias set does the opposite on purpose. It covers a wide range of roll angles, and the focal length changes from view to view.
Roll is the rotation of the camera around its own viewing direction: tilt your head to one shoulder. Field of view (FOV) is the angle the lens takes in: a wide lens has a large FOV, a zoomed lens a small one.
Left: three cameras around a building, from above. Right: the image frame of each camera, turned by its roll. Pick a set, then draw new cameras.
The first cameras shown for each set are the paper's Fig. 4 examples: natural at roll 0°, 5°, −5° with FOV 58°; counterbias at roll 45° / FOV 72°, roll −75° / FOV 42°, roll 135° / FOV 60°. New draws are illustrative: the paper does not print its sampling ranges. The building is a toy.
The two sets use different camera positions. They are not the same view twice with a twist. So the counterbias set also adds new viewpoints and new occlusions.
Roll and zoom still leave one bias. Almost every training image comes from a pinhole camera, or was straightened to look like one. A pinhole camera maps straight lines in the world to straight lines in the image. A fisheye lens does not.
Remember what the geometry branch predicts for each pixel: a ray (Chapter 1). With pinhole images only, the model sees one kind of map from pixel to ray. So the authors warp the training images. Each sequence draws one lens type, and every image in that sequence gets the same warp.
A square grid seen through four lens types. Pick a type and drag the strength. The bar shows how often training draws that type.
Probabilities: Section 4.3 (identity 40%, barrel 35%, blended equidistant 20%, pincushion 5%). The warp shapes here are standard textbook forms with an illustrative strength: the paper does not print its formulas or parameter ranges.
Three details make this warp honest supervision and not a picture trick.
Why one warp per sequence? A real camera keeps its lens for the whole recording. If each image had a different lens, the model would learn a world that does not exist.
Internet videos are the richest source of real motion. They are also hard for geometry. Think of a first-person cooking video: two hands and a pan fill most of the image. A reconstruction model looks for static structure to anchor the cameras, and finds little. The paper reports that large moving foregrounds disrupt the reconstruction, most of all in first-person video.
The fix sounds odd at first: delete the foreground, invent the background behind it, reconstruct that, and then throw the invented part away. Step through it.
Top: one video frame. Bottom: the scene from above, with the points that become labels. Step through the five stages.
Pipeline: Section 4.4 and Fig. 5. The frame and the point counts are a toy. The inpainting model the paper cites is Wan; the reconstruction comes from an earlier geometry-only checkpoint of π4.
The five stages in words:
Two choices in stage 5 carry the idea.
Why throw away the inpainted points? The generative model invented those pixels. They look plausible, but nobody measured them. A label on an invented pixel would teach the model to trust a guess. The inpainting has one job only: to stop the foreground from breaking the reconstruction of the real background.
Why pair with the original frame? At test time the model sees videos with the person still there. So the training input must have the person too. The model learns this: here is a frame full of dancer, and here is the true geometry of the wall strip around the dancer.
One thing is still missing. Rendered scenes are static, and Internet videos have no ground truth for motion. The motion branch needs to know where each point truly went.
GameRealm fills that gap. It is a dataset built from video games, made with collaborators of the authors. A game engine knows everything about its own world. So GameRealm gives posed colour and depth images from several views, and persistent point trajectories in 2D and 3D: the same point followed through the whole clip.
Table 1 of the paper lists 60 sources with a sampling probability for each. A sampling probability is the chance that the next training example comes from that source. It is not a count of images. The largest shares:
| Stage | Source | Share | What it supplies |
|---|---|---|---|
| Geometry | OmniWorld | 8.28% | Multi-domain 4D data |
| Sketchfab scenes | 6.57% | Rendered scene assets (this chapter) | |
| GameRealm | 4.50% | Game-engine geometry | |
| Internet videos | 1.00% | Foreground-suppressed pseudo-labels | |
| Funes scenes | 0.95% | Rendered scene assets | |
| Motion | GameRealm | 20.53% | Native 2D and 3D point tracks |
| GMOS-2K | 10.00% | Moving-object masks on real videos | |
| Kubric | 5.79% | Synthetic point tracks | |
| SynthVerse | 5.79% | Synthetic point tracks |
The motion stage splits three ways by kind of label: 70.2% point tracking, 19.8% static geometry, and 10.0% moving-object masks from real videos.
The middle share deserves a note. In a static scene with known depth and cameras, you can compute where any pixel lands in any other view. Project it out to 3D, then into the other camera. So every static RGB-D dataset is also a correspondence dataset, with no motion capture needed. The paper calls these static reprojection tracks. They teach the motion branch the wide-baseline matches that Chapter 7 showed it is good at.
One in five motion examples comes from games. That is a large bet on one source. The paper tests for the obvious risk: its long-video tracking benchmark, GameRealm (Long), uses games that the motion training never saw.
Chapter 9
Pack a GPU with views, freeze the right parts at the right time, then run a route of 800 frames in one pass
Here is a claim that should make you suspicious. During training, π4 never sees more than 64 views of one scene. At test time it takes more than a thousand images in one forward pass. Why should that work at all?
This chapter answers in three parts. First, how the training budget is spent on views. Second, what is trained when, and what stays frozen. Third, the test: six long routes through Oxford, where several larger models run out of memory.
Each GPU holds at most 64 images per training step. You can spend that budget in two ways. You can take 64 different scenes with one image each. Or you can take one scene with 64 views. Or anything between.
The paper's rule is simple. If a training example is a set of K views of one scene, a GPU packs as many whole sets as fit:
K = 1 → 64 examples K = 8 → 8 K = 24 → ⌊2.67⌋ = 2 K = 48 → ⌊1.33⌋ = 1 K = 64 → 1
Look at K = 24. Two sets use 48 images, and 16 slots stay empty. Look at K = 48: one set, 16 empty slots. A long set is costly twice. It gives fewer independent examples, and it can waste slots.
Drag the view count K. Left: the 64 image slots of one GPU, grouped into sets. Right: the memory the paper measured for an input set of that size.
Packing rule: Section 4.6. Memory: read off the plot in Fig. 9, so every value is "about". Fig. 9 measures peak allocated memory per full update on an A800 80GB GPU with 512 × 512 inputs, BF16, 16 loop steps and activation recomputation.
Short sets give many independent examples per step, which makes gradients less noisy. So why not train on short sets only, and hope the model extrapolates?
Because combining evidence across many views is a skill, and the model learns a skill by doing it. With 4 views, cross-view attention has little to reconcile. With 64 views, the same point shows up in a dozen images, and the cameras must agree with all of them at once. The paper says it wants direct training exposure to large sets, and does not want to rely only on extrapolation from short ones.
So the view count is drawn at random for each example, from three buckets:
| Bucket | View count K | Share of the draws | What it trains |
|---|---|---|---|
| Single image | 1 | Extra mass | Depth and rays from one image, with no second view to lean on |
| Short sets | 2 to 24 | Most of the mass | Frequent updates with many independent scenes per step |
| Long sets | 32, 48 or 64 | Extra mass | Combining evidence over many views |
The paper gives no exact probabilities for the buckets. It says only that short sets get most of the mass, with extra mass on single images and on the long buckets.
Now connect this to Chapter 3. The geometry decoder is one pair of blocks, used 16 times. The paper says it chose weight sharing partly to reduce memory, and that this frees capacity for larger contexts inside one sequence. The measured footprint is in Fig. 9: about 6 GiB for one view, about 18 for 8, about 31 for 32, and about 58 GiB for 64 views. A 64-view set fits on one 80 GB card.
π4 is not trained in one go. It is trained in stages, and each stage starts from the weights of the one before. The order matters, so step through it.
Each box is one module. A filled box is trained in this stage. An outlined box is frozen. A faint box does not exist yet.
Stages: Sections 3.5 and 4.6. The paper gives the totals (about 300,000 geometry updates, about 100,000 motion updates) but not the length of each geometry stage, and not the order of the confidence stage relative to motion.
Every freeze has a reason.
| Setting | Value |
|---|---|
| Hardware | 64 NVIDIA A800 GPUs |
| Geometry training | about 300,000 optimizer updates, over progressive stages |
| Motion training | about 100,000 updates, geometry frozen throughout |
| Optimizer | AdamW, BF16 mixed precision, cosine decay |
| Image size | long side 512 pixels, varying aspect ratio |
| Base learning rate | 1.5 × 10−5 (decoder and heads) |
| Encoder learning rate | 2 × 10−6 |
| Loop steps | geometry 8 to 16 in training, 16 at test; motion 8 |
An update here is one optimizer step under weighted sampling. It is not an epoch: no source is read from start to end.
The encoder is DINOv3, a pretrained image model. Two questions come with any pretrained encoder: which of its layers to read, and whether to keep training it.
Which layers. The last layer of a pretrained encoder is tuned to that encoder's own training task. Middle layers often keep more of the spatial detail that dense prediction needs. In the paper's ablations, reading layers 11 and 17 together gave the best local points and the best cameras among the pairs tried.
Whether to train it. The answer depends on how fast, and on when you look:
| Encoder setting | Early in training | Late in training |
|---|---|---|
| Frozen | Reference | Reference |
| Fine-tuned at 10−4 | Loss falls faster than frozen | Worse than frozen |
| Fine-tuned at 10−5 | Not reported | Local point loss −8.1%, camera loss −4.5% vs frozen |
This is a trap worth remembering. A short experiment would have picked the fast rate, because it looks better early. Only a long run shows that it ends worse than no fine-tuning at all. The final recipe goes lower still: 2 × 10−6 for the encoder, about one seventh of the base rate (1.5 × 10−5 ÷ 2 × 10−6 = 7.5).
Now the claim from the top of the chapter. Oxford Spires is a dataset of long walks around Oxford colleges, with a laser-scanned reference. The paper takes six routes of 361 to 800 frames each. Every model gets all frames of a route in one forward pass. That is roughly 6 to 12 times the longest training set of 64 views.
Five metrics score a route:
Pick a metric. Each bar is the mean over six routes. A red tag marks a model that ran out of memory on some routes, so it has no six-route mean.
Table 3: Oxford Spires, six routes of 361 to 800 frames, one forward pass per route, metric definitions from Scal3R. "Complete" counts the routes a model finished; a dash in the paper means the six-route mean is unavailable because of out-of-memory failures.
Two things stand out.
Four of nine baselines cannot finish. VGGT completes 0 of 6 routes. DA3-Giant and Track4World complete 2, MapAnything 3. They run out of memory. These are models of 1.2 to 1.7 billion parameters.
Only two models stay near one metre. π4 has an ATE of 0.73 m. DVLT, the other looped model, has 1.39 m. Every other model that finishes is above 10 m: π3 10.19, Pi3X 10.35, ARROW 11.17, VGGT-Ω 12.14. The two best models on long routes are the two that loop one pair of blocks.
ATE: 1 − 0.7337 ÷ 1.3885 = 47.2% lower than DVLT CD: 1 − 1.1573 ÷ 1.5238 = 24.1% lower
Be careful with the cause. The table shows that looped decoders do well on long routes. It does not isolate why. π4 also trains on 64-view sets and on its own data mixture, and the paper runs no ablation that separates these on Oxford Spires. So "the loop explains it" is a reasonable reading, not a proven one.
And one honest limit, from Section 7 of the paper. π4 does not consistently match classical geometric optimisation, most of all on sequences longer than those seen in training. Best among feed-forward models is not the same as solved.
Chapter 10
Rank ten models on five kinds of task, and find the places where π4 comes second or third
A model that does five jobs gets five report cards. It is easy to read only the good ones. This chapter reads all of them, with the same care for the losses as for the wins.
First, how do you compare ten models over many datasets with different units? Depth error is a ratio. Pose accuracy is a percentage. Reconstruction error is in metres, or in millimetres on one dataset. You cannot average those.
The paper's answer is the average rank. On each metric, sort the ten models from best to worst and give each its place, 1 to 10. Then average the places. A lower average rank is better, and 1.00 would mean first on everything.
The paper averages in two levels. The geometry evaluation has 16 settings, each a task on a dataset, grouped into four panels: monocular depth, video depth, pose and trajectory, and multiview reconstruction. Ranks are averaged inside each panel first. Then the four panel scores are averaged with equal weight.
π4: ¼ (3.50 + 2.33 + 3.00 + 3.17) = 12.00 ÷ 4 = 3.00 Pi3X: ¼ (2.57 + 3.10 + 3.31 + 3.42) = 12.40 ÷ 4 = 3.10
Read those two lines again. π4 wins overall by 0.10 of a rank. And it wins while losing the first panel: on monocular depth Pi3X is clearly ahead, 2.57 against 3.50. An average rank of 3.00 also tells you that π4 is, on a typical metric, about third. It is the most consistent model, not the best at each thing.
Pick a task, then a metric. Bars are sorted best first. π4 is teal, every other model is grey. The line under the chart says where π4 lands and who leads.
Geometry rank: Table 2 (average ranks over 16 settings, lower is better; the parameter count is every loaded parameter, frozen ones included). Tracking: Table 4, averages over datasets, in percent. A dagger marks a separate tracker that runs on VGGT-Ω geometry. Track4World's single-view average covers 37 of 45 GameRealm clips, so the paper does not rank it. Moving objects: Table 5, mean J&F over three datasets. Metric scale: Table 2, relative error of the point-cloud radius in percent, lower is better.
Set the explorer to Geometry rank, Overall. π4 is first of ten at 3.00. Pi3X is second at 3.10, and π3 third at 3.85. The next model, DA3-Giant, is far behind at 5.53.
Now look at the parameter counts next to the names. π4 loads 343M parameters for this comparison. Pi3X loads 992M, almost three times as many. Eight of the nine baselines are above 950M. Only DVLT is smaller, at 117M, and it ranks seventh.
Three single results back up the ranks:
| Result | π4 | Next best |
|---|---|---|
| Sintel video depth, AbsRel (lower is better) | 0.160 | Track4World 0.181 |
| DTU reconstruction accuracy, mm (lower) | 1.0452 | ARROW 1.0613 |
| ETH3D reconstruction accuracy, m (lower) | 0.1722 | VGGT-Ω 0.1733 |
AbsRel is the absolute relative depth error: the mean of |d − d*| / d*, where d is the predicted depth and d* the true depth. An AbsRel of 0.160 means the depth is off by 16% on average. Sintel is an animated film with fast motion, so this is a hard set, and the gap to the next model is large. The two reconstruction wins are narrow: 0.016 mm on DTU and about one millimetre on ETH3D.
The overall score gives each of the four panels the same weight. That is a choice. A team that builds a depth sensor for single photos cares about one panel only. So try other choices.
Switch panels on and off. The chart shows the mean rank over the panels you keep, for all ten models, best first.
Panel ranks are the paper's (Table 2). The means over a subset of panels are our arithmetic, not a result the paper reports. With all four panels on, the chart is the paper's Overall column.
Keep only Mono depth and Pi3X is first, with π4 third. Keep Mono depth and Video depth: Pi3X is still first, by less than a tenth of a rank. Add Reconstruction or Pose and the lead changes. With Video depth alone, π4 leads by its widest margin.
So the headline depends on a fair but arbitrary choice: equal weight on four panels. That does not make the result weak. It tells you what kind of result it is. π4 is the best all-round model in this table. If your work needs one panel only, read that panel.
Tracking has two metrics, each in 2D and in 3D.
Set the explorer to Single-view tracking and step through the four metrics. On 2D AJ, π4 leads with 72.43. The margin over CoWTracker is 0.01 points, 72.43 against 72.42. That is a tie in any practical sense. On the other three metrics π4 is second. It is behind CoWTracker on 2D APD, 86.38 against 87.42. It is behind ARROW on both 3D metrics: 57.33 against 58.77 on APD, and 47.68 against 48.61 on AJ.
Now Multiview tracking: four cameras that film the same moment, 24 timesteps. The pattern repeats with larger gaps. π4 leads 2D AJ, 35.07 against 32.32 for TAPIP3D. It is second on 2D APD. And in 3D, ARROW is clearly ahead: 70.00 against 65.01 on APD, 41.84 against 33.70 on AJ.
So the honest sentence is this. π4 leads average 2D AJ and is second on the other three metrics, in both settings. It is not the best 3D tracker on these benchmarks.
Chapter 6 argued that lifting keeps a track on the reconstructed surface by construction. ARROW regresses XYZ directly, and its tracks can drift off the surface. Yet ARROW scores higher on 3D APD. Is that a contradiction?
No. Here is our reading; the paper gives no analysis of this gap. "On the reconstructed surface" and "close to the true 3D point" are two different properties. The benchmark measures the second. A lifted track inherits every error of the surface it is read from. If the reconstructed depth of a moving hand is wrong, the track is wrong by exactly that much. A direct regressor can, in principle, place the point well even where its dense geometry is poor.
What the paper does show is the other half. In its pictures (Fig. 7 and Fig. 10), ARROW's late tracks leave the scene when the camera moves far from the query view, and π4's stay registered. The multiview benchmark has four cameras and 24 timesteps per case. It may not stress that failure much. That last sentence is our guess, not a result.
One more caution on the baselines. CoWTracker and TAPIP3D carry a dagger in the table. They are separate tracking models that borrow geometry from VGGT-Ω. So in 2D, π4 ties a dedicated tracker while it shares its encoder with a reconstruction model. That is a fair way to read the 0.01 margin.
Moving-object segmentation is scored with J, the region similarity (the overlap of the predicted mask and the true mask, as intersection over union), and F, the contour accuracy (how well the mask edges match). J&F is their average.
On the mean over three datasets, GMOS scores 87.48 and π4 scores 85.04: second, 2.44 points behind. GMOS is a model built for this one task, and it inspired π4's mask head. π4 does take one first place: region similarity J on SegTrackv2, 83.42 against 82.00.
Chapter 1 introduced the scale m, the one number that turns a reconstruction into metres. The paper scores it apart from everything else, with no scale fitting and no alignment: how far off is the radius of the point cloud, in percent?
| Scale error, % (lower is better) | 7-Scenes | ETH3D | NRGBD | Mean |
|---|---|---|---|---|
| Pi3X | 5.41 | 26.98 | 18.37 | 16.92 |
| π4 | 11.05 | 24.83 | 24.44 | 20.11 |
| MapAnything | 33.54 | 19.03 | 22.73 | 25.10 |
π4 is second on the mean, behind Pi3X. It is second on 7-Scenes and on ETH3D, and third on NRGBD. A mean error of 20% is a plain fact to keep in mind: a room that is 5 metres wide can come out at 4 or at 6. The shape is good. The size is a rough estimate. The paper reports this score for three models only, which is why the table is short.
Put the two columns side by side and the shape of the result is clear. π4 is not the best model at each job. It is near the top at all of them at once, with one shared encoder and about 0.5B parameters for the full system. Most baselines are more than twice that size. That is what "foundation model" means in the title: breadth at a high level, in one pass.
Chapter 11
Name the three failures, lock in the cheat sheet, and place π4 in the field
You can now read the π4 paper and defend each of its choices. Why no view is the reference. Why one pair of blocks runs sixteen times. Why depth is refined in 3D neighbourhoods. Why the motion branch predicts a pixel and not a 3D point. And where the model comes second. Before the summary, the three places where it fails.
1. Is the camera moving, or the object? Picture a video where a large truck fills most of the frame and the background is a blank sky and a plain road. The truck moves left. Or the camera pans right. In the image, the two look alike. π4 can read the moving foreground as stationary, and then it blames the camera for the motion. The reconstruction that follows does not agree with the static background.
This happens when the background has little texture or the foreground dominates. The foreground-suppressed labels of Chapter 8 reduce it. They do not remove it. The paper says a real fix needs scene and motion understanding beyond local texture matches.
2. Far from the origin, cameras get worse. Camera-position errors are larger for cameras far from the reconstruction origin than for cameras near it. The authors suspect the coordinate representation and the numerical size of absolute translations. To see why size could matter: a 1% error on a translation of 200 metres is 2 metres. They call the sensitivity to the choice of origin an open problem.
Our reading: this looks like the disease that Chapter 6 found in XYZ track regression, large coordinates in a reference frame. Lifting removed it for tracks. The camera translations may still carry it.
3. Not yet as accurate as optimisation. π4 does not consistently match classical geometric optimisation, the family that includes bundle adjustment. The gap is widest on sequences longer than those seen in training. One forward pass is fast and robust, but a solver that iterates on the exact reprojection error can still be more precise.
π4 takes plain photos, with no calibration, in any number and any order. For each image, its geometry branch returns a local pointmap, a camera pose and a confidence map. A local pointmap is a ray times a depth for every pixel. The whole set gets one metric scale. It keeps the reference-free design of π3, so reordering the inputs only reorders the outputs.
Its decoder is one pair of Transformer blocks: frame attention, then cross-view attention. The pair runs 16 times with shared weights, and a signal tells each pass where it is in the loop. The memory this saves goes into training on sets of up to 64 views. A sparse 3D refiner then sharpens the depth along each ray.
The motion branch is trained afterwards, with the geometry frozen. It reads geometry features through Spatial AdaLN and predicts only where each query pixel lands in each target image. The 3D track is then read off the target view's metric pointmap. So every visible track point lies on the reconstructed surface by construction.
The result: the best overall average rank in geometry over 16 settings, 3.00 against 3.10 for Pi3X, with a 343M geometry model and about 0.5B parameters in all. It leads average 2D AJ in tracking and is second in 3D. It runs routes of 800 frames in one pass, where several larger models run out of memory.
Before the tables, trace one forward pass. Each row below is one module. Step through them and read what goes in, what comes out, and whether the module is trained or borrowed.
Press Next module, or tap a row. Blue rows belong to the geometry branch, pink rows to the motion branch. The teal row has no weights at all.
Structure: Fig. 3 and Section 3. Output sizes use N views of H × W pixels. The paper does not print the token count, the feature width, or the number of refiner rounds, so none is shown.
| Quantity | Value | Why it matters |
|---|---|---|
| Size | 343M geometry model; about 0.5B full system | Less than half the size of most baselines; only DVLT (117M) is smaller |
| Geometry rank | 3.00 overall, first of 10; Pi3X 3.10 | Leads video depth, pose and reconstruction; third on monocular depth (3.50) |
| Loop steps | L = 8 to 16 in training, 16 at test; motion M = 8 | One pair of blocks, weights shared inside a branch |
| Step conditioning | local point loss −2.8%, camera loss −10.2% | The loop needs to know which pass it is on |
| Training context | 1, 2 to 24, or 32 / 48 / 64 views; ⌊64/K⌋ sets per GPU | Direct practice at combining many views |
| Memory | about 58 GiB for 64 views (Fig. 9) | A 64-view set fits on one 80 GB card |
| Stop-gradient (Eq. 11) | camera loss −10.9%; local point loss +0.2% | The camera loss must not rescale the points |
| Relative-point weight ×10 | local point loss −5.4%, camera loss −2.3% | Points and poses are best graded together |
| Refiner without image features | error +8.77% (zeros), +7.47% (noise) | Clean structure in the wrong place; so the refiner reads decoder features |
| Geometry conditioning | EPE −7.17 px overall, −8.10 px at large baselines | Motion borrows the cross-view work geometry already did |
| Encoder fine-tuning | at 10−5: −8.1% point loss, −4.5% camera loss vs frozen | At 10−4 it ends worse than frozen |
| Long routes | ATE 0.73 m vs DVLT 1.39 m; others above 10 m or out of memory | 361 to 800 frames in one pass, trained on at most 64 |
| Tracking | 2D AJ 72.43 (first); 3D AJ 47.68 (second, ARROW 48.61) | Leads one metric of four, second on the rest |
| Moving objects | mean J&F 85.04; GMOS 87.48 | Second to a specialist |
| Metric scale | 20.11% mean error; Pi3X 16.92% | Shape is good, size is a rough estimate |
| Training cost | 64 A800 GPUs; about 300,000 + 100,000 updates | Geometry first, then motion with geometry frozen |
Four small pieces carry the paper: the loop, the pointmap, the lifting step, and the gradient routing. Here they are in PyTorch style. The layer sizes and the block internals are placeholders, because the paper does not print them. The structure is the paper's.
pythonimport torch import torch.nn.functional as F # 1. Looped decoder (Eq. 1): ONE pair of blocks, applied L times. # Z: [N views, T tokens, D]. Frame attention stays inside a view; # cross-view attention sees the tokens of all N views at once. def loop_decode(Z, frame_block, cross_block, L=16): N, T, D = Z.shape for l in range(L): tau = torch.tensor([l / L, (l + 1) / L]) # where am I in the loop, and where next Z = frame_block(Z, tau) # [N, T, D]: each view alone Z = cross_block(Z.reshape(1, N * T, D), tau) # [1, N*T, D]: all views together Z = Z.reshape(N, T, D) return Z # heads read only this final state # 2. Local pointmap (Eq. 2) and metric world points (Eq. 4). # The head predicts rx, ry and log z for every pixel: [N, H, W] each. def local_points(rx, ry, log_z): ray = torch.stack([rx, ry, torch.ones_like(rx)], dim=-1) # [N, H, W, 3], not unit length return log_z.exp().unsqueeze(-1) * ray # P = z * r, camera coordinates def metric_points(P, R, t, m): # P: [N, H, W, 3] R: [N, 3, 3] t: [N, 3] m: one positive number per set world = torch.einsum('nij,nhwj->nhwi', R, P) + t[:, None, None, :] return m * world # X = m (R P + t), in metres # 3. Lifting (Eq. 5): read the 3D track off the TARGET view's pointmap. # U: [H, W, 2], the pixel in target view i that matches each query pixel. def lift(U, X_metric_i): H, W, _ = X_metric_i.shape grid = torch.stack([U[..., 0] / (W - 1), U[..., 1] / (H - 1)], dim=-1) * 2 - 1 # pixels -> [-1, 1] Xi = X_metric_i.permute(2, 0, 1)[None] # [1, 3, H, W] Y = F.grid_sample(Xi, grid[None], mode='bilinear', align_corners=True) return Y[0].permute(1, 2, 0) # [H, W, 3]: on the surface by construction # 4. Gradient routing (Eq. 11): one shared scale, two gradient paths. def normalise(P, t, valid): s = P[valid].norm(dim=-1).mean() # sequence-wide mean valid point norm P_n = P / s # the point loss may change s t_n = t / s.detach() # the camera loss may not return P_n, t_n # worked check of Eq. 2 and Eq. 4 (numbers of our own): # r = (0.5, 0.2, 1), z = 4 -> P = (2.0, 0.8, 4.0) # R = identity, t = (1, 0, 0), m = 1.5 -> X = 1.5 * (3.0, 0.8, 4.0) = (4.5, 1.2, 6.0)
Piece 3 is the one to remember. It has no learned weights. The motion branch's whole 3D output is one grid_sample on a tensor that the geometry branch already made. If the pixel U is a little wrong, the point slides along the surface. It cannot leave it.
| Equation | In words | Use it when |
|---|---|---|
| Zℓ+1 = Bcross(Bframe(Zℓ; τℓ); τℓ) Eq. 1 | Z: all tokens. Bframe: attention inside one image. Bcross: attention across views. τℓ: the current and next loop position. The same two blocks at every step ℓ. | You want depth of computation without new weights |
| Pi(u) = zi(u) ri(u), r = [rx, ry, 1]⊤ Eq. 2 | The 3D point of pixel u in camera i's own coordinates: depth z along the camera axis, times a ray r that is not unit length. | You need a point without knowing the lens |
| log z(s+1) = log z(s) + Δ(s) Eq. 3 | The refiner changes only log depth, by a correction Δ at each round s. The rays stay. | You refine surfaces and must not move pixels sideways |
| Ximetric(u) = m (Ri Pi(u) + ti) Eq. 4 | Rotate by Ri, shift by ti into the common frame, then multiply by the scale m to get metres. | You place every view in one world |
| Yq→i(u) = Ximetric(Uq→i(u)) Eq. 5 | The 3D track of query pixel u at view i: look up the metric pointmap of view i at the matching pixel U. | You turn a 2D correspondence into a 3D track |
| Llocal = 〈 wi(u) ‖P̂i(u) − P*i(u)‖1 〉 Eq. 6 | Mean L1 error of scale-aligned local points P̂ against ground truth P*, weighted by w, a bounded inverse depth. | You grade surface shape, view by view |
| Lrel = 〈 wi(u) ‖Q̂j←i(u) − Q*j←i(u)‖1 〉, Qj←i = Tj−1Ti Pi Eq. 7 | Move view i's points into camera j with the predicted relative pose, then compare. Grades points and poses together. | You want poses that agree with the points |
| Lmatch = −log πij(b*(a) | a) Eq. 8 | For patch a in view i, the softmax probability given to its true partner patch b* in view j. | Pose learning is stuck at the start of training |
| Lmetric = 〈 (log(1+m) − log(1+m*))2 〉 Eq. 9 | Squared error of the scale m against the true scale m*, in log(1 + m) space. | The data has real metric ground truth |
| P̃ = P / s(P), t̃ = t / sg(s(P)) Eq. 11 | s(P): the mean norm of the predicted points. sg: stop-gradient. Points and translations share one normaliser, but only the point loss may change it. | Two losses share a quantity that only one should control |
Now press Present or Teach and explain, out loud and from memory, why a lifted track lies on the reconstructed surface by construction, and why that still does not make it the most accurate 3D track. If you can, you own this paper. Then go back to the track instrument and drag the target view all the way to 64.