A method, device and medium for prostate image segmentation
Patent Information
- Application Number
- CN202610704475.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]前列腺腺体存在边界模糊、内部结构复杂,且易受周围膀胱、直肠、脂肪组织干扰的特性,现有的分割模型存在以下缺陷:
(1)通过在BiResUnet分割模型的深层网络中集成残差模块学习前列腺超声图像更深层次的抽象特征,同时引入独立的BiFormer模块进行多尺度注意力增强,可更好地区分前列腺超声图像中前列腺真实边界与散斑噪声、声影、伪影等干扰信息,从而减少前列腺超声图像中的误分割和漏分割。
Smart Images

Figure CN122597789A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image segmentation technology, and in particular to a method, device and medium for prostate image segmentation. Background Technology
[0002] Prostate diseases are common urinary system diseases among middle-aged and elderly men, with the incidence of prostate cancer showing an increasing trend year by year. Early and accurate diagnosis and lesion assessment are crucial for improving patient prognosis. Prostate ultrasound and magnetic resonance imaging (MRI) have become important imaging tools for clinical screening, lesion localization, preoperative evaluation, and postoperative follow-up due to their non-invasiveness, convenience, and high soft tissue resolution. Achieving accurate and automatic segmentation of prostate ultrasound or MRI images is a key foundation for quantitative lesion analysis, three-dimensional reconstruction, and computer-aided diagnosis, and has significant clinical implications for improving diagnostic accuracy, optimizing clinical treatment plans, and promoting intelligent screening for prostate diseases.
[0003] The prostate gland has indistinct boundaries, a complex internal structure, and is easily affected by surrounding bladder, rectum, and adipose tissue. Existing segmentation models have the following drawbacks: (1) Prostate ultrasound images usually have problems such as speckle noise, acoustic shadowing, artifacts and low signal-to-noise ratio. The gray level difference between the true boundary of the prostate and the adjacent tissue is small. Traditional segmentation networks are prone to misidentifying local high-response noise, artifacts or adjacent tissues as the prostate region, resulting in false positive segmentation or boundary offset.
[0004] (2) Although the soft tissue contrast of MRI images is high, there may still be problems such as unclear local boundaries and discontinuous contours in the apex, base and capsule edge areas of the prostate. At the same time, the size, shape, location and surrounding tissue structure of the prostate vary greatly among different patients, and traditional segmentation networks are prone to segmentation deviation or incomplete contours in samples with significant changes in anatomical structure.
[0005] (3) Whether it is a prostate ultrasound image or an MRI image, when the encoder-decoder model is used for segmentation, the fine spatial information of the prostate boundary may be weakened during multiple downsampling processes, resulting in insufficient recovery of local edges in the final segmentation image, and the boundary may be expanded outward, contracted inward, or locally missing.
[0006] A search revealed Chinese invention patent application CN115619810A, which discloses a method, system, and device for prostate region segmentation. This method employs a two-level segmentation logic: initial segmentation and threshold-triggered secondary segmentation. However, this method relies solely on the macroscopic indicator of the volume ratio of the peripheral zone to the overall gland to switch segmentation strategies. This approach fails to accurately capture subtle structural features such as the boundary between the central gland and the peripheral zone, and the thin peripheral zone, easily leading to misclassification of regions and inaccurate boundary positioning, thus reducing segmentation accuracy. Furthermore, it struggles to fully cover the entire gland, its edges, and multi-scale internal anatomical structures, potentially resulting in local omissions and structural defects.
[0007] Therefore, there is an urgent need to design a prostate image segmentation method with higher segmentation integrity and accuracy to overcome the above-mentioned defects. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a prostate image segmentation method, device and medium with higher segmentation integrity and accuracy.
[0009] The objective of this invention can be achieved through the following technical solutions: A prostate image segmentation method, comprising: Input a prostate image, use the BiResUnet segmentation model to perform prostate multimodal image segmentation, and output the prostate multimodal image segmentation results; The network architecture of the BiResUnet segmentation model is based on U-net and includes: A series of downsampling operations are performed on the input prostate image to generate the first multi-scale feature; Upsampling and skip connections are performed on the first multi-scale feature, and convolution is performed to generate the second multi-scale feature; residual modules are set on the sampling and downsampling paths in the deep layers of the network. Multiple second-scale features are concatenated and fused to form global contextual features; The features of each scale in the global context features and the second multi-scale features are fed in parallel into the corresponding BiFormer module for multi-scale attention enhancement. The outputs of each BiFormer module are cascaded and then output through a convolutional layer to produce the final prostate image segmentation result.
[0010] Preferably, the residual module includes two consecutive convolutional layers, wherein the input of each convolutional layer is first processed by batch normalization and activation functions.
[0011] Preferably, the downsampling process, before being fed into the first residual module, further includes image block segmentation and location encoding preprocessing of the input first feature map, specifically including: 1) Input the first feature map , These are the batch size, input channel input, height dimension parameter, and width dimension parameter, respectively. 2) The first feature map is processed by two-dimensional convolution. Transformed into image blocks and then subjected to linear projection Embedded into In 3D space, we obtain the block adjustment sequence. ,in , , The number of output channels; wherein, the kernel size and stride of the two-dimensional convolutional layer are set to be the same; 3) The pre-learned position encoding matrix Block adjustment sequence Perform bilinear interpolation or resampling to obtain the interpolation position code. ; 4) Encode the interpolation position After being reshaped into a sequence, it is compared with the block feature sequence. Element-wise addition yields the first feature incorporating location information. ; 5) The first feature that incorporates location information Applying a dropout layer for regularization yields the first feature. ; 6) The first feature Rearranged into an image format, the output features are obtained. It is used as the input to the first residual module in the downsampling stage.
[0012] Preferably, the BiFormer module applies a two-level routing attention mechanism, specifically implemented as follows: 1) Input the second feature map Divided in spatial dimension There are non-overlapping regions, each containing multiple feature tokens; 2) Map the feature vectors of each feature token to the query using a linear mapping. ,key Sum ; 3) All queries within each region s and keys Instead of using average pooling, generate compact query representations at the region level. Compact representation of bonds : 4) Compact representation based on region-level queries Compact representation of bonds Calculate the similarity matrix between regions For the similarity matrix For each row, a Top-k operation is applied to dynamically select the k most relevant key regions for each query region, generating a routing index matrix. : 5) Based on the routing index matrix For each query region, collect all original token-level key-value pairs from the corresponding k regions to form a sparse key-value pair set related to the query content. ; 6) Query by region With sparse key-value pair set Calculate the scaled dot product attention to obtain fine-grained attention features. ; 7) Parallel processing of the original values Apply depthwise separable convolution operations Perform local context enhancement to obtain local context enhancement features. ; 8) Superimpose fine-grained attention features With local context enhancement features Then, the output feature map is obtained through a linear layer. .
[0013] Preferably, the query based on region With sparse key-value pair set Calculate the scaled dot product attention to obtain fine-grained attention features. The calculation expression is: = , , , In the formula: It is a dot product function; This is the activation function.
[0014] Preferably, feature maps are processed directly in shallow networks through convolution operations.
[0015] Preferably, for the residual module, when the number of channels in the input feature map is different from the number of channels in the output map or when the spatial resolution changes due to the stride of the convolution, an additional 1×1 convolutional layer is introduced on the skip connection for dimensionality adjustment. The 1×1 convolutional layer follows a pre-activation mode, which involves performing batch normalization and activation processing before performing convolution processing.
[0016] Preferably, the BiResUnet segmentation model is trained using a multi-point deep supervision strategy. In the decoder, after upsampling (excluding the first layer), the outputs of the convolutional layers, the BiFormer modules, and the concatenated outputs of each BiFormer module are used to extract the prediction head, which is then subject to loss supervision. The total loss function... The calculation expression is: , In the formula: This is the loss corresponding to the output of the convolutional layer after upsampling of the i-th intermediate layer (excluding the first layer) in the decoder. For the first The loss corresponding to the output of each BiFormer module The loss corresponding to the output of the convolutional layer after the output of each BiFormer module is concatenated is characterized by a hybrid loss, which includes binary cross-entropy loss and Dice loss. This represents the number of intermediate layers in the decoder. The number of BiFormer modules; , , These are the corresponding weight hyperparameters.
[0017] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the program to implement any of the methods described above.
[0018] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, characterized in that the program, when executed by a processor, implements any of the methods described above.
[0019] Compared with the prior art, the present invention has the following advantages: (1) By integrating residual modules into the deep network of the BiResUnet segmentation model to learn deeper abstract features of prostate ultrasound images, and introducing independent BiFormer modules for multi-scale attention enhancement, the true boundary of the prostate and interference information such as speckle noise, acoustic shadowing, and artifacts in prostate ultrasound images can be better distinguished, thereby reducing missegmentation and missed segmentation in prostate ultrasound images.
[0020] (2) By using image segmentation and location coding, multi-scale feature enhancement and deep residual structure, the BiResUnet segmentation model can better learn the spatial structural relationship between the apex, base and capsule edge of the prostate, thereby improving the problems of boundary discontinuity, contour offset and local missing in MRI images.
[0021] (3) By setting up multi-point deep supervision at the intermediate layer of the decoder, the output of the attention module and the final fusion output, and using a hybrid loss function, the model can simultaneously optimize the local pixel boundary and the overall region overlap during the modal training process, thereby improving the training stability and segmentation accuracy when the prostate region accounts for a small proportion and the boundary details are weak.
[0022] (4) The present invention uses the BiResUnet segmentation model, which can be trained on prostate ultrasound images and prostate MRI images respectively, so that the model can learn the corresponding boundary, texture and morphological features according to the data distribution of each modality. Thus, without changing the main structure of the network, model weights suitable for ultrasound segmentation and MRI segmentation are obtained respectively, improving the adaptability of the network framework under different prostate image modalities.
[0023] (5) Improve the reliability of image basis in robot-assisted puncture scenarios: The present invention can output more complete and stable prostate segmentation contours for prostate ultrasound images and MRI images respectively, providing a more reliable image basis for prostate localization, volume estimation, puncture path planning and image navigation in robot-assisted diagnosis and treatment. Attached Figure Description
[0024] Figure 1 A schematic diagram of the architecture of the BiResUnet segmentation model; Figure 2 This is a structural diagram of the BiFormer module; Figure 3 This is a qualitative comparison of the segmentation models in the embodiments. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] Example To achieve accurate segmentation of prostate images (ultrasound images, MRI images), this embodiment provides a prostate image segmentation method. This method uses the BiResUnet segmentation model to segment prostate images, and utilizes the BiFormer module in the BiResUnet segmentation model for multi-scale attention fusion to enhance the capture of key features. At the same time, a residual module is introduced and combined with a multi-point deep supervision strategy to effectively improve the problems of weak boundaries, noise interference, and local contour discontinuities, thereby improving the completeness and accuracy of prostate region segmentation results. The output prostate region segmentation results include a binary mask and / or prostate contour, which can be used for prostate volume estimation, image navigation, and prostate localization in robot-assisted puncture path planning.
[0027] Next, the BiResUnet segmentation model in this embodiment will be described in detail.
[0028] (1) Network architecture To further enhance the model's ability to represent ultrasound and MRI prostate images in complex contexts, the BiResUnet segmentation network model constructed in this embodiment adopts a U-Net encoder-decoder symmetrical structure as its main architecture. It includes a compressed path (left encoder) for feature extraction and an extended path (right decoder) for spatial information reconstruction, and innovative improvements are made to its decoding and output structure.
[0029] like Figure 1 As shown, in this embodiment, the segmentation process of the BiResUnet segmentation model is specifically implemented as follows: A series of downsampling operations are performed on the input prostate image to generate the first multi-scale feature; Upsampling and skip connections are performed on the first multi-scale feature, and convolution is performed to generate the second multi-scale feature; residual modules are set on the sampling and downsampling paths in the deep layers of the network. Multiple second-scale features are concatenated and fused to form global contextual features; The features of each scale in the global context features and the second multi-scale features are fed in parallel into the corresponding BiFormer module for multi-scale attention enhancement. The outputs of each BiFormer module are cascaded and then output through a convolutional layer to produce the final prostate image segmentation result, which includes a binary mask and / or prostate contour.
[0030] Specifically, a hierarchical heterogeneous design is adopted, employing different construction strategies at different depths: In the shallow layers, the model directly processes feature maps through standard convolutional operations, aiming to capture and preserve the global contextual information and low-level geometric features of the image to the greatest extent possible; while in deeper layers, to address the gradient vanishing problem that may occur in deep networks and to enhance nonlinear expressive capabilities, both the downsampling and upsampling paths are built on residual modules as basic units to learn deeper abstract features. Notably, in the deep downsampling path, image block segmentation and positional encoding preprocessing are innovatively introduced before performing residual operations to enhance attention to local details. Finally, the decoder effectively fuses these heterogeneous features extracted from the shallow and deep layers through a series of upsampling operations and skip connections, reconstructing high-resolution details.
[0031] Unlike the standard U-Net, which outputs predictions directly at the top layer of the decoder, this model innovatively introduces a multi-scale attention fusion stage thereafter. Specifically, the multi-scale feature maps generated by the decoder at each level in the expansion path are fed in parallel into their respective independent attention mechanism modules (BiFormer modules) along with a global context feature fused from high-level semantic information.
[0032] Guided by this shared global contextual feature, each BiFormer module can adaptively weight and refine local features at the corresponding scale to highlight the information most critical to the segmentation task. For example... Figure 2 As shown, additional supervisory signals are introduced at this stage and applied directly to the BiFormer module. Finally, all feature maps enhanced by the attention mechanism are concatenated and stitched together along the channel dimension to form a higher-order composite feature representation that integrates multiple scales, is filtered, and is more discriminative.
[0033] Finally, this highly condensed fusion feature is fed into a lightweight convolutional prediction head, directly and accurately mapping the high-dimensional latent features to the final pixel-level segmentation map. This multi-stage fusion and deep attention enhancement design ensures that the model has stronger robustness when processing low signal-to-noise ratio images.
[0034] (2) Image segmentation and location coding In the compression path of the deep layers of the network, in order to more effectively capture and process local detail information, an image segmentation and location encoding module is innovatively introduced. This module is used to segment the input feature map into image blocks and embed precise location information, aiming to transform the two-dimensional feature map into a representation with rich spatial context information for subsequent residual module processing.
[0035] In this embodiment, image segmentation and location encoding specifically include: 1) Input the first feature map , These are the batch size, input channel, height dimension parameter, and width dimension parameter, respectively.
[0036] 2) The first feature map is processed by two-dimensional convolution. Transformed into image blocks and then subjected to linear projection Embedded into In 3D space, we obtain the block adjustment sequence. ,in , , The number of output channels is specified; the kernel size and stride of the two-dimensional convolutional layer are set to be consistent, thereby enabling non-overlapping block operations on the input feature map.
[0037] To ensure the ability to handle input feature maps of arbitrary sizes, a dynamic zero-padding mechanism is introduced. After projection, an optional normalization layer normalizes the embedded features to stabilize training and improve the model's generalization ability. The output of this stage is a two-dimensional feature map that has been segmented and embedded with the features.
[0038] 3) To further enhance the model's ability to accurately perceive spatial location information, the pre-learned location encoding matrix is... Block adjustment sequence Perform bilinear interpolation or resampling to obtain the interpolation position code. .
[0039] Specifically, the pre-learned position encoding matrix The encoding is randomly generated during model initialization and optimized through backpropagation during training, thereby learning a unique encoding for each location in the image corresponding to a specific pre-trained image size (e.g., 128×128).
[0040] When processing forward propagation, if the size of the current input feature map does not match the predefined size, the learnable positional encoding will be adaptively adjusted to the same resolution as the current feature map through bilinear interpolation.
[0041] 4) Encode the interpolation position After being reshaped into a sequence, it is compared with the block feature sequence. Element-wise addition yields the first feature incorporating location information. : , In the formula: For reshaping operations.
[0042] 5) The first feature that incorporates location information Applying a dropout layer for regularization yields the first feature. ; 6) The first feature Rearranged into an image format, the output features are obtained. This is used as the input to the first residual module in the downsampling stage: .
[0043] (3) Residual module In the deeper stages of the network, to construct deeper and more stable feature learning paths and effectively alleviate the gradient vanishing problem that may occur in deep networks, residual modules are introduced as basic building blocks in both the downsampling and upsampling paths. Residual connections can promote information flow and feature reuse, thereby improving the model's learning ability and optimization efficiency.
[0044] Residual modules such as Figure 1 As shown in the dark yellow area, the design follows a fully pre-activated paradigm. Specifically, each residual block consists of two consecutive convolutional layers, with batch normalization and an activation function applied before each convolutional layer. The input feature map is first batch normalized and ReLU activated before being fed into the first 3×3 convolutional layer. Its output is then batch normalized and ReLUed again before being fed into the second 3×3 convolutional layer.
[0045] The core of the residual module lies in its skip connections, which are as follows: the original input feature map skips these two convolutional layers directly and is added element-wise with the features after the convolution operation.
[0046] To ensure dimensionality matching, when the number of channels in the input feature map differs from the number of channels in the output map, or when the spatial resolution changes due to the stride of the convolution, an additional 1×1 convolutional layer is introduced on the skip connections for dimensionality adjustment. This adjustment layer also follows a pre-activation pattern, performing batch normalization and ReLU before convolution. This design allows the network to learn residual mappings more efficiently, focusing on subtle changes in features rather than learning the complete mapping from scratch, thus mitigating potential network degradation issues.
[0047] (4) BiFormer module To address the complexity and variability in feature representation of multimodal medical images (ultrasound and MRI) and to improve the universality and robustness of model feature extraction, a BiFormer module is introduced in the decoder section for multi-scale attention enhancement.
[0048] In this embodiment, as Figure 1 The blue area shows the structure of the BiFormer module. The BiFormer module employs a two-level routing attention mechanism, which uses a "routing first, attention later" sparsity strategy, such as... Figure 2 As shown, the logical implementation process of the BiFormer module in this embodiment includes: Initialization phase: 1) Input the second feature map Divided in spatial dimension There are three non-overlapping regions, each containing multiple feature tokens.
[0049] 2) The feature vectors of each feature token are mapped to the query value through a shared linear mapping layer. ,key Sum .
[0050] Coarse-grained area routing phase: 3) All queries within each region s and keys Instead of using average pooling, generate compact query representations at the region level. Compact representation of bonds .
[0051] 4) Compact representation based on region-level queries Compact representation of bonds Through matrix multiplication Calculate the similarity matrix between regions To achieve sparsity, the similarity matrix is... For each row, a Top-k operation is applied to dynamically select the k most relevant key regions for each query region, generating a routing index matrix. .
[0052] Fine-grained token attention phase: 5) Based on the routing index matrix For each query region, collect all original token-level key-value pairs from the corresponding k regions to form a sparse key-value pair set related to the query content. , , , In the formula: For collection operations.
[0053] 6) Query by region With sparse key-value pair set Calculate the scaled dot product attention to obtain fine-grained attention features. The calculation expression is: = , , , In the formula: It is a dot product function; This is the activation function.
[0054] 7) Parallel processing of the original values Apply depthwise separable convolution operations Perform local context enhancement to obtain local context enhancement features. This is used to compensate for the potential loss of local information caused by sparse routing. .
[0055] 8) Superimpose fine-grained attention features With local context enhancement features Then, the output feature map is obtained through a linear layer. The calculation expression is: , , In the formula: The linear projection weights of the output vector.
[0056] Compared to traditional global self-attention mechanisms, the two-level routing attention mechanism adopted by the BiFormer module has significant theoretical advantages and practical value in processing medical image segmentation tasks, mainly in the following two aspects: First, in terms of computational efficiency, traditional self-attention mechanisms are O(N) 2 The computational complexity of traditional attention algorithms is typically at the level of 1000, posing significant computational and memory overhead when processing large feature maps. However, by applying the BiFormer module in this invention, the computational complexity can be reduced from that of traditional attention algorithms. Optimize to approximation This effectively alleviates the computational bottleneck and greatly improves the efficiency of processing high-resolution images.
[0057] Secondly, regarding sparsity, the two-level routing attention mechanism introduces a query-aware dynamic sparsity. Unlike mechanisms employing a fixed sparsity pattern, the routing relationship of the two-level routing attention mechanism is dynamically generated based on the input content, flexibly allocating computational resources to each region in the image, allowing it to focus only on the few semantically most relevant regions. In MRI and ultrasound image segmentation tasks, image edges often present challenges due to their complex information and blurred boundaries. The dynamic routing characteristics of the two-level routing attention mechanism are highly compatible with the requirements of this task, adaptively filtering out the key features most relevant to edge definition from massive background and noise information. This prompts the model to highly concentrate its attention on the key regions that play a decisive role in the segmentation result, providing strong theoretical support for achieving accurate segmentation.
[0058] (5) Loss function and training strategy Binary cross-entropy loss It is a loss function that measures the difference between predicted probabilities and true labels at the pixel level. It works by probabilistically modeling the class prediction for each pixel. It can more accurately reflect changes in the target area, especially when processing boundaries and small regions in an image, and can effectively avoid over-smoothing the overall image distribution. It is defined as follows: Where N represents the total number of pixels. The true label (0 or 1) for pixel i. This determines the probability that the pixel is a foreground element in the model's prediction.
[0059] Dice loss The Dice Similarity Coefficient (DSC), derived from evaluating the overlap of segmentation results, assesses segmentation performance from a global perspective of region overlap. It can effectively address the class imbalance problem and enable the model to generate more complete and continuous segmentation results in terms of morphology, while improving the model's segmentation accuracy for small regions or boundaries. It is defined as: in, and Represent the values of the i-th pixel in the predicted result and the true label, respectively, and the smoothing term. Used to prevent the denominator from being zero and to stabilize training.
[0060] In medical image segmentation tasks, a single loss function often struggles to balance global structure and local details. To achieve a balance between the two, this embodiment constructs a hybrid loss function based on the complementary properties of binary cross-entropy loss and Dice loss. It can comprehensively optimize the model's local boundary awareness and global shape constraint capabilities, and its definition is as follows: To effectively train the model to learn discriminative features that distinguish foreground from background, and to ensure that both deep and shallow features of the network are fully learned, a multi-supervised training strategy is introduced. A hybrid loss function is used for calculation at each supervised point.
[0061] Specifically, prediction heads are introduced at three key locations in the network, and loss supervision is applied. These locations are as follows: Figure 1 The red borders indicate the three points. These correspond to the output of the convolutional layer after upsampling (excluding the first layer) (decoder intermediate layer output), the output of the BiFormer module, and the output of the convolutional layer after cascading the outputs of each BiFormer module (feature fusion output).
[0062] The defined hybrid loss function is used at each supervision point. The calculation is performed. Considering the differences in size and semantic level of the feature maps output by different network depths, directly summing the losses of each supervision point with equal weights may lead to training instability. Therefore, a weight hyperparameter is introduced into the final total loss function. and This is used to balance the contribution of different parts to the total loss.
[0063] Total loss function The expression is: , In the formula: This is the loss corresponding to the output of the convolutional layer after upsampling of the i-th intermediate layer (excluding the first layer) in the decoder. For the first The loss corresponding to the output of each BiFormer module The loss corresponding to the output of the convolutional layer after the output of each BiFormer module is concatenated is characterized by a hybrid loss, which includes binary cross-entropy loss and Dice loss. This represents the number of intermediate layers in the decoder. The number of BiFormer modules; , , These are the corresponding weight hyperparameters.
[0064] In this embodiment, the number of intermediate layers in the decoder is . The number of BiFormer modules Regarding the hyperparameter settings, the weights of each monitoring point are... Based on their depth in the network, the weights are set to 0.4, 0.5, 0.7, and 0.8 respectively, from shallowest to deepest, and the final fused output weights... Set to 1.0.
[0065] It should be noted that, for prostate ultrasound images or prostate MRI images, the BiResUnet segmentation model is trained on training images of the corresponding modality and their prostate region annotations under the same network main structure, so as to obtain model parameters suitable for the corresponding modality and thus output prostate region segmentation results.
[0066] (6) Experimental verification Datasets: This embodiment acquired three datasets, covering image data from 704 patients, totaling 9002 images (4501 ultrasound images and 4501 MRI images), to comprehensively and thoroughly validate the proposed method. In practical applications of ultrasound navigation in clinical surgery, only two-dimensional information is typically presented, and MRI and ultrasound images have a corresponding relationship. Therefore, network segmentation is performed on two-dimensional images, while MRI and ultrasound images are taken from the same patient. The training and test sets are divided in an 8:2 ratio based on individual patients. The private dataset used in this embodiment comes from Shanghai East Hospital. This dataset contains 49 patients, and the segmentation labels for validating network performance were drawn by two urology clinicians. The public datasets are from The Cancer Imaging Archive and the µ-ProReg challenge.
[0067] Experimental results: 1) NMR image segmentation: Table 1 According to the quantitative evaluation results of each model on the prostate MR image segmentation task in Table 1, BiResUNet ranks first in the average values of multiple evaluation indicators. Specifically, its Dice coefficient, Intersection over Union (IoU), and Accuracy (ACC) reached 0.9309, 0.9321, and 0.9872, respectively, all ranking first numerically. Compared with the LDNet model, which performed second best in the table, the model in this study showed a statistically significant performance advantage. Welch's t-test analysis showed that BiResUNet significantly outperformed LDNet in the Dice coefficient (t=4.68, P < 0.001), strongly demonstrating the authenticity of the performance improvement.
[0068] 2) Ultrasound image segmentation: Table 2 Table 2 presents the quantitative evaluation results of the model on the prostate TRUS image segmentation task. As shown in Table 2, BiResUNet achieved comprehensive superiority on the TRUS dataset, achieving the best performance across all six evaluation metrics. A key finding is that the performance gap between models widens significantly on ultrasound tasks. Specifically, BiResUNet achieved a 3.83% improvement in the Dice coefficient compared to LDNet (compared to only 2.05% for MRI).
[0069] Welch's t-test analysis showed that this advantage had extremely high statistical confidence (t=7.20, P<0.001). Notably, compared to the MRI experiment, BiResUNet demonstrated significantly stronger statistical performance on the ultrasound task: its t-statistic increased dramatically from 4.68 in MRI to 7.20, and the effect size also increased from 0.22 to 0.34, an increase of over 50%.
[0070] Figure 3 This section showcases representative segmentation cases, comparing the top three performing models—BiResUNet, LDNet, and UTNet—to highlight their performance differences across various scenarios. In the figures, red outlines represent the gold standard manually drawn by radiologists, while green, blue, and cyan outlines correspond to the prediction results of the BiResUNet, LDNet, and UTNet models, respectively. To comprehensively examine the models' generalization ability, the samples selected in the figures cover datasets from three different sources, and the segmentation results for MRI (left column) and transrectal ultrasound (TRUS) (right column) are also displayed.
[0071] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for prostate image segmentation, characterized in that, include: Input a prostate image, use the BiResUnet segmentation model to perform prostate multimodal image segmentation, and output the prostate multimodal image segmentation results; The network architecture of the BiResUnet segmentation model is based on U-net and includes: A series of downsampling operations are performed on the input prostate image to generate the first multi-scale feature; Upsampling and skip connections are performed on the first multi-scale feature, and convolution is performed to generate the second multi-scale feature; residual modules are set on the sampling and downsampling paths in the deep layers of the network. Multiple second-scale features are concatenated and fused to form global contextual features; The features of each scale in the global context features and the second multi-scale features are fed in parallel into the corresponding BiFormer module for multi-scale attention enhancement. The outputs of each BiFormer module are cascaded and then output through a convolutional layer to produce the final prostate image segmentation result.
2. The prostate image segmentation method according to claim 1, characterized in that, The residual module comprises two consecutive convolutional layers, wherein the input of each convolutional layer is first processed by batch normalization and activation functions.
3. The prostate image segmentation method according to claim 1, characterized in that, The downsampling process, before being fed into the first residual module, also includes image block segmentation and location encoding preprocessing of the input first feature map, specifically including: 1) Input the first feature map , These are the batch size, input channel input, height dimension parameter, and width dimension parameter, respectively. 2) The first feature map is processed by two-dimensional convolution. Transformed into image blocks and then subjected to linear projection Embedded into In 3D space, we obtain the block adjustment sequence. ,in , , The number of output channels; wherein, the kernel size and stride of the two-dimensional convolutional layer are set to be the same; 3) The pre-learned position encoding matrix Block adjustment sequence Perform bilinear interpolation or resampling to obtain the interpolation position code. ; 4) Encode the interpolation position After being reshaped into a sequence, it is compared with the block feature sequence. Element-wise addition yields the first feature incorporating location information. ; 5) The first feature that incorporates location information Applying a dropout layer for regularization yields the first feature. ; 6) The first feature Rearranged into an image format, the output features are obtained. It is used as the input to the first residual module in the downsampling stage.
4. The prostate image segmentation method according to claim 1, characterized in that, The BiFormer module employs a two-level routing attention mechanism, specifically implemented as follows: 1) Input the second feature map Divided in spatial dimension There are non-overlapping regions, each containing multiple feature tokens; 2) Map the feature vectors of each feature token to the query using a linear mapping. ,key Sum ; 3) All queries within each region s and keys Instead of using average pooling, generate compact query representations at the region level. Compact representation of bonds ; 4) Compact representation based on region-level queries Compact representation of bonds Calculate the similarity matrix between regions For the similarity matrix For each row, a Top-k operation is applied to dynamically select the k most relevant key regions for each query region, generating a routing index matrix. : 5) Based on the routing index matrix For each query region, collect all original token-level key-value pairs from the corresponding k regions to form a sparse key-value pair set related to the query content. ; 6) Query by region With sparse key-value pair set Calculate the scaled dot product attention to obtain fine-grained attention features. ; 7) Parallel processing of the original values Apply depthwise separable convolution operations Perform local context enhancement to obtain local context enhancement features. ; 8) Superimpose fine-grained attention features With local context enhancement features Then, the output feature map is obtained through a linear layer. .
5. The prostate image segmentation method according to claim 4, characterized in that, The query based on region With sparse key-value pair set Calculate the scaled dot product attention to obtain fine-grained attention features. The calculation expression is: = , , , In the formula: It is a dot product function; This is the activation function.
6. The prostate image segmentation method according to claim 1, characterized in that, In shallow networks, feature maps are processed directly through convolution operations.
7. The prostate image segmentation method according to claim 1, characterized in that, For the residual module, when the number of channels in the input feature map is different from the number of channels in the output map, or when the spatial resolution changes due to the stride of the convolution, an additional 1×1 convolutional layer is introduced on the skip connection for dimension adjustment. The 1×1 convolutional layer follows a pre-activation mode, which involves performing batch normalization and activation processing before performing convolution processing.
8. The prostate image segmentation method according to claim 1, characterized in that, The BiResUnet segmentation model is trained using a multi-point deep supervision strategy. In the decoder, after upsampling (excluding the first layer), the outputs of the convolutional layers, the BiFormer modules, and the concatenated outputs of each BiFormer module are used to extract the prediction head, which is then subjected to loss supervision. The total loss function... The calculation expression is: , In the formula: This is the loss corresponding to the output of the convolutional layer after upsampling of the i-th intermediate layer (excluding the first layer) in the decoder. For the first The loss corresponding to the output of each BiFormer module The loss corresponding to the output of the convolutional layer after the output of each BiFormer module is concatenated is characterized by a hybrid loss, which includes binary cross-entropy loss and Dice loss. This represents the number of intermediate layers in the decoder. The number of BiFormer modules; , , These are the corresponding weight hyperparameters.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Prostate partition segmentation method, system and equipment
CN115619810A