In the era of massive foundation models like SAM and Mask2Former, it’s easy to assume that every computer vision task requires a deep neural network and millions of parameters. A new paper titled "DORMS: Image Segmentation via Depth-Ordered Region Merge Trees" challenges this assumption. The authors propose a purely algorithmic framework that segments images using nothing but monocular depth maps and classical geometric principles.
TL;DR
DORMS is a parameter-free, purely algorithmic image segmentation framework that operates solely on monocular depth maps. By combining depth-ordered merge trees with explicit geometric constraints, it outperforms classical baselines and rivals state-of-the-art zero-shot neural models, proving that explicit geometric reasoning remains a powerful tool in computer vision.
What Problem Does This Paper Address?
Modern image segmentation has largely shifted from algorithmic techniques (like graph-based clustering or superpixels) to learned representations. While deep learning has led to massive leaps in performance, these models often require substantial training data, specialized hardware (GPUs), and can be "black boxes" regarding their internal logic.
The authors of DORMS ask a fundamental question: How much of an image's structure can be recovered through algorithmic reasoning alone? By using depth as a proxy for scene geometry—capturing relative distances, object boundaries, and spatial relationships—they aim to create a lightweight, interpretable, and practical segmentation method that doesn't rely on semantic supervision or learned segmentation parameters.
Methods
The DORMS (Depth-Ordered Region Merging for Segmentation) pipeline is elegant in its simplicity. It treats segmentation as a topological problem in a scalar field (the depth map).
The process follows these key steps:
- Global Depth Detrending: Before segmenting, the algorithm fits a plane to the depth map using least squares and subtracts it. This "detrending" removes dominant linear gradients (like a receding ground plane), which helps emphasize local geometric variations and prevents global trends from skewing the merge process.
- Depth-Ordered Sweep: Pixels are sorted from nearest to farthest. A deterministic union-find procedure "activates" pixels in this order, building connected components.
- Geometric Merge Decisions: When two components meet, the algorithm decides whether to merge them based on two main criteria:
- Area-Persistence Score: This is the product of a region's area and its "depth persistence" (how long it has existed independently in the depth sweep). High scores indicate substantial, distinct objects that should remain separate.
- Gated Spatial-Contact Constraint: To prevent regions from merging prematurely across narrow "necks" (a common failure in topological methods), DORMS requires a minimum amount of accumulated spatial contact before a merge is even considered for large components.
- Threshold Search: The algorithm performs a bounded search for a merge threshold that produces a user-specified target region count ($k$).
- Small-Region Cleanup: A final pass reassigns tiny residual fragments to their nearest large neighbors.
Datasets
The authors evaluated DORMS across three diverse benchmarks to test its generalizability:
- COCO Panoptic: Everyday objects in varied contexts.
- Cityscapes: Complex urban driving environments.
- ADE20K: Diverse indoor and outdoor scenes with high annotation density.
While the segmentation algorithm is purely algorithmic, it requires a depth map as input. For these experiments, the authors used an off-the-shelf, pre-trained Depth Anything V2 model to generate the initial depth estimates.
Key Insights and Ideas
- Geometry is a Sufficient Cue: The most striking insight is that meaningful segmentation can be achieved without any RGB features or semantic labels during the segmentation stage. Depth discontinuities alone provide enough signal to find object boundaries.
- The Power of Detrending: Removing the "big picture" (the dominant plane) is crucial. As shown in Figure 3, detrending consistently improves performance across all levels of scene planarity, not just for flat scenes.
- Algorithmic vs. Zero-Shot Neural: On the Cityscapes dataset, DORMS actually outperformed all evaluated zero-shot neural models, including SAM and SAM2. This suggests that in structured environments where geometry is king, explicit reasoning can be more effective than general-purpose learned representations.
- Efficiency: Because it's purely algorithmic, the segmentation stage is incredibly lightweight, requiring only about 231 MB of CPU RAM for a COCO image.
Key Results
Quantitatively, DORMS demonstrated strong performance using the Hungarian-matched mean Intersection-over-Union (H-mIoU) metric:
- Cityscapes: Achieved an H-mIoU of 0.2086, surpassing the strongest zero-shot baseline, CLIPSeg (0.1506).
- Baselines: Consistently outperformed classical algorithms like Felzenszwalb’s graph-based method and SLIC superpixels across all three datasets.
- Qualitative Quality: Qualitative results show that DORMS successfully separates foreground objects from backgrounds and handles complex occlusions well.
Limitations and Future Work
Despite its strengths, DORMS has clear boundaries:
- Depth Quality Dependency: The algorithm is only as good as its input. If the monocular depth estimator produces blurry boundaries or lacks contrast between adjacent objects, DORMS will struggle.
- Target Region Count ($k$): The method currently relies on a dataset-specific target region count. The authors identify adaptive region-count selection as a primary direction for future work.
- Under-segmentation in Crowds: In very crowded scenes (like the bottom row of Figure 4), the algorithm can under-segment, merging multiple distinct but geometrically similar objects into one.
DORMS serves as a compelling reminder that as we push toward ever-larger neural networks, there is still immense value in "old-school" algorithmic reasoning—especially when paired with the high-quality geometric priors provided by modern depth estimators.
Summary updated