Localizing object boundaries is important for embodied visual systems, since small boundary errors can change the inferred geometry of physical surfaces. We study whether deep stereo models produce boundaries consistent with simple shape priors when local image and disparity cues are weak. We create a synthetic stereo dataset consisting of objects drawn from a highly constrained family of shapes, with randomized depth, slant, color and texture. Despite the simplicity of this shape space, we find that several state-of-the-art stereo models retain systematic boundary errors, even when finetuned or trained from scratch on the dataset. We then introduce a simple generative stereo model that jointly predicts disparity and a distance field representing object boundaries. The model improves boundary localization and produces contours that adhere more closely to the underlying shape space. These results expose limitations in the boundary predictions of current stereo architectures when local evidence is weak, and motivate further study of whether generative models can better combine regional grouping evidence with global geometric structure.
Figures & tables
Figure 1: Boundary errors when texture and disparity cues are weak. Left panel: input stereo images and true disparity. Right panel: locations where each model’s predicted disparity error is greater than two pixels, along with overall Bad 2.0 percentage. Despite being finetuned or trained from scratch on our heavily constrained shape distribution, several deep stereo models retain substantial errors near object boundaries. Our diffusion-based HDiT-Stereo reduces errors near boundaries, particularly where local evidence is weak.
Figure 2: Dataset examples. Shapes are slanted planar regular polygons up to degree eight with randomized appearance. Difficulty is controlled by similarity in object appearance, object slant, and object depth. The extreme case (bottom right) provides no local evidence for much of the objects’ boundaries, requiring nonlocal shape information for successful grouping.
Figure 3: Overview of HDiT-Stereo. Per-view image features and correspondence features from a trainable photometric encoder and a frozen DINOv2 semantic encoder condition an HDiT denoiser. From noise the model jointly generates disparity and an unsigned boundary distance field through iterative denoising. Flame and snowflake symbols indicate trainable and frozen components.
Boundary & contour
Global
Method [-1pt] Params: total / trainable
Condition
Bound. EPE ↓
Chamfer (px) ↓
Hausd. 99 (px) ↓
EPE ↓
Bad1 (%) ↓
Bad2 (%) ↓
RAFT-Stereo
Zero-shot
17.192 ±3.70
6.987 ±4.63
37.96 ±18.89
19.868 ±3.68
71.00 ±13.42
48.43 ±34.55
11.1 M / 11.1 M
Train-from-scratch
0.792 ±0.23
0.345 ±0.05
1.37 ±0.21
0.118 ±0.02
2.62 ±0.39
1.71 ±0.33
Fine-tuned
0.867 ±0.23
0.382 ±0.06
1.74 ±0.50
0.142 ±0.03
2.86 ±0.41
1.86 ±0.37
Selective-IGEV
Zero-shot
5.892 ±2.25
6.633 ±2.57
34.78 ±12.03
5.510 ±2.65
39.62 ±29.22
33.59 ±21.11
13.1 M / 13.1 M
Train-from-scratch
0.823 ±0.23
0.353 ±0.06
1.46 ±0.21
0.127 ±0.03
2.69 ±0.42
1.76 ±0.43
Table 1: Contour fidelity and global accuracy. Boundary-localization metrics (left columns) are this paper’s focus; global metrics (right columns) are reported for completeness. Results use 1000 test scenes and variability is reported as ± IQR/2 across scenes. Beneath each method are its total and trainable parameters in millions. Our model is sampled 10 times per scene, and we report the average metric across the samples ( Mean ) and the oracle Best-1-of-10 , which for each metric is the best value among the 10 samples, selected using ground truth. In every column, bold marks the best value and underline the second best, excluding Best-1-of-10 . Our model leads the boundary and global Bad- X columns and is mid-field for global EPE.
Figure 4: Recovered foreground shapes. For each scene, the upper row shows disparity maps with ground truth on the left; the lower row shows recovered foreground shapes overlaid on ground truth. Dark regions indicate agreement, orange regions indicate disagreement, and solid black lines mark ground-truth contours. Our model achieves the highest shape IoU.
Method
n
Mean 1−IoU↓
Dist. to Ideal (mean) ↓
Dist. to Ideal (median) ↓
RAFT-Stereo
100
0.0238
1.692
1.568
Selective-IGEV
100
0.0231
1.684
1.506
DEFOM-Stereo
100
0.0243
1.733
1.604
MonSter
100
0.0245
1.753
1.564
HDiT-Stereo (Ours)
100
0.0223
1.631
1.486
Table 2: Foreground shape accuracy across 100 test scenes. Lower is better for all metrics. Bold marks the best value and underline marks the second-best value among competing methods.
Figure 5: Sample variation identifies unreliable predictions. Left: Mean disparity error versus sample standard deviation, binned separately for boundary and interior pixels across all test scenes. Higher uncertainty indicates larger errors. Right: Mean error among pixels retained by predicted uncertainty (orange) or ground-truth error (gray). Removing uncertain pixels substantially reduces error without requiring ground truth for selection. Computed on a 100-scene test subset, and the dashed line is RAFT-Stereo on the same subset.
Figure 6: Our sampled posterior can be bimodal for ambiguous figure-ground scenes. Left: Four sampled disparity and boundary predictions. Disparity remains consistent while the boundary predictions capture both valid figure-ground interpretations. Right: t-SNE embedding of 100 boundary samples, forming two clusters near the two valid contour maps (orange and green stars). Grey bands indicate the predicted zero-level boundary contours.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Params (M) total / trainable
GFLOPs per sample
Time per sample (s)
Base
22.9 / 22.9
1,728
0.180
Base + Shared Encoders
45.4 / 23.4
3,182
0.318
Base + UDF
22.9 / 22.9
1,728
0.180
Full (UDF + Shared Encoders)
45.4 / 23.4
3,183
0.318
RAFT-Stereo
11.1 / 11.1
199
0.018
Selective-IGEV
13.1 / 13.1
218
0.025
Appendix
Table 3: Inference cost for one 128×128 stereo pair on a single A100-40GB in fp32. HDiT-Stereo uses 50-step DPM++(2M) SDE sampling, while the baselines use a single forward pass. FLOPs count multiply-adds as two operations. Runtime is measured per image with a batch of 10, excluding model loading and I/O. Trainable parameters exclude frozen pretrained backbones.
Boundary & contour
Global
Variant
UDF
Shared Encoders
Params
Condition
Bound. EPE ↓
Chamfer (px) ↓
Hausd. 99 (px) ↓
EPE ↓
Bad1 (%) ↓
Bad2 (%) ↓
Base
–
–
22.9 M
Mean
0.836 ±0.219
0.355 ±0.047
1.59 ±0.19
0.192 ±0.046
3.00 ±0.57
1.80 ±0.34
Best-1-of-10
0.769 ±0.21
0.310 ±0.05
1.32 ±0.00
0.164 ±0.04
2.46 ±0.41
1.57 ±0.31
Base + Shared Encoders
–
✓
45.4 M
Mean
0.776 ±0.209
0.335 ±0.045
1.39 ±0.17
0.159 ±0.037
2.30 ±0.37
1.56 ±0.30
Best-1-of-10
0.724 ±0.20
0.297 ±0.05
1.19 ±0.00
0.138 ±0.03
2.08 ±0.35
1.42 ±0.31
Base + UDF
✓
–
22.9 M
Mean
0.831 ±0.230
0.338 ±0.046
1.47 ±0.19
0.188 ±0.049
3.14 ±0.67
1.78 ±0.37
Appendix
Table 4: Ablation of HDiT-Stereo components on the 1000 test scenes ( ± IQR/2 over scenes). Base uses only the disparity objective and removes both shared conditioning encoders. UDF denotes the boundary-distance output head; Shared Encoders denotes the pair of Shared Photometric and Shared Semantic encoders, which are added or removed together. Best in bold , second best underlined among Mean rows. Best-1-of-10 uses an oracle and is excluded from ranking.
Occlusion fraction
0.2–0.4
0.4–0.6
0.6–0.8
0.8–1.0
Δd=0 px
56%
31%
39%
15%
Δd=4 px
31%
28%
28%
13%
Appendix
Table 5: Percentage of scenes in which both figure-ground readings appear among 50 samples, grouped by the overlap fraction h and the disparity offset Δd between the two objects.
Figure 7: Disparity predictions and boundary errors. For each scene, rows show disparity maps, cyan-box enlargements, Bad-2 error maps, and their enlargements; stereo inputs appear at left. Black pixels indicate disparity errors exceeding 2 px. HDiT-Stereo better preserves polygonal contours and achieves the lowest Bad-2 rate in both examples.