EndoMamba: An Efficient Foundation Model for Endoscopic Videos via Hierarchical Pre-training

📄 arXiv: 2502.19090v2 📥 PDF

作者: Qingyao Tian, Huai Liao, Xinyan Huang, Bingyu Yang, Dongdong Lei, Sebastien Ourselin, Hongbin Liu

分类: cs.CV

发布日期: 2025-02-26 (更新: 2025-05-15)

🔗 代码/项目: GITHUB


💡 一句话要点

EndoMamba:通过分层预训练实现内窥镜视频高效基础模型

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱八:物理动画 (Physics-based Animation) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 内窥镜视频 基础模型 Mamba 分层预训练 自监督学习 实时推理 手术阶段识别

📋 核心要点

  1. 现有视频基础模型在内窥镜应用中面临计算效率低和内窥镜数据预训练不足的挑战。
  2. EndoMamba通过优化的Mamba骨干网络和分层预训练策略,提升了内窥镜视频理解的效率和泛化能力。
  3. 实验表明,EndoMamba在多个下游任务上超越现有方法,同时保持实时推理速度。

📝 摘要(中文)

本文提出EndoMamba,一个专为内窥镜视频设计的、能够进行实时推理并学习通用时空表示的基础模型。针对现有视频基础模型计算效率低和内窥镜预训练数据有限导致性能欠佳的问题,EndoMamba通过优化后的EndoMamba骨干网络实现实时推理。该网络融合了双向Mamba块用于帧内空间建模,以及普通Mamba块用于跨时间域的过去到现在的推理,从而实现强大的时空建模和在线视频流中的高效推理。此外,本文还提出了一种自监督分层预训练方案,利用内窥镜视频并通过结合掩码重建和辅助监督来增强EndoMamba的表示学习能力,利用低级重建捕获时空结构,并利用高级对齐从预训练的通用视频域基础模型中迁移更广泛的知识。在分类、分割、手术阶段识别和定位四个下游任务上的大量实验表明,EndoMamba优于现有的基础模型和特定任务方法,同时保持了实时推理速度。

🔬 方法详解

问题定义:内窥镜视频分析在微创手术中至关重要,但现有视频基础模型计算量大,难以实时推理。此外,内窥镜视频数据有限,直接使用通用视频模型效果不佳,需要针对性地进行预训练。因此,如何构建一个既能高效推理又能学习到内窥镜视频特有表示的基础模型是本文要解决的问题。

核心思路:本文的核心思路是设计一个高效的Mamba架构,并结合分层预训练策略。Mamba架构具有线性复杂度,能够实现快速推理。分层预训练利用掩码重建学习时空结构,并利用通用视频模型的知识进行迁移,从而提升模型的泛化能力。

技术框架:EndoMamba的整体框架包括两个主要部分:EndoMamba骨干网络和分层预训练方案。EndoMamba骨干网络使用双向Mamba块进行空间建模,使用普通Mamba块进行时间建模。分层预训练方案首先使用掩码重建损失学习低级时空结构,然后使用知识对齐损失从通用视频模型中迁移高级语义信息。

关键创新:本文的关键创新在于将Mamba架构应用于内窥镜视频分析,并提出了针对内窥镜视频的分层预训练策略。与传统的Transformer架构相比,Mamba架构具有更高的计算效率。与直接使用通用视频模型相比,分层预训练能够更好地利用内窥镜视频的特性。

关键设计:在EndoMamba骨干网络中,双向Mamba块用于捕捉帧内的空间关系,普通Mamba块用于捕捉帧间的时间关系。在分层预训练中,掩码比例和知识对齐损失的权重是关键的超参数。具体而言,掩码比例控制了重建任务的难度,知识对齐损失的权重控制了知识迁移的强度。这些参数需要根据具体的内窥镜视频数据集进行调整。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

EndoMamba在四个下游任务(分类、分割、手术阶段识别和定位)上都取得了显著的性能提升。例如,在手术阶段识别任务上,EndoMamba的准确率超过了现有最佳方法,同时保持了实时推理速度。实验结果表明,EndoMamba是一种高效且有效的内窥镜视频分析基础模型。

🎯 应用场景

EndoMamba具有广泛的应用前景,包括内窥镜手术导航、手术阶段识别、病灶定位和异常检测等。它可以帮助医生更准确、更高效地进行手术,提高手术成功率,减少患者痛苦。未来,EndoMamba可以进一步扩展到其他医学影像领域,例如CT、MRI等。

📄 摘要(原文)

Endoscopic video-based tasks, such as visual navigation and surgical phase recognition, play a crucial role in minimally invasive surgeries by providing real-time assistance. While recent video foundation models have shown promise, their applications are hindered by (1) computational inefficiencies and (2) suboptimal performance caused by limited data for pre-training in endoscopy. To address these issues, we present EndoMamba, a foundation model designed for real-time inference while learning generalized spatiotemporal representations. First, to mitigate computational inefficiencies, we propose the EndoMamba backbone, optimized for real-time inference. Inspired by recent advancements in state space models, EndoMamba integrates Bidirectional Mamba blocks for spatial modeling within individual frames and vanilla Mamba blocks for past-to-present reasoning across the temporal domain. This design enables both strong spatiotemporal modeling and efficient inference in online video streams. Second, we propose a self-supervised hierarchical pre-training diagram to enhance EndoMamba's representation learning using endoscopic videos and incorporating general video domain knowledge. Specifically, our approach combines masked reconstruction with auxiliary supervision, leveraging low-level reconstruction to capture spatial-temporal structures and high-level alignment to transfer broader knowledge from a pretrained general-video domain foundation model. Extensive experiments on four downstream tasks--classification, segmentation, surgical phase recognition, and localization--demonstrate that EndoMamba outperforms existing foundation models and task-specific methods while maintaining real-time inference speed. The source code is available at https://github.com/TianCuteQY/EndoMamba.