Abstract
The advancement of medical image segmentation techniques has been propelled by the adoption of deep learning techniques, particularly UNet-based approaches, which exploit semantic information to improve the accuracy of segmentations. However, the order of organs in scanned images has been disregarded by current medical image segmentation approaches based on UNet. Furthermore, the inherent network structure of UNet does not provide direct capabilities for integrating temporal information. To efficiently integrate temporal information, we propose TP-UNet that utilizes temporal prompts, encompassing organ-construction relationships, to guide the segmentation UNet model. Specifically, our framework is featured with cross-attention and semantic alignment based on unsupervised contrastive learning to combine temporal prompts and image features effectively. Extensive evaluations on two medical image segmentation datasets demonstrate the state-of-the-art performance of TP-UNet.
Introduction
Medical imaging is inherently sequential. When a radiologist examines a stack of MRI or CT slices, they rely on the predictable anatomical order of the human body—knowing, for instance, that the stomach typically appears before the small intestine in a top-to-bottom scan. However, standard deep learning architectures like the UNet are "temporally blind," processing individual 2D slices as isolated images without understanding their global context within the scan sequence.
As shown in the figure above, organ occurrence follows a distinct distribution relative to scan depth. By ignoring these "organ construction relationships," current models miss critical spatial cues that could help distinguish between similar-looking tissues. TP-UNet addresses this by teaching models to "read" their position in a scan using automatically generated textual prompts.
Methodology
TP-UNet integrates textual temporal information into the segmentation process through three core components:
- Temporal Prompts: The system generates a text string for every slice, such as: "This is an MRI of the stomach with a segmentation period of $N_i^{th}/N$." This maps the slice to a normalized interval $[0, 1]$, providing the model with precise sequential context.
- Semantic Alignment: Image features from the UNet encoder and text features from a fine-tuned language model (like CLIP or Electra) are aligned using unsupervised contrastive learning. This ensures that the image of a specific organ and the text describing its location share a similar mathematical representation.
- Modality Fusion: Aligned features are merged via a cross-attention mechanism. This allows the textual prompt to guide the decoder, prioritizing specific parts of the image feature map based on the expected anatomy at that depth.
Experimental Results
The model was evaluated on the UW-Madison GI Tract Dataset (MRI) and the LITS 2017 benchmark (CT). TP-UNet demonstrated superior performance over both traditional CNNs and modern Transformer-based models:
- UW-Madison Dataset: TP-UNet achieved an average Dice score of 0.9286, outperforming the standard UNet by 4.44% and the Swin UNet by 1.3%. The most significant gains were observed in the small intestine, a notoriously difficult organ to segment due to its variable appearance.
- LITS Dataset: For liver segmentation, the model achieved a Dice score of 0.9125, a 6.08% improvement over the baseline UNet.
- Ablation Study: Removing temporal information resulted in a 2.1% drop in performance, confirming that the model effectively utilizes sequential context to improve accuracy.
Conclusion
TP-UNet successfully bridges the gap between vision and language in medical imaging by incorporating the sequential logic of human anatomy. By using temporal prompts to guide the segmentation process, the model achieves state-of-the-art results with minimal computational overhead (less than 1ms for prompt generation). Future work will explore more complex, LLM-generated prompts and the integration of full 3D spatial context to further refine segmentation accuracy.
Summary updated