F2PASeg: Feature Fusion for Pituitary Anatomy Segmentation in Endoscopic Surgery

Lumin Chen, Zhiying Wu, Tianye Lei, Xuexue Bai, Ming Feng, Yuxi Wang, Gaofeng Meng, Zhen Lei, Hongbin Liu · OpenReview

Introduction

Endoscopic pituitary surgery is often described as a "game of millimeters." Surgeons must navigate the complex sellar region to resect tumors that frequently deform or encapsulate vital structures, such as the internal carotid arteries (ICA) and optic nerves. In this high-stakes environment, accidental injury can lead to catastrophic hemorrhaging or permanent vision loss. While AI-driven anatomical segmentation offers the potential for real-time "early warning" systems, the field has been hindered by two primary challenges: the extreme scarcity of pixel-level annotated surgical datasets and the visual instability caused by intraoperative bleeding, camera motion, and instrument occlusion.

To address these hurdles, the researchers introduce F2PASeg, a robust, real-time framework designed to provide reliable intraoperative guidance by leveraging a novel feature fusion approach and a large-scale specialized dataset.

The Pituitary Anatomy Segmentation (PAS) Dataset

A significant contribution of this work is the introduction of the Pituitary Anatomy Segmentation (PAS) dataset. Prior to this, the leading benchmark in the field contained only 635 images from 64 cases. The PAS dataset significantly expands this scope, featuring:

  • Scale: 7,845 time-coherent images extracted from 120 surgical videos.
  • Granularity: Pixel-level masks for six critical anatomical classes: the Sella Floor (SF), Tuberculum Sella (TS), ICA Prominence (IP), Clival Recess (CR), Optic Carotid Recess (OCR), and Optic Prominence (OP).

This dataset provides the necessary foundation for training deep learning models to recognize the subtle visual cues of the sellar region under varying surgical conditions.

Methodology: F2PASeg

F2PASeg is built upon the Segment Anything Model 2 (SAM2) architecture, but introduces three specific innovations to adapt the model for the chaotic environment of the operating room.

1. Feature Fusion Module

Standard segmentation models often struggle with consistency when the view is partially obscured. Unlike the original SAM2, which utilizes simple addition for high-dimensional features, F2PASeg incorporates a dedicated Feature Fusion block. This module employs two residual paths to better integrate high-resolution image features from the encoder with deep semantic embeddings from the memory encoder. This refinement allows the model to maintain more accurate anatomical boundaries even during camera motion or bleeding.

2. Low-Rank Adaptation (LoRA)

To ensure the model remains efficient enough for real-time use without sacrificing accuracy, the authors integrated LoRA branches into the residual blocks. This technique allows for effective feature modulation and fine-tuning by updating only a small subset of parameters. Consequently, the team reduced the trainable parameters from 39.0M to 34.8M, optimizing the model for the high-speed requirements of live surgery.

3. Instrument-Aware Data Augmentation

Class imbalance is a common issue in surgical data, as certain anatomical structures are frequently hidden by tools. The researchers developed a "multiplexing" augmentation strategy where masks of surgical instruments (such as suction tubes and forceps) are superimposed onto images of rare anatomical structures. This forces the model to learn that an anatomical structure remains present even when occluded, significantly improving temporal consistency in video streams.

Experimental Results

F2PASeg demonstrates superior performance across several key metrics compared to existing benchmarks like MedSAM and the original SAM2:

  • Accuracy: The model achieved a mean Dice score of 86.35%, outperforming SAM2 (83.97%) and MedSAM (81.66%).
  • Safety Gains: Crucially, the model showed a 3.90% improvement in segmenting the ICA and a 0.48% improvement for the OCR. These are the most "dangerous" zones where precision is non-negotiable.
  • Real-Time Performance: F2PASeg operates at 28.57 FPS, which is approximately 2.3 times faster than SAM-Med 2D, making it a viable solution for live intraoperative support.

Conclusion and Future Work

F2PASeg represents a significant step forward in surgical AI, providing a high-speed, accurate tool for navigating the complexities of pituitary surgery. By combining a massive new dataset with architectural innovations like feature fusion and LoRA, the framework overcomes traditional barriers of visual instability and data scarcity.

While the current model relies on periodic bounding box prompts (every 10 frames) to maintain accuracy, future research will focus on developing adaptive temporal modeling and moving toward fully autonomous segmentation that requires zero manual intervention during the surgical workflow. The researchers also aim to test the generalizability of the feature fusion module in other types of endoscopic procedures.

Summary updated

Abstract

Pituitary tumors often cause deformation or encapsulation of adjacent vital structures. Anatomical structure segmentation can provide surgeons with early warnings of regions that pose surgical risks, thereby enhancing the safety of pituitary surgery. However, pixel-level annotated video stream datasets for pituitary surgeries are extremely rare. To address this challenge, we introduce a new dataset for Pituitary Anatomy Segmentation (PAS). PAS comprises 7,845 time-coherent images extracted from 120 videos. To mitigate class imbalance, we apply data augmentation techniques that simulate the presence of surgical instruments in the training data. One major challenge in pituitary anatomy segmentation is the inconsistency in feature representation due to occlusions, camera motion, and surgical bleeding. By incorporating a Feature Fusion module, F2PASeg is proposed to refine anatomical structure segmentation by leveraging both high-resolution image features and deep semantic embeddings, enhancing robustness against intraoperative variations. Experimental results demonstrate that F2PASeg consistently segments critical anatomical structures in real time, providing a reliable solution for intraoperative pituitary surgery planning. Code: https://github.com/paulili08/F2PASeg.
BibTeX
@inproceedings{chen2025f,
  author = {Lumin Chen and Zhiying Wu and Tianye Lei and Xuexue Bai and Ming Feng and Yuxi Wang and Gaofeng Meng and Zhen Lei and Hongbin Liu},
  title = {{F2PASeg: Feature Fusion for Pituitary Anatomy Segmentation in Endoscopic Surgery}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2025},
  doi = {10.1007/978-3-032-05114-1\_24},
}
Figure