Don't Roll the DiCE: Diffusion Certificates for Error Detection in Single-Shot Fringe Projection Profilometry

Rhys G. Evans, Siddhartha Mishra, Sam Van der JeughtarXiv 2026

TL;DR

Single-shot 3D imaging systems can capture moving parts in a single camera frame, but they often rely on a self-reported "trust mask" that fails silently—marking large, coherent patches of wrong depth as reliable. This paper audits those failures, fixes a third of them for free using the rig's geometry, and introduces DiCE: a diffusion-based "certificate" trained only on correct data that catches the remaining errors, even when the camera setup or error types change unexpectedly.

What Problem Does This Paper Address?

Fringe projection profilometry (FPP) measures 3D shape by projecting a striped pattern onto an object and watching how the stripes deform. To get sub-millimetre accuracy, classical systems project several shifted patterns in sequence—which fails if the object moves. Single-shot systems solve this by projecting four superimposed patterns at once and using a deep network (here, a fine-tuned Depth Anything V2) to predict both a coarse depth and the wrapped phases of the stripes, which a ray-wise matcher then combines into a final 3D depth map.

Because no measurement system is perfect, the pipeline also outputs a trust mask: a label-free check that marks a pixel as reliable if its depth agrees with its $9 \times 9$ neighbours. The catch? If a whole patch of pixels locks onto the same wrong depth, every pixel agrees with its neighbours, and the trust mask happily waves them through. On real scans of unseen objects, 7.4% of "trusted" pixels are more than 5 mm off (rising to 25.5% on the object itself, once you ignore the easy-to-measure support plate).

Pipeline overview

Methods

The authors tackle this in two ways: reducing errors at the source, and catching what's left.

  • Calibration-Aware Matcher Start (No Retraining): The matcher searches for the best depth around the network's monocular coarse depth ($z_c$). Because $z_c$ is estimated without knowing the camera-projector geometry, it can be biased and seed the matcher into a wrong local minimum. The authors instead triangulate the network's auxiliary projector-coordinate predictions $(u,v)$ using the rig calibration to get a geometry-aware starting depth ($z_{uv}$).
  • DiCE (Diffusion Certificate for Error Detection): Instead of training a classifier to recognize specific errors, DiCE trains a conditional diffusion model (GenCFD U-ViT, 86M parameters) only on correct (fringe image, depth) pairs. At test time, DiCE adds Gaussian noise at 12 levels to the pipeline's predicted depth and asks the frozen denoiser to remove it. Where the depth is consistent with the fringes, the denoiser leaves it alone. Where it's wrong, the denoiser pulls it toward a more plausible depth—and that per-pixel reconstruction error becomes the suspicion score. Unlike prior diffusion certificates that use a slow ODE likelihood, DiCE uses a denoising-score bound that is 75× faster and localized per pixel.
  • Baselines: DiCE is pitted against fringe-quality maps, matcher cost/margin, regressor uncertainty (deep ensembles, snapshot ensembles, MC dropout, heteroscedastic heads), and supervised error predictors—including EP12, a strong label-free predictor trained on synthetic depth "blobs."
Figure 2. DiCE, the diffusion certificate. (a) A conditional denoiser learns which depth maps are compatible with a fringe image, from correct pairs only. (b) At test time, the pipeline’s depth is noised at 12 levels and passed through the frozen denoiser; where the depth does not fit the fringes, the denoiser pulls it towards a more plausible depth, and the per- pixel reconstruction error, accumulated over noise levels, is the suspicion score. The depth is scored, never re-predicted. Thumbnails: the unseen fossil scan of Fig. 3. (c) What DiCE changes with respect to the certificate of Raoni´c et al.; the ODE likelihood is kept as an ablation.

Datasets

  • Real Scans: 41 evaluation scans across 6 objects on a turntable, with multi-frame phase-shift reference depth (~0.20–0.28 mm accuracy). Nine scans of two objects (fossil and benchmark) are completely unseen during any training or tuning. Another 42 positions of three seen objects are used to train supervised detectors.
  • Synthetic Renders: Three scene sets with varied materials (for training DiCE) plus 80 held-out synthetic test frames injected with 12 different error types.
  • Second Scanner: 8 scans of a vase captured on a completely different rig (wider baseline, different focal lengths, 4° rotation) to test severe distribution shift.

Key Insights and Ideas

  • Local consistency is blind to patch errors: 76% of bad trusted pixels on unseen objects sit in connected patches of at least 25 pixels, typically 10–35 mm off—not whole fringe orders (66 mm), but wrong local minima where a subset of stripes happens to agree.
  • The right answer is already in the matcher: For 79% of bad trusted pixels on unseen objects, a depth within 5 mm of the ground truth is sitting among the matcher's top 8 alternative minima. (However, trying to pick the right alternative per pixel using DiCE or a small selector network broke more pixels than it fixed.)
  • Specialists vs. Generalists: Supervised error predictors are specialists—they win in-distribution because they are tuned on the exact error population. DiCE is a generalist: it needs no error labels, ranks error severity best (telling a 30 mm error apart from a 6 mm one), and holds up when the data, pipeline, or scanner changes.

Key Results

  • Calibration-aware start ($z_{uv}$): Cuts wrong trusted pixels on unseen objects by roughly a third, from 7.42% to 5.05% (and from 25.46% to 17.44% on object pixels).
  • In-distribution detection (unseen objects): EP12 leads with an AUROC of 0.981, while DiCE achieves 0.961 (outperforming matcher cost and all regressor-uncertainty baselines).
  • Unseen error types: On 7 synthetic error types outside EP12's blob-shaped training model, DiCE wins 5—most notably on smooth bumps (0.82 vs. 0.43, where EP12 is worse than chance) and flying-pixel spikes (1.00 vs. 0.69).
  • Conformal risk control: Under leave-one-object-out calibration ($\alpha = 0.5\%$), DiCE meets the risk target (0.48%) while keeping 76.4% of trusted pixels—1.6× the coverage of deep ensembles, the only other detector to meet the target.
  • Second scanner: Where the pipeline fails systematically, DiCE flags 38% of the wrong trusted pixels at a 5% false-alarm threshold, 3× more than EP12 (12%).
  • Speed: DiCE takes 5.5 seconds per scan on an RTX 4090 (vs. 413 s for ODE likelihood and 0.01 s for error predictors).

Limitations and Future Work

  • Small shift sets: The unseen real-object group has only 9 scans (2 objects), and the second scanner has a single object, leading to wide confidence intervals.
  • Depth vs. rig OOD: On the second scanner, DiCE flags the wrong depth, not the unfamiliar rig itself (it scores the vase's true reference depth as in-distribution). Testing whether it flags unfamiliar materials or object classes with correct depth is left for future work.
  • Compute cost: At 5.5 s per scan (~27 regressor passes), DiCE fits part-by-part industrial inspection, not real-time video rates.

Summary updated

BibTeX
@misc{evans2026don,
  author = {Rhys G. Evans and Siddhartha Mishra and Sam Van der Jeught},
  title = {{Don't Roll the DiCE: Diffusion Certificates for Error Detection in Single-Shot Fringe Projection Profilometry}},
  year = {2026},
  eprint = {2612.05368},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.05368},
}
Figure