Papers
Topics
Authors
Recent
Search
2000 character limit reached

BlooDet: Surgical Bleeding Detection

Updated 25 May 2026
  • BlooDet is a dual-task surgical detection framework that segments bleeding regions and localizes bleeding points using a memory-augmented, bidirectionally guided architecture.
  • It integrates a video-capable SAM 2 backbone with custom prompt, edge, and memory modules to exploit spatial-temporal cues in laparoscopic procedures.
  • The framework achieves state-of-the-art performance with precise segmentation (IoU 64.88%) and improved point localization (PCK-10% 83.69%) on the SurgBlood benchmark.

BlooDet is a dual-task, online detection framework for quantitative bleeding region segmentation and bleeding point localization in laparoscopic surgical videos. Developed to exploit spatial-temporal cues in real-world surgical data, it synergistically unites bleeding-area mask and bleeding-source point detection in a bidirectionally guided, memory-augmented architecture. BlooDet builds upon, and extensively extends, the video-capable Segment Anything Model 2 (SAM 2) backbone, integrating novel prompt and memory mechanisms designed to maximize detection accuracy under surgical conditions typified by rapid hemoglobin dynamics and camera movement (Pei et al., 28 Mar 2025).

1. Dual-Branch Network Architecture

BlooDet features two parallel, tightly coupled branches: a Mask Branch that predicts binary bleeding region masks, and a Point Branch that outputs coordinate positions and confidence for the bleeding source per video frame. A sliding window over sequences of N=8N=8 consecutive frames is employed, with each time step kk processing the current video frame IkI_k and its N1N-1 predecessors. Input images are passed through the shared SAM 2 image encoder to obtain multi-scale features FkN+1kF_{k-N+1 \dots k}, which are subsequently processed by both memory modeling modules—one for the region masks, one for bleeding point features.

A defining characteristic is bidirectional branch guidance: the Mask Branch incorporates a soft point-heatmap from the Point Branch as a prompt, while the Point Branch reuses historical mask features and maps for optical-flow–based compensation and spatial anchoring. This architecture exploits spatial-temporal correlations between regions and acute bleed points, allowing each task to provide contextual evidence for the other and enhancing overall detection robustness.

2. Adaptive Prompt Embedding and Decoder Integration

BlooDet leverages key components from the official ICLR ‘25 release of SAM 2: the image encoder, prompt encoder, and transformer-based decoder. To tailor SAM 2’s generalist design to the surgical bleeding detection tasks, the Mask Branch integrates two custom prompt types:

Edge Prompt (EmE_m): Generated by a multi-scale Wavelet Laplacian filter applied to high-resolution features, encoding blood region edges. This prompt is transformed via a lightweight prompt encoder comprised of alternating 2×2 convolutions, LayerNorm, and GELU activation layers:

Ep=Cv(LN(Gelu(Cv(LN(Gelu(Cv(Em)))))))E_p = \operatorname{Cv}\left(\operatorname{LN}\left(\operatorname{Gelu}\left(\operatorname{Cv}\left(\operatorname{LN}\left(\operatorname{Gelu}\left(\operatorname{Cv}(E_m)\right)\right)\right)\right)\right)\right)

Point Prompt (PmP_m): The soft point-heatmap from the Point Branch is Fourier-feature-encoded positionally:

Pp=concat{sin(2πPo(Pm)),cos(2πPo(Pm))}+LeP_p = \operatorname{concat}\{ \sin(2\pi \cdot \operatorname{Po}(P_m)), \cos(2\pi \cdot \operatorname{Po}(P_m)) \} + L_e

where Po()\operatorname{Po}(\cdot) denotes Fourier-feature positional encoding and kk0 is a learned embedding.

Both prompt embeddings, kk1 and kk2, are fused in the SAM 2 mask decoder, which jointly attends over kk3, kk4, and kk5 to predict the bleeding-region mask kk6.

3. Point Branch: Memory Modeling and Optical Flow Compensation

For accurate bleeding point localization, the Point Branch incorporates both mask-guided spatiotemporal memory and explicit motion compensation:

  • Memory Banks: For each time point, two memory banks store past point-feature memories kk7 and mask-feature memories kk8. These enable temporal modeling over the recent video window.
  • Optical Flow: For each inter-frame pair, dense flow kk9 is computed, but critically, to isolate camera (not hemorrhage) movement, the average flow over background pixels (weighted by IkI_k0) yields the global camera offset:

IkI_k1

This is mapped via a small MLP and concatenated with past point (IkI_k2) and mask (IkI_k3) encodings to form reference tensors IkI_k4 for each of the IkI_k5 stored frames.

  • Point Feature Synthesis and Decoding: The current features IkI_k6 attend (self- and cross-attention) to all IkI_k7, yielding IkI_k8. A transformer-based decoder, following the standard SAM 2 paradigm but with additional learnable query tokens, decodes the bleeding point coordinate IkI_k9 and existence score N1N-10.

4. Loss Functions, Training, and Inference Protocols

The overall training objective combines region, edge, point localization, and point existence terms:

N1N-11

with empirical weights N1N-12, N1N-13.

  • Mask/Edge Losses: Per-pixel sum of Focal Loss and Dice Loss.
  • Point Loss: Smooth L1 loss applied only on frames where a bleeding point exists (N1N-14), plus binary cross-entropy (BCE) for point existence prediction.

The memory banks update on each new frame using memory encoders for both mask and point features, truncating to N1N-15 entries as needed. Training uses the SurgBlood dataset (5,330 frames from 95 surgical clips), Adam with linear warm-up and linear decay, and fixed PWC-Net weights for optical flow. Inference applies the pipeline over sliding windows, yielding mask and point predictions for the final frame in each window.

Inference Pipeline Pseudocode

N1N-16

5. Empirical Performance and Ablation Analysis

Quantitative evaluation on the SurgBlood benchmark indicates that BlooDet achieves state-of-the-art results for both bleeding region and point detection:

Method IoU Dice↑ PCK-2%↑ PCK-5%↑ PCK-10%↑
SAM 2‐Adapter 64.23 77.95
SAM 2 + point head 50.93 67.49 12.35 41.68 71.99
BlooDet 64.88 78.70 18.62 55.85 83.69

Mask segmentation achieves IoU of 64.88% and Dice of 78.70%. For point detection, BlooDet yields PCK-10% of 83.69%, surpassing the next best baseline by approximately 12 percentage points.

Ablation studies confirm the complementary roles of the Edge Generator (EG) and Point Memory Modeling (PMM): removing either module degrades both mask and point metrics, with the full model yielding superior accuracy (e.g., IoU 64.88%, Dice 78.70%, PCK-2% 18.62%). Removing multi-scale branches or Laplacian filtering from the edge prompt lowers IoU by 3–4 points; substituting background-weighted optical flow for standard approaches yields increased point accuracy. Bidirectional guidance contributes ~1–2 IoU to region accuracy and ~6–8 points to PCK-2% for points.

6. Architectural Significance and Discussion

BlooDet introduces a novel approach to dual-task detection that goes beyond naïve multi-headed or serial solutions by establishing bidirectional, memory-augmented coupling between masks and points. The adaptive edge and point prompt mechanisms, combined with temporal memory and cross-task guidance, enable effective exploitation of subtle spatial-temporal relationships frequently present in challenging surgical video data. The architecture, by leveraging explicit camera-motion compensation and inter-frame context, addresses the confounding effects of camera movement and blood flow dynamics more robustly than previous methods.

The use of a shared SAM 2 backbone for video processing ensures consistency and leverages advances from large-scale segmentation research, while the bespoke modules enable precise adaptation for the critical tasks of surgical bleeding quantification and point localization.

7. Dataset and Benchmarking: SurgBlood

BlooDet was trained and evaluated on the SurgBlood dataset, which comprises 5,330 annotated frames over 95 laparoscopic surgical video clips, each annotated for bleeding regions (masks) and discrete bleeding points. Data splits used 75 clips for training and 20 for testing, with 8-frame, 512×512-pixel windowed inputs.

This new benchmark supports objective, reproducible comparison across methods addressing intraoperative bleeding detection. On this dataset, BlooDet outperforms a set of 12 contemporary baselines.


All information precisely reflects “Synergistic Bleeding Region and Point Detection in Laparoscopic Surgical Videos” (Pei et al., 28 Mar 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to BlooDet Framework.