---
id: "dust3r"
title: "DUSt3R"
aliases: [Dense Unconstrained Stereo 3D Reconstruction]
domain: "capture"
stage: "capture"
realtime: "interactive"
platforms: [cuda, python]
year_introduced: 2023
inputs: [photos]
outputs: [point-cloud, depth, camera-poses]
style: "photoreal"
dynamic: "static"
cost: "medium"
authority: "Wang et al., 2023"
url: "https://texelatlas.vercel.app/t/dust3r/"
sources_verified_at: "2026-11-29"
---
# DUSt3R (Wang et al., 2023)

> A transformer that takes two uncalibrated images and directly regresses dense pointmaps in a shared frame, from which depth, intrinsics, matches and relative pose follow without SfM.

## Reach for it when

- reconstruct 3d from photos without camera poses
- structure from motion fails with few images
- get dense 3d points from just two images
- no calibration known but want geometry from pictures

## How it works

A ViT encoder processes each image and a decoder with cross-attention between the two streams outputs a pointmap per image: for every pixel, a 3D point expressed in the first image's coordinate frame, plus a confidence. Camera intrinsics, relative pose and depth are then derived from these pointmaps by simple geometric fitting, e.g. focal length by Weiszfeld-style optimisation and pose by Procrustes or PnP. For more than two views, pairwise predictions are combined by a global alignment optimisation over a graph of pairs, which recovers per-image scale and pose. Training uses large datasets with ground-truth depth and pose and a scale-normalised regression loss. No calibration or known poses are needed.

## When to use it

Choose it for quick geometry and poses from a handful of casual images where [Structure-from-Motion (COLMAP)](https://texelatlas.vercel.app/t/structure-from-motion-colmap.md) fails from low overlap or texture. Prefer [MASt3R](https://texelatlas.vercel.app/t/mast3r.md) when you need accurate dense matching, [VGGT (Visual Geometry Grounded Transformer)](https://texelatlas.vercel.app/t/vggt.md) for many views in one pass, and COLMAP when you have dense, well-textured image sets and need maximum metric accuracy.

## Cost

medium — Pairwise inference is fast on GPU, but global alignment over many images costs seconds to minutes.
Measured GPU Weight: 20.29× baseline (heavy) — 0.6675 ms median / 0.7352 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 21.06× baseline (heavy) — 0.3348 ms median (1.99× faster on L4).
Ampere A100 scaling: 13.69× baseline (moderate) — 0.3943 ms median (1.69× faster on A100).

## Failure modes

- Quadratic pair count and slow global alignment on large image sets
- Pointmaps drift on long trajectories since predictions are not bundle adjusted
- Dynamic objects and reflective surfaces yield inconsistent pointmaps
- Pretrained weights carry a non-commercial licence

## Dataflow

- Inputs: photos
- Outputs: point-cloud, depth, camera-poses
- Platforms: cuda, python

## Presets

### DUSt3R — unposed stereo confidence & pointmap XYZ (left) vs fused 3D point cloud (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_CONF_CUT": 0.45,
  "P_POINT_RES": 18,
  "P_ROT_SPEED": 0.58,
  "P_SPLIT": 0.48
}
```

```glsl
const float P_CONF_CUT = 0.45; // P Confidence Gain [0.1, 1.0, 0.02]
const float P_POINT_RES = 18.0; // P Pointmap Density [8.0, 32.0, 1.0]
const float P_ROT_SPEED = 0.58; // P 3D Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Pointmap / Fused 3D [0.0, 1.0, 0.02]

mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }

float sdBox(vec3 p, vec3 b) {
  vec3 q = abs(p) - b;
  return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);
}

// 3D landmark scene reconstructed directly into shared camera-1 coordinate frame by DUSt3R
vec2 mapLandmark(vec3 p) {
  vec2 res = vec2(p.y + 0.65, 1.0); // courtyard floor
  float plinth = sdBox(p - vec3(0.0, -0.35, 0.0), vec3(0.55, 0.30, 0.55)) - 0.02;
  if (plinth < res.x) res = vec2(plinth, 2.0);
  float archL = sdBox(p - vec3(-0.34, 0.22, 0.0), vec3(0.12, 0.36, 0.16)) - 0.02;
  float archR = sdBox(p - vec3(0.34, 0.22, 0.0), vec3(0.12, 0.36, 0.16)) - 0.02;
  float topB = sdBox(p - vec3(0.0, 0.56, 0.0), vec3(0.52, 0.10, 0.18)) - 0.02;
  float dArch = min(min(archL, archR), topB);
  if (dArch < res.x) res = vec2(dArch, 3.0);
  float statue = length(p - vec3(0.0, 0.16, 0.0)) - 0.22;
  if (statue < res.x) res = vec2(statue, 4.0);
  return res;
}

vec3 calcNormal(vec3 p) {
  vec2 e = vec2(0.0025, 0.0);
  return normalize(vec3(
    mapLandmark(p + e.xyy).x - mapLandmark(p - e.xyy).x,
    mapLandmark(p + e.yxy).x - mapLandmark(p - e.yxy).x,
    mapLandmark(p + e.yyx).x - mapLandmark(p - e.yyx).x
  ));
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float screenX = fragCoord.x / max(iResolution.x, 1.0);
  float split = clamp(P_SPLIT, 0.0, 1.0);
  bool isPointmap = screenX < split;
  float confGain = clamp(P_CONF_CUT, 0.1, 1.0);
  float ptRes = clamp(P_POINT_RES, 8.0, 36.0);
  float spin = iTime * max(P_ROT_SPEED, 0.0);

  vec3 ro = vec3(0.0, 0.34, 2.35);
  vec3 rd = normalize(vec3(uv - vec2(0.0, 0.06), -1.48));
  ro.xz = rot2(spin * 0.50) * ro.xz;
  rd.xz = rot2(spin * 0.50) * rd.xz;

  vec3 col = mix(vec3(0.022, 0.028, 0.048), vec3(0.058, 0.075, 0.125), smoothstep(-0.55, 0.55, uv.y));

  float t = 0.05;
  vec2 hit = vec2(1e5, 0.0);
  for (int i = 0; i < 56; i++) {
    vec2 h = mapLandmark(ro + rd * t);
    if (h.x < 0.003) { hit = vec2(t, h.y); break; }
    t += h.x;
    if (t > 8.0) break;
  }

  if (hit.x < 1e4) {
    vec3 p = ro + rd * hit.x;
    vec3 n = calcNormal(p);
    // Pointmap XYZ normalized into [0,1] RGB
    vec3 xyzCol = clamp(p * 0.55 + 0.5, 0.0, 1.0);
    // Per-pixel regression confidence (highest on well-observed textured foreground geometry)
    float conf = clamp(exp(-hit.x * 0.28) * (0.4 + 0.6 * max(dot(n, -rd), 0.0)) + 0.25 * confGain, 0.0, 1.0);

    if (isPointmap) {
      // Left: Raw regressed dense 3D Pointmap X(u,v) colored by world XYZ + confidence iso-lines
      float iso = 0.82 + 0.18 * cos(length(p) * 28.0);
      col = xyzCol * iso * (0.35 + 0.75 * conf);
      // Show stereo camera baseline frustum hint in corner
      vec2 g = abs(fract(p.xz * 4.0) - 0.5);
      col += vec3(0.18, 0.92, 0.96) * smoothstep(0.05, 0.01, min(g.x, g.y)) * 0.22;
    } else {
      // Right: Fused dense 3D point cloud splats aligned from View-1 (cyan) & View-2 (warm lit RGB)
      vec3 q = p * ptRes;
      vec3 cell = floor(q) + 0.5;
      float dSplat = length(q - cell);
      float splatMask = smoothstep(0.56, 0.22, dSplat);
      vec3 lDir = normalize(vec3(0.58, 0.80, 0.45));
      float diff = max(dot(n, lDir), 0.0);
      vec3 alb = vec3(0.58, 0.62, 0.68);
      if (hit.y > 1.5 && hit.y < 2.5) alb = vec3(0.78, 0.72, 0.62);
      else if (hit.y > 2.5 && hit.y < 3.5) alb = vec3(0.86, 0.56, 0.34);
      else if (hit.y > 3.5) alb = vec3(0.24, 0.82, 0.94);
      vec3 lit = alb * (0.32 + 0.82 * diff);
      col = mix(col * 0.65, lit, splatMask * clamp(conf * 1.15, 0.3, 1.0));
    }
  }

  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
  col = mix(col, vec3(0.95, 0.97, 1.0), sep);

  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index.

## Lineage

- extended by [MASt3R](https://texelatlas.vercel.app/t/mast3r.md)

## Combines with

- [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md): DUSt3R poses and points can replace COLMAP to initialise Gaussians from few images.

## Sources

1. [primary] Shuzhe Wang, Vincent Leroy, Yohann Cabon, Boris Chidlovskii, Jerome Revaud (2023) DUSt3R: Geometric 3D Vision Made Easy. arXiv preprint (cs.CV). https://arxiv.org/abs/2312.14132 (verified via arxiv on 2026-11-29)
2. [implementation] naver (2024) naver/dust3r. https://github.com/naver/dust3r License: NOASSERTION. (verified via github on 2026-11-29)

## Cite this entry

Texel. "DUSt3R." https://texelatlas.vercel.app/t/dust3r/ (accessed 2026-12-01).
