When a network predicts a depth map and that map is turned into a 3D point cloud, the edges of objects often come out wrong. Instead of a clean jump from a chair at 2 m to a wall at 10 m, the network predicts a smooth ramp of in-between depths. In 3D these in-between values become "flying pixels": sheets of points hanging in empty air. This proposal locates one specific place where multi-scale depth decoders create these ramps, which is the step where a coarse prediction is upsampled to a finer resolution. It then replaces that step with an operation that cannot produce them. At each coarse cell, the decoder carries two candidate surfaces, a front one and a back one. At full resolution, a separate lightweight head decides only which of the two surfaces each pixel belongs to. Final depth is read from the chosen surface and is never averaged across the two. The split also settles the local-versus-global question in a principled way. The surfaces and the question of which one is in front are decided with coarse, scene-level context. The exact position of the boundary is decided with fine, pixel-level image evidence.
Put in two sentences: today's coarse-to-fine decoders mix foreground and background every time they upsample, and later refinement stages then have to undo the mix. We propose to carry depth up the pyramid as two separate layers and to cut between them with a full-resolution ownership mask, so the mixing never happens and no slow generative sampling is needed.
Core Claim
Three explanations for boundary smearing already appear in the literature, and each points to a different operator. Depth Coefficients for Depth Completion shows that squared-error regression, when a boundary pixel is ambiguous, predicts the mean of foreground and background, which puts points in empty space. Adaptive Multi-Modal Cross-Entropy Loss for Stereo Matching shows the same averaging happening inside stereo cost volumes through the soft-argmin expectation. Pixel-Perfect Depth with Semantics-Prompted Diffusion Transformers shows that the image compressor inside latent diffusion models adds flying pixels even when it is given ground truth. We argue that multi-scale decoders have a fourth, separate source of the same problem: interpolation during upsampling. Suppose a coarse cell straddles an edge, and its prediction or its features are upsampled bilinearly or with transposed convolutions. The result at the new pixels is a weighted average of the two sides, whatever loss was used for training.
Residual pyramids such as Structure-Aware Residual Pyramid Network for Monocular Depth Estimation and FCFR-Net then ask every finer level to predict a large corrective residual precisely at those pixels. These are exactly the pixels where a bounded residual is least able to make the correction. From Big to Small: Multi-Scale Local Planar Guidance (BTS) replaces upsampling with a fitted local plane per cell. That reduces halos, but at a boundary a single plane has to tilt across the gap.
The claim to test is this. If each coarse cell carries two smooth surfaces and fine resolution only selects between them, boundary flying pixels drop sharply in a single forward pass, and interior accuracy is unchanged.
Concretely, let $s_k(x)$ for $k \in \{1,2\}$ be the depth that coarse cell $c(x)$ assigns to fine pixel $x$ under its $k$-th surface. Each surface is a plane evaluated by ray-plane intersection, as in the planar guidance layers. Let $o(x) \in [0,1]$ be the predicted probability that $x$ belongs to surface 1. Training uses a soft readout. Inference uses a hard one:
$$\hat d(x) = s_{k^*(x)}(x), \qquad k^*(x) = \arg\max\{o(x),\,1-o(x)\}.$$
Because $\hat d(x)$ is always one of two surface values, it cannot fall in the empty space between them. When a cell contains a single surface, the two hypotheses are tied together and the operator reduces to ordinary planar guidance.
Relation to Prior Work
The closest existing design is DDL-MVS. It predicts a bimodal Laplacian at every pixel inside a PatchMatch multi-view stereo pipeline, and its mixture weight behaves like a foreground/background segmenter. That paper motivates ours, since it shows a two-mode output is learnable and the mixture weight means something. Our design differs in two ways. First, we separate the two parts of the output by scale. Surfaces are predicted at coarse cells using global context, and ownership is predicted at full resolution. DDL-MVS instead predicts both at every pixel from a local convolutional network. Second, we pass both layers up the pyramid, so no intermediate level ever blends them.
Monocular Depth Estimation with Global-Aware Discretization and Local Context Modeling conditions the choice of depth bins on the whole scene, and it still reads depth out as an expectation over bins. We borrow its lesson that scene-level context should shape the depth hypotheses. We move that conditioning from one bin set per image to two surfaces per cell. The per-pixel window clustering in the adaptive multi-modal loss gives us a way to build supervision. We extend its horizontal 1×9 window to 2D coarse cells.
The global-context side follows SparseMask. Its connectivity search repeatedly chose to feed pooled global features directly into every decoder stage. We therefore condition the ownership head on global tokens as well, because deciding which side of an edge is in front is a figure-ground judgment and not a purely local one. Global-Local Path Networks (GLPNet) supplies the encoder and a strong regression decoder to compare against. Its fusion module weighs local against global features at each pixel, but its output remains a continuous regression, so it is exactly the kind of model our diagnosis predicts will smear.
Research Program
We will build a decoder that can be attached to a fixed hierarchical transformer encoder, the SegFormer-style encoder used by GLPNet. It has three parts. A coarse head, fed by encoder features plus pooled global features, predicts two plane hypotheses per cell at 1/8 resolution. At 1/4 and 1/2 resolution, a refinement step updates each layer separately, with residuals added within a layer and never across layers. A full-resolution ownership head receives shallow RGB-level features, the two upsampled layer depths, and a global token, and predicts $o(x)$.
Supervision comes from ground-truth depth. Within each coarse cell we cluster log-depth into one or two groups, splitting only when the gap between groups exceeds a threshold relative to depth. This defines per-pixel ownership labels and per-layer depth targets. The ownership head is trained with cross-entropy, each layer is trained with L1 on its own pixels, and a small tie loss applies to single-surface cells. We break the symmetry between the two layers by always sorting them front to back.
Real sensors are noisy exactly at boundaries. Following SharpNet's practice (SharpNet), we will pretrain on synthetic Hypersim and fine-tune on NYUv2.
Alongside the method, we will run a diagnostic. For each baseline decoder, we will read out the intermediate depth at every pyramid level and measure how much boundary-region error is added between one level and the next. The claim predicts that most of the boundary error in regression pyramids appears at upsampling steps, not in the coarsest prediction.
Baselines
The naive reference point is the same encoder with a continuous regression decoder trained with L1. We will use GLPNet's fusion decoder, which reports AbsRel 0.098 on NYUv2 (Global-Local Path Networks). We will also run the single-plane planar guidance decoder, which is the direct ablation of our two-layer version. A "do nothing extra" variant adds a standard post-hoc filter: points at depth edges are clipped above a gradient threshold. This shows what completeness is lost by simply deleting edges.
The strongest single-pass competitor on this particular question is a discretized decoder. It uses scene-adaptive bins in the style of the global bin prediction module, trained with cross-entropy, and at inference it reads out only the dominant mode, as in the dominant-mode estimator of Adaptive Multi-Modal Cross-Entropy Loss for Stereo Matching. This removes expectation averaging entirely and is the most plausible cheap route to the same result. The paper we take the bin design from reports δ1 of 0.934 on NYUv2 (Global-Aware Discretization).
The strongest method overall on flying pixels is Pixel-Perfect Depth. It reports an edge-aware Chamfer distance of 0.08, against 0.14 for Depth Pro and 0.17 for Marigold (Pixel-Perfect Depth). We will evaluate it with its released protocol as an upper reference. It is not a matched-compute competitor.
Every trained decoder shares the same encoder, the same data (Hypersim pretraining followed by NYUv2), the same number of training steps, and the same hyperparameter-search budget. Decoder parameter counts will be kept within a small factor of GLPNet's 0.66M. Ablations isolate each ingredient. Two layers blended by soft ownership at inference tests whether hard selection matters. An ownership head without the global token tests the local-global claim. Two layers merged at every level before upsampling tests whether keeping the layers separate through the pyramid matters.
Beating the field means three things at once. Flying-pixel rate and edge-aware Chamfer must fall clearly below both the regression and the dominant-mode baselines. Standard NYUv2 AbsRel must stay within noise of the regression baseline. And the boundary-completeness metric must be higher than the post-filter's.
Why not just…?
Why not just use a bigger backbone such as Depth Anything v2? The Fourth Monocular Depth Estimation Challenge reports that Depth Anything v2 was clearly beaten by entries with customized refinement, and that adding more data shows diminishing returns on thin structures and boundaries. The averaging argument in Depth Coefficients holds at any capacity. We will still run our decoder on a larger frozen encoder to check that the gain does not disappear with scale.
Why not just train with bins and take the dominant mode? This is the real threat. Mode readout removes the ramps, but it decides each boundary pixel on its own, from a near 50/50 split. We expect this to give jagged or shifted edges and to lose thin structures narrower than the network's effective resolution. The two-layer design instead decides ownership at full resolution using image edges and global figure-ground context. The head-to-head comparison on boundary localization (DBE accuracy and completeness on NYUv2-OC) and on thin-structure recall will settle it. If dominant-mode readout matches us on these, our contribution reduces to a readout trick, and we will report it that way.
Why not just upsample with RGB-guided joint bilateral filtering, or prune flying points afterward? Guided filtering still computes weighted averages of depth, so it reduces ramps without ruling them out. Pruning removes points instead of placing them correctly. DDL-MVS reports that learning boundaries end to end improved the DTU overall score from 0.352 to 0.339 mm, while filtering-based pipelines give up completeness. We include both a guided-upsampling variant and the clipping filter so that this cost is measured directly and not assumed.
Why not just use pixel-space diffusion? Pixel-Perfect Depth sets the accuracy bar, but it needs iterative sampling and depends on external foundation-model features. Our question is how much of its edge quality a single forward pass can recover. We will report its accuracy alongside our latency and the gap between the two.
Proposed Experiments
The main experiment trains on Hypersim followed by NYUv2 and evaluates on the NYUv2 test set with the standard metrics. For boundaries, we evaluate on NYUv2-OC with the depth-boundary-edge metric; no reported DBE number found on Lacuna for NYUv2-OC. We also evaluate edge-aware Chamfer distance on Canny-masked regions using the protocol from Pixel-Perfect Depth. Finally, we report a flying-pixel rate: the fraction of reprojected boundary-region points lying farther than a distance τ from every ground-truth surface, with τ swept across values. Zero-shot transfer is measured on ETH3D and DIODE. For context on the 3D F-score, the SYNS-Patches challenge winner reached 23.05% (The Fourth Monocular Depth Estimation Challenge).
A secondary experiment on KITTI depth completion tests whether the operator still helps when sparse LiDAR fixes the two surfaces. The reference point there is that depth coefficients lowered tMAE from 59.4 to 33.4 (Depth Coefficients).
Two checks are decisive. The first is the per-level diagnostic. If regression pyramids do not add most of their boundary error at upsampling steps, the motivation is wrong. The second is the comparison with the dominant-mode bin baseline on boundary localization and thin-structure recall. If the two-layer decoder does not beat it there, the added machinery is not justified.
References
- Depth Coefficients for Depth Completion
- Adaptive Multi-Modal Cross-Entropy Loss for Stereo Matching
- Pixel-Perfect Depth with Semantics-Prompted Diffusion Transformers
- Structure-Aware Residual Pyramid Network for Monocular Depth Estimation
- FCFR-Net: Feature Fusion based Coarse-to-Fine Residual Learning for Depth Completion
- From Big to Small: Multi-Scale Local Planar Guidance for Monocular Depth Estimation
- DDL-MVS: Depth Discontinuity Learning for Multi-View Stereo Networks
- Monocular Depth Estimation with Global-Aware Discretization and Local Context Modeling
- SparseMask: Differentiable Connectivity Learning for Dense Image Prediction
- Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth
- SharpNet: Fast and Accurate Recovery of Occluding Contours in Monocular Depth Estimation
- The Fourth Monocular Depth Estimation Challenge