Skip to main content
QUICK REVIEW

[Paper Review] Surgical SAM 2: Real-time Segment Anything in Surgical Video by Efficient Frame Pruning

Haofeng Liu, Erli Zhang|arXiv (Cornell University)|Aug 15, 2024
Medical Image Segmentation TechniquesComputer Science5 citations
TL;DR

SurgSAM-2 optimizes SAM2 for real-time surgical video segmentation by dynamic cosine-similarity frame pruning, reducing memory use and boosting FPS with minimal accuracy loss. It achieves state-of-the-art results on EndoVis17/18 while operating in resource-constrained settings.

ABSTRACT

Surgical video segmentation is a critical task in computer-assisted surgery and is vital for enhancing surgical quality and patient outcomes. Recently, the Segment Anything Model 2 (SAM2) framework has shown superior advancements in image and video segmentation. However, SAM2 struggles with efficiency due to the high computational demands of processing high-resolution images and complex and long-range temporal dynamics in surgical videos. To address these challenges, we introduce Surgical SAM 2 (SurgSAM2), an advanced model to utilize SAM2 with an Efficient Frame Pruning (EFP) mechanism, to facilitate real-time surgical video segmentation. The EFP mechanism dynamically manages the memory bank by selectively retaining only the most informative frames, reducing memory usage and computational cost while maintaining high segmentation accuracy. Our extensive experiments demonstrate that SurgSAM2 significantly improves both efficiency and segmentation accuracy compared to the vanilla SAM2. Remarkably, SurgSAM2 achieves a 3$ imes$ FPS compared with SAM2, while also delivering state-of-the-art performance after fine-tuning with lower-resolution data. These advancements establish SurgSAM2 as a leading model for surgical video analysis, making real-time surgical video segmentation in resource-constrained environments a reality. Our source code is available at https://github.com/jinlab-imvr/Surgical-SAM-2.

Motivation & Objective

  • Motivate real-time surgical video segmentation under resource constraints.
  • Adapt SAM2 for surgical environments by reducing redundant frame processing.
  • Develop a dynamic memory management module using frame pruning to preserve essential temporal context.
  • Demonstrate efficiency-accuracy trade-offs on EndoVis17/18 datasets.
  • Provide insights for deploying SAM-based models in real-time surgical workflows.

Proposed method

  • Extend SAM2 with a dynamic memory bank management system.
  • Introduce Efficient Frame Pruning (EFP) using cosine similarity to prune past frames.
  • Configure memory bank to keep current frame plus a selective subset of previous frames (n=5, m=2; first frame always retained).
  • Fine-tune only the mask decoder and memory module while freezing prompt and image encoders.
  • Train with mixed video and image data at 512x512 resolution; use half-precision (bf16).
  • Evaluate with multi-mask output, IOU prediction, and occlusion prediction across EndoVis17/18 datasets.

Experimental results

Research questions

  • RQ1Can selective frame pruning based on cosine similarity maintain or improve segmentation accuracy while reducing memory and compute in real-time surgical video analysis?
  • RQ2What is the impact of reduced memory bank size on FPS, memory usage, and instance-level instrument segmentation performance in EndoVis17/18?
  • RQ3How does SurgSAM-2 compare to vanilla SAM2 under various prompting settings (Full Mask, 1 Point, 5 Points) in terms of CIoU/IoU, Dice, FPS, and memory?

Key findings

  • SurgSAM-2 increases FPS by an average of 13.8% across prompt settings compared to SAM2.
  • Memory usage is reduced by about 8.5% on average with the proposed EFP mechanism.
  • Fine-tuning with lower-resolution input (512x512) plus EFP yields superior or competitive accuracy versus full-resolution SAM2 across EndoVis datasets.
  • With 1-point and 5-point prompts, SurgSAM-2 achieves competitive CIoU compared to task-specific baselines while offering higher FPS and lower memory footprint.
  • On EndoVis17, SurgSAM-2 generally maintains or modestly improves IoU/J&F/Dice compared to SAM2, with substantial gains in speed and memory efficiency; on EndoVis18, accuracy often improves with EFP, alongside speed/memory gains.
  • In comparison to existing surgical instrument methods and other SAM-based approaches, SurgSAM-2 delivers the best balance of segmentation quality and real-time performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.