Abstract
EndoStreamDepth is a novel deep-learning framework designed for real-time, "streaming" depth estimation in endoscopic videos. By integrating efficient Mamba-based temporal modules into a hierarchical architecture, it produces depth maps that are both spatially sharp and remarkably stable across video frames. This approach effectively solves the "flickering" problem common in standard single-frame models without the high latency associated with batch-based video approaches. The framework achieves state-of-the-art performance on major colonoscopy benchmarks, maintaining a real-time processing speed of 24 FPS.
Introduction
In robotic surgery and image-guided interventions, accurate depth estimation—the distance from the camera to the tissue—is critical for automation and safety. However, monocular endoscopy presents significant computer vision challenges: near-field lighting, harsh glares, specular reflections on wet tissue, rapid camera rotations, and motion blur.
Existing solutions typically fall into two categories, both with inherent flaws. Single-frame models are fast but produce "flickering" results where depth values jump inconsistently between consecutive frames. Conversely, batch-based video models achieve temporal consistency by processing groups of frames simultaneously, but this introduces significant latency, which is unacceptable for real-time surgical control loops. EndoStreamDepth bridges this gap by providing a model that is accurate, temporally smooth, and fast enough for live surgical applications.
Methodology
EndoStreamDepth builds upon a Vision Transformer (ViT-L) backbone, specifically DepthAnythingv2, and introduces several surgical-specific innovations to handle the unique constraints of endoscopic video.
Endoscopy-Specific Transformation (EST)
To bridge the domain gap between natural images and the internal anatomy of the colon, the authors developed a specialized augmentation pipeline called EST. This pipeline simulates medical-specific artifacts such as defocus, smoke, fog, and tissue-cutting debris during training, ensuring the model is robust to real-world surgical conditions.
Multi-level Mamba Modules
Instead of standard Recurrent Neural Networks (RNNs) or Transformers, the framework utilizes Mamba (a State Space Model). Mamba is highly efficient at processing sequences; it maintains a "hidden state" that carries information from previous frames to the current one without the massive memory overhead of self-attention. These modules are placed at four different resolutions in the decoder to capture both global geometry and fine-grained edges.
Comprehensive Supervision
The model is trained using a multi-faceted loss function:
- SiLog & Metric Loss: Ensures correct overall depth scaling.
- Edge-Aware Loss: Forces the model to produce sharp boundaries around anatomical structures.
- Self-supervised Temporal Regularization: A novel loss term that penalizes frame-to-frame fluctuations in a scale-invariant manner, leading to smoother depth trajectories over time.
Evaluation and Results
The authors evaluated EndoStreamDepth on two major colonoscopy benchmarks: C3VD (Colonoscopy 3D Video Dataset), a high-fidelity phantom dataset, and SimCol3D, a simulated colonoscopy dataset.
EndoStreamDepth set a new state-of-the-art on the C3VD dataset, outperforming high-profile models like DepthAnything v2 and FlashDepth:
- Accuracy: It achieved a $\delta_1$ (accuracy under threshold) of 0.952, significantly higher than the 0.730–0.850 range of competing models.
- Consistency: The frame variance ($\sigma$), which measures flickering, was consistently lower than the previous best streaming model across almost all test sequences.
- Speed: The model runs at approximately 24 FPS on an NVIDIA A6000, meeting the real-time threshold required for medical deployment.
Key Insights
- Mamba for Surgery: The research demonstrates that Mamba modules can propagate temporal information across long sequences with minimal latency, making them superior to batch-processing for live surgical streams.
- Log-Domain Precision: Standard depth losses often penalize far-range errors more than near-range ones. By using log-domain $\ell_1$ losses, the authors force the model to be more precise in the "near-range" where surgical tools are most active.
- Balancing Sharpness and Stability: While sharp edges are desirable, they can introduce flickering. The hierarchical design and temporal regularization act as a counterbalance, ensuring anatomical boundaries remain stable during camera movement.
Conclusion and Future Work
EndoStreamDepth provides a robust solution for real-time depth estimation in endoscopic video. While it introduces a slight computational trade-off compared to the fastest single-frame models, the gains in temporal stability are substantial. Future work may involve incorporating robot "proprioception" (joint data) to provide an even more stable geometric reference and exploring generalization to other surgical types, such as laparoscopy.
Summary updated