Prompt2Echo (P2Echo): Text-Prompted Multi-View Echocardiography Segmentation with One Model

✨ arXiv preprint, 2026 ✨

Moein Heidari*, Alvin Kimbowa*, Mahdi Tabatabaei, Afshin Bozorgpour, Sina Ghorbani Kolahi, River Jiang, Wenjin Chen, David J. Foran, Jasmine Grewal, Dorit Merhof, Ilker Hacihaliloglu

*Equal contribution

P2Echo segments LV, MYO, LA, RV and RA in 2CH, 3CH, 4CH and PSAX echocardiography with a single network, controlled by view-aware text prompts.
1 model
for four views and five structures, steered by text
96.94%
mDice on 2CH, internal test set
82.22%
mDice on held-out HMC-QU
64.68 FPS
on one H100 at 6.90 GFLOPs

Abstract

Automated segmentation in multi-view echocardiography is essential for comprehensive cardiac assessment, yet remains challenging due to substantial anatomical and appearance variability across standard acoustic windows. In this paper, we present P2Echo, a unified framework capable of segmenting diverse cardiac structures across multiple standard echocardiographic views using a single model controlled by structured view-aware text prompts. Unlike recent foundation model adaptations that rely on implicit latent priors, P2Echo explicitly conditions the segmentation process via a novel Dynamic Image-Text Alignment (DyITA) module. DyITA integrates a differentiable routing mechanism and token differential operators to dynamically modulate decoder features according to the requested view and target structure. This allows the network to adaptively switch its processing pathways for different views without architectural changes. Extensive experiments on a large-scale internal dataset (seen during training) and held-out evaluation on three external datasets demonstrate that P2Echo matches or exceeds both view-specific specialists and state-of-the-art universal models at a fraction of their computational cost, offering an efficient, controllable solution for multi-plane cardiac analysis. Code is available at github.com/moeinheidari7829/P2Echo.

Why one model is hard

Challenges of multi-view echocardiography segmentation
Figure 1. Key challenges in multi-view echocardiography image segmentation: (a) cross-view appearance disparity, (b) acquisition-domain shift, (c) inter-subject anatomical variability, (d) view-specific anatomical visibility, and (e) boundary degradation from speckle, shadowing, and signal dropout. Colored contours denote the annotated cardiac structures.

Method

P2Echo architecture
Figure 2. The P2Echo framework. A dual-encoder extracts hierarchical visual and textual features, aligned by a prompt decoder into stage-specific mask embeddings, which are natively fused via ITA blocks. Each ITA block is built around Dynamic Image-Text Alignment (DyITA): dynamic projection with routed redundancy projectors, a dynamic measure kernel, and a cross-modal differential operator before softmax cross-attention.

Results

Table 1. Comparison on the internal test set across echocardiographic views (mean ± s.d.). Best and second best per column. ** p < 0.01, Wilcoxon signed-rank test against the second-best method.
Method2CH3CH4CHPSAX
mDice ↑mIoU ↑HD95 ↓mDice ↑mIoU ↑HD95 ↓mDice ↑mIoU ↑HD95 ↓mDice ↑mIoU ↑HD95 ↓
nnUNet92.82 ± 3.7586.82 ± 6.144.90 ± 2.2093.07 ± 2.9787.17 ± 5.035.98 ± 3.0291.39 ± 5.6884.64 ± 8.176.35 ± 4.0291.50 ± 5.6984.78 ± 8.547.72 ± 4.86
SwinUNet86.58 ± 6.0877.15 ± 7.937.75 ± 3.7687.27 ± 6.0377.88 ± 8.898.86 ± 4.9785.43 ± 8.1675.62 ± 10.049.04 ± 6.5185.29 ± 8.9675.29 ± 12.0611.11 ± 7.10
ResUNet91.80 ± 2.8985.21 ± 4.535.46 ± 3.3091.78 ± 3.6085.26 ± 5.815.69 ± 4.0188.09 ± 6.5280.01 ± 8.577.83 ± 10.2888.99 ± 7.4580.86 ± 10.6714.88 ± 15.12
MissFormer90.88 ± 3.0483.70 ± 4.735.48 ± 1.6291.09 ± 5.6584.12 ± 8.435.95 ± 4.0788.34 ± 5.6779.92 ± 7.726.24 ± 4.1688.50 ± 7.2480.00 ± 10.269.20 ± 5.19
CENet93.11 ± 2.1487.38 ± 3.604.07 ± 1.2593.09 ± 2.9987.42 ± 5.034.42 ± 2.1090.88 ± 4.8083.89 ± 6.564.71 ± 3.0291.08 ± 5.1083.99 ± 8.027.29 ± 3.46
SAMUS89.04 ± 10.3981.85 ± 12.1313.67 ± 3.3893.61 ± 2.9188.13 ± 4.978.42 ± 1.1889.36 ± 9.1582.00 ± 11.4413.72 ± 3.4791.46 ± 4.2384.55 ± 6.8612.28 ± 2.17
SAM3 (Zero-shot)8.75 ± 6.414.84 ± 4.23220.04 ± 7.702.37 ± 1.341.29 ± 0.26310.12 ± 20.456.32 ± 4.223.53 ± 2.01241.67 ± 30.125.06 ± 2.662.99 ± 2.20306.86 ± 11.85
SAM3 (Fine-tuned)93.39 ± 1.7587.60 ± 3.113.18 ± 0.8992.70 ± 2.4887.04 ± 4.216.69 ± 1.7090.85 ± 5.2583.85 ± 7.594.19 ± 3.5391.18 ± 4.6684.13 ± 7.327.90 ± 3.85
MedCLIP-SAMv228.98 ± 16.0017.98 ± 11.14170.40 ± 79.6731.70 ± 12.7619.48 ± 8.57170.09 ± 60.7824.61 ± 14.7814.87 ± 10.07170.90 ± 86.4027.72 ± 15.3417.04 ± 10.7236.48 ± 10.60
Grounding DINO-US-SAM73.97 ± 21.0462.20 ± 21.1615.47 ± 19.3983.29 ± 7.0971.92 ± 9.6010.59 ± 5.6176.43 ± 13.8864.30 ± 16.0212.31 ± 7.4184.42 ± 9.5474.06 ± 12.5513.50 ± 8.19
EchoONE91.69 ± 11.6785.83 ± 12.642.51 ± 3.3893.60 ± 3.3588.15 ± 5.484.24 ± 2.1991.11 ± 10.1084.69 ± 11.623.88 ± 3.5091.71 ± 8.8285.56 ± 10.707.97 ± 3.06
P2Echo (ours)96.94** ± 1.7294.11** ± 3.082.03** ± 0.9294.71** ± 2.1690.03** ± 3.793.96** ± 1.6093.87** ± 5.0788.81** ± 7.483.33** ± 3.7792.00 ± 4.9785.52 ± 7.766.99 ± 3.74
Table 2. Held-out external datasets, excluded from training (mean ± s.d.). Params in millions, FLOPs in G. Best and second best per column; ** p < 0.01.
MethodParams (M)FLOPs (G)HMC-QUCardiacNet
mDice ↑HD95 ↓mDice ↑HD95 ↓
nnUNet33.4828.3045.30 ± 45.417.64 ± 3.7888.13 ± 10.986.32 ± 6.27
SwinUNet27.176.1652.24 ± 11.5119.28 ± 15.5375.42 ± 14.5211.40 ± 7.45
ResUNet13.0554.5458.02 ± 12.2623.04 ± 14.0586.82 ± 14.306.22 ± 7.38
MissFormer42.469.8948.31 ± 11.8023.24 ± 12.2186.07 ± 13.705.98 ± 6.75
CENet33.3912.7654.41 ± 13.2519.89 ± 12.6589.56 ± 13.484.33 ± 6.68
SAMUS39.65145.8861.93 ± 27.9919.19 ± 14.7786.64 ± 10.928.94 ± 5.48
SAM3 (Zero-shot)-2417.081.91 ± 1.00261.99 ± 3.542.14 ± 2.00173.12 ± 7.95
SAM3 (Fine-tuned)14.402417.0843.46 ± 43.43179.59 ± 32.2590.62 ± 9.843.70 ± 5.38
MedCLIP-SAMv2836.992458.1724.25 ± 14.7378.30 ± 27.0516.20 ± 8.24232.61 ± 57.47
Grounding DINO-US-SAM397.291171.3860.99 ± 28.0813.13 ± 6.3178.05 ± 21.819.92 ± 9.67
EchoONE45.62174.3453.96 ± 31.4313.10 ± 16.6988.10 ± 10.433.84 ± 5.24
P2Echo (ours)37.476.9082.22** ± 9.536.92** ± 2.5892.95** ± 10.023.37** ± 5.63
Qualitative comparison
Figure 3. Qualitative comparison across four echocardiographic views (rows). Columns show the input image, baseline predictions, and P2Echo. Colored regions denote predictions, while class-colored contours indicate ground-truth boundaries. Red arrows highlight representative segmentation errors.
Qualitative analysis of P2Echo
Figure 4. Qualitative analysis of P2Echo. (a) Prompt-driven segmentation of structures beyond available annotations. (b) Feature activation maps before and after DyITA for different target structures. (c) Visualization of DyITA component ablations.
Table 3. Prompt intervention on 450 images (950 structure instances). Only the prompt text is varied. Gray rows probe unsupported requests, where near-zero overlap is the intended behavior.
ConditionExample promptDice (%) ↑IoU (%) ↑
Canonical“Segment the LV: The LV is fully visualized from base to apex.”93.53 ± 6.8388.39 ± 8.84
Clinical paraphrase“Delineate the left ventricular blood pool.”80.48 ± 23.8872.62 ± 26.76
Concise“Segment the left ventricle cavity.”35.83 ± 36.2328.58 ± 30.95
Ambiguous“Segment the cardiac chamber.”0.01 ± 0.230.01 ± 0.12
Irrelevant“Segment the liver.”6.35 ± 19.704.95 ± 16.54
Null“No anatomical structure is requested.”0.00 ± 0.000.00 ± 0.00
Table 4. Inference time per image on an NVIDIA H100 (FP32, batch size 1; mean ± s.d. over 10 runs).
MethodTime (s/image) ↓
nnUNet0.04057 ± 0.00002
SwinUNet0.00577 ± 0.00002
MissFormer0.01034 ± 0.00001
CENet0.02328 ± 0.00010
SAMUS0.06620 ± 0.00024
SAM3 (Zero-shot)0.19694 ± 0.00004
SAM3 (Fine-tuned)0.08203 ± 0.00009
MedCLIP-SAMv22.46376 ± 0.02072
Grounding DINO-US-SAM2.59870 ± 0.01970
EchoONE0.08649 ± 0.00004
P2Echo (ours)0.01546 ± 0.00002

BibTeX

@article{heidari2026p2echo,
  title   = {Prompt2Echo (P2Echo): Text-Prompted Multi-View Echocardiography Segmentation with One Model},
  author  = {Heidari, Moein and Kimbowa, Alvin and Tabatabaei, Mahdi and Bozorgpour, Afshin and Ghorbani Kolahi, Sina and Jiang, River and Chen, Wenjin and Foran, David J. and Grewal, Jasmine and Merhof, Dorit and Hacihaliloglu, Ilker},
  journal = {arXiv preprint arXiv:ARXIV_ID_PLACEHOLDER},
  year    = {2026}
}