Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

Depth Bleeding

Depth bleeding is a depth-map artifact in which distances smear across object boundaries, leaving flying pixels and halos in point clouds and AR scenes.

Depth bleeding is an artifact in depth maps in which depth values spill across the boundary between a foreground object and its background, so pixels along the edge take the other surface's depth or a blend of both. It appears at depth discontinuities, the occlusion boundaries where one surface ends and a much farther one begins, and it affects every source of depth: stereo vision, time-of-flight and LiDAR sensors, and learned depth estimation. The edges matter far more than their pixel count suggests. Back-projected into a 3D point cloud, bled pixels become flying pixels, points hanging in empty space between an object and the wall behind it. In augmented reality they make virtual objects poke through or float in front of real edges, in novel view synthesis they stretch edges like rubber sheets, and for robotics and autonomous vehicles they make objects look wider than they are, which misplaces a robot's grasp and stretches the boxes of 3D object detection.

Where Depth Bleeding Comes From#

In stereo matching, each pixel's match is decided by comparing a window of neighbors, and near an edge that window covers both surfaces. Foreground pixels in the window can dominate the matching cost, so the foreground's depth spreads onto background pixels next to it, an effect the stereo literature calls foreground fattening. Pixels visible to only one camera have no correct match at all and pick up a neighbor's depth.

Neural networks for monocular depth estimation produce bleeding in two ways. Their encoders downsample the image into coarse feature maps, so many decoders predict depth at a fraction of the input resolution and interpolate up, which blends the two surfaces across every edge. And where a boundary pixel could belong to either surface, a squared-error loss function is minimized by predicting the average of the two depths, a value that lies on neither surface. Ultralytics YOLO26 depth models predict log-depth at a quarter of the input resolution, and the predictor upsamples the map bilinearly to the original image size, so a jump between two surfaces in the output becomes a ramp a few pixels wide.

Sensors bleed physically. A time-of-flight pixel or a LiDAR beam whose footprint straddles an edge receives light from both surfaces and reports a depth in between, the classic source of flying pixels in depth-camera point clouds. RGB-D cameras add misalignment, since depth is measured from a slightly different position than color and edges shift when one is reprojected onto the other.

This example upsamples a quarter-resolution depth map of a person standing 1.5 m in front of a wall 4 m away, the way many depth networks reach full resolution, and counts pixels whose depth belongs to neither surface:

import torch
import torch.nn.functional as F

# A depth map predicted at 1/4 resolution: a person 1.5 m away in front of a wall 4 m away
low = torch.full((1, 1, 120, 160), 4.0)
low[..., 30:, 60:100] = 1.5

for mode in ["bilinear", "nearest"]:
    # Upsample 4x to the 480 x 640 image
    depth = F.interpolate(low, size=(480, 640), mode=mode)[0, 0]

    # Bleeding pixels hold depths that belong to neither surface
    bleeding = (depth > 1.6) & (depth < 3.9)
    print(f"{mode}: {bleeding.sum().item()} bleeding pixels, row 300 across the edge: {depth[300, 394:404].tolist()}")

Bilinear upsampling creates 3,518 bleeding pixels, a ramp of 1.81, 2.44, 3.06, and 3.69 m along every edge of the silhouette, each of which would float in midair in a point cloud. Nearest-neighbor upsampling creates none, because it never invents new values, but in real images the true edge falls inside a coarse pixel, so nearest-neighbor output places edges up to two pixels off and turns diagonal edges into staircases.

Reducing and Measuring Depth Bleeding#

Edge-aware upsampling, a form of guided depth super-resolution, uses the full-resolution color image as a guide. Joint bilateral upsampling, introduced by Johannes Kopf and colleagues in 2007, and the guided filter weight each neighbor by color similarity, so depth stops at image edges. The opposite failure, texture copying, follows when color edges without a depth change, such as print on a box, are carved into the depth map. Networks reduce bleeding with higher-resolution outputs, boundary-aware training losses, and refinement guided by image segmentation, and Apple's Depth Pro was designed and evaluated specifically for sharp boundaries. For stereo, a left-right consistency check marks pixels whose matches disagree between the two directions, and for any source, flying pixels can be removed by discarding points where depth jumps sharply between neighbors or where the surface is nearly parallel to the viewing ray.

Standard metrics barely register bleeding, since edge pixels are a small share of an image and average errors such as absolute relative error hardly move. The iBims-1 benchmark, released by Tobias Koch and colleagues at the Technical University of Munich in 2018, scores depth edges directly with depth boundary errors: accuracy measures how far predicted edges lie from manually annotated ones, and completeness measures how many true edges a prediction misses.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Computer vision in sports
Computer vision in sports
Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery
Computer vision for aerial imagery
Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace
Computer vision in aerospace
Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security
Computer vision in security
Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics
Computer vision in robotics
Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics
Computer vision in logistics
Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail
Computer vision in retail
Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare
Computer vision in healthcare
Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing
Computer vision in manufacturing
Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive
Computer vision in automotive
Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture
Computer vision in agriculture
Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Computer vision in sports
Computer vision in sports
Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery
Computer vision for aerial imagery
Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace
Computer vision in aerospace
Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security
Computer vision in security
Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics
Computer vision in robotics
Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics
Computer vision in logistics
Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail
Computer vision in retail
Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare
Computer vision in healthcare
Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing
Computer vision in manufacturing
Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive
Computer vision in automotive
Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture
Computer vision in agriculture
Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning