EndoStreamDepth: Temporally Consistent Monocular Depth Estimation for Endoscopic Video Streams

Hao Li, Daiwei Lu, Jiacheng Wang, Robert J. Webster Iii, Ipek Oguz

TL;DR

EndoStreamDepth is a novel streaming monocular depth estimation framework designed specifically for endoscopic video. By processing frames sequentially using multi-level Mamba temporal modules and domain-specific augmentations, it achieves real-time throughput, sharp anatomical boundaries, and exceptional temporal consistency without the latency of multi-frame batching. This makes it a highly viable solution for the control loops of autonomous surgical robots.

What Problem Does This Paper Address?

Monocular depth estimation in endoscopy provides crucial geometric information for 3D reconstruction and robot-assisted surgery. However, deploying existing vision foundation models in real-world surgical settings presents a major dilemma:

  1. Single-frame models (like DepthAnything) achieve high spatial accuracy but suffer from severe flickering and temporal inconsistency when applied to video.
  2. Video-based or diffusion-based models achieve temporal consistency but require processing batches of frames simultaneously or demand heavy computation, introducing significant latency that is unacceptable for real-time surgical control loops.

Furthermore, endoscopic video features unique challenges—such as near-field lighting, specular reflections, rapid camera rotations, low-texture tissue surfaces, and smoke/fogging—that cause natural-scene foundation models to fail. EndoStreamDepth addresses these limitations by providing accurate, sharp, and temporally stable depth maps in a true streaming format.

Methods

EndoStreamDepth processes individual video frames sequentially to eliminate batching latency, utilizing three core components:

  • Endoscopy-Specific Transformation (EST): To make the network robust against surgical artifacts, the authors developed an augmentation pipeline that applies geometric transformations (like random 90° rotations to simulate camera roll) and photometric perturbations (such as motion blur, specular reflections, defocus, and smoke/fog simulation) during training.
  • Multi-Level Mamba Temporal Modules: Instead of using heavy transformers or batch processing, the framework integrates Mamba (state-space model) blocks at four distinct spatial resolutions within a hierarchical DPT decoder. These blocks maintain and propagate a recurrent hidden state ($H_t$) across frames, capturing both fine local details and global geometry with linear complexity.
  • Comprehensive Multi-Scale Supervision: The model is optimized using a combination of complementary losses:
  • Multi-scale SiLog loss to stabilize global depth structure across the decoder pyramid.
  • Log-domain $\ell_1$ metric loss to prioritize near- and mid-range accuracy (where clinical anatomy actually resides) over far-range errors.
  • Gradient-based edge loss to sharpen anatomical boundaries.
  • Self-supervised temporal regularization loss that penalizes frame-to-frame depth fluctuations using a robust per-video normalization technique.
Overview of the EndoStreamDepth framework showing the EST pipeline, single-frame network, and streaming video network.

Datasets

The framework was trained and evaluated on two publicly available colonoscopy depth benchmarks:

  • Phantom Colonoscopy Depth Dataset (C3VD): Contains 22 video sequences (10,015 frames) registered with ground-truth metric depth maps (clamped to 0–100 mm). The authors evaluated performance using both an in-distribution split and a challenging domain-shift split (holding out the transverse colon to test cross-organ generalization).
  • Simulated Colonoscopy Depth Dataset (SimCol3D): Consists of 33 videos (37,800 frames). This dataset was used strictly for external evaluation to verify the model's generalizability.

Key Insights and Ideas

  • Streaming over Batching: By leveraging Mamba's recurrent state-space architecture, the model achieves the temporal consistency of video-based networks while maintaining the low latency of single-frame networks.
  • Log-Domain Compression Matters: Standard $\ell_1$ losses heavily penalize far-range errors. By switching to a log-domain metric loss, the authors compress the depth range, forcing the model to focus its capacity on the near- and mid-range zones where surgical tools interact with tissue.
  • Domain Augmentation Beats Pure Scale: Simply fine-tuning a massive foundation model on medical data isn't enough. Explicitly forcing the model to learn invariance to endoscopic realities (like camera roll and smoke) via the EST pipeline yields massive robustness gains.

Key Results

EndoStreamDepth significantly outperformed state-of-the-art methods (including DepthAnything v2, EndoOmni, DINOv3, and FlashDepth) across all standard metrics on the C3VD dataset:

  • Accuracy & Error: It achieved a threshold accuracy ($\delta_1$) of 0.952 and reduced the absolute relative error (AbsRel) to 0.085 (compared to FlashDepth's 0.730 and 0.188, respectively).
  • Boundary Sharpness: It delivered much sharper anatomical boundaries, yielding a Boundary F1 score of 0.143 compared to DepthAnything v2's 0.089.
  • Temporal Stability: As shown in the ablation studies and sequence evaluations, the self-supervised temporal regularization effectively suppressed frame-to-frame flickering, providing consistently lower frame variance ($\sigma$) across 8 out of 9 test videos compared to FlashDepth.
  • Runtime Performance: The model maintained an average inference speed of 24 FPS on an NVIDIA A6000 GPU. While slightly slower than the single-module FlashDepth (36 FPS) due to the multi-level architecture, it comfortably satisfies real-time throughput requirements for surgical robotic deployment.
Quantitative ablation table showing the step-by-step performance gains of each component.

Limitations and Future Work

The primary trade-off in EndoStreamDepth is computational complexity: incorporating Mamba modules at multiple feature levels drops the frame rate relative to single-level temporal models. While 24 FPS is sufficient for real-time applications, optimizing the architecture for even higher throughput remains an open task.

For future work, the authors plan to extend the framework to other types of robot-assisted endoscopic interventions and explore integrating robot proprioception data (e.g., kinematic feedback from the surgical robot) to further refine depth accuracy in high-error regions.

Summary updated

BibTeX
@misc{li2025endostreamdepth,
  author = {Hao Li and Daiwei Lu and Jiacheng Wang and Robert J. Webster III and Ipek Oguz},
  title = {{EndoStreamDepth: Temporally Consistent Monocular Depth Estimation for Endoscopic Video Streams}},
  year = {2025},
  eprint = {2512.18159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.18159},
}
Figure