Depth cameras fail on glass. Infrared light passes through the object and measures the table behind it, or it bounces away and returns nothing. The broken depth map still has to be combined with the color image, which shows where the glass is. A cheap and increasingly popular way to mix features in dense-prediction networks is channel-wise self-attention, also called transposed attention. Instead of letting every pixel attend to every other pixel, it builds a small channel-by-channel similarity matrix by summing feature products over the whole image. It then uses that matrix to remix channels at every pixel. The cost grows linearly with image size, so it can run at full resolution. The catch is that the matrix is one global summary. In a transparent-object scene, most pixels have correct depth. The summary therefore learns how to mix channels where depth is trustworthy, and then applies that same mixing to the glass pixels, where it is exactly wrong.
We propose to split the summary by reliability. The network predicts, per pixel, a soft map of where raw depth is corrupted. It computes two channel-attention matrices, one summed only over trustworthy pixels and one summed only over corrupted pixels. Each pixel is then remixed by a blend of the two, weighted by its own reliability. Inside the corrupted region, the model is free to learn a different rule, such as "rebuild depth channels from color channels." Everywhere else it keeps the default rule. The cost stays linear in the number of pixels. We test whether this beats the obvious alternative of plain channel attention on concatenated color-and-depth features, and whether the learned rules really route depth information from color inside the glass.
Core Claim
Applying transposed attention to RGB and depth across two separate modality branches is not new in substance. When RGB and depth features are concatenated along the channel axis, a single transposed self-attention matrix, as in Restormer, already contains every RGB-to-depth and depth-to-RGB cross-covariance block. The polarimetric restoration work in Architectural Unification for Polarimetric Imaging already fuses two physical domains with cross-channel attention.
What neither does is let the channel-mixing rule change across space according to whether a sensor can be trusted there. Our claim is that transparent-object depth completion fails largely because a single global mixing rule is shared between reliable and corrupted pixels. Conditioning the rule on a learned corruption map fixes this at almost no extra cost. The cross-modal part of the idea lives in the corrupted-region matrix. We predict that its depth-output rows will draw most of their weight from RGB-input columns, while the reliable-region matrix will stay close to depth-to-depth mixing.
Research Program
The core operator follows the Restormer convention. Let $Q, K, V \in \mathbb{R}^{HW \times C}$ be the queries, keys and values projected from the concatenated RGB-depth features after depth-wise convolution. Let $w_r(x) \ge 0$ be the network's soft membership of pixel $x$ in region $r \in \{\text{reliable}, \text{corrupted}\}$, with $\sum_r w_r(x) = 1$. For each region we form a channel-attention matrix from that region's pixels only, and then blend per pixel:
$$A_r = \text{softmax}\!\left(\frac{Q^\top \text{diag}(w_r)\, K}{\tau}\right), \qquad y(x)^\top = \sum_r w_r(x)\, v(x)^\top A_r .$$
Here $A_r$ is the $C \times C$ matrix for region $r$, $\tau$ is a learned temperature, and $v(x), y(x)$ are the input and output feature vectors at pixel $x$. The cost is $O(R \cdot HW \cdot C^2)$ for $R$ regions, still linear in pixel count. That lets us place the block at every decoder scale rather than only at the lowest-resolution bottleneck.
The map $w$ comes from a small head at each scale. It is supervised by a target we can compute for free on the benchmarks: pixels where the raw depth is missing or differs from ground truth by more than a threshold. We also add a residual gate on the output, borrowed from the gated cross-attention of An Interpretable Framework for Drug-Target Interaction with Gated Cross Attention. The gate keeps reliable-pixel features close to their input, so correct depth is not overwritten.
The rest of the network is deliberately ordinary. It is a U-Net with separate RGB and depth stems, reliability-split transposed attention blocks at every scale, and Restormer's gated feed-forward layers. It is trained with the L2 and surface-normal losses used by TODE-Trans.
We also examine what the model learns. For each trained model we measure, for both $A_r$, the fraction of attention mass flowing from RGB channels into depth-output channels. The hypothesis predicts a large gap between regions, and it also predicts that the gap is where the accuracy gain comes from.
As a secondary extension, we allow $R = 3$ regions: reliable, single transparent layer, and stacked or covered transparency. We test this on ClearPose's translucent-cover setting. ClearPose reports pose accuracy (ADD-S) collapsing from about 58% to as low as 13% in that setting. GHOST concedes that its weak-refraction assumption fails there.
Baselines
Naive fusion. The first reference point is concatenating RGB and raw depth at the input of the same U-Net, with no attention. It is run with the identical training data, schedule, and hyperparameter search budget. Beating it is necessary but uninformative.
Unsplit joint transposed attention. This is the ablation that isolates our key ingredient. It is the same architecture, parameter count and training recipe, but with a single Restormer-style matrix computed over all pixels. It sees the same cross-modal covariance blocks our model sees and differs only in the reliability split. We also run a variant that keeps the reliability head and its auxiliary loss but feeds its output only as an extra input channel. This separates "the model knows where glass is" from "the model mixes channels differently there."
A second control replaces the learned $w$ with a random spatial permutation of itself. This checks that the gain depends on the map being correctly aligned with the image.
Spatial cross-attention. The GCAN-style comparison follows Gated Cross-Attention Network for Depth Completion. It uses dual RGB and depth encoders with depth-confidence-gated bidirectional cross-attention and spatial attention only at the bottleneck. It is re-implemented at matched FLOPs and trained on the transparent benchmarks. It is the strongest cross-modal design in the file, but it was only evaluated on Lambertian scenes, meaning ordinary matte surfaces with trustworthy depth. No reported result was found on Lacuna for GCAN on ClearGrasp, TransCG or ClearPose, so we train it ourselves under the same budget.
Published transparent-object methods. We compare against TODE-Trans (Swin encoder, pooled channel fusion) and FDCT (lightweight convolutional U-Net, 70 FPS). The strongest published number in the file is from Transparent Object Depth Completion. It reports TransCG mean absolute error (MAE) of 0.006 m, against FDCT's 0.010 m, using a single-view network plus a multi-view stereo cost volume.
That method uses multiple views and a 3D cost volume, which is a different input regime from ours. Our claim of success is therefore two-sided:
- Beat FDCT's 0.010 m and TODE-Trans on single-view TransCG under matched evaluation.
- Close most of the gap to 0.006 m while running at a frame rate we measure against FDCT on the same GPU.
Matching 0.006 m from a single view would be a strong result, but we do not assume it. On ClearGrasp, the file gives ClearGrasp's own RMSE of 0.039 on Real-Known and only relative improvements for TODE-Trans. We rerun TODE-Trans from its released setup rather than invent absolute figures.
Why not just…?
Why not just run Restormer on concatenated RGB-D? This is the main threat, because it already computes every cross-modal channel covariance. The only thing it lacks is the spatial split. If the unsplit ablation matches our model on TransCG and ClearGrasp, the idea is wrong and we will say so. The evidence for the gap is indirect. Channel attention washes out local spatial variation unless convolution anchors it, which is the known limitation of DaViT-style channel tokens. Glass also occupies a minority of pixels, so a global covariance is dominated by background. The matched ablation settles the question directly.
Why not just mask out the bad depth and inpaint, as ClearGrasp does? ClearGrasp segments transparent regions and discards their depth before optimization. This is a hard-mask version of our idea, and it is also a real competitor. Hard masking throws away the partial, background-shifted depth inside glass. That depth still carries information about scale and about the surface behind the object. It also turns segmentation errors into hard failures at boundaries. We test it with our backbone, zeroing depth where the predicted mask exceeds 0.5. If soft splitting does no better than hard masking, the contribution shrinks to "use a mask."
Why not just use spatial cross-attention, or preprocess with GHOST? Spatial cross-attention at full resolution is quadratic, which is why GCAN confines it to the bottleneck. Our matched-FLOPs GCAN baseline tests whether low-resolution spatial fusion already suffices. GHOST's opaquification, which repaints glass as opaque before a standard depth model runs, reports 0.38 s per view on an RTX 4090 and relies on a weak-refraction assumption. We include its reported ClearGrasp gain for DepthAnythingV3 (RMSE 0.023 to 0.018) as context. It is not a like-for-like comparison, because it uses no sensor depth.
Proposed Experiments
We train and evaluate on ClearGrasp (synthetic training, real test), TransCG, and ClearPose, reporting RMSE, MAE, relative error, and threshold accuracy both inside transparent masks and over the full image. On ClearPose we break results out by adversarial setting, with translucent cover reported separately. For ClearPose translucent cover, the file gives only a relative figure (28.2% MAE reduction over TranspareNet) and no absolute number, so we retrain the strongest single-view baseline there. Latency is measured on one GPU for every model.
Three decisive checks decide the outcome.
- Split versus unsplit. Our model must beat the unsplit joint-attention ablation inside transparent masks, across three seeds, without losing accuracy on reliable pixels. The permuted-map control must erase the gain.
- Routing interpretation. In the corrupted-region matrix, the RGB-to-depth attention mass must be clearly higher than in the reliable-region matrix. Across checkpoints and datasets, the size of this gap should track the in-mask error reduction. If accuracy improves but routing does not differ, the mechanism story is wrong even if the method works.
- Hard-mask threat. Soft splitting must beat hard masking specifically near object boundaries and in the translucent-cover subset. The three-region variant is kept only if it improves that subset beyond the two-region model.
References
- Restormer: Efficient Transformer for High-Resolution Image Restoration
- Architectural Unification for Polarimetric Imaging Across Multiple Degradations
- An Interpretable Framework for Drug-Target Interaction with Gated Cross Attention
- TODE-Trans: Transparent Object Depth Estimation with Transformer
- ClearPose: Large-scale Transparent Object Dataset and Benchmark
- GHOST: Geometry-Guided Hallucination of Opaque Surface Textures
- Gated Cross-Attention Network for Depth Completion
- FDCT: Fast Depth Completion for Transparent Objects
- Transparent Object Depth Completion
- DaViT: Dual Attention Vision Transformers
- Clear Grasp: 3D Shape Estimation of Transparent Objects for Manipulation