Source-linked AI summary
Contour-Guided Query-Based Feature Fusion for Boundary-Aware and Generalizable Cardiac Ultrasound Segmentation
Zahid Ullah, Sieun Choi, Jihie Kim
TL;DR
Cardiac ultrasound segmentation must remain accurate despite weak boundaries, noise, anatomical variability, and domain shifts, while existing appearance-driven methods lack explicit structural grounding. CGQR-Net uses contour-derived queries with multi-resolution feature refinement and boundary-aware supervision, achieving improved segmentation and boundary delineation across CAMUS and CardiacNet, including under domain shift. The method's refinement remains dependent on the quality of its initial coarse segmentation.
Problem
Cardiac ultrasound segmentation is challenged by noisy, low-contrast images and domain shifts, while appearance-driven methods provide limited explicit structural grounding for precise anatomical boundaries.
Method
CGQR-Net converts contours from a coarse segmentation into learnable queries that cross-attend to fused multi-resolution features, with dual-head segmentation and boundary supervision.
Results
CGQR-Net achieves superior segmentation performance on CAMUS and maintains strong generalization on CardiacNet, with sharper, more anatomically consistent boundaries under challenging conditions.
Takeaways & Limitations
Contour-guided structural refinement offers a supported approach for improving cardiac ultrasound segmentation quality across imaging conditions and challenging weak-boundary regions.
Takeaways & Limitations
Contour refinement depends on coarse-segmentation quality, so errors may propagate in extremely noisy cases or when structures are missing.
Abstract
from arXiv · showhide
Accurate cardiac ultrasound segmentation is essential for reliable assessment of ventricular function in intelligent healthcare systems. However, echocardiographic images are challenging due to low contrast, speckle noise, irregular boundaries, and domain shifts across devices and patient populations. Existing methods, largely based on appearance-driven learning, often fail to preserve boundary precision and structural consistency under these conditions. To address these issues, we propose a Contour-Guided Query Refinement Network (CGQR-Net) for boundary-aware cardiac ultrasound segmentation. The framework integrates multi-resolution feature representations with contour-derived structural priors. An HRNet backbone preserves high-resolution spatial details while capturing multi-scale context. A coarse segmentation is first generated, from which anatomical contours are extracted and encoded into learnable query embeddings. These contour-guided queries interact with fused feature maps via cross-attention, enabling structure-aware refinement that improves boundary delineation and reduces noise artifacts. A dual-head supervision strategy jointly optimizes segmentation and boundary prediction to enforce structural consistency. The proposed method is evaluated on the CAMUS dataset and further validated on the CardiacNet dataset to assess cross-dataset generalization. Experimental results demonstrate improved segmentation accuracy, enhanced boundary precision, and robust performance across varying imaging conditions. These results highlight the effectiveness of integrating contour-level structural information with feature-level representations for reliable cardiac ultrasound segmentation.
1 INTRODUCTION
Cardiac ultrasound segmentation is difficult because appearance varies across noisy, low-contrast images and domain shifts, while reliable assessment depends on anatomically precise contours. CGQR-Net addresses this gap by using contour-guided queries, multi-resolution features, cross-attention, and dual-head supervision, with evaluation on CAMUS and CardiacNet.
- Motivation: Low contrast, ambiguous boundaries, speckle noise, anatomical deformation, and domain shift make it difficult to preserve fine details and global structural consistency.Acquisition devices, imaging protocols, and patient populations contribute to performance degradation on unseen datasets.
- Related limitations: Existing CNN and transformer methods capture appearance or long-range context but generally lack explicit geometric guidance, leading to smooth, jagged, leaking, or inconsistent boundaries.Boundary-aware methods often treat edge information as auxiliary supervision rather than using it to drive feature refinement.
- Motivation: Cardiac segmentation is a structural problem because clinical measurements depend on precise anatomical contours, not isolated pixel predictions.The motivation focuses on LV endocardium, LV epicardium, and LA delineation for assessing cardiac function and cardiovascular disease.
- Proposed method: CGQR-Net extracts contours from a coarse segmentation, converts them into learnable query embeddings, and uses cross-attention to refine fused multi-resolution features.HRNet preserves high-resolution spatial detail while capturing multi-scale context in the proposed architecture.
- Training and evaluation: A dual-head strategy jointly optimizes region segmentation and boundary prediction to enforce anatomical consistency.The framework is evaluated on CAMUS and further validated on CardiacNet, including ASD and non-ASD cohorts, to assess cross-dataset generalization.
2 RELATED WORK
Existing cardiac ultrasound segmentation methods improve local appearance modeling, global context, or edge supervision, but generally lack integrated anatomical structure and remain vulnerable to domain shift.
- Most existing approaches are appearance-driven and commonly suffer from boundary ambiguity, over-smoothing, and degraded robustness under domain shift.
- CNN-Based Cardiac Segmentation: CNN-based models rely mainly on local convolutional evidence and pixel-wise overlap, producing overly smooth, fragmented, or anatomically inconsistent predictions.
- Transformer-Based Medical Segmentation: Transformer-based models capture long-range dependencies and global context but typically lack explicit geometric or contour-level structural grounding.
- Boundary-Aware Segmentation Models: Boundary-aware methods sharpen contours through auxiliary edge branches or losses, yet usually treat boundary prediction as secondary supervision rather than a feature-refinement driver.
- Query-Based and Attention-Based Refinement Methods: Query-based methods use cross-attention for adaptive feature grouping, but generic or weakly initialized queries lack domain-specific anatomical priors and geometric grounding.
- Domain generalization methods often emphasize appearance alignment even though anatomical structure varies less across datasets, encouraging structural consistency as a more robust basis.
3 PROPOSED METHOD
CGQR-Net combines HRNet-based multi-resolution features with coarse contour extraction and contour-guided refinement for boundary-aware cardiac ultrasound segmentation.
- 3 PROPOSED METHOD: CGQR-Net uses preprocessing, coarse structural estimation, and contour-guided refinement to produce boundary-aware multi-class segmentation.The framework processes echocardiographic images with HRNet, extracts contours from coarse predictions, and generates final segmentation outputs.
- 3 PROPOSED METHOD: HRNet preserves high-resolution representations while exchanging information across parallel multi-scale branches.This design retains spatial detail needed for weak boundaries, speckle noise, and thin myocardial structures while incorporating semantic context.
- 3 PROPOSED METHOD: A coarse segmentation generated from the deepest feature map provides the basis for extracting structural contours.The contours are subsequently encoded into queries and used to refine fused multi-scale features through cross-attention.
- 3 PROPOSED METHOD: Contour points are represented as ordered boundary sets with normalized coordinates, converting dense masks into explicit boundary geometry.The representation captures contour location, extent, and shape while reducing dependence on image size.
3.5 Contour-to-Query Embedding Module
The contour-to-query module converts coarse anatomical contours into compact geometric descriptors and query embeddings for structure-guided feature refinement.
- 3.5 Contour-to-Query Embedding Module: Each contour is summarized using geometric descriptors including centroid, area, perimeter, and spatial dispersion.These descriptors encode the contour’s position, size, boundary extent, and spread.
- 3.5 Contour-to-Query Embedding Module: The contour descriptor is projected into latent feature space to form a query embedding associated with the corresponding anatomical contour.The resulting q_k acts as a structural token for probing fused feature maps.
- 3.5 Contour-to-Query Embedding Module: Learnable base queries are added alongside contour-derived queries to provide additional representation flexibility.The final query matrix therefore combines explicit contour structure with a small set of learned tokens.
3.6 Feature Pyramid Fusion
Feature pyramid fusion aligns HRNet branches and combines their complementary boundary-detail and semantic information into a unified spatial representation.
- 3.6 Feature Pyramid Fusion: Multi-resolution feature maps are first aligned in channel dimension and spatial size before fusion.1 × 1 convolutions map the branches to a common channel dimension, followed by upsampling to a shared resolution.
- 3.6 Feature Pyramid Fusion: Feature fusion provides a shared image-driven memory that complements the structure-driven representation supplied by contour queries.The design combines multi-resolution HRNet information rather than relying on a single feature scale.
- 3.6 Feature Pyramid Fusion: The fused representation combines shallow edge and contour cues with deeper global anatomical semantics and noise robustness.This unified feature memory is later attended by contour-derived queries.
3.7 Contour-Guided Cross-Attention Refinement
Contour-guided cross-attention uses structural query embeddings to retrieve boundary-relevant evidence from fused spatial feature tokens and refine the representation.
- 3.7 Contour-Guided Cross-Attention Refinement: The fused feature map is flattened into spatial tokens, while contour-derived and learnable queries form the query matrix.The two representations provide spatial image evidence and structural guidance, respectively.
- 3.7 Contour-Guided Cross-Attention Refinement: Cross-attention computes how strongly each contour query attends to each spatial location in the fused feature map.The resulting query-conditioned context is projected back into the feature domain as a query-guided modulation map.
- 3.7 Contour-Guided Cross-Attention Refinement: The refined feature representation combines the original fused features with query-guided modulation through a learnable scaling parameter.This formulation makes the refinement explicitly structure-aware rather than a generic interaction between token sets.
3.8 Boundary-Aware Dual-Head Prediction and Loss
CGQR-Net uses separate segmentation and boundary heads to jointly enforce region consistency and anatomical edge precision. Their losses combine multi-class Dice supervision with binary cross-entropy boundary supervision.
- Dual-head prediction: The segmentation head predicts refined class logits, while the boundary head predicts edge logits.The two heads separately target region assignment and edge localization.
- Dual-head prediction: Joint optimization encourages predictions that are both region-consistent and anatomically well delineated.
- Loss functions: The segmentation objective uses multi-class Dice similarity coefficient loss.The loss compares predicted and ground-truth pixels across classes.
- Loss functions: Boundary supervision uses binary cross-entropy to emphasize edge localization.The balancing coefficient λ controls the relative contributions of region and boundary supervision.
4 EXPERIMENTAL SETUP
Experiments use CAMUS and CardiacNet to evaluate cardiac segmentation across views, phases, pathological variation, and cross-dataset conditions. Standardized preprocessing, phase-specific training, and DSC-based validation support the evaluation.
- Datasets: CAMUS provides annotated 2CH and 4CH echocardiography frames at end-diastolic and end-systolic phases.Annotations cover LV endocardium, LV epicardium, and LA, with background as a fourth class.
- Datasets: CardiacNet adds ASD and non-ASD cohorts to test robustness under pathological and morphological variability.It is used for internal partitioning or as an external test set for cross-dataset generalization.
- Preprocessing: Preprocessing standardizes intensity and spatial resolution across acquisition conditions.Images are normalized per image and resized, while masks use nearest-neighbor interpolation.
- Data partitioning: Patient-level training and validation splits are used to avoid data leakage and support fair evaluation.CAMUS follows the official protocol or an 80%-20% patient-level split.
- Training protocol: Training uses phase-specific models with AdamW, cosine annealing, teacher forcing for the first 20 epochs, and validation-based model selection.The network is trained for 100 epochs separately for ED and ES, with batch size 4 and learning rate 1 × 10^-4.
- Evaluation: Segmentation performance is evaluated using DSC averaged across foreground anatomical classes.The training algorithm computes refined and boundary logits, optimizes the total loss, and saves the best validation model.
5 RESULTS
CGQR-Net achieves strong quantitative and qualitative results on CAMUS and CardiacNet, with improved performance in difficult cardiac structures and sharper, more coherent boundaries under noise and domain shift.
- Quantitative results: 90.40% average DSC is achieved on CAMUS, outperforming competing methods across the evaluated cardiac structures.The reported improvements include endocardium, epicardium, and left atrium segmentation.
- Quantitative results: 93.95% DSC is obtained for the endocardium, while epicardium performance reaches 88.09%.The epicardium is described as more challenging because of low contrast and weak boundary definition.
- Quantitative results: 89.15% DSC is achieved for the left atrium, exceeding DAM-Seg at 89.10% and CANet at 87.01%.The left atrium is difficult because of its irregular shape and high variability across patients.
- External validation: 90.27% average DSC is achieved on CardiacNet, with the best reported performance across cardiac structures.The model reaches 89.60% for the left atrium and 89.73% for the right atrium.
- External validation: 91.87% DSC is achieved for the left ventricle and 89.89% for the right ventricle on CardiacNet.The right ventricle is described as challenging because of shape variability and boundary ambiguity.
- Qualitative results: Contour-guided refinement produces more coherent and anatomically consistent predictions under CardiacNet noise, intensity variation, and domain shift.The qualitative results describe reduced fragmentation and boundary leakage after refinement.
- Qualitative results: The refined outputs show sharper boundaries, improved shape preservation, and better alignment with anatomical structures than conventional segmentation behavior.These effects are reported particularly for weak-contrast or irregular-shape cases.
6 DISCUSSION
Across CAMUS and CardiacNet, CGQR-Net reports higher segmentation performance and stronger generalization by using contour-derived structural information alongside feature refinement. Ablations support the contribution of its contour, boundary, fusion, and attention components, while the method remains limited by coarse-segmentation quality and computational overhead.
- Overall findings: CGQR-Net consistently outperforms existing methods across CAMUS and CardiacNet, indicating strong segmentation capability and robust generalization.
- Structural modeling: Contour-guided query refinement explicitly incorporates structural information beyond conventional pixel-wise supervision.The discussion identifies this integration as critical for improving accuracy and boundary delineation.
- Quantitative interpretation: The highest DSCs occur across structures on both datasets, with particularly noticeable gains for the epicardium and left atrium.These regions have weak boundaries and high variability in echocardiographic images.
- Qualitative interpretation: Contour cues help correct coarse errors, reduce leakage, and preserve fine details under low-contrast and noisy conditions.Boundary predictions provide additional evidence of meaningful edge representations contributing to segmentation quality.
- Ablation findings: Removing contour queries or the boundary head degrades performance, while feature fusion and cross-attention also contribute to the reported gains.The ablation discussion attributes performance to the combined integration of these modules.
- Domain generalization: Contour-based representations are described as less sensitive to intensity and noise variation than purely appearance-based features.This is linked to the method’s stronger performance on unseen datasets.
- Limitations: Refinement depends on coarse-segmentation quality, and cross-attention adds computational overhead that may affect resource-constrained deployment.Severe noise or missing structures can make contour representations less reliable.
7 CONCLUSION
CGQR-Net combines contour-guided query refinement with multi-scale feature learning to improve cardiac ultrasound segmentation. It achieves strong dataset performance and generalization under domain variations and challenging boundary conditions.
- CGQR-Net integrates contour-derived structural priors and cross-attention refinement to improve boundary delineation and shape consistency.The framework combines contour-guided query refinement with multi-scale feature learning.
- CGQR-Net achieves superior performance on the CAMUS dataset and maintains strong generalization on the CardiacNet dataset.
- Boundary-aware refinement is particularly effective in challenging regions with weak or ambiguous boundaries.The conclusion identifies boundary-aware refinement as crucial for improving segmentation quality.
CREDIT AUTHORSHIP CONTRIBUTION STATEMENT
The contribution statement assigns distinct roles across conceptualization, methodology, analysis, software, writing, supervision, and project management.
- Zahid Ullah contributed to conceptualization, methodology, software, formal analysis, investigation, data curation, and manuscript writing.
- Sieun Choi contributed to original-draft writing and review and editing.
- Jihie Kim contributed to formal analysis, investigation, supervision, and project administration and management.