Self-supervised Monocular Depth and Pose Estimation for Endoscopy with Latent Priors

Ziang Xu, Bin Li, Yang Hu, Chenyu Zhang, James East, Sharib Ali, Jens Rittscher

TL;DR

This paper introduces a novel self-supervised framework for estimating depth and camera pose in endoscopic videos, crucial for 3D reconstruction and lesion characterization. By leveraging a generative latent bank trained on natural scene depth data and a VAE-constrained pose network, the method significantly improves accuracy and robustness in challenging endoscopic environments, outperforming existing approaches.

What Problem Does This Paper Address?

Accurate 3D mapping of the gastrointestinal (GI) tract during endoscopy is vital for precise lesion characterization, diagnosis, and treatment planning. This requires reliable estimation of both the depth of the scene and the camera's pose (position and orientation) as it moves through the tract. However, endoscopy presents unique challenges: the systems are typically monocular (single camera), making depth estimation inherently difficult. Furthermore, the GI tract's environment is characterized by complex textures, variable lighting, and occlusions, making it hard to obtain accurate ground truth depth and pose data for training. Existing methods often rely on synthetic data, which may not generalize well to real-world scenarios, or complex models that struggle with these specific challenges.

Methods

The proposed framework is a self-supervised approach that jointly estimates depth and pose. It builds upon the principles of Monodepth2, using a depth network (DepthNet) and a pose network (PoseNet) that are trained by minimizing reprojection errors between adjacent video frames.

The key innovations lie in how these networks are enhanced:

  • DepthNet with Generative Latent Bank: To improve depth prediction realism and robustness, DepthNet is conditioned by a "Generative Latent Bank." This bank is a pre-trained StyleGAN-like generator that has learned to produce realistic depth maps from natural scenes. The encoder of DepthNet extracts features from the endoscopic image, which are then used as "prompts" to guide the latent bank. This injects prior knowledge of scene depth structures, making the depth predictions more accurate and less susceptible to endoscopic artifacts.
  • PoseNet with VAE as Latent Priors: The pose estimation is reframed using a Variational Autoencoder (VAE). The PoseNet acts as the encoder, predicting pose transitions between frames. These predicted poses are treated as latent variables within the VAE. The VAE's decoder is effectively the reprojection process. A KL divergence loss is introduced to regularize these latent pose variables against a standard Gaussian prior. This regularization encourages smoother, scale-consistent pose transitions, particularly stabilizing the z-axis movement and improving sensitivity to x-y plane changes, which aligns with the natural, gentle motion expected in endoscopy.

The entire system is trained end-to-end using a self-supervised objective that minimizes the difference between the current frame and frames reprojected using the estimated depth and pose from adjacent frames.

Datasets

The paper evaluates its method on several datasets:

  • SimCol: This dataset includes synthetic colon videos generated from CT scans and rendered in Unity, providing ground truth depth maps and camera poses. It's used for evaluating depth estimation and model generalization across different GI regions.
  • EndoSLAM: This dataset comprises both synthetic videos from a VRCaps simulation environment and real endoscopy videos from porcine GI organs. It's used for evaluating model generalization to non-virtual datasets and real-world scenarios.
  • SceneNet RGB-D: This dataset was used for pre-training the Generative Latent Bank. It contains over 15,000 synthesized indoor RGB images with corresponding ground truth depth maps.

Key Insights and Ideas

  • Leveraging Natural Scene Priors for Endoscopy: A crucial insight is that knowledge learned from natural scene depth estimation (via the Generative Latent Bank) can significantly improve performance in the highly specialized domain of endoscopy, even without direct endoscopic ground truth during pre-training.
  • VAE for Pose Regularization: Treating pose transitions as latent variables within a VAE framework is an effective way to enforce smooth, physically plausible movements. This is particularly important for endoscopy, where jerky or inconsistent motion can be detrimental.
  • Interdependence of Depth and Pose: The ablation studies highlight that the depth and pose estimation branches are not independent. Improvements in one can positively impact the other due to their shared role in the reprojection loss.
  • Addressing Z-axis Dominance: The VAE regularization specifically helps to prevent the pose estimation from over-emphasizing z-axis movement, leading to more accurate and naturalistic trajectory reconstructions.

Key Results

The proposed method demonstrates state-of-the-art performance on the SimCol and EndoSLAM datasets.

  • Depth Estimation: On the SimCol dataset, the method achieved lower RMSE values (e.g., 0.505 on Simcol-III) and better Abs Rel and L1 error compared to methods like Monodepth2, MonoViT, and Lite-Mono. Qualitative results show superior depth maps, especially on challenging phantom and real frames with complex textures and lighting.
  • Pose Estimation: The method achieved competitive or superior results in pose estimation, with RTE values of 0.089 and 0.296 and ROT values of 0.671 and 0.789 on Simcol-I/II and Simcol-III, respectively. Qualitative visualizations show improved x, y, and z scale consistency and better rotation angle alignment compared to other methods. The method also showed strong performance on the real endoscopy data from the EndoSLAM dataset.

Limitations and Future Work

  • Limitations: The paper acknowledges that comprehensive quantitative validation in fully clinical settings is constrained by the absence of ground truth data from real colonoscopies. The current evaluation relies on synthetic data and porcine datasets.
  • Future Work: The authors plan to integrate real-world clinical data by using computational methods to approximate ground truth depth and pose. This could involve leveraging CT scans or quantitative validation on physical phantoms. They also aim to incorporate 3D reconstruction of the colon, which would further enhance the applicability of their approach in clinical workflows.

Summary updated

BibTeX
@article{xu2026self,
  author = {Ziang Xu and Bin Li and Yang Hu and Chenyu Zhang and James East and Sharib Ali and Jens Rittscher},
  title = {{Self-supervised Monocular Depth and Pose Estimation for Endoscopy with Latent Priors}},
  journal = {IEEE Transactions on Medical Imaging},
  year = {2026},
  doi = {10.1109/tmi.2026.3671423},
}
Figure