Automated transperineal ultrasound analysis using deep learning for pelvic floor dysfunction assessment after total hysterectomy.

OA: gold CC-BY-4.0
AI-generated deep summary by qwen3.7-flash, 2026-08-26 · read from full text

This retrospective study developed a deep learning framework using a multi-scale shifted window Transformer to automate the analysis of transperineal ultrasound images for assessing pelvic floor dysfunction after total hysterectomy. The model was trained on 50 patients with benign gynecological conditions, including uterine adenomyosis, to automatically segment anatomical structures and calculate seven functional parameters during resting and Valsalva states. The results demonstrated that this automated approach provides a standardized, objective, and reproducible alternative to manual measurement, which is often limited by operator variability and image quality issues. Relevance to endometriosis: uterine adenomyosis is listed as one of the surgical indications for the hysterectomies studied, linking the paper’s population to adenomyosis research.

Read from the paper's body, not the abstract. Not a substitute for reading the paper. No clinical advice. How this works

Abstract

BackgroundPelvic floor dysfunction (PFD) is a common functional disorder following total hysterectomy. Currently, the assessment mainly relies on manual measurements of transperineal ultrasound (TPUS) images, which suffers from low efficiency, subjectivity, and limited reproducibility.ObjectiveTo address these limitations, this work proposes an automated transperineal ultrasound analysis using deep learning for pelvic floor dysfunction assessment after total hysterectomy.MethodsA labeled dataset including key anatomical landmarks such as the symphysis pubis, bladder neck, urethra, and puborectalis muscle was established, and a multi-scale shifted window Transformer was developed to achieve automatic segmentation and key point detection. Additionally, a geometric reasoning module was further designed to compute seven clinically relevant functional parameters, including bladder neck-symphysis distance, posterior urethrovesical angle, and urethral rotation angle.ResultsExperimental results demonstrated that the model achieved an average Dice coefficient of 88.67 ± 1.96% in segmentation, with key point localization errors controlled within 2 mm. The automatic measurement results are highly consistent with manual annotations, with Pearson correlation coefficients up to 0.92, and effectively distinguished functional differences among patients undergoing different surgical approaches.ConclusionThe proposed method enables structured, automated, and objective TPUS image analysis, significantly reducing manual intervention. Although validated in patients with benign diseases, the approach is directly transferable to gynecologic oncology patients, who are at even higher risk of PFD due to more extensive surgery and adjuvant therapies. It provides a reliable tool for postoperative functional monitoring and therapeutic evaluation after total hysterectomy, and holds great potential for functional imaging-based rehabilitation assessment in post-hysterectomy patients.
Full text 55,023 characters · extracted from pmc-nxml · 5 sections · click to expand

Intro

Pelvic floor dysfunction (PFD) is a prevalent functional disorder among middle-aged and elderly women ( 1 ), primarily manifested as stress urinary incontinence, pelvic organ prolapse, and defecation disorders, all of which significantly impair quality of life. In recent years, with the increasing prevalence of gynecological surgeries such as hysterectomy, the incidence of PFD has markedly risen in postoperative populations ( 2 , 3 ). Particularly after total hysterectomy, patients frequently experience varying degrees of pelvic floor muscle relaxation, reduced tissue elasticity, and degeneration of supportive structures. Without timely recognition and intervention, these functional impairments may progress to irreversible pelvic floor damage. Therefore, establishing an objective, quantitative, and efficient approach for pelvic floor function assessment is of great clinical significance for postoperative rehabilitation management, risk stratification, and long-term follow-up of patients after hysterectomy ( 4 , 5 ). While this study focuses on patients with benign diseases to establish the methodology, the tool is equally applicable to gynecologic oncology patients, who often undergo more extensive surgery and adjuvant treatments that further increase the risk of PFD. Thus, the developed method holds direct translational relevance for both benign and malignant diseases. Transperineal Ultrasound (TPUS) is a non-invasive, real-time imaging technique that has become a key tool in the evaluation of female pelvic floor anatomy ( 6 – 8 ). TPUS enables clear visualization of key anatomical landmarks, including the symphysis pubis (SP), bladder (BL), urethra (U), vagina (V), anus (A), rectum (R), and pelvic floor muscle (PR). By comparing images obtained at resting and during the Valsalva maneuver, TPUS allows the extraction of essential structural parameters, such as bladder neck-symphyseal distance (BSD), posterior urethrovesical angle (PUA), anorectal junction–symphysis distance (ASD), the anteroposterior diameter of the hiatus (HAPD), bladder neck descent (BND), urethral rotation angle (URA), and anorectal junction descent (ARJD) ( 9 , 10 ). These seven parameters are internationally recognized clinical indicators of pelvic floor support and mobility, and are routinely used in clinical practice to evaluate PFD. These quantitative indicators are widely applied in postoperative rehabilitation assessment and monitoring of pelvic floor functional changes, providing substantial clinical value. However, TPUS images are often characterized by blurred tissue boundaries, low signal-to-noise ratio, and substantial structural variability ( 11 , 12 ), which restricts current clinical evaluation to visual interpretation and manual measurement by ultrasound technicians. This approach is not only inefficient and poorly reproducible but is also highly dependent on operator expertise and subjective judgment, making it difficult to support standardized large-scale, multicenter follow-up studies in patients after total hysterectomy ( 13 , 14 ). With the rapid development of artificial intelligence, particularly deep learning techniques in medical image analysis, automatic recognition and structural modeling of TPUS images have gradually become a research hotspot ( 15 – 18 ). Early studies, represented by convolutional neural networks (CNNs) such as U-Net ( 19 ), achieved remarkable progress in tissue segmentation tasks on grayscale ultrasound images. The encoder–decoder architecture of CNNs enables the effective recovery of local tissue boundaries. Nevertheless, due to the limited receptive field of CNNs, they have limitations in capturing long-range dependencies between anatomical structures ( 20 , 21 ). More recently, Transformer-based models have been increasingly applied to medical imaging owing to their global attention mechanisms and superior contextual modeling capabilities. Compared with traditional CNNs, Transformers can effectively integrate global semantic information from low-contrast ultrasound images, thereby enabling accurate recognition and modeling of complex anatomical structures. They have demonstrated remarkable potential in tasks such as tumor detection, tissue segmentation, and structural modeling ( 22 , 23 ). The development of this method marks a significant shift in approach, moving from convolutional networks driven by local feature extraction to self-attention models with global perceptual features, providing a completely new technical path for the automated and standardized analysis of TPUS images. Recent work by ( 24 ) proposed automatic extraction of the minimal hiatal plane from 3D pelvic floor ultrasound. In contrast, our method analyzes 2D TPUS images using a multi-scale shifted window Transformer for fully automated segmentation and key point detection, combined with a geometric reasoning module to compute seven functional parameters across both resting and Valsalva states. This enables comprehensive, quantitative assessment of postoperative pelvic floor function in benign cases, without manual plane selection. To address the challenges of weak anatomical features, large regional variability, and blurred boundaries in TPUS images, this work proposes a segmentation network based on a multi-scale shifted window Transformer, combined with a key point detection module and a geometric reasoning module, to achieve fully automated identification and computation of seven pelvic floor functional parameters (BSD, PUA, URA, HAPD, ASD, ARJD, and BND). The research framework includes four main steps: (1) constructing a TPUS anatomical dataset with pixel-level structural annotations and key point heat map labels; (2) designing a segmentation network that integrates multi-scale shifted window attention, and introducing a structure-guided key point detection module; (3) developing a geometric reasoning module to automatically calculate seven functional parameters based on segmentation and key point predictions; and (4) validating the stability and clinical utility of the proposed model through accuracy evaluation, reproducibility analysis, and comparative studies across surgical groups of post-hysterectomy patients. The proposed automated transperineal ultrasound analysis using deep learning has the potential to replace conventional manual delineation and measurement procedures, enabling standardized, objective, and automated assessment of pelvic floor function. This approach provides an efficient and scalable solution for postoperative rehabilitation monitoring and clinical decision support in patients after total hysterectomy.

Results

To validate the performance advantages of the proposed multi-scale shifted window Transformer in TPUS image automatic recognition and functional parameter inference, this work conducted a systematic analysis and comparative evaluation from four aspects: segmentation accuracy, key point localization precision, functional parameter measurement consistency, and clinical discriminative capability. A total of 50 patients who underwent total hysterectomy for benign lesions were enrolled in this work. General clinical characteristics of patients are summarized in Table 2 . Among them, 28 patients received total abdominal hysterectomy (TAH), while 22 patients underwent total laparoscopic hysterectomy (TLH). No statistically significant differences were observed between the two groups in terms of age, BMI, gravidity, parity, or menopausal status (all p ≥ 0.05), indicating comparable baseline characteristics. General clinical characteristics of patients. Based on predicted key point coordinates, seven structural parameters were automatically measured through a geometric reasoning module. Physical calibration was performed using the pixel-to-millimeter conversion factor from DICOM files to ensure consistency with manual measurements in both units and scale. The definitions of these parameters are as follows: Bladder Neck–Symphyseal Distance (BSD): Vertical distance from the bladder base to the inferior margin of the pubic symphysis, evaluating bladder support capacity. Posterior Urethrovesical Angle (PUA): Angle between the bladder neck and the urethral axis, reflecting the elasticity of posterior urethral support structures. Anorectal Junction–Symphyseal Distance (ASD): Linear distance from the inferior margin of the pubic symphysis to the anorectal junction (ARJ). Anteroposterior Diameter of the Hiatus (HAPD): Anteroposterior diameter of the levator hiatus, measured from the inferior margin of the pubic symphysis to the anterior margin of the puborectalis muscle under Resting and Valsalva. Bladder Neck Descent (BND): Inferior displacement of the bladder neck under Valsalva, a key clinical index for bladder neck function. Urethral Rotation Angle (URA): Rotation of the urethra under Valsalva relative to Resting, reflecting urethral mobility. Anorectal Junction Descent (ARJD): Inferior displacement of the ARJ under Valsalva, commonly used to assess perineal mobility. For TPUS segmentation task, Dice similarity coefficient (DSC), Intersection over Union (IoU), and segmentation accuracy (Accuracy) were employed to quantify agreement between model predictions and expert manual annotations. DSC measures overlap between predicted and true regions, IoU evaluates joint coverage and boundary precision, and Accuracy calculates the proportion of correctly classified pixels to complement DSC and IoU. These metrics provide a comprehensive assessment of model performance on low-contrast TPUS images. As shown in Table 3 , the proposed multi-scale shifted window Transformer outperformed the classical U-Net, Attention U-Net ( 35 ), and Swin-Unet ( 36 ) in the TPUS segmentation task. The average Dice coefficient reached 88.67 ± 1.96%, representing an improvement of 3.22% compared with Swin-Unet. This indicates that the model demonstrates superior contour recognition and boundary restoration capabilities for key anatomical structures such as SP, BL, and PR in TPUS images characterized by low contrast and blurred boundaries. Comparison of segmentation performance of different models on TPUS images. Compared with the baseline model, U-Net tended to mis-segment regions with blurred boundaries, leading to the lowest Dice scores. Attention U-Net improved the recognition of local structures by introducing attention mechanisms, but it still exhibited limitations in long-range feature interactions. Swin-Unet enhanced overall segmentation accuracy through local-global feature modeling, but remained insufficient in boundary refinement of critical anatomical structures. The proposed method utilizes a multi-scale shifted window mechanism to facilitate cross-regional information exchange and integrates a WA-Mask to assign greater attention weights to critical anatomical structures, including the bladder neck, PR, and ARJ. Consequently, enhanced segmentation accuracy and consistency were achieved in these key regions compared with the baseline models. To further assess the stability and robustness of the proposed framework under different data partitions, five-fold cross-validation was conducted at the patient level. Specifically, the dataset was randomly divided into five mutually exclusive subsets, where four folds were used for training and the remaining fold was used for validation in each iteration. The final cross-validation Dice was reported as the mean ± standard deviation across the 5 folds. Detailed fold-wise segmentation results are summarized in Table 4 . Five-fold cross-validation results for TPUS image segmentation. The average Dice coefficient across all folds was 87.31 ± 2.23%, closely matching the held-out test set performance of 88.67 ± 1.96%. The small difference is expected due to variations in train-test splits and limited patient numbers per fold. These results indicate that the proposed model maintains stable segmentation performance across different splits, providing initial evidence of internal generalizability, though external validation on multi-center, multi-device datasets remains necessary. To systematically evaluate the contributions of each component in the proposed architecture, we conducted an ablation study on the validation set. Five model variants were designed: w/o Multi-scale: The multi-scale module is removed to assess its contribution to capturing features at different resolutions. w/o WA-Mask: The weighted attention mask is removed to evaluate the effect of attention-guided feature refinement. w/o Weighted Loss: The weighted loss is replaced with a standard unweighted loss to quantify the effect of loss weighting. w/o Data Augmentation: All data augmentation strategies (e.g., flipping, rotation, scaling) are removed to evaluate their impact on model generalization and stability. w/o Post-processing: Post-processing refinements, including sub-pixel keypoint fitting, are disabled to evaluate their contribution to final prediction accuracy and boundary refinement. The ablation results in Table 5 demonstrate that each component contributes to overall performance. Removing the multi-scale module caused the largest decrease in Dice and IoU, highlighting the importance of multi-scale feature extraction. WA-Mask and weighted loss contributed moderate improvements, showing their role in feature refinement and loss optimization. Data augmentation significantly enhanced model generalization and stability, while post-processing refinements improved boundary accuracy and prediction quality. The full model achieved the best performance across all metrics, confirming the effectiveness of the proposed architecture. Ablation study. For key anatomical point detection, Euclidean distance was used to evaluate positional deviation. The mean error, standard deviation (SD), maximum error, and accuracy within 3 mm (%) between the predicted coordinates and the manually annotated coordinates were calculated to comprehensively assess localization performance. These metrics intuitively reflect the model’s positioning accuracy for the bladder neck, pubic symphysis, midline of the urethra, and puborectalis muscle, thereby providing a reliable foundation for subsequent geometric parameter inference. The evaluation results, as shown in Table 6 , showed that the proposed model achieved low localization errors for most anatomical structures in the resting state. Specifically, the mean localization errors of SP and BL were 1.72 mm and 1.64 mm, respectively, both below 2 mm, with localization accuracy (≤3 mm) exceeding 95%. The overall mean error across all landmarks was 1.94 ± 0.65 mm, corresponding to a 93.8% accuracy, demonstrating high precision and robustness in static conditions. Accuracy evaluation of TPUS anatomical landmark localization in resting and Valsalva states. During the Valsalva maneuver, the mean localization errors of all landmarks slightly increased, with the overall error rising from 1.94 ± 0.65 mm to 2.12 ± 0.68 mm, while the accuracy within 3 mm decreased marginally from 93.8% to 92.7%. This increase primarily results from the displacement and morphological deformation of pelvic floor structures caused by the Valsalva maneuver, which increases localization difficulty. More noticeable error increments were observed for UM, V, and PR, reflecting the dynamic complexity and elasticity of these structures under load-bearing conditions. Nevertheless, the localization accuracy remained clinically acceptable (mean accuracy of 92.7%), confirming that the proposed method can robustly capture anatomical landmarks under both resting and straining states, thereby supporting reliable quantitative assessment of postoperative pelvic floor function and dynamic parameter extraction. Figure 4 illustrates the boxplots of localization errors for TPUS key anatomical points in both resting and Valsalva states. In the resting state, the errors are tightly clustered, with median values generally below 2 mm, indicating stable and precise localization. In contrast, during the Valsalva maneuver, the errors exhibit a slightly wider dispersion and higher median values, particularly for UM, V, and PR. These variations reflect the morphological deformation and positional shifts of pelvic floor structures caused by the maneuver. This visualization intuitively demonstrates the error distribution across different anatomical landmarks and functional states, providing a clear basis for understanding localization behavior and supporting dynamic parameter extraction under functional loading. Despite the slight increase in errors during Valsalva, the overall localization accuracy remained within the clinically acceptable threshold (≤ 3 mm), confirming the robustness and adaptability of the proposed model in both static and dynamic conditions. Boxplots of localization errors of TPUS key anatomical points in resting and Valsalva states. Furthermore, comparison between the resting and Valsalva states facilitates the extraction of dynamic functional parameters, such as bladder neck descent, urethral rotation angle variation, and elasticity changes in pelvic floor muscles. These parameters contribute to a more comprehensive functional evaluation and provide valuable clinical insights for assessing postoperative recovery and monitoring pelvic floor dysfunction. In summary, the proposed multi-scale window attention Transformer network achieved high accuracy, robustness, and clinical feasibility in automatic TPUS key point localization. By effectively modeling both static and dynamic pelvic floor features, the network establishes a reliable foundation for quantitative analysis of structural parameters and functional assessment in clinical practice. To evaluate agreement between automated and clinical manual measurements, mean absolute error (MAE) and root mean square error (RMSE) were calculated to quantify systematic bias and dispersion, respectively. Pearson correlation coefficient ( r ) was calculated between the automated measurements and the manual measurements for each functional parameter. A value of r ≥ 0.85 was considered indicative of good linear consistency. Additionally, the 95% limits of agreement (LoA) is used to determine whether the model has met the clinically acceptable consistency standard, and to measure the frequency with which the automatic measurement values fall within the acceptable range compared to the manual reference values. These statistical approaches are standard in method comparison studies for medical imaging and are widely adopted in recent ultrasound-based deep learning research ( 37 ). Seven pelvic floor functional parameters were selected as evaluation metrics: BSD, PUA, ASD, HAPD, BND, URA, and ARJD. Among these, BSD, PUA, ASD, and HAPD were measured under both resting and Valsalva conditions to evaluate the model’s adaptability to anatomical structures under stable and stressed states. BND, URA, and ARJD were derived from the difference between Resting and Valsalva states to reflect the dynamic activity of the pelvic floor. To quantify the impact of keypoint localization errors on derived functional parameters, we conducted an error propagation analysis based on Monte Carlo simulation. Using the standard deviations of keypoint localization errors as input uncertainty, zero-mean Gaussian noise was added to the keypoint coordinates for each test frame with 1,000 perturbation iterations per frame. All functional parameters were recalculated for each perturbation, and the propagated uncertainty for each parameter was derived. For dynamic parameters such as BND, URA and ARJD, we have further defined an error amplification factor, which is the ratio of the propagation uncertainty of the dynamic parameter to the uncertainty of the corresponding static parameter (BSD or PUA). This reflects the cumulative uncertainty resulting from subtracting two independent measurements. Table 7 summarizes the automatic measurement errors, correlation analysis, and error propagation results. Among all functional parameters, R-BSD showed the highest agreement with manual measurements, with a Pearson correlation coefficient of 0.92, consistent with the maximum correlation value reported in the abstract. 95% LoA coverage all exceeded 90%, indicating high stability and reliability across different anatomical and functional metrics. For distance-based parameters (BSD, ASD, HAPD), MAE remained approximately 2 mm, consistent with prior deep learning-based TPUS studies, demonstrating that the model accurately captures spatial relationships and geometric features between key pelvic floor points. Automatic measurement errors and correlation analysis of pelvic floor functional parameters. R-denotes Resting condition, V-denotes Valsalva condition. Error magnification for BND, URA, and ARJD is the ratio of the propagated uncertainty of the dynamic parameter to that of the corresponding static parameter (BSD or PUA). For ASD and HAPD, which are single-time-point distance parameters, no difference-related error amplification occurs, and the magnification factor is set to 1.00. In contrast, dynamic parameters BND and URA showed slightly higher errors, approximately 2 mm or 3.8°, primarily due to rapid displacement and deformation of anatomical structures under the Valsalva maneuver, compounded by motion artifacts and boundary blurring. Error propagation analysis further quantified this observation. The propagated uncertainty of BND was 2.28 mm and that of URA was 4.85°, with corresponding error magnification factors of approximately 1.48–1.53, indicating that uncertainties from resting and Valsalva measurements accumulate, leading to larger measurement uncertainty for dynamic parameters. For ASD and HAPD, which are single-time-point distance parameters, the propagated uncertainties were 1.85–1.96 mm with error magnification factors close to 1.0. Angular parameters, such as PUA and URA, maintained errors within 3.5° to 4.3°, which remains clinically acceptable, and PUA exhibited high correlation under both states, with Pearson r values ranging from 0.86 to 0.88, indicating robust modeling of the relative geometry between the bladder and urethra. In summary, the proposed automated method achieves comparable accuracy to manual annotation for static parameters and demonstrates good consistency for dynamic functional metrics. Considering the error ranges of MAE and RMSE, approximately 2 mm for distances and 4°for angles, satisfy clinical follow-up and preoperative assessment requirements, this method provides practical value by reducing manual operation dependence and minimizing subjective variability, offering a technical foundation for standardized quantitative evaluation of pelvic floor function. At the clinical application level, the proposed model was further evaluated for its feasibility and discriminative capability in automated pelvic floor parameter computation. TPUS images from patients who underwent TAH and TLH were analyzed to compare postoperative pelvic floor functional indicators. Independent-sample t -tests were conducted to assess intergroup differences. To account for multiple comparisons without relying on parametric assumptions, a non-parametric permutation test was applied. Patient labels were randomly permuted 5000 times, and t statistics were recalculated for each pelvic floor parameter in each permutation. Parameters with adjusted p ≤ 0.05 were considered statistically significant. As shown in Table 8 , only V-BSD showed a statistically significant difference, with an adjusted p -value of 0.042. The other dynamic parameters demonstrated moderate effect sizes, but due to the limited sample size, they failed to reach a significant level. These results indicate that the model can reliably extract parameters sensitive to surgical outcomes, and larger-scale studies are needed to establish its clinical significance. Comparison of pelvic floor functional parameters under Resting and Valsalva conditions between different surgical approaches. R-denotes Resting condition, V-denotes Valsalva condition. BND, URA, and ARJD are dynamic parameters. Notably, BND, as a key dynamic parameter reflecting bladder neck descent, sensitively captures postoperative weakening of pelvic floor support structures. Its elevation is closely associated with increased risk of urinary incontinence and cystocele. Similarly, abnormal variations in PUA and URA indicate reduced stability of the bladder urethra, suggesting potential voiding dysfunction or impaired muscular coordination in some patients. Although these functional changes may not immediately manifest as clinical symptoms, they could serve as important predictors of postoperative complications during long-term follow-up. In contrast, static anatomical parameters such as BSD, ASD, and HAPD showed no significant differences between the two groups, indicating that the two surgical approaches have relatively limited direct impact on pelvic floor morphology. This finding aligns with previous studies, which suggest that anatomical structures remain relatively stable at resting, whereas functional parameters under dynamic conditions better reflect surgical differences and potential functional impairments. To assess whether the observed group differences are clinically meaningful, we benchmarked them against minimal clinically important difference (MCID) values reported in the pelvic floor ultrasound literature. For BND, a difference of approximately 5–8 mm is associated with clinically detectable changes in stress urinary incontinence severity. The observed mean BND difference between TAH and TLH was 1.39 mm, which is substantially below the MCID threshold. For URA, the group difference was 3.49°, whereas clinically relevant URA changes typically exceed 10°–15° when differentiating severity grades. The largest observed difference was V-BSD, but moderate measurement variability in BSD suggests that changes below 5 mm may not reliably indicate functional impairment. Therefore, while some parameters reached nominal statistical significance before correction, their magnitudes remain below established clinical thresholds, indicating that the surgical approach has relatively modest effects on postoperative pelvic floor function. In summary, the automatically computed dynamic parameters demonstrate high sensitivity and stability, providing quantitative evidence for postoperative risk stratification and rehabilitation assessment. These results indicate that the model can reliably extract parameters sensitive to surgical outcomes, and larger-scale studies are needed to establish its clinical significance. To provide an intuitive evaluation of segmentation performance, visual comparisons among different models are presented in Figure 5 . The figure includes the original ultrasound image, ground-truth annotation, segmentation results from U-Net, Swin-Unet, and the proposed model, as well as Dice coefficients indicated below each result. Zoom-in views of SP region are also provided to highlight boundary details. Comparison of segmentation results among different models. As shown in the figure, U-Net produces relatively coarse segmentation results with noticeable fragmentation and incomplete boundaries, particularly in low-contrast regions, resulting in lower Dice coefficients (e.g., 83.11% and 82.56%). Swin-Unet improves the continuity of the structure by integrating global context information, yielding smoother and more coherent segmentation with moderately higher Dice (e.g., 87.20% and 86.63%), although slight over-smoothing and residual artifacts remain. In contrast, the proposed model achieves the clearest and most accurate segmentation. It effectively suppresses noise, preserves structural integrity, and generates smooth and complete boundaries, as evidenced by the highest Dice coefficients, such as 91.53% and 91.24%. Zoom-in views of the SP region further highlight the precise boundary delineation and improved segmentation continuity compared to baseline methods. This gradual improvement clearly demonstrates the advantage of global modeling based on transformers in capturing complex anatomical structures in ultrasound images.

Discussion

This work proposes a multi-scale shifted window Transformer, enabling fully automated identification of key pelvic floor anatomical structures and comprehensive functional parameter inference from TPUS images. Experimental results demonstrate that the proposed method achieves superior performance in segmentation accuracy, key point localization, functional parameter consistency, and clinical discriminative capability, validating its potential clinical utility for postoperative monitoring of PFD. In terms of segmentation performance, the proposed multi-scale shifted window Transformer network significantly outperformed traditional convolutional architectures (U-Net, Attention U-Net) and single-scale Transformers (Swin-Unet), achieving a Dice coefficient of 88.67 ± 1.96%. This improvement is primarily attributed to SW-MSA, which enhances global semantic perception while modeling local structures, effectively mitigating common TPUS imaging challenges such as low contrast and blurred boundaries. Additionally, the integration of WA-Mask strengthened the model’s focus on critical anatomical regions, including the pubic symphysis, bladder neck, and anorectal junction, further improving the accuracy and stability of anatomical structure recognition. Regarding key point localization, the bladder neck and pubic symphysis were identified with errors below 2 mm, within clinically acceptable thresholds. Although the anorectal junction exhibited slightly higher errors due to ultrasound signal attenuation and deep anatomical characteristics, overall errors remained below 2.1 mm. These findings are consistent with previous studies and indicate that accurate boundary recognition of deep structures remains a technical challenge in TPUS automated analysis, which could be further addressed using 3D-TPUS imaging or cross-modal image fusion techniques. For functional parameter consistency, static parameters such as BSD and HAPD exhibited measurement errors below 2 mm, while angular parameters such as PUA and URA were controlled within 4°, with Pearson correlation coefficients exceeding 0.84. Bland–Altman analysis revealed no systematic bias, indicating robust geometric inference capability and providing reliable reference for quantitative assessment of pelvic floor support structures. However, dynamic parameters such as BND and ARJD showed slightly higher errors, mainly due to patient compliance during the Valsalva maneuver and the choice of temporal windows, suggesting that future optimization could involve standardized motion guidance and temporal modeling to enhance the accuracy and stability of dynamic measurements. These results demonstrate that the proposed model achieves both high segmentation accuracy, with a Dice coefficient of 88.67 ± 1.96%, and strong agreement with manual annotations, with a Pearson r up to 0.92, validating its reliability for clinical TPUS assessment. In terms of clinical discriminative capability, significant differences ( p< 0.05) were observed in dynamic parameters including BND, URA, V-BSD, and V-PUA between patients undergoing TAH and TLH. These parameters are internationally recognized indicators of pelvic floor support and mobility, and their variation directly reflects postoperative PFD status. These findings indicate that the automatically computed parameters can sensitively capture the functional alterations of pelvic floor support structures induced by different surgical approaches, serving as quantitative indicators for postoperative recovery assessment. This underscores the potential of TPUS-based automated analysis to facilitate individualized rehabilitation planning and risk prediction in clinical practice. Overall, the proposed multi-scale shifted window Transformer consistently outperforms CNN-based and hybrid Transformer models in segmentation and key anatomical point, providing clearer boundaries and better structural continuity for reliable TPUS analysis. We would like to clarify that our patients were not normal in terms of pelvic floor function. Although they did not have PFD before the surgery, total hysterectomy itself is known to alter pelvic floor anatomy and function ( 2 , 5 ). The functional parameters measured by our research group, such as BND and URA, fell within ranges consistent with mild to moderate pelvic floor impairment as reported in the literature. For instance, mean BND was 9.06 mm in the TAH group and 7.67 mm in the TLH group, values that exceed the normal threshold of approximately 5–6 mm suggested in previous studies ( 8 , 13 ). Therefore, this group exhibited measurable changes related to PFD, and the high consistency between automatic measurement and manual measurement reflects the robustness of our method under clinical relevant conditions, rather than an accidental phenomenon in the normal group. Despite these promising results, several limitations remain. First, the sample size was relatively small, and the postoperative follow-up period was short, limiting assessment of long-term stability of the model in rehabilitation monitoring. Second, modeling was based on two-dimensional TPUS images, which does not fully exploit volumetric information available from three- or four-dimensional ultrasound. Future work could integrate 3D-TPUS or shear wave elastography (SWE) to jointly assess pelvic floor muscle elasticity and structure. Additionally, the generalizability across centers, devices, and patient populations requires further validation to enhance model robustness and translational potential. Moreover, this study was conducted using a single ultrasound system, namely Mindray RESONA R9T, at a single center with 50 patients who had benign gynecological conditions. The absence of external validation or testing across different ultrasound vendors and broader patient demographics inevitably limits real-world generalizability. To partially address this concern, we performed patient-level five-fold cross-validation, which yielded stable segmentation performance and indicated no severe overfitting to a specific test split. In addition, potential failure modes include severe pelvic organ prolapse, suboptimal Valsalva execution, and other atypical anatomical variations, which may lead to increased localization errors or measurement deviations. Domain shift is also a concern when extending the method to gynecologic oncology patients, whose anatomy may be more complex due to adjuvant therapies such as radiotherapy or surgery. To mitigate these risks, future work could incorporate multi-center datasets, transfer learning, or domain adaptation strategies, and implement patient-specific quality control measures during Valsalva maneuvers.

Conclusions

This work presents a multi-scale shifted window Transformer, enabling high-precision automated segmentation and key point detection of critical pelvic floor anatomical structures from TPUS images. Seven functional parameters were fully automatically measured via a geometric reasoning module. Experimental results demonstrate that the proposed method significantly outperforms conventional approaches in segmentation accuracy, key point localization, functional parameter consistency, and clinical discriminative capability. By enabling objective and reproducible evaluation, it provides a foundation for monitoring pelvic floor dysfunction and supporting postoperative rehabilitation after hysterectomy. This approach effectively replaces manual measurements, enhancing the efficiency and standardization of postoperative pelvic floor assessment. Although the current validation was performed in patients with benign disease, the methodology may be extended to gynecologic oncology populations with further validation, where the need for accurate, non-invasive assessment of PFD is even greater. Therefore, future work will include collecting TPUS data from two additional centers using GE Voluson and Philips Affiniti systems, and we plan to evaluate the model on an independent cohort of at least 100 patients, including those with prior pelvic malignancy and severe anatomical distortion. Domain adaptation strategies will also be explored to enhance cross-device robustness.

Materials|Methods

This retrospective study was conducted following the STROBE guidelines and approved by the Ethics Committee of Nantong Third People’s Hospital (Approval No. EK2024081). All participants signed written consent forms after being informed of the details. All study procedures have been conducted in compliance with the Declaration of Helsinki. A total of 92 female patients scheduled for total hysterectomy due to benign gynecological conditions between January 2020 and May 2025 were initially screened. Based on image quality and completeness of follow-up, 50 cases were finally selected for inclusion. The surgical indications include multiple uterine fibroids, uterine adenomyosis, cervical intraepithelial neoplasia, endometrial polyps, and refractory functional uterine bleeding, etc. The age of participants ranged from 35 to 65 years, and none had a history of severe pelvic infection or confirmed pelvic floor disorders preoperatively. Before enrollment, comprehensive demographic and clinical data were systematically collected, including age, body mass index (BMI), obstetric history, menopausal status, history of difficult delivery, as well as risk factors such as chronic cough and constipation. All questionnaires were completed under the supervision of trained research staff. Inclusion criteria were: (1) age between 30 and 80 years with normal cognitive ability; (2) number of deliveries ≤ 3 and more than 10 years after delivery; (3) ability to correctly perform a standardized Valsalva maneuver. Exclusion criteria included: (1) BMI >28 kg/m 2 ; (2) comorbidities associated with sustained increases in intra-abdominal pressure, such as chronic cough or defecation disorders; (3) significant cardiopulmonary insufficiency, diabetes, or a history of heavy smoking; (4) history of pelvic radiotherapy, severe pelvic adhesions, or ongoing pelvic floor rehabilitation therapy; (5) history of twin pregnancy or macrosomia delivery; (6) inability to perform a proper Valsalva maneuver or poor image quality due to patient positioning. All examinations were performed using a Mindray RESONA R9T system with a C5–1 convex array probe (frequency range: 1–5 MHz). In the supine position with knees flexed, midsagittal transperineal images were acquired. TPUS gray-scale dynamic images (cine loop) were captured in both the resting state and the Valsalva maneuver state to ensure clear visualization of key anatomical landmarks such as SP, BL and U. Figure 1 illustrates representative midsagittal TPUS images in the resting state and the Valsalva states. To ensure standardized assessment, Valsalva images showing maximal pelvic floor relaxation were selected for analysis, excluding frames with co-activation or suboptimal relaxation. Representative midsagittal TPUS images. (A) Typical resting-state image showing SP, BL, U, and PR. (B) Image during Valsalva maneuver illustrating bladder neck descent and urethral rotation. For each participant, dynamic cine loops of at least 30 frames were acquired. Image quality was required to meet the following criteria: (1) complete and clearly defined visualization of key anatomical structures; (2) absence of significant artifacts or motion-induced distortions; (3) standardized participant positioning and adherence to established acquisition protocols. To enable automated recognition of pelvic floor anatomical structures and the measurement of functional parameters in TPUS images, all data were subjected to standardized preprocessing and annotation prior to input into the deep learning model, ensuring sample quality and consistency. Firstly, from each dynamic cine loop sequence, the 10 frames with the highest image quality scores were selected based on a quantitative metric, as defined in Equation 1 : where Laplacian variance is the normalized variance of the Laplacian of the image, Contrast norm is the normalized Michelson contrast, and SNR norm is the normalized signal-to-noise ratio. Each component is normalized to [0,1] across all frames of the same loop before summation. This metric prioritizes frames that clearly displayed key anatomical landmarks, including SP, BL, U and PR. Subsequently, a fixed rectangular region of interest (ROI) of size 300×250 pixels, which encompass all these anatomical areas was defined on the first frame by an experienced sonographer. The same ROI coordinates were applied uniformly to all frames from the same patient. The ROI was cropped to exclude irrelevant background and emphasize structural focus for the model ( 25 ). All ROI images were then resized to 224×224 pixels and normalized to balance variations in brightness and contrast across images. To enhance model robustness against imaging noise and individual anatomical variability, several data augmentation strategies were applied, including histogram equalization, random rotation, mirror flipping, and Gaussian blurring, thereby improving generalization performance ( 26 , 27 ). Finally, two experienced attending physicians with more than 10 years of experience in pelvic floor ultrasonography performed frame-by-frame manual annotations of the SP, BL, U, and PR regions in the TPUS images to generate pixel-level segmentation labels (ground truth masks). In addition, Gaussian distributed heat maps were generated at the centroid of each anatomical structure to provide supervisory signals for key point detection tasks. All annotations underwent cross-checked and consistency-reviewed to ensure the accuracy and reliability of the labels. To achieve automated recognition of key pelvic floor anatomical structures and standardized measurement of functional parameters in TPUS images, this work proposes a multi-scale shifted window Transformer (MSWT). The architecture is specifically designed to integrate the strengths of local texture perception and global anatomical dependency modeling, making it particularly well-suited for TPUS images characterized by blurred tissue boundaries, low contrast, and significant morphological changes. Figure 2 illustrates the overall framework of automated transperineal ultrasound analysis using deep learning. The model comprises three major components, including an image segmentation backbone, a structural key point detection module, and a geometric reasoning module, enabling inference from pixel-level segmentation to the estimation of seven functional parameters. Specifically, the input TPUS images are first processed through a multi-scale shifted window Transformer backbone, incorporating shifted window-based multi-head self-attention (SW-MSA) and window-based attention masks (WA-Mask) to extract hierarchical texture and anatomical features. Subsequently, the key point detection module performs precise localization of SP, BL, and PR. Finally, the geometric reasoning module calculates pelvic floor functional parameters based on the spatial relationships among the detected key points. The overall framework of automated transperineal ultrasound analysis using deep learning. The framework consists of three main modules: a multi-scale shifted window Transformer (MSWT) for local and global feature extraction, a keypoint detection module that generates probability heatmaps of anatomical landmarks, and a geometric reasoning module for calculating pelvic floor functional parameters. TPUS images are characterized by blurred boundaries, high levels of noise, and irregular structural morphology. Although CNNs demonstrate strengths in local texture recognition, their limited receptive fields restrict their ability to capture long-range dependencies among anatomical structures such as SP, BL, and PR ( 28 ). To address this limitation, the backbone network incorporates a multi-scale shifted window Transformer, which is built upon the Swin Transformer architecture. Our implementation is adapted from the official Swin Transformer repository, which can be available at https://github.com/microsoft/Swin-Transformer , and modified for multi-scale feature aggregation and window-based attention masking, as detailed below. In this architecture, SW-MSA is applied within each window to learn local semantic features ( 29 ). In addition, a shifted window strategy is introduced within the hierarchical architecture to facilitate cross-window information exchange ( 30 ), thereby enhancing global structural perception. Compared with existing self-attention frameworks that have been successfully applied to multi-scale spatiotemporal intent recognition in human–robot interaction ( 31 , 32 ), our MSWT specifically adapts the multi-scale window partitioning mechanism to the challenging anatomical modeling task in TPUS, ensuring that anatomical structures at different scales can be effectively captured. Furthermore, to increase the model’s sensitivity to key anatomical regions, WA-Mask ( 33 ) is employed, assigning higher weights to key points during attention computation. Specifically, the proposed WA-Mask biases the attention scores toward window regions that contain key anatomical landmarks, including SP, BL and PR. First, a spatial saliency map S ∈ ℝ H × W is generated the features of the deepest encoder through a lightweight 1 × 1 convolution layer, where each pixel value represents the probability of belonging to anatomically important regions. Then, for each window w at scale s , the average saliency score within the window is calculated as follows Equation 2 : where | w | denotes the number of pixels in window w . The corresponding window attention mask is subsequently defined as Equation 3 : where γ is an empirically determined amplification coefficient and is set to 2.0 in this work. Windows containing anatomically relevant structures will receive larger attention responses during the feature interaction process. For each scale, we compute the WA-Mask independently for all windows at that scale, and apply the mask within the self-attention computation at that scale. The masks at different scales respectively guide the network to focus on anatomical regions that are most relevant to the corresponding scale. During self-attention computation, the generated WA-Mask is added to the attention probability values before the softmax operation, as shown in Equation 4 : where Q , K , and V denote the query, key, and value matrices, respectively, and M contains the mask values of all windows. By enhancing attention responses in anatomically informative regions, the proposed WA-Mask improves structural awareness and boundary continuity under the TPUS conditions with noise and low contrast. This design enables the network to simultaneously capture local edge textures and global structural relationships, substantially improving the stability of boundary recognition in TPUS images compared with traditional CNNs. Building upon the segmentation feature maps, a structural key point detection module was constructed to perform heatmap regression and generate probability maps of key anatomical landmarks, such as SP, BL, and PR, as shown in Figure 3 . Workflow of key anatomical point detection module. CNNs generate Gaussian heatmaps from segmentation features. Coarse landmarks are located via argmax, refined by quadratic surface fitting on 3 × 3 patches, and evaluated using Euclidean distance. During training, ground-truth heatmaps are generated by placing a 2D Gaussian kernel at each annotated landmark coordinate, as defined in Equation 5 : where ( x k ∗ , y k ∗ ) denotes the ground-truth coordinate, and σ controls the spatial spread of the Gaussian kernel, which is set to 3 pixels. This formulation encourages the network to learn spatial confidence distributions centered at anatomical landmarks. During inference, the landmark positions are determined via an argmax operation on the predicted heatmap. To achieve sub-pixel accuracy, a quadratic surface is fitted to the 3 × 3 neighborhood around each peak, and the refined coordinates are derived by locating the maximum of the fitted surface ( 34 ). This sub-pixel refinement effectively alleviates localization errors caused by blurred boundaries and low contrast in ultrasound images. The final predicted coordinate ( x p r e d , y p r e d ) is then converted to physical units using DICOM pixel spacing. Localization accuracy is quantified by the Euclidean distance between predicted and ground-truth coordinates ( x gt , y gt ), as shown in Equation 6 : The obtained key point coordinates were subsequently employed as geometric inputs for pelvic floor functional parameter computation, providing a robust foundation for millimeter-level precision and standardized parameter outputs, thereby supporting quantitative evaluation and dynamic analysis of postoperative pelvic floor function. The geometric reasoning module automatically computes seven pelvic floor functional parameters based on the key point coordinates of TPUS, namely BSD, PUA, URA, ASD, HAPD, BND, and ARJD. Specifically, BSD is obtained as the Euclidean distance between BL and SP; PUA and URA are calculated based on the angle formed by the vectors of key points, reflecting the spatial direction relationship between the urethra and the bladder neck. ASD, HAPD, and BND are inferred from longitudinal (head-totail direction) displacements and anteroposterior distances of relevant keypoints, thereby characterizing morphological changes in pelvic floor soft tissues and cavities. ARJD represents the distance between anatomical structures associated with the anorectal junction (ARJ). All parameter calculations are performed with precise pixel-to-physical length conversion based on DICOM metadata, enabling millimeter-level calibration. This ensures high consistency between automated measurements and manual annotations, while conforming to clinical standardization requirements, thus providing a reliable basis for quantitative evaluation of postoperative pelvic floor function. To achieve simultaneous optimization of anatomical region segmentation and key point localization, a multi-task joint loss function was designed during training. Building upon the preceding feature extraction and network design, this composite objective enables the network to learn both spatially coherent anatomical boundaries and anatomically meaningful keypoint positions in a unified framework. Specifically, the segmentation task incorporates both Dice loss and cross-entropy loss to jointly ensure regional completeness and boundary sharpness, while the key point detection branch employs a mean squared error (MSE) loss to supervise heatmap regression. The overall objective is formulated as Equation 7 : where λ 1 , λ 2 , and λ 3 denote task-specific weighting coefficients, which are empirically tuned on the validation set to balance segmentation accuracy and localization precision. The segmentation loss ℒ s e g integrates Dice loss and cross-entropy loss as. where α is a balancing factor that adjusts the contribution of each component. Dice loss measures the regional overlap between the predicted probability map P i and the corresponding ground truth mask G i , as defined in Equation 8 : where N denotes the total number of pixels, P i ∈ [0,1] is the predicted probability of pixel i belonging to the target region, and G i ∈ {0,1} represents the corresponding binary label. The cross-entropy loss evaluates pixel-wise classification consistency as shown in Equation 9 . penalizing deviations between predicted and true class probabilities. For key point detection, the MSE loss quantifies the pixel-wise discrepancy between predicted and ground-truth heatmaps, as defined in Equation 10 : where K denotes the number of keypoints, and H ^ i ( k ) and H i ( k ) represent the predicted and ground-truth heatmap intensities of the k -th keypoint at pixel i , respectively. In addition, ℒ o t h e r represents auxiliary regularization terms that constrain the network parameters and stabilize training. These may include an L 2 weight decay term to prevent overfitting by penalizing excessively large model parameters, and a smoothness regularization term to enforce spatial continuity in the predicted probability maps, as shown in Equation 11 : where θ denotes the trainable network parameters, ∇ P i is the spatial gradient of the predicted probability at pixel i , and β 1 , β 2 are hyperparameters controlling the regularization strength. By jointly optimizing segmentation, detection, and regularization objectives, the proposed loss function enables the network to achieve anatomically consistent segmentation with sub-pixel key point precision while maintaining model stability and generalization across diverse ultrasound imaging conditions. To improve robustness against imaging variability and anatomical differences, extensive data augmentation was applied, including random rotation, horizontal/vertical flipping, brightness and contrast adjustments, and Gaussian blurring. Specifically, random rotation within ±10 ° , scaling 0.9–1.1, horizontal flipping with probability 0.5, and intensity jitter (brightness ±0.2, contrast ±0.2). The random seed for all augmentation operations was fixed at 42, and this value is also used as the seed for other operations to ensure the reproducibility of the results. A total of 50 TPUS cases were included, resulting in 1500 image frames with corresponding annotations. The dataset was partitioned at the patient level to prevent data leakage, with 35 patients and 1050 frames used for training, 7 patients and 225 frames for validation, and 8 patients and 225 frames for testing, as summarized in Table 1 . TPUS dataset partition for model training and evaluation. The Adam optimizer was used with an initial learning rate of 1 × 10 −4 , batch size of 8, and 200 training epochs. Early stopping with a patience of 20 epochs and a ReduceLROnPlateau scheduler with a factor of 0.5 and patience of 10 epochs were employed to prevent overfitting and ensure stable convergence. The loss weight coefficients were empirically set based on the performance of the validation set, namely λ 1 = 1.0, λ 2 = 0.5, λ 3 = 0.01, α = 0.5, β 1 = 0.0001, and β 2 = 0.001. Model training and inference were implemented in PyTorch 1.12.1 on an NVIDIA RTX 3090 GPU (24 GB) and Intel Xeon CPU. Inference time per TPUS image was approximately 0.12 s, enabling near real-time clinical analysis. The complete source code will be publicly released at https://github.com/fany1993usst-coder/MSWTcode .

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: pmc-nxml

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

SciLite annotations

organisms 2
noordeloos 2009062 human

Source provenance

europepmc
last seen: 2026-08-23T09:30:01.253652+00:00
scilite
last seen: 2026-08-23T10:03:07.687773+00:00
License: CC-BY-4.0 · commercial use OK · attribution required
Per Europe PMC