Thyroid ultrasound image segmentation method, device and readable storage medium thereof
By introducing CMFEM and CFIFM modules into the TransUNet network, the bottleneck layer feature expression and the decoder cross-layer feature fusion are optimized, and the problems of boundary blurring and noise interference in thyroid ultrasound image segmentation are solved, achieving higher segmentation accuracy and robustness.
Patent Information
- Application Number
- CN202510918834.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-07-04
AI Technical Summary
The prior art has problems such as blurred boundary, strong noise interference, low segmentation accuracy and poor robustness in thyroid ultrasound image segmentation, especially the lack of bottleneck layer feature expression capabilities of deep learning models such as TransUNet and insufficient fusion of cross-layer feature of decoders.
The collaborative multipath feature enhancement module (CMFEM) and cross-layer feature interaction fusion module (CFIFM) are introduced into the TransUNet network, and the bottleneck layer feature expression is optimized through dual-dimensional attention coupling, group feature interaction and dynamic fusion gate, and the deep fusion of high and low-level features is achieved through multi-domain feature perception and spatial interaction weights.
The accuracy and robustness of thyroid ultrasound image segmentation have been significantly improved, the Dice coefficient has been increased by 1.49% to 84.62%, and the 95% Hausdorff distance has been reduced to 16.14 pixels. The boundary positioning is more accurate, adapting to different samples and complex scenes.
Smart Images

Figure CN120411528B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing technology, and in particular to an automated segmentation method and system for thyroid ultrasound images, which achieves accurate segmentation of thyroid nodules through deep learning network optimization. Background Art
[0002] Early and accurate diagnosis of thyroid nodules is crucial for improving survival and effectively managing the disease. Ultrasound imaging is the preferred method due to its radiation-free, real-time, and non-invasive nature. However, ultrasound images are often affected by speckle noise and acoustic artifacts, resulting in blurred nodule boundaries and irregular morphology. This makes manual segmentation time-consuming and highly subjective.
[0003] Traditional image segmentation methods (such as those based on contours, regions, or traditional machine learning) have limitations such as sensitivity to image quality and reliance on artificial feature design. Although deep learning models (such as U-Net and TransUNet) improve performance through encoding-decoding structures and Transformer, the bottleneck layer of TransUNet has problems such as insufficient channel feature discrimination, limited spatial detail recovery, and weak noise resistance. In addition, the traditional decoder feature fusion mechanism (simple splicing / addition) has difficulty in mining the correlation between high- and low-level features and has poor noise suppression capabilities, which restricts the accuracy and clinical applicability of thyroid ultrasound image segmentation.
[0004] Therefore, there is an urgent need for a thyroid ultrasound image segmentation method, device and readable storage medium thereof to solve the problems existing in the prior art. Summary of the Invention
[0005] The embodiments of the present invention provide a thyroid ultrasound image segmentation method, device, and readable storage medium thereof. These methods address the problems of traditional image segmentation methods that rely on artificial features and have poor adaptability, and deep learning models (such as TransUNet) that have insufficient bottleneck layer feature expression capabilities and insufficient decoder cross-layer feature fusion, resulting in low segmentation accuracy and poor robustness for nodules with blurred boundaries and noise interference in thyroid ultrasound images.
[0006] The core technology of this invention is mainly achieved by introducing the collaborative multipath feature enhancement module (CMFEM) and the cross-layer feature interaction fusion module (CFIFM) into TransUNet. The former optimizes the bottleneck layer feature expression through two-dimensional attention coupling, group feature interaction and dynamic fusion gate, while the latter realizes the deep fusion of high and low layer features of the decoder through multi-domain feature perception, channel and spatial interaction weights, thereby improving the accuracy and robustness of thyroid ultrasound image segmentation.
[0007] In a first aspect, the present invention provides a method for segmenting a thyroid ultrasound image, the method comprising the following steps:
[0008] Obtain ultrasound images of the thyroid gland;
[0009] The thyroid ultrasound image is input into the C2F-TransUNet network, which includes an encoder, a decoder, a collaborative multipath feature enhancement module set between the encoder and decoder, and a cross-layer feature interaction fusion module set at the cross-layer connection position in the decoder;
[0010] The collaborative multipath feature enhancement module performs collaborative enhancement of the channel and spatial dimensions and grouping feature interaction on the bottleneck layer features output by the encoder to generate enhanced bottleneck layer features;
[0011] Through the cross-layer feature interactive fusion module, the high-level and low-level features of the up- and down-sampling paths in the decoder are subjected to multi-domain feature perception and dynamic weight fusion of channel and spatial dimensions to generate interactive fusion features;
[0012] Based on the enhanced bottleneck layer features and interactive fusion features, the segmentation results of thyroid nodules are output through the decoder.
[0013] Furthermore, the collaborative multipath feature enhancement module includes:
[0014] The dual-dimensional attention coupling module is used to coordinately optimize channel attention and spatial attention on input features. Channel attention generates a channel attention vector through global average pooling, layer normalization, and 1×1 convolution dimensionality reduction and dimensionality increase. Spatial attention generates a spatial attention matrix through parallel processing of 7×7 depthwise separable convolution and 3×3 dilated convolution with a dilation rate of 3. The element-by-element product of the two forms an adaptive enhanced feature.
[0015] The grouped feature interaction layer is used to group the input features along the channel, perform group normalization and group convolution, and realize cross-group feature interaction through channel shuffling operation;
[0016] The dynamic feature fusion gate is used to multiply the output features of the two-dimensional attention coupling module with the original input features element by element, and then concatenate them with the output features of the grouped feature interaction layer. After 1×1 convolution, batch normalization and GELU activation, the final enhanced features are generated.
[0017] Furthermore, the process of generating the channel attention vector by the two-dimensional attention coupling module includes: performing global average pooling on the input feature map to obtain global semantic statistics;
[0018] After layer normalization and GELU activation function processing, 1×1 convolution is used for dimensionality reduction and dimensionality increase to generate the channel attention vector , where C is the number of channels.
[0019] Furthermore, the process of generating the spatial attention matrix by the two-dimensional attention coupling module includes:
[0020] Local fine structure features are extracted through 7×7 depth-wise separable convolution, and long-range spatial dependency features are extracted through 3×3 dilated convolution with a dilation rate of 3;
[0021] Perform 1×1 convolution on the two features and then add them together, and generate a spatial attention matrix through Sigmoid activation. , where H and W are the height and width of the space.
[0022] Furthermore, the processing of the group feature interaction layer includes: dividing the input features into g subgroups along the channel, and performing group normalization on each subgroup;
[0023] Perform 1×1 group convolution on the normalized subgroups to generate intra-group structured features;
[0024] Reorganize the channels of different subgroups through channel shuffling operation and restore them to the original feature dimension .
[0025] Furthermore, the cross-layer feature interaction fusion module includes:
[0026] The multi-domain feature perception unit uses 3×3, 5×5, and 7×7 convolutions to extract multi-scale features from the input high- and low-level features respectively, and generates multi-domain enhanced features after fusion;
[0027] The channel interaction control unit performs global average pooling and maximum pooling in the spatial dimension on the multi-domain enhanced features. After splicing, it generates channel fusion weights through 1×1 convolution and Softmax to dynamically adjust the channel contribution of high- and low-level features.
[0028] The spatial interaction focusing unit performs global average pooling and maximum pooling in the channel dimension on the multi-domain enhanced features, and then generates spatial fusion weights through 2D convolution and Softmax after splicing to focus on the key spatial areas;
[0029] The residual fusion unit adds the channel and spatial fusion weights and then adds 1, multiplies them element-wise with the multi-domain enhanced features, and then adds them to generate interactive fusion features.
[0030] Furthermore, the process of generating channel fusion weights by the channel interaction control unit includes:
[0031] Perform spatial global average pooling and global maximum pooling on the multi-domain enhanced features to obtain channel statistical features;
[0032] The statistical features are spliced along the spatial width, and after dimensionality reduction by 1×1 convolution, they are normalized by Softmax to generate channel fusion weights. .
[0033] Furthermore, the process of generating spatial fusion weights by the spatial interaction focusing unit includes: performing channel global average pooling and global maximum pooling on the multi-domain enhanced features to obtain spatial statistical features;
[0034] The statistical features are spliced along the channel, processed by 2D convolution and then normalized by Softmax to generate spatial fusion weights .
[0035] In a second aspect, the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above-mentioned thyroid ultrasound image segmentation method.
[0036] In a third aspect, the present invention provides a readable storage medium storing a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes the thyroid ultrasound image segmentation method described above.
[0037] The main contributions and innovations of the present invention are as follows:
[0038] 1. Significantly improved segmentation accuracy: On the public dataset DDTI and the self-built dataset Dataset A, the Dice coefficient reached 84.62% and 80.03%, respectively, representing improvements of 1.49% and 2.26% compared to TransUNet. The 95% Hausdorff distance was reduced to 16.14 pixels and 25.68 pixels, respectively, achieving more accurate boundary positioning.
[0039] 2. Enhanced noise resistance and stability: The module design effectively suppresses ultrasonic noise and artifacts, with the lowest Dice coefficient and 95% Hausdorff distance standard deviation among compared models, adapting to different samples and complex scenarios.
[0040] 3. Feature expression and fusion optimization: CMFEM strengthens the channel discrimination and spatial details of the bottleneck layer, and CFIFM achieves deep fusion of high- and low-level features through dynamic weights, solving the problem of feature homogeneity and insufficient fusion in traditional models.
[0041] 4. Outstanding clinical applicability: The training is stable in small sample scenarios and has excellent segmentation effect on small-volume nodules with fuzzy boundaries, providing quantitative support for intelligent diagnosis of thyroid nodules.
[0042] The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below so that other features, objects, and advantages of the invention are more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0044] Figure 1 is a flowchart of a thyroid ultrasound image segmentation method according to an embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of a CMFEM architecture according to an embodiment of the present invention;
[0046] Figure 3 is a schematic diagram of a CFIFM architecture according to an embodiment of the present invention;
[0047] Figure 4 2. It is a schematic diagram of qualitative comparison between C2F-TransUNet and SOTA segmentation models on Dataset A and DDTI datasets according to an embodiment of the present invention;
[0048] Figure 5 2. It is a schematic diagram of the C2F-TransUNet architecture according to an embodiment of the present invention;
[0049] Figure 6 FIG. 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0051] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0052] Currently, ultrasound images of thyroid nodules are subject to speckle noise and acoustic artifacts, resulting in blurred nodule boundaries and irregular morphology. Traditional segmentation methods (such as U-Net and TransUNet) suffer from insufficient global context modeling, loss of local details, and weak noise immunity when processing low-contrast, high-noise images. The bottleneck layer and decoder feature fusion mechanism of the existing TransUNet cannot meet the high-precision requirements for thyroid ultrasound image segmentation.
[0053] Based on this, the present invention solves the problems existing in the prior art based on the C2F-TransUNet network architecture.
[0054] Example 1
[0055] This paper proposes a deep learning-based thyroid ultrasound image segmentation method and system (C2F-TransUNet). By introducing the Coupled Multi-path Feature Enhancement Module (CMFEM) and the Cross-layer Feature Interactive Fusion Module (CFIFM) into the traditional TransUNet network, this method addresses the problem of insufficient segmentation accuracy in thyroid ultrasound images caused by fuzzy nodule boundaries and strong noise interference. Through modular design, this method optimizes bottleneck layer feature representation and decoder cross-layer feature fusion, significantly improving segmentation accuracy, noise resistance, and clinical applicability.
[0056] Specifically, the embodiment of the present invention provides a thyroid ultrasound image segmentation method, which can refer to Figure 1 , the method comprises the following steps:
[0057] Step 1: Obtain thyroid ultrasound images;
[0058] Step 2: Input the thyroid ultrasound image into the C2F-TransUNet (Coupled & Cross-layer Fusion TransUNet) network, which includes an encoder, a decoder, a collaborative multipath feature enhancement module located between the encoder and decoder, and a cross-layer feature interaction fusion module located at the cross-layer connection position in the decoder.
[0059] In this embodiment, if Figure 2 As shown in the figure, the collaborative multipath feature enhancement module is innovatively integrated after the bottleneck layer output features of the TransUNet network, aiming to deeply optimize and dynamically enhance the high-dimensional features output by the bottleneck layer, so as to significantly improve the expressive ability of the features in thyroid ultrasound image segmentation.
[0060] Among them, such as Figure 5 As shown in Figure 2, the C2F-TransUNet network architecture is as follows:
[0061] Based on an encoder-decoder architecture, the CMFEM is embedded between the encoder and decoder, and the CFIFM is integrated at the decoder's cross-layer connections. After inputting a thyroid ultrasound image, the encoder extracts features, the CMFEM enhances the bottleneck layer features, and the CFIFM fuses the high- and low-level features of the decoder to produce the final segmentation result.
[0062] Specifically, Figure 5 The core process is "encoding-enhancement-decoding-fusion-segmentation":
[0063] 1. Input layer: Input the thyroid ultrasound image and start the segmentation process.
[0064] 2. Encoder (left half):
[0065] ResNet50 backbone: First, ResNet50 is used to extract basic image features (such as nodule contours and textures) and generate multi-scale "Hidden Features".
[0066] Transformer layer: further encodes the output features of ResNet50, uses a multi-layer (n=12) Transformer to mine global semantic associations (such as the long-range dependency between nodules and background), and outputs high-dimensional features (n patch ×768 dimensions).
[0067] 3. Feature enhancement (CMFEM module):
[0068] The high-dimensional features output by Transformer ( ), optimized by CMFEM (Collaborative Multipath Feature Enhancement Module):
[0069] Principle: Fusion channel attention, spatial attention to strengthen key features (such as highlighting nodule areas, suppressing noise artifacts), and then through group convolution, channel shuffling to improve feature diversity, and finally output enhanced bottleneck layer features ( ).
[0070] 4. Decoder (right half):
[0071] Upsampling and cross-layer fusion (CFIFM module):
[0072] The enhanced features are upsampled to gradually restore the spatial resolution ( → etc.), and at the same time fuse the skip connection features (SkipConnection) of different stages of the encoder through CFIFM (cross-layer feature interaction fusion module):
[0073] Principle: Use multi-scale convolution to capture local-global information, combined with channel + spatial attention dynamic weighting (to strengthen nodule boundaries and suppress background interference), so that high- and low-level features can complement each other deeply.
[0074] 5. Segmentation Head:
[0075] The final features are processed by convolution (Conv3×3+ReLU) and upsampling (Upsample), and the segmentation results (H×W×16→binary or multi-classification segmentation map) are output to distinguish nodules from background.
[0076] visible, Figure 5 It clearly demonstrates the entire process from ultrasound image input, to feature encoding, enhancement, cross-layer fusion, and finally output of nodule segmentation results. The core relies on the two modules CMFEM and CFIFM to break through the bottleneck of traditional segmentation and adapt to the needs of medical imaging.
[0077] Step 3: The bottleneck layer features output by the encoder are collaboratively enhanced in the channel and spatial dimensions and grouped feature interaction through the collaborative multipath feature enhancement module to generate enhanced bottleneck layer features;
[0078] In this embodiment, the bottleneck layer features output by the encoder-Transformer are received, that is, the input feature map ,in C Indicates the number of channels, H and W The collaborative multipath feature enhancement module design includes three key modules: a two-dimensional attention coupling module, a grouping feature interaction layer, and a dynamic feature fusion gate:
[0079] 1. Bidirectional Attention Coupling Block (BACB):
[0080] BACB aims to adaptively recalibrate and enhance input features through the coordinated optimization and deep fusion of channel and spatial dimensions. Figure 2 As shown in the figure, the structure and process of BACB include the following key steps:
[0081] First, a bottleneck compression-expansion architecture is employed for channel-wise adaptive feature enhancement. Global Average Pooling (GAP) is used to aggregate global semantic statistics, and Layer Normalization (LN) and the GELU activation function are integrated to significantly improve the stability of feature distribution and nonlinear expression capabilities. 1×1 convolutions are used to achieve dimensionality reduction and dimensionality increase, effectively compressing information redundancy and dynamically strengthening the response of key semantic channels. Ultimately, a channel attention vector is dynamically generated:
[0082]
[0083] in represents global average pooling, and Represents a 1×1 convolutional layer for dimensionality reduction and increase. Representation layer normalization, Represents the GELU activation function.
[0084] Secondly, a heterogeneous parallel convolutional architecture is used for heterogeneous perception and fusion of spatial dimensions. Path one uses a 7×7 depthwise separable convolution to efficiently focus on local fine structures; path two uses a 3×3 dilated convolution with a dilation rate of 3 to significantly expand the receptive field to model long-range spatial dependencies. After the two outputs are integrated through dimensionality reduction using a 1×1 convolution, a sigmoid activation function is used to generate a spatial attention matrix:
[0085]
[0086] in, and is the corresponding 1×1 convolution operation; and They represent depth-wise separable convolution with a convolution kernel size of 7×7 and dilated convolution with a dilation rate of 3 and a convolution kernel size of 3×3. Represents the Sigmoid activation function.
[0087] Finally, the channel attention vector is multiplied by the tensor broadcast product across dimensions. and the spatial attention matrix Perform element-by-element product fusion to obtain adaptively enhanced feature representation:
[0088]
[0089] in, Represents broadcast multiplication. Get BACB enhanced features .
[0090] Through these innovative designs, BACB achieves deep interaction and collaborative optimization across both channel and spatial dimensions, significantly improving the discriminative response of key semantic channels, suppressing homogeneous expressions, precisely focusing on spatially salient regions crucial for segmentation tasks, and effectively enhancing the robustness of features in the presence of complex backgrounds and noise. This module significantly enhances the expressive power of bottleneck layer features, laying a solid foundation for discriminative features for subsequent processing.
[0091] 2. Grouped Feature Interaction Layer (GFIL)
[0092] GFIL aims to promote the intra-group consistency and inter-group interactivity of features by integrating group normalization, group convolution and channel shuffling operations. Its processing flow can be described as follows:
[0093]
[0094] in, represents group normalization, is the group convolution, Represents a channel shuffle operation.
[0095] First, normalize the features within the group. The model is divided into g independent subgroups along the channel dimension, and group normalization (GN) is applied to the features of each subgroup. This strategy effectively alleviates the statistical bias problem in small-batch training scenarios and significantly improves the consistency of feature distribution within the group, thereby enhancing the training stability of the model on small-sample medical imaging datasets.
[0096] Then, the intra-group structural transformation is performed. Grouped Convolution is performed independently on each normalized feature subgroup. ) operation, using a 1×1 convolution kernel to focus on learning efficient structured representations of intra-group features. This grouping mechanism preserves the prior structure of intra-group features while effectively avoiding the computational redundancy of traditional full-channel convolution and strengthening the inherent correlation of local features.
[0097] Finally, cross-group feature interaction and reorganization are performed. Based on the intra-group processing, the channel shuffle operation is introduced. ). This operation achieves full interaction and fusion of cross-subgroup feature information by systematically reorganizing the channels of different subgroups. Specifically, Figure 2 As shown, for the feature representation after group convolution , the channel shuffle operation is defined as follows:
[0098] This operation rearranges and combines features from different groups and finally restores the original shape. .
[0099] Through the above-mentioned hierarchical processing, GFIL not only ensures the distribution consistency of features within the group and improves the robustness of the model under small sample conditions, but also greatly promotes the flow and interaction of information across groups, significantly improving the diversity and discriminative ability of feature expression.
[0100] 3. Dynamic Feature Fusion Gate (DFFG)
[0101] DFFG adaptively fuses the enhanced features output by the BACB module and the structured features output by the GFIL module through a gating mechanism. The fusion process is described as follows:
[0102]
[0103] in , represents element-wise multiplication, represents splicing along the channel dimension, is the corresponding 1×1 convolution, Represents batch normalization.
[0104] First, enhance the features With the original input features Perform element-wise multiplication ( ) to enhance the key feature area to enhance the discriminative feature response of the key area. Then, the enhanced features are combined with the structured features. Splicing along the channel dimension ( ), forming a comprehensive feature representation containing complementary information. Next, the concatenated features are linearly transformed in the channel dimension through a 1×1 convolution kernel, aiming to further adjust the relative contribution weights of the enhanced features and the structural features, and realize the adaptive fusion of the two features. Finally, batch normalization (BatchNormalization, ) and GELU activation function for feature normalization and nonlinear activation. The final output is the optimized enhanced features , realizing dynamic weighted fusion of features.
[0105] Through the above design, the DFFG mechanism efficiently integrates complementary information from different paths, and through gate-driven weight learning, dynamically optimizes the contribution ratio of each path feature in the final output, maximizes the fusion effect, and thus significantly improves the model's ability to represent complex medical image features and segmentation performance. Figure 2 It shows in detail the whole process of "how bottleneck layer features go from input → two-dimensional enhancement → group interaction → dynamic fusion output". The core is to use multiple modules to collaborate to solve the problem of insufficient expression of traditional network features and adapt to the needs of thyroid ultrasound image segmentation.
[0106] Step 4: Through the cross-layer feature interactive fusion module, the high-level and low-level features of the up- and down-sampling paths in the decoder are subjected to multi-domain feature perception, dynamic weight fusion of channel and spatial dimensions, and interactive fusion features are generated;
[0107] In this embodiment, in order to address the core defects of traditional decoder feature fusion methods, such as insufficient feature correlation mining and weak noise suppression capabilities, the present invention proposes a cross-layer feature interactive fusion module (CFIFM) and integrates it into the key bridge position connecting the upsampling path and the downsampling path in the TransUNet network, aiming to solve the problem of insufficient cross-layer feature fusion in the encoder-decoder architecture. Figure 3 As shown, for the input graph ,in represents the low-level features extracted by the downsampling process, represents the high-level features recovered by the upsampling process, C is the number of channels, H and W are the height and width of the space respectively. The module design includes the following key modules:
[0108] CFIFM first performs multi-domain feature perception on both high-level and low-level input features. Specifically, for each feature path, the module simultaneously uses multiple sets of convolution kernels with different receptive fields (such as 3×3, 5×5, and 7×7) for parallel convolution operations, which can be formally expressed as follows:
[0109]
[0110] in, Represents convolution operations of different sizes. Through this multi-scale collaborative encoding method, the module can fully capture rich information from local details to global context dependencies. The convolution results of each scale are fused after nonlinear activation to form multi-domain enhanced feature representations of high-level features and low-level features respectively. and This design significantly improves the adaptability of features to spatial structures of different scales and provides rich contextual information for subsequent interactive fusion.
[0111] Then, the two sets of enhanced features were and The interactive fusion of global context perception is performed in two dimensions: channel and space. First, CFIFM adopts a channel collaborative control mechanism to achieve dynamic optimization of features from different sources in the channel dimension. Specifically, the multi-domain enhanced features are respectively and Perform global average pooling in the spatial dimension ( ) and global maximum pooling ( ), and obtain two sets of global statistical features. Then, by Operation, the statistical features are spliced in the spatial width direction to form a joint feature description. The joint feature is subjected to one-dimensional convolution ( ) is processed to generate two sets of feature representations and normalized by Softmax ( ) obtain two sets of channel fusion weights , which is formally expressed as follows:
[0112]
[0113] in, and Represent the global average pooling and global maximum pooling in the spatial dimension, respectively. Indicates dimension reshaping, represents one-dimensional convolution, Represents Softmax normalization.
[0114] This weight can dynamically adjust the contribution of upsampling and downsampling features in each channel, achieving efficient interaction and optimization of the channel dimension.
[0115] Then, CFIFM adopts the spatial collaborative focusing mechanism to further improve the discrimination ability of the spatial dimension. Specifically, the multi-domain enhanced features are respectively and Perform global average pooling on the channel dimension ( ) and global maximum pooling ( ), to obtain spatial statistical characteristics. Then, by The operation splices the above statistical features in the channel direction to form a joint spatial feature, and uses Remove the spatial height to form a compact joint spatial feature description. This compact feature is subjected to two-dimensional convolution ( ) is processed to generate two sets of spatial feature representations, which are then normalized into two sets of spatial fusion weights through Softmax. , which is formally expressed as follows:
[0116]
[0117] in, and Represent the global average pooling and global maximum pooling in the channel dimension, Represents a two-dimensional convolution.
[0118] This weight can dynamically focus on key spatial areas, thereby improving the model's discriminative ability in the spatial dimension and the refinement of feature expression.
[0119] Subsequently, the two sets of channel fusion weights and the two sets of spatial fusion weights are added together, and an identity mapping (i.e., addition operation) is introduced to ensure the effective retention of the original feature information and the stability of the gradient flow.
[0120] It can be seen that the core innovation of the CFIFM module lies in the construction of a fusion framework that organically coordinates three mechanisms: multi-domain feature perception, channel interaction regulation, and spatial interaction focusing. Figure 3 It shows in detail the whole process of "how high- and low-level features are extracted from input → multi-scale → dynamic weighting → precise fusion". The core is to use intelligent weights to make the advantages of features at different levels complement each other and solve the problem of ultrasound image segmentation.
[0121] Multi-domain feature perception mechanism: Through multi-scale convolutional pathways, it efficiently captures and fuses multi-level spatial information from local subtle structures to global context, significantly enriching the spatial representation dimension of features.
[0122] Channel interaction regulation mechanism: Based on the global statistical characteristics of cross-path features, channel-level interaction weights are dynamically generated and applied to achieve adaptive integration of feature channel dimensions, significantly enhance the expression of key semantic channels and suppress redundancy.
[0123] Spatial interactive focusing mechanism: Through dynamic spatial attention modeling, the model is guided to focus on spatial areas that are critical to the current fusion task, such as complex boundaries and suspected nodule areas, greatly improving the accuracy of capturing fuzzy boundaries and subtle structures.
[0124] In addition, the module adopts a residual design of fusion weights, which effectively ensures the reliable transmission of original feature information and the stability of gradient flow while introducing deep interactive fusion.
[0125] Through the synergistic effect of these innovative mechanisms, CFIFM effectively overcomes the issues of information redundancy, insufficient discriminability, and noise sensitivity inherent in traditional simple splicing and fusion. It significantly improves model structure analysis, precise location of fuzzy boundaries, and robustness to strong noise interference, laying a crucial feature fusion foundation for achieving high-precision and robust medical image segmentation.
[0126] Step 5: Based on the enhanced bottleneck layer features and interactive fusion features, the decoder outputs the segmentation results of the thyroid nodules.
[0127] In this embodiment, the fusion weights are finally multiplied element-by-element by the multi-domain enhancement features and then added to obtain the interactive fusion features, which are formally expressed as follows:
[0128]
[0129]
[0130] The fused features The output of CFIFM combines rich global contextual information with fine local details, providing highly expressive features for subsequent network layers. This module's flexible design allows for seamless integration into the feature bridge of various encoder-decoder architectures (such as UNet and TransUNet). This module effectively overcomes the shortcomings of traditional feature fusion methods in integrating global and local information, significantly improving the model's ability to capture complex structures and details. It is particularly suitable for scenarios such as medical image segmentation, which require extremely high cross-layer feature fusion.
[0131] Preferably, in order to verify the feasibility, this embodiment also provides a comparative experiment:
[0132] To fully validate the effectiveness of the proposed method, experiments were conducted on both the publicly available thyroid ultrasound image segmentation dataset (DDTI) and a self-constructed thyroid ultrasound image segmentation dataset (Dataset A). In these comparative experiments, several representative mainstream models in the current field of medical image segmentation were selected for comparison, including U-Net, DeepLabV3+, TransUNet, DA-TransUNet, U-KAN, and the proposed C2F-TransUNet. The experiments employed two commonly used segmentation performance evaluation metrics: the Dice Similarity Coefficient (DSC) and the 95% Hausdorff distance (HD95), which measure the overlap and boundary localization accuracy of the segmentation results, respectively. Through systematic comparisons across different datasets and multiple mainstream models, the proposed method was able to fully demonstrate its accuracy and robustness in thyroid ultrasound image segmentation tasks, as well as its potential for practical application.
[0133] Table 1 Dataset division method
[0134]
[0135] As shown in Table 1, we split both datasets into training and test sets in an 8:2 ratio. Specifically, in the publicly available DDTI dataset, 509 samples were used for training and 128 samples were used for testing; in our self-built Dataset A, 900 samples were selected as the training set and 226 samples were selected as the test set.
[0136] Table 2 Segmentation performance of C2F-TransUNet and SOTA segmentation models on the DDTI dataset
[0137]
[0138] Experiments on the thyroid ultrasound image segmentation dataset DDTI demonstrate that the proposed C2F-TransUNet demonstrates superior segmentation performance. As shown in Table 2, in terms of segmentation accuracy, the average Dice coefficient (DSC) of C2F-TransUNet reaches 84.62±14.11, a significant improvement over mainstream models. This performance is significantly higher than the classic medical image segmentation network U-Net (79.34±18.16), significantly better than the traditional TransUNet (83.13±15.14), and significantly ahead of the convolutional network DeepLabV3+ (70.48±25.84), surpassing the improved DA-TransUNet (78.99±18.52), and outperforming the recently proposed U-KAN (79.26±16.18). In terms of boundary localization accuracy, the HD95 of C2F-TransUNet is 16.14±14.63, which is better than U-Net (25.18±22.42), DeepLabV3+ (29.75±24.74), DA-TransUNet (22.93±22.76), and U-KAN (28.50±23.36), and also surpasses TransUNet (18.39±15.39) in this indicator, showing that this method has stronger robustness and precision in dealing with complex boundaries and detailed structures.
[0139] Furthermore, C2F-TransUNet achieved the lowest standard deviations of all models in both DSC and HD95 metrics, demonstrating its more stable segmentation performance and its ability to adapt to changes in different samples and complex scenarios. In summary, the experimental results of C2F-TransUNet on the DDTI dataset demonstrate its effectiveness and advancement in thyroid ultrasound image segmentation tasks, particularly in improving segmentation accuracy, boundary discrimination, and model stability, outperforming existing mainstream segmentation methods.
[0140] Table 3 Segmentation performance of C2F-TransUNet and SOTA segmentation model on Dataset A
[0141]
[0142] On the thyroid ultrasound image segmentation dataset, Dataset A, the proposed C2F-TransUNet demonstrated significant advantages in two key evaluation metrics: the Dice coefficient and HD95. As shown in Table 3, the C2F-TransUNet achieved a top-tier Dice coefficient of 80.03±17.89, surpassing U-Net (72.37±27.06), DeepLabV3+ (62.42±31.48), TransUNet (77.77±21.90), DA-TransUNet (77.76±22.13), and U-KAN (73.49±22.08), fully demonstrating the superiority of this method in segmentation accuracy. At the same time, C2F-TransUNet also performed outstandingly in the HD95 indicator, achieving 25.68±36.76, which is better than U-Net (58.49±80.10), DeepLabV3+ (52.33±59.39), TransUNet (29.81±39.21), and DA-TransUNet (30.13±39.50), and is comparable to U-KAN (25.55±29.61), showing that this method also has a leading level in boundary localization and robustness to abnormal samples.
[0143] Notably, C2F-TransUNet achieved lower standard deviations in both Dice and HD95 metrics than all other compared models, and significantly lower than U-Net (80.10). This suggests that its segmentation performance is more stable and adaptable to variations in different samples and complex scenarios. Overall, the experimental results of C2F-TransUNet on Dataset A fully demonstrate its effectiveness and advancement in thyroid ultrasound image segmentation, particularly in improving segmentation accuracy, boundary discrimination, and model stability, outperforming existing mainstream segmentation methods.
[0144] Preferably, the present invention also performs a visual comparison of the segmentation results of typical samples on the self-built Dataset A thyroid ultrasound image segmentation dataset of the public DDTI. Figure 4As shown in the figure, when faced with nodules with fuzzy boundaries, complex structures, or small targets, traditional U-Net and DeepLabV3+ often produce incomplete target contours, missed detections, or mis-segmentation results, making it difficult to accurately restore the true shape of the nodules. TransUNet and DA-TransUNet have improved in overall segmentation performance and can better capture the target area, but some samples still have problems with uneven boundaries, lost details, or sensitivity to noise. U-KAN can segment targets well in some samples, but when dealing with small targets or complex backgrounds, segmentation is still inconsistent or mis-segmented.
[0145] Compared with several major segmentation methods, the segmentation results of the C2F-TransUNet proposed in this paper on both datasets showed good adaptability and boundary discrimination capabilities for nodules of different morphologies. Regardless of the size of the nodules and the blurred boundaries, the segmentation contours of C2F-TransUNet were highly consistent with the gold standard annotations, and the ability to suppress background noise and irrelevant areas was stronger. Overall, C2F-TransUNet not only improved the accuracy of segmentation and the ability to restore details, but also significantly enhanced the generalization ability and robustness of the model across datasets, further verifying the advanced nature and practical value of the method in the task of thyroid ultrasound image segmentation.
[0146] To further validate the effectiveness of the innovative modules proposed in this paper in the thyroid ultrasound image segmentation task and their contribution to overall model performance, we designed and conducted systematic ablation experiments on two datasets. By integrating the Collaborative Multipath Feature Enhancement Module (CMFEM) and the Cross-layer Feature Interaction Fusion Module (CFIFM) on TransUNet, and then applying them together, we were able to comprehensively evaluate the impact of each module on segmentation accuracy, boundary discrimination, and model robustness. These ablation experiments not only help to reveal the independent effects and synergistic gains of each module, but also provide strong empirical evidence for the scientific and advanced nature of our approach.
[0147] Table 4 Ablation experiment results of different improved modules on Dataset A and DDTI
[0148]
[0149] As shown in Table 4, ablation experiments on the publicly available thyroid ultrasound image DDTI dataset show that TransUNet achieves a Dice coefficient and HD95 score of 83.13±15.14 and 18.39±15.39, respectively. After introducing CMFEM, the Dice coefficient increases to 84.09±14.47, while the HD95 score decreases to 17.87±16.28, demonstrating the module's positive impact in enhancing feature representation and improving segmentation accuracy. When CFIFM is integrated, the Dice coefficient increases to 84.15±14.18, while the HD95 score decreases to 17.05±15.86, demonstrating CFIFM's significant advantages in feature fusion and detail restoration. When the two are combined, model performance is further improved, with a Dice coefficient of 84.62±14.11 and a HD95 score of 16.14±14.63. The above results show that the CMFEM and CFIFM modules can effectively improve the segmentation accuracy and boundary discrimination ability on this dataset, and their combined application can further enhance the robustness and generalization ability of the model, fully verifying the effectiveness and advancement of the method of the present invention.
[0150] Ablation experiments on the self-built Dataset A thyroid ultrasound image segmentation dataset showed the same trend. The Dice coefficient of the TransUNet model was 77.77±21.90, and the HD95 was 29.81±39.21. When CMFEM was introduced, the Dice coefficient increased to 78.87±20.63, and the HD95 decreased to 28.39±38.13. When CFIFM was integrated alone, the Dice coefficient increased to 79.71±19.74, and the HD95 decreased to 26.49±37.19. When the two were combined, the model performance reached the optimal level, with the Dice coefficient increased to 80.03±17.89 and the HD95 further reduced to 25.68±36.76. This fully demonstrates the synergistic gain effect of the two modules, which can maximize the performance of the model in complex ultrasound image segmentation tasks.
[0151] Example 2
[0152] This embodiment also provides an electronic device, referring to Figure 6 , includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.
[0153] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits for implementing the embodiments of the present invention.
[0154] Memory 404 may include a large-capacity memory 404 for data or instructions. By way of example, and not limitation, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to the data processing device. In certain embodiments, memory 404 is non-volatile memory. In certain embodiments, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0155] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0156] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any one of the thyroid ultrasound image segmentation methods in the above embodiments.
[0157] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0158] Transmission device 406 can be used to receive or transmit data via a network. Specific examples of such networks may include wired or wireless networks provided by the electronic device's communications provider. In one embodiment, the transmission device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0159] The input / output device 408 is used to input or output information.
[0160] Example 3
[0161] This embodiment further provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute the process. The process includes the thyroid ultrasound image segmentation method according to the first embodiment.
[0162] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be repeated here.
[0163] In general, various embodiments may be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the blocks, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or a controller or other computing device, or some combination thereof.
[0164] Embodiments of the present invention can be implemented by computer software, which is executable by the data processor of the mobile device, such as in the processor entity, or is implemented by hardware, or is implemented by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product can include one or more computer executable components configured to perform the embodiment when the program is running. One or more computer executable components can be at least one software code or a part thereof. In addition, at this point, it should be noted that any box of the logic flow in the figure can represent a program step, or interconnected logical circuits, boxes and functions, or a combination of program steps and logical circuits, boxes and functions. The software can be stored in physical media such as memory chips or storage blocks implemented in the processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs. Physical media is non-transient media.
[0165] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0166] The above embodiments merely illustrate several embodiments of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of the present invention. Therefore, the scope of the present invention shall be determined by the appended claims.
Claims
1. A thyroid ultrasound image segmentation method, characterized in that: The following steps are involved: Obtain ultrasound images of the thyroid gland; Inputting the thyroid ultrasound image into a C2F-TransUNet network, the network comprising an encoder, a decoder, a collaborative multipath feature enhancement module disposed between the encoder and the decoder, and a cross-layer feature interaction fusion module disposed at a cross-layer connection position in the decoder; The collaborative multipath feature enhancement module performs collaborative enhancement of channel and spatial dimensions and group feature interaction on the bottleneck layer features output by the encoder to generate enhanced bottleneck layer features; wherein the collaborative multipath feature enhancement module includes: A two-dimensional attention coupling module is used to coordinately optimize channel attention and spatial attention on input features. The channel attention generates a channel attention vector through global average pooling, layer normalization, and 1×1 convolution dimensionality reduction and dimensionality increase. The spatial attention generates a spatial attention matrix through parallel processing of 7×7 depthwise separable convolution and 3×3 dilated convolution with a dilation rate of 3. The element-by-element product of the two forms an adaptive enhancement feature. The grouped feature interaction layer is used to group the input features along the channel, perform group normalization and group convolution, and realize cross-group feature interaction through channel shuffling operation; A dynamic feature fusion gate is used to multiply the output features of the two-dimensional attention coupling module by the original input features element by element, and then concatenate them with the output features of the grouped feature interaction layer, and generate the final enhanced features after 1×1 convolution, batch normalization and GELU activation; The cross-layer feature interactive fusion module performs multi-domain feature perception and dynamic weight fusion of channel and spatial dimensions on the high- and low-layer features of the up- and down-sampling paths in the decoder to generate interactive fusion features; wherein the cross-layer feature interactive fusion module includes: The multi-domain feature perception unit uses 3×3, 5×5, and 7×7 convolutions to extract multi-scale features from the input high- and low-level features respectively, and generates multi-domain enhanced features after fusion; The channel interaction control unit performs global average pooling and maximum pooling in the spatial dimension on the multi-domain enhanced features, and generates channel fusion weights after splicing through 1×1 convolution and Softmax to dynamically adjust the channel contribution of high- and low-level features; A spatial interaction focusing unit performs global average pooling and maximum pooling in the channel dimension on the multi-domain enhanced features, and generates spatial fusion weights after splicing through 2D convolution and Softmax to focus on key spatial areas; The residual fusion unit adds the channel and spatial fusion weights and adds 1, multiplies them element-wise with the multi-domain enhanced features, and then adds them to generate interactive fusion features; Based on the enhanced bottleneck layer features and interactive fusion features, the segmentation result of the thyroid nodule is output through the decoder.
2. The thyroid ultrasound image segmentation method according to claim 1, wherein: The process of generating the channel attention vector by the dual-dimensional attention coupling module includes: performing global average pooling on the input feature map to obtain global semantic statistics; After layer normalization and GELU activation function processing, 1×1 convolution is used for dimensionality reduction and dimensionality increase to generate the channel attention vector , where C is the number of channels.
3. The thyroid ultrasound image segmentation method according to claim 1, wherein: The process of generating the spatial attention matrix by the two-dimensional attention coupling module includes: Local fine structure features are extracted through 7×7 depth-wise separable convolution, and long-range spatial dependency features are extracted through 3×3 dilated convolution with a dilation rate of 3; Perform 1×1 convolution on the two features and then add them together, and generate a spatial attention matrix through Sigmoid activation. , where H and W are the height and width of the space.
4. The thyroid ultrasound image segmentation method according to claim 1, wherein: The processing process of the group feature interaction layer includes: dividing the input features into g subgroups along the channel, and performing group normalization on each subgroup; Perform 1×1 group convolution on the normalized subgroups to generate intra-group structured features; Reorganize the channels of different subgroups through channel shuffling operation and restore them to the original feature dimension .
5. The thyroid ultrasound image segmentation method according to claim 1, wherein: The process of generating channel fusion weights by the channel interaction control unit includes: Perform spatial global average pooling and global maximum pooling on the multi-domain enhanced features to obtain channel statistical features; The statistical features are spliced along the spatial width, and after dimensionality reduction by 1×1 convolution, they are normalized by Softmax to generate channel fusion weights. .
6. The thyroid ultrasound image segmentation method according to claim 1, wherein: The process of generating spatial fusion weights by the spatial interaction focusing unit includes: performing channel global average pooling and global maximum pooling on the multi-domain enhanced features to obtain spatial statistical features; The statistical features are spliced along the channel, processed by 2D convolution and then normalized by Softmax to generate spatial fusion weights .
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the thyroid ultrasound image segmentation method according to any one of claims 1 to 6.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes the thyroid ultrasound image segmentation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Ultrasonic image segmentation method and system based on multistage feature extraction
CN119693383A
Deep learning-based ultrasonic image segmentation method and system, device and medium
WO2024182997A1