Self-Supervised monocular depth and ego-Motion estimation in endoscopy: Appearance flow to the rescue

Shuwei Shao, Zhongcai Pei, Weihai Chen, Wentao Zhu, Xingming Wu, Dianmin Sun, Baochang Zhang

TL;DR

This paper introduces Appearance Flow, a novel concept that enables self-supervised depth and ego-motion estimation in the challenging, non-uniform lighting conditions of endoscopic surgery. By relaxing the traditional "brightness constancy" assumption and modeling radiometric changes directly, the authors' unified framework significantly outperforms existing methods and demonstrates remarkable generalization across different surgical datasets without fine-tuning.

What Problem Does This Paper Address?

In autonomous driving, self-supervised depth estimation relies on a "brightness constancy" assumption: the idea that a pixel's intensity remains the same as it moves between video frames. However, in minimally invasive surgery (MIS), this assumption falls apart. Endoscopes carry their own light sources, meaning the illumination moves with the camera. This creates severe brightness fluctuations, specular reflections on wet tissues, and complex inter-reflections.

Standard algorithms mistake these lighting changes for geometric movement, leading to "ambiguous supervision" and distorted 3D reconstructions. As shown in Figure 2, the mismatch between target and source frames in endoscopic scenes creates a noisy supervisory signal that degrades performance.

Figure 2

Methods

The authors propose a unified self-supervised framework built on a Generalized Dynamic Image Constraint (GDIC). Instead of just warping pixels based on geometry, they model the relationship between frames as a combination of geometric transformation (motion) and radiometric transformation (appearance).

The architecture consists of four primary modules:

  1. Structure Module (DepthNet): Predicts dense depth maps from a single target frame.
  2. Motion Module (PoseNet): Estimates the 6-degree-of-freedom (6DOF) camera movement between frames.
  3. Appearance Module (AFNet): This is the core innovation. It predicts an Appearance Flow field—a dense map of brightness variations—to calibrate the image intensity.
  4. Correspondence Module (OFNet): Uses an optical flow network to perform an automatic registration step. This aligns the frames geometrically so the Appearance Module can more easily isolate and learn the pure lighting changes.

The training process is illustrated in Figure 3, showing how these modules interact to produce "Refined Frames" that satisfy the GDIC.

Figure 3

Datasets

The model was trained and evaluated on several key endoscopic benchmarks:

  • SCARED: Fresh porcine cadaver abdominal anatomy with ground-truth point clouds and ego-motion.
  • EndoSLAM: Ex vivo porcine gastrointestinal tract organs, featuring challenging lighting and textures.
  • SERV-CT & Hamlyn: Used specifically to test generalization. The model trained on SCARED was tested on these datasets without any additional fine-tuning to see how well it handles different patients and camera hardware.

Key Insights and Ideas

  • Relaxing the Constancy Constraint: By treating brightness change as a learnable "flow" ($C_\delta$), the model can handle non-Lambertian surfaces (shiny tissues) that previously baffled self-supervised learners. This is visually explained in Figure 4, where the GDIC allows for linear and nonlinear brightness variations.
  • The Power of Registration: The authors found that simply adding an appearance module wasn't enough. The Correspondence Module is critical because it "pre-aligns" the frames, allowing the appearance module to focus on why the brightness changed rather than where the pixels moved.
  • Robustness to Large Errors: The framework shows particular strength in the "Sq Rel" (Squared Relative Error) metric. Because this metric penalizes large outliers, the improvement suggests the appearance flow effectively eliminates the "hallucinated" depth artifacts caused by specular highlights.
Figure 4

Key Results

The proposed method, referred to as AF-SfMLearner, outperformed state-of-the-art models like Monodepth2 and Endo-SfM by a significant margin.

  • Accuracy: On the SCARED dataset, the model achieved an Abs Rel error of 0.059, compared to 0.071 for Monodepth2.
  • Generalization: When tested "zero-shot" on the SERV-CT dataset, it maintained a superior Abs Rel of 0.102, while other models' errors spiked significantly.
  • Qualitative Quality: As seen in Figure 6, the resulting depth maps are more continuous and better preserve fine-grained anatomical boundaries compared to baseline methods.
Figure 6

Limitations and Future Work

Despite the "rescue" provided by appearance flow, some hurdles remain:

  • Oversaturation: In regions where the image is completely "blown out" (pure white) by the light source, information is lost. The appearance flow cannot recover depth in these areas because there is no texture to match.
  • Scale Ambiguity: Like all monocular methods, the system cannot determine the absolute scale of the scene (e.g., millimeters) without external information or a known object size.
  • Future Directions: The authors suggest exploring multi-view depth estimation to utilize information from more than two frames and integrating physical sensor data (like endoscope tracking) to resolve absolute scale.

Summary updated

BibTeX
@article{shao2022self,
  author = {Shuwei Shao and Zhongcai Pei and Weihai Chen and Wentao Zhu and Xingming Wu and Dianmin Sun and Baochang Zhang},
  title = {{Self-Supervised monocular depth and ego-Motion estimation in endoscopy: Appearance flow to the rescue}},
  journal = {Medical Image Analysis},
  year = {2022},
  url = {https://openreview.net/forum?id=VN6kqGF1Jre},
}
Figure