Layer-Wise Left-Right Checks for Glass in Stereo

A stereo camera judges depth by matching each pixel in the left image to its partner in the right image. The standard sanity test for such matches is the left-right check: match left to right, then right back to left, and throw away any pixel whose round trip does not return to where it started. Glass breaks this test in an unhelpful way. The pixels behind a clear beaker show sharp background texture, so the matcher locks onto the background, the round trip closes cleanly, and the check certifies the wrong answer. The glass surface a robot must grasp is reported as empty space.

We propose to apply the check separately to two depth layers. The first layer is the glass surface itself, which is a real 3D surface and must close the ordinary round trip along the camera's matching line (the epipolar line). The second layer is the scene seen through the glass. Refraction bends it off that line, so its round trip should be checked in two dimensions rather than one. Written as a training loss, this split check lets a two-layer stereo network learn from unlabeled real stereo images of glassware without penalizing the network for refraction. At test time the same check yields a per-pixel confidence for the glass layer. The two-sentence version: stop asking one consistency check to validate a pixel that contains two surfaces; give each surface the check its physics actually obeys, and use it as free supervision on real data.

Core Claim

Two-layer stereo already exists. Multi-Label Stereo Matching for Transparent Scene Depth Estimation predicts a foreground (glass) and background disparity per pixel as a two-dimensional Gaussian and refines them with a recurrent update. It is trained and scored mainly on the synthetic TranScene set. Its matching runs in one direction only, and it has no way to learn from real images that lack two-layer labels. Separately, Unsupervised Monocular Depth Estimation with Left-Right Consistency showed that left-right reconstruction is a strong self-supervised training signal, but for a single opaque layer. Our claim is that combining the two naively fails on glass: forcing both layers to close along the epipolar line pulls the through-glass layer toward a physically wrong answer. A layer-specific check fixes this by keeping the glass layer epipolar-strict and giving the through-glass layer a two-dimensional correspondence. With that check, a network pretrained on synthetic data can adapt to real transparent scenes and measurably improve depth on the glass surface itself.

Research Program

The base model is a two-layer stereo network in the style of the multi-label method. We modify it to also emit a two-dimensional offset field for the through-glass layer, pretrain it on TranScene plus the active-stereo HISS scenes, and run it on both the left and right images. Let $d^L_0(x)$ be the glass-layer disparity predicted from the left view at pixel $x$, and $d^R_0$ the same layer predicted from the right view. Let $u^L_1(x)$ and $u^R_1$ be the two-dimensional offsets that map a through-glass pixel to its partner in the other view. The layered cycle loss is

$$ \mathcal{L}_{cyc} = \sum_{x \in \Omega} m(x)\Big( \big|d^L_0(x) - d^R_0(x - d^L_0(x))\big| + \big\|u^L_1(x) + u^R_1(x + u^L_1(x))\big\|_1 \Big), $$

where $\Omega$ is the set of image pixels and $m(x)$ is the network's own estimate that the pixel contains two layers. We read $m$ from the predicted layer correlation, following the multi-label paper's use of its correlation parameter. Where $m$ is near zero, the pixel is treated as ordinary opaque stereo and receives the standard single-layer left-right loss.

Cycle closure alone admits trivial solutions: a constant disparity closes perfectly. So each layer also gets an appearance term restricted to the cues that genuinely transfer across views. The through-glass layer is matched photometrically, because background texture is strong. The glass layer is matched only on image-gradient features near silhouettes and wall edges, since view-dependent highlights on glass are not matchable. Mixed batches keep the synthetic supervised loss active throughout adaptation. The unlabeled real stereo comes from Booster training images, used without their labels, and from our own captures of lab glassware. The captures deliberately include thick bases and liquid-filled vessels, where the first-order "thin wall" picture of refraction is weakest.

The check is also used as an analysis tool. We measure the vertical component of the through-glass offset, which should be zero for opaque pixels. We ask whether its magnitude tracks glass thickness and curvature. Refraction bends rays in proportion to surface slope through Snell's law, so a strong correlation would confirm the offset is measuring refraction rather than matching noise.

Inference cost matters for grasping. We keep the reverse pass as a training-only cost, which avoids the doubled-latency problem the file flags for bidirectional methods. At test time the network runs once. The reverse pass is optional and produces a confidence map for pixels where the glass layer's round trip fails.

Baselines

The naive reference point is the raw active-stereo sensor depth. DRoMa reports real-robot grasp success of 0.25 on transparent objects and 0.45 overall with raw depth.

The first learned reference point is the synthetic-only two-layer network, evaluated before any adaptation. On TranScene, Multi-Label Stereo Matching reports 0.014 m mean absolute error, against 0.188 m for RAFT-Stereo. We re-run it from the same pretraining so that any gain can be attributed to adaptation.

The strongest existing competitor is D³RoMa (DRoMa). It denoises a single disparity map with a diffusion model (a generator that iteratively removes noise), conditioned on the stereo pair, and steers sampling with a left-right photometric and smoothness loss. It is the only prior method that uses left-right consistency specifically on transparent and specular objects. It reports 0.0092 mean absolute error on real DREDS, against 0.017 for SwinDR, and 0.63 transparent grasp success, against 0.43 for ASGrasp. We run it with its released pretraining on the same evaluation images and report its per-frame latency alongside ours. Beating it means lower glass-pixel error on Booster and on our real captures at a fraction of its sampling time. For Booster we found no reported result on Lacuna for D³RoMa or the multi-label method, so all Booster numbers will be our own runs.

Two ablations isolate the key ingredient. The first applies an epipolar-strict cycle to both layers. The second is single-layer self-supervised left-right adaptation in the style of Unsupervised Monocular Depth Estimation with Left-Right Consistency. Both use the same unlabeled data, adaptation steps and tuning budget as our method.

Why not just…?

Why not just use a standard left-right loss for self-supervised adaptation? This is the obvious transfer, and it is the thing we expect to fail. On glass the background dominates matching, so a single-layer loss rewards background depth. Transparent Object Depth Completion documents this "global shift" for multi-view cost volumes. The single-layer ablation tests it directly: if it matches our glass-pixel error, the layered design is unnecessary.

Why not just segment the glass and mask it out of the adaptation loss? This is a real threat. Segmentation is strong: the TransDINO module in GHOST reports 92.44% mIoU on ClearGrasp. Masking glass pixels would let real-data adaptation fix opaque regions while leaving glass depth to the synthetic prior. We include it as a baseline, with a segmenter trained on ClearGrasp synthetic data. If masked adaptation equals ours on glass pixels, our loss contributes nothing inside the glass and the claim fails.

Why not just opaquify the images and run an off-the-shelf stereo model? GHOST paints a plausible opaque texture over glass so that foundation models can reconstruct it. It works per view, however, so the invented textures in the left and right images need not correspond, and stereo matching on them is unconstrained. Where code permits, we run GHOST on both views followed by RAFT-Stereo. We measure its glass-pixel error and its left-right closure rate; a low closure rate would expose the cross-view inconsistency.

Why not just use D³RoMa? It is accurate but produces a single layer, and its left-right guidance assumes straight epipolar matching through glass. Iterative sampling also makes it slow. The comparison above settles whether a single-pass two-layer network with layered self-supervision can match its accuracy on real glass.

Proposed Experiments

The decisive experiment adapts all methods on the same unlabeled real stereo and scores glass-pixel mean absolute error and error-threshold rates on Booster ground truth and on our annotated captures. The ground truth for our captures comes from matte-sprayed copies of each scene, scanned after imaging; the spray is used only for labels. Results are reported separately for thin-walled, thick-based and liquid-filled vessels. The hypothesis is that the gap between our method and the epipolar-strict ablation grows with optical thickness.

A second check measures whether the glass-layer cycle residual is a usable confidence. We compute sparsification curves on real data and compare against the network's predicted variance. This follows the confidence-measure methodology of Analysis of KITTI Data for Stereo Analysis with Stereo Confidence Measures.

On synthetic data, we confirm on held-out TranScene that adaptation does not degrade the 0.014 m reference. We then render a HISS-style held-out split of thick and liquid-filled objects in Isaac Sim to test the refraction-offset correlation where exact geometry is known.

Finally, on a real arm, we report transparent-object grasp success using the D³RoMa protocol. D³RoMa's 0.63 serves only as context, since hardware differs; the head-to-head comparison is D³RoMa re-run on our rig.

The idea is refuted if either of two outcomes occurs on real glass pixels: masked adaptation matches our error, or the epipolar-strict ablation matches it.