Training method of thyroid nodule segmentation model, nodule segmentation method and device

CN118154878BActive Publication Date: 2026-10-09CHINA UNIV OF MINING & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410385640.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-01
Publication Date
2026-10-09
Estimated Expiration
2044-04-01

AI Technical Summary

Technical Problem

[0003]传统的甲状腺结节超声图像分割依赖于专业医师的手动分割,不仅费时费力,还严重依赖于医师的影像学经验,主观性较强

Benefits of technology

[0038]The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of this application are described below.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118154878B_ABST
    Figure CN118154878B_ABST
Patent Text Reader

Abstract

The present disclosure provides a thyroid nodule segmentation model training method, a nodule segmentation method and device. The thyroid nodule segmentation model training method comprises: obtaining a target training sample, the target training sample comprising: a plurality of thyroid nodule ultrasound image data; constructing a preset network model, the preset network model comprising: an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module and a decoder; training the preset network model based on the target training sample using a hybrid loss function to obtain a thyroid nodule segmentation model. Thus, by training the constructed preset network model, a thyroid nodule segmentation model capable of segmenting thyroid nodules is obtained, which facilitates effective segmentation of thyroid nodules, improves the segmentation accuracy of thyroid nodules, and effectively expands the application of medical images in clinical diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the field of artificial intelligence technology, and more specifically, to a training method, nodule segmentation method, and apparatus suitable for a thyroid nodule segmentation model. Background Technology

[0002] Influenced by lifestyle habits and the external environment, the incidence of thyroid nodules is increasing year by year, and the affected population is spreading from middle-aged people to young people. Relevant medical data shows that over 60% of the general population is diagnosed with thyroid nodules via ultrasound imaging, most of which are benign. However, 7%-15% of thyroid nodules are malignant and can further develop into thyroid cancer, seriously threatening human health. Therefore, the importance of diagnosing thyroid nodules is self-evident.

[0003] Traditional ultrasound image segmentation of thyroid nodules relies on manual segmentation by specialist physicians, which is not only time-consuming and labor-intensive but also heavily dependent on the physician's imaging experience, making it highly subjective. With the widespread application of medical imaging techniques, the volume of medical data images has increased dramatically, making it difficult for physicians to perform accurate segmentation of thyroid nodules, thus limiting the application of medical images in clinical diagnosis. Summary of the Invention

[0004] The embodiments described herein provide a training method, nodule segmentation method, and apparatus for a thyroid nodule segmentation model, overcoming the aforementioned problems.

[0005] Firstly, based on the content of this disclosure, a training method for a thyroid nodule segmentation model is provided, including:

[0006] Obtain target training samples, which include: ultrasound image data of multiple thyroid nodules;

[0007] A pre-defined network model is constructed, which includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct the information encoding path. The global guidance module is used to reconstruct the jump connections between the information encoding path and the information decoding path based on multi-stage global context information. The pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with a pre-defined convolution to generate a dimensionality-reduced context information representation to obtain global pyramid pooling features. The hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features. The decoder is used to output thyroid nodule feature maps.

[0008] A hybrid loss function is used to train a pre-defined network model based on target training samples to obtain a thyroid nodule segmentation model;

[0009] The hybrid loss function includes a first preset function and a second preset function. The first preset function describes the region-based loss function, and the second preset function describes the distribution-based loss function.

[0010] Optionally, the pyramid pooling module is used to downsample based on four different scales of global pooling: 1*1, 2*2, 3*3, and 6*6. It combines 1*1 convolution to generate a dimensionality-reduced contextual information representation. By reducing the number of channels generated by the pooling operation to 1, bilinear interpolation is used to upsample the low-resolution thyroid nodule feature map to the same size as the original input feature map. The upsampled feature map is then concatenated with the original input thyroid nodule feature map to obtain the global pyramid pooling feature.

[0011] Among them, global pyramid pooling features are used to extract multi-scale information from thyroid nodule feature maps.

[0012] Optionally, the hybrid adaptive attention module includes channel attention and spatial attention, which are connected in parallel to form the hybrid adaptive attention module;

[0013] Channel attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized channel weights with the original feature map channel by channel, while spatial attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized spatial weights with the original feature map element by element.

[0014] Optionally, the decoder includes: 4 decoding modules, each of which includes: 2 1*1 convolutions and 1 3*3 transposed convolution;

[0015] 1*1 convolutions are used to adjust the number of decoding channels to increase / decrease the dimensionality of the input thyroid nodule feature map.

[0016] Optionally, the first preset function is represented as:

[0017]

[0018] Where (i,j) is the model-predicted pixel, Pre(i,j) represents the probability that the model-predicted pixel (i,j) is normal, GT(i,j) represents the actual binary label, W is the width of the ultrasound image of the thyroid nodule in the target training sample, and H is the height of the ultrasound image of the thyroid nodule in the target training sample.

[0019] Optionally, the second preset function is expressed as:

[0020]

[0021] Where (i,j) is the model-predicted pixel, Pre(i,j) represents the probability that the model-predicted pixel (i,j) is normal, GT(i,j) represents the actual binary label, W is the width of the ultrasound image of the thyroid nodule in the target training sample, and H is the height of the ultrasound image of the thyroid nodule in the target training sample.

[0022] Secondly, according to the content of this disclosure, a method for segmenting thyroid nodules is provided, including:

[0023] Obtain ultrasound images of thyroid nodules;

[0024] The ultrasound image of the thyroid nodule is input into the thyroid nodule segmentation model. Based on the output of the thyroid nodule segmentation model, the segmentation result of the ultrasound image of the thyroid nodule is determined.

[0025] Among them, the thyroid nodule segmentation model is a thyroid nodule segmentation model trained by any of the methods in the first aspect.

[0026] Thirdly, according to the present disclosure, a training device for a thyroid nodule segmentation model is provided, comprising:

[0027] The first acquisition module is used to acquire target training samples, which include: ultrasound image data of multiple thyroid nodules;

[0028] The building module is used to construct a preset network model, which includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct the information encoding path. The global guidance module is used to reconstruct the jump connections between the information encoding path and the information decoding path based on multi-stage global context information. The pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with preset convolution to generate a dimensionality-reduced context information representation to obtain global pyramid pooling features. The hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features. The decoder is used to output thyroid nodule feature maps.

[0029] The training module is used to train a preset network model based on target training samples using a hybrid loss function to obtain a thyroid nodule segmentation model.

[0030] The hybrid loss function includes a first preset function and a second preset function. The first preset function describes the region-based loss function, and the second preset function describes the distribution-based loss function.

[0031] Fourthly, according to the present disclosure, a thyroid nodule segmentation device is provided, characterized in that it comprises:

[0032] The second acquisition module is used to acquire ultrasound images of thyroid nodules;

[0033] The input module is used to input the ultrasound image of the thyroid nodule into the thyroid nodule segmentation model, and to determine the segmentation result of the ultrasound image of the thyroid nodule based on the output of the thyroid nodule segmentation model.

[0034] Among them, the thyroid nodule segmentation model is a thyroid nodule segmentation model trained by any of the methods in the first aspect.

[0035] Fifthly, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the training method for the thyroid nodule segmentation model as described in any of the above embodiments, or implements the steps of the thyroid nodule segmentation method as described in any of the above embodiments.

[0036] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the steps of the training method for the thyroid nodule segmentation model as described in any of the above embodiments, or implements the steps of the thyroid nodule segmentation method as described in any of the above embodiments.

[0037] The training method for the thyroid nodule segmentation model provided in this application embodiment involves acquiring target training samples, which include multiple thyroid nodule ultrasound image data; constructing a preset network model, which includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct information encoding paths, the global guidance module is used to reconstruct the jump connections between information encoding paths and information decoding paths based on multi-stage global context information, the pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with preset convolution to generate dimensionality-reduced context information representations to obtain global pyramid pooling features, the hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features, and the decoder is used to output thyroid nodule feature maps; and a hybrid loss function is used to train the preset network model based on the target training samples to obtain the thyroid nodule segmentation model. The hybrid loss function includes a first preset function and a second preset function, where the first preset function describes a region-based loss function and the second preset function describes a distribution-based loss function. In this way, by training the pre-constructed network model, a thyroid nodule segmentation model capable of segmenting thyroid nodules is obtained, which facilitates the effective segmentation of thyroid nodules, thereby improving the segmentation accuracy of thyroid nodules and effectively expanding the application of medical images in clinical diagnosis.

[0038] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of this application are described below. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments will be briefly described below. It should be understood that the drawings described below only relate to some embodiments of this disclosure and are not intended to limit this disclosure, wherein:

[0040] Figure 1 This is a schematic flowchart of a training method for a thyroid nodule segmentation model provided in an embodiment of this disclosure.

[0041] Figure 2A This is a schematic diagram illustrating a data enhancement effect provided in an embodiment of this disclosure.

[0042] Figure 2B This is a schematic diagram of a preset network model provided in an embodiment of this disclosure.

[0043] Figure 2C and Figure 2D This is a schematic diagram of an encoder module provided in an embodiment of this disclosure.

[0044] Figure 2E This is a schematic diagram of the G2 module of a GGM provided in an embodiment of this disclosure.

[0045] Figure 2F This is a schematic diagram of a pyramid pooling module provided in an embodiment of this disclosure.

[0046] Figure 2G This is a schematic diagram of a channel attention module provided in an embodiment of this disclosure.

[0047] Figure 2H This is a schematic diagram of a spatial attention module provided in an embodiment of this disclosure.

[0048] Figure 2I This is a schematic diagram of the output of an HCSM module provided in an embodiment of this disclosure.

[0049] Figure 2J This is a schematic diagram of a decoding module provided in an embodiment of this disclosure.

[0050] Figure 2K This is a schematic diagram of TP, TN, FP, and FN provided in an embodiment of this disclosure.

[0051] Figure 3This is a flowchart illustrating a method for segmenting thyroid nodules provided in an embodiment of this disclosure.

[0052] Figure 4 This is a schematic diagram of the structure of a training device for a thyroid nodule segmentation model provided in an embodiment of this disclosure.

[0053] Figure 5 This is a schematic diagram of a thyroid nodule segmentation device provided in an embodiment of this disclosure.

[0054] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure.

[0055] It should be noted that the elements in the attached diagram are schematic and not drawn to scale. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure 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 this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure without creative effort are also within the scope of protection of this disclosure.

[0057] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this subject matter pertains. It will be further understood that terms such as those defined in commonly used dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the specification and in the relevant art, and shall not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, the statement of “connecting” or “coupling” two or more parts together shall mean that these parts are directly joined together or joined through one or more intermediate components.

[0058] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of the phrase "embodiment" in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0059] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists, A and B exist simultaneously, or B exists. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Terms such as "first" and "second" are only used to distinguish one component (or part of a component) from another component (or another part of a component).

[0060] In the description of this application, unless otherwise stated, "multiple" means two or more (including two), and similarly, "multiple groups" means two or more (including two groups).

[0061] With the deepening development of deep learning in computer vision, convolutional neural networks, as a powerful tool of deep learning, have provided new ideas for thyroid nodule segmentation through their penetration into the medical field. Pan et al. proposed a label-guided deep network segmentation model for thyroid nodules using U-Net as the base network. However, the repeated transmission of low-resolution information from feature maps in skip layers leads to blurred extracted image features. Yang M et al. proposed the DenseASPP (semantic segmentation) model, which concatenates the results obtained from the previous layer using dilated convolution with the results obtained from traditional convolution. The concatenated image is then passed to the next dilated convolution layer. This model overcomes the defect of ordinary dilated convolution failing after the dilation rate increases to a certain extent, and can gradually increase the receptive field of each dilated convolution layer. However, this model has problems such as uneven segmentation edges in ultrasound segmentation. Ying et al. proposed a cascaded framework, using UNet to eliminate irrelevant regions and using a VGG network to segment nodules. However, the precision of edge segmentation is not accurate enough, and it is difficult to recover all details. Furthermore, segmenting thyroid nodules from ultrasound images is extremely challenging due to the inherent characteristics of ultrasound images, such as attenuation, speckles, shadows, low contrast, and easy signal loss.

[0062] Although many scholars have conducted extensive research on deep learning-based thyroid nodule segmentation, existing studies still have several limitations: The limited availability of publicly available thyroid datasets leads to poor model generalization ability. Variations in image size within datasets increase the probability of redundant information being learned during model training. Existing networks for thyroid nodule ultrasound image segmentation are susceptible to the influence of adjacent tissue structures, exhibiting insufficient contextual information extraction capabilities and low edge segmentation accuracy. Training network models using a single loss function results in poor robustness.

[0063] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0064] Figure 1 This is a flowchart illustrating a training method for a thyroid nodule segmentation model provided in this embodiment of the disclosure, as shown below. Figure 1 As shown, the specific process of training the thyroid nodule segmentation model includes:

[0065] S110, Obtain the target training samples.

[0066] The target training samples include: ultrasound image data of multiple thyroid nodules.

[0067] Considering the current scarcity of thyroid dataset resources, insufficient sample size, and inconsistent image sizes in the dataset, this embodiment uses preprocessing to reduce redundant information in the input image, alleviating the segmentation difficulties caused by inherent defects in ultrasound images such as attenuation, speckles, shadows, and low contrast. At the same time, non-ultrasound image regions are cropped, the size of the input image is uniformly adjusted to 224*224, and the pixel values ​​are normalized to the range of [0,1].

[0068] After extensive preliminary data collection, a TN3K thyroid nodule ultrasound dataset containing 3493 images with pixel-level labels was selected. The training and test sets contained 2879 and 614 images, respectively, both consisting of original patient ultrasound images and corresponding manually labeled images. Dynamic data augmentation strategies were used to expand the dataset sample size, addressing the issue of insufficient network training due to the limited medical image dataset. These strategies included random translation, scaling, perspective adjustment, rotation, vertical flipping, and horizontal flipping. The data augmentation effects are shown below. Figure 2A As shown.

[0069] S120. Construct a preset network model.

[0070] The preset network model includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct the information encoding path. The global guidance module is used to reconstruct the jump connections between the information encoding path and the information decoding path based on multi-stage global context information. The pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with preset convolution to generate a dimensionality-reduced context information representation to obtain global pyramid pooling features. The hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features. The decoder is used to output thyroid nodule feature maps.

[0071] Preset network model such as Figure 2BThe HGP-Net network model shown is an FCN (Fully Convolutional Network) based on an encoder-decoder architecture, consisting of five main parts: encoder, global guidance module GGM, pyramid pooling module PPM, hybrid adaptive attention module HCSM, and decoder.

[0072] The encoder uses a pre-trained ResNet-34 instead of the original UNet to construct the information encoding path. The final average pooling layer and fully connected layer of the ResNet-34 are removed, retaining only the first five encoding modules E1, E2, E3, E4, and E5. The pre-trained model reduces reliance on large datasets and accelerates network convergence. Furthermore, ResNet uses residual connections, allowing gradients to propagate directly to shallower layers via skip connections, which helps alleviate gradient vanishing and network degradation problems. This makes it easier for the network to learn identity mappings during training, thus facilitating optimization of deeper networks. The first encoding module E1 consists of a 7x7 convolution, a batch normalization (BN) layer, and a ReLU activation function. The latter four encoding modules E2, E3, E4, and E5 consist of 3, 4, 6, and 3 EncoderBlock modules, respectively. The EncoderBlock is a crucial component of the encoding module; each EncoderBlock uses two consecutive convolutional layers and a skip connection, with a 3x3 kernel size. A schematic diagram of the EncoderBlock and E2 modules is shown below. Figure 2C and Figure 2D As shown.

[0073] The Global Guidance Module (GGM) is integrated into the skip connections between the encoding and decoding paths. The GGM reconstructs skip connections using multi-stage global context information, providing the decoder with a guide flow of global information from higher stages. Each stage's skip connection includes both local context information from that stage and global context information from higher stages. This design helps combine low-level, high-level, and global features, thus better preserving detailed information and addressing issues such as low edge segmentation accuracy. Taking G2 as an example, a 3x3 convolution kernel is first used to ensure that the feature maps F3, F4, and F5 output by the E3, E4, and E5 encoding modules maintain the same number of channels as F2 (C=64). After upsampling using bilinear interpolation to obtain the same size as F2, they are concatenated. Then, depthwise separable dilated convolutions (dilation coefficients of 1, 2, 4, and 8) are used to obtain fusion information from different receptive fields. After concatenation, a 1×1 convolutional layer reduces the number of channels to 64, which is then used as the final result. Figure 2E This is the G2 module.

[0074] The output of the feature map through each global guidance module is determined by formula (1).

[0075]

[0076] In formula (1), k takes the value [2,3,4], the kernel size of conv2 is 1*1, and the kernel size of conv1 is 3*3; concat(a, b, c) means concatenating feature maps a, b, and c; DSC2 i-k () indicates a depthwise separable convolution operation, 2 i-k Indicates the coefficient of thermal expansion; UP2 i-k () indicates an upsampling operation, 2 i-k Indicates the upsampling factor. F i Indicates encoding module E i The output of .

[0077] In some embodiments, the pyramid pooling module is used to downsample based on four different scales of global pooling: 1*1, 2*2, 3*3, and 6*6. It combines 1*1 convolution to generate a dimensionality-reduced contextual information representation. By reducing the number of channels generated by the pooling operation to 1, bilinear interpolation is used to upsample the low-resolution thyroid nodule feature map to the same size as the original input feature map. The upsampled feature map is then concatenated with the original input thyroid nodule feature map to obtain the global pyramid pooling feature. The global pyramid pooling feature is used to extract multi-scale information from the thyroid nodule feature map.

[0078] The Pyramid Pooling (PPM) module uses four different scales of global pooling (1*1, 2*2, 3*3, and 6*6) for downsampling and combines them with 1*1 convolutions to generate dimensionality-reduced contextual information representations. The number of channels generated by the pooling operation is reduced to 1. Then, bilinear interpolation is used to upsample the low-resolution feature map to the same size as the original input feature map, and this upsampled map is concatenated with the original input feature map to form the final global pyramid pooled feature. Through these operations, the network further extracts multi-scale information, which helps in the accurate segmentation of thyroid nodules. The pyramid pooling module is as follows: Figure 2F As shown.

[0079] In some embodiments, the hybrid adaptive attention module includes channel attention and spatial attention, which are connected in parallel to form the hybrid adaptive attention module. Channel attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized channel weights with the original feature map channel by channel, and spatial attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized spatial weights with the original feature map element by element.

[0080] To address the issue of missegmentation in networks when dealing with interference from neighboring structures, a hybrid adaptive attention module (HCSM) is proposed, consisting of parallel channel attention and spatial attention. It focuses on which features effectively represent thyroid nodule information and which features can determine the location of thyroid nodules. This effectively highlights valuable nodule features in the feature map while suppressing irrelevant features.

[0081] Channel attention:

[0082] An adaptive mechanism is employed in both average pooling and max pooling features, assigning weights α and β to average pooling and max pooling respectively. The initial values ​​of α and β are both set to 0.5, ranging from 0 to 1. During training, the values ​​of α and β are continuously updated through backpropagation and the Adam optimization algorithm. Utilizing these two trainable parameters not only generates an adaptive mechanism between average pooling and max pooling features but also enriches the features extracted from the image.

[0083] One-dimensional fast convolutions are used instead of fully connected layers to avoid channel dimensionality reduction and capture cross-channel interactions. The kernel size of the one-dimensional convolution is set to k, determined by equation (2). The parameter k represents the interaction between k channels. A dynamic convolution kernel is used, adaptively adjusting the kernel size k according to the mapping of the input channel dimension C. In this experiment, the values ​​of γ and b are set to 2 and 1, respectively. For layers with a large number of channels, a larger kernel is used to facilitate more cross-channel interactions; for layers with a small number of channels, a smaller kernel is used to facilitate fewer cross-channel interactions.

[0084]

[0085] The process of feature maps undergoing channel attention can be represented by formula (3).

[0086]

[0087] In formula (3), Avgp(F) and Maxp(F) represent average pooling and max pooling of the feature map, respectively, σ represents the sigmoid function, and C1D 1*k This represents a one-dimensional convolution with a kernel size of k, where α and β are adaptively obtained weights, and Fc is the output obtained by channel attention on the feature map. It represents the multiplication operation.

[0088] First, the feature map c*h*w is subjected to max pooling and average pooling to obtain Maxp(F) and Avgp(F) of size c*1*1. Then, one-dimensional fast convolution operations are performed on α*Avgp(F), β*Maxp(F), and 1 / 2Avgp(F)+1 / 2Maxp(F) respectively. The convolution kernel size is adaptive, and the three paths share parameters. The results of the three convolutions are added together to obtain c*1*1. After passing through the sigmoid function, the normalized channel weights of the feature map are obtained. The weight values ​​are between 0 and 1, with the closer to 1 indicating that the channel is more important. Finally, the normalized weights are multiplied by the original input feature map channel by channel to generate the weighted feature map, i.e., [c,h,w]*[c,1,1]==>[c,h,w]. The channel attention module is as follows. Figure 2G As shown.

[0089] Spatial attention:

[0090] Introduction Figure 2H The spatial attention module shown performs average pooling and max pooling along the channel dimension, transforming the feature map c*h*w into 1*h*w. The pooled results are then concatenated to obtain 2*h*w. Channel information is fused using a 7*7 kernel-sized convolution, and spatial information is explored using contextual information from a large receptive field. (To maintain the same shape of the feature maps before and after convolution, padding is used during convolution to transform 2*h*w into 1*h*w. The spatial weights of the feature maps are normalized using the sigmoid function. Finally, the normalized weights are multiplied element-wise with the original input feature map to generate a weighted feature map, i.e., [c,h,w]*[1,h,w]==>[c,h,w].)

[0091] The process of spatial attention on the feature map can be represented by formula (4).

[0092]

[0093] In formula (4), Avgp(F)⊙Maxp(F) represents the concatenation operation of Avgp(F) and Maxp(F), conv 7*7 This indicates a convolution operation with a kernel size of 7*7, and Fs is the output obtained by spatial attention of the feature map.

[0094] The HCSM module is obtained by connecting the spatial attention module and the channel attention module in parallel. Its output and schematic diagram are shown in formula (5) and Figure 2I As shown.

[0095] Out = Fs + Fc (5)

[0096] In some embodiments, the decoder includes: 4 decoding modules, each decoding module including: 2 1*1 convolutions and 1 3*3 transposed convolution; the 1*1 convolutions are used to adjust the number of decoding channels to perform dimensionality increase / decrease on the input thyroid nodule feature map.

[0097] The decoder consists of four decoding modules: D1, D2, D3, and D4. Each module comprises two 1x1 convolutions and one 3x3 transposed convolution. First, the input feature map is processed by a 1x1 convolution, then by a 3x3 transposed convolution to upsample the low-resolution feature map back to a high-resolution image. Finally, a 1x1 convolution is performed to obtain the output feature map. The 1x1 convolution allows for adjustment of the number of channels, enabling dimensionality upscaling / downscaling of the input feature map. Furthermore, the normalization operation and ReLU non-linear activation function following the 1x1 convolution enable the model to better learn and represent features. Taking D3 as an example, the input of D3 is the concatenation of D4 and G4, followed by the output of the attention module. The input channel count is 512 (256+256). After a 1x1 convolution, the output channel count is 128; then, a transposed convolution is performed for upsampling, and finally, a 1x1 convolution is performed to obtain the final feature map. The decoding modules are as follows... Figure 2J As shown.

[0098] S130. Using a hybrid loss function, the preset network model is trained based on the target training samples to obtain a thyroid nodule segmentation model.

[0099] The hybrid loss function includes a first preset function and a second preset function. The first preset function describes the region-based loss function, and the second preset function describes the distribution-based loss function.

[0100] To address the issue of poor robustness when training network models using a single loss function, a hybrid loss function is employed. While Dice Loss, a region-based loss function, can improve performance in scenarios with imbalanced positive and negative samples, it is prone to training instability and gradient saturation in extreme cases. In contrast, BCE Loss, a distribution-based loss function, reweights imbalanced segmentation tasks. By using a hybrid loss function comprised of Dice Loss and BCE Loss to jointly supervise the prediction and segmentation of images, accurate segmentation of thyroid nodules was achieved.

[0101] In some embodiments, the first preset function is represented as:

[0102]

[0103] Where (i,j) is the model-predicted pixel, Pre(i,j) represents the probability that the model-predicted pixel (i,j) is normal, GT(i,j) represents the actual binary label, W is the width of the ultrasound image of the thyroid nodule in the target training sample, and H is the height of the ultrasound image of the thyroid nodule in the target training sample.

[0104] In some embodiments, the second preset function is represented as:

[0105]

[0106] Where (i,j) is the model-predicted pixel, Pre(i,j) represents the probability that the model-predicted pixel (i,j) is normal, GT(i,j) represents the actual binary label, which takes the value of 0 or 1, W is the width of the ultrasound image of the thyroid nodule in the target training sample, and H is the height of the ultrasound image of the thyroid nodule in the target training sample.

[0107] The hybrid loss function is expressed as shown in Equation (8).

[0108] Loss=αL BCE +(1-α)L Dice (8)

[0109] In formula (8), α is a hyperparameter used to balance the weights between the two loss functions. Preferably, α = 0.4.

[0110] In this embodiment, target training samples are acquired, including multiple thyroid nodule ultrasound image data. A preset network model is constructed, comprising an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct information encoding paths, the global guidance module is used to reconstruct jump connections between information encoding and information decoding paths based on multi-stage global context information, the pyramid pooling module is used to downsample based on four different scales of global pooling and combine with preset convolution to generate dimensionality-reduced context information representations to obtain global pyramid pooling features, the hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features, and the decoder is used to output thyroid nodule feature maps. A hybrid loss function is used to train the preset network model based on the target training samples to obtain a thyroid nodule segmentation model. The hybrid loss function includes a first preset function and a second preset function, the first preset function describing a region-based loss function and the second preset function describing a distribution-based loss function. In this way, by training the pre-constructed network model, a thyroid nodule segmentation model capable of segmenting thyroid nodules is obtained, which facilitates the effective segmentation of thyroid nodules, thereby improving the segmentation accuracy of thyroid nodules and effectively expanding the application of medical images in clinical diagnosis.

[0111] This embodiment carefully selects a large thyroid ultrasound dataset with manual annotations, and performs preprocessing and data augmentation operations on the original images. An HGP-Net network model is proposed, an FCN based on an encoder-decoder architecture, consisting of five main parts: an encoder, a global guidance module (GGM), a pyramid pooling module (PPM), a hybrid adaptive attention module (HCSM), and a decoder. A pre-trained ResNet-34 is used instead of the original UNet to construct the information encoding path. The global guidance module (GGM) is introduced during skip connections, and the pyramid pooling module (PPM) is embedded at the top of the backbone. A hybrid adaptive attention module (HCSM) is proposed, which is alternately invoked with the decoding module in the information decoding path. A hybrid loss function consisting of Dice Loss and BCE Loss is proposed to jointly supervise the prediction and segmentation of the image.

[0112] Preprocessing and data augmentation operations expand the original dataset, reducing the probability of learning redundant information during model training and improving the model's generalization ability and stability. Segmentation accuracy is improved; the HGP-Net algorithm achieves excellent results across various metrics, with Dice coefficient, accuracy (acc), precision, intersection-over-union (IOU), and Hausdorff distance (hd) reaching 83.87%, 97.36%, 87.33%, 75.22%, and 12.54 respectively, outperforming many current network models used for thyroid nodule segmentation. This algorithm can accurately segment thyroid nodules, effectively improving edge segmentation accuracy and handling the problem of segmentation easily affected by neighboring tissues. It is suitable for clinical thyroid nodule segmentation and can effectively reduce the workload of physicians. The proposed hybrid loss function compensates for the shortcomings of a single loss function, making it more robust to noise and outlier data. The proposed HGP-Net algorithm is optimized, considering model performance from multiple perspectives and providing a more balanced advantage in different aspects.

[0113] Figure 3 This is a flowchart illustrating a method for segmenting thyroid nodules according to an embodiment of this disclosure, as shown below. Figure 3 As shown, the specific process of thyroid nodule segmentation includes:

[0114] S310. Obtain ultrasound images of thyroid nodules.

[0115] The ultrasound images of thyroid nodules may include: one or at least two ultrasound image data of thyroid nodules.

[0116] S320. Input the ultrasound image of the thyroid nodule into the thyroid nodule segmentation model, and determine the segmentation result of the ultrasound image of the thyroid nodule based on the output of the thyroid nodule segmentation model.

[0117] The thyroid nodule segmentation model is the thyroid nodule segmentation model trained and generated in the above embodiments.

[0118] This embodiment provides the following examples and illustrations.

[0119] Example 1: Experimental example of thyroid nodule segmentation based on HGP-Net

[0120] To visually demonstrate the advantages of this algorithm, the thyroid nodule regions segmented by the HGP-Net model are compared with those manually labeled. The following five metrics are used to evaluate the segmentation accuracy of the proposed model: Dice coefficient represents the similarity between the manually labeled and network segmentation results; Precision represents the segmentation accuracy; Acc represents the accuracy of the algorithm segmentation; IOU represents the ratio of the intersection to the union of the algorithm's prediction results and the manually labeled images; and HausdroffDistance refers to the maximum distance from one set to the nearest point in another set, used to measure the accuracy of boundary segmentation. The specific formulas are shown in formulas (9)-(15).

[0121]

[0122]

[0123]

[0124]

[0125] HausdroffDistance(hd)=H(A,B)=max(h(A,B),h(B,A)) (13)

[0126] in:

[0127] H(A,B)=max(a∈A)min(b∈B)||ab|| (14)

[0128] H(B,A)=max(b∈B)min(a∈A)||ba|| (15)

[0129] ||·|| represents the Euclidean distance between set A and set B. h(A,B) is the one-way Hausdorff distance from set A to set B, defined as follows: For sets A and B, there exists a shortest path distance d from a point p in set A to set B. If we traverse all points p1, p2, ..., pN in set A, and there exists a series of shortest distances from these points to B: d1, d2, ..., dN, then h(A,B) = max(d1, d2, ..., dn).

[0130] Set A refers to the segmentation results of the model, A = TP + FN, and set B is the manually labeled set, B = TP + FP. |A∩B| is the sum of the dot product of the predicted image pixels and the manually labeled pixels, where |A| and |B| are the sums of the pixels in their respective images.

[0131] The meanings of TP, TN, FP, and FN are as follows: Figure 2K As shown in Appendix 1.

[0132] Table 1. Meaning of TP, TN, FP, and FN

[0133] TN Background overlap between manual labeling and segmentation algorithms FP The overlapping portion of the background in the manual labeling and the thyroid nodules in the segmentation algorithm FN Overlap between manually labeled thyroid nodules and background in segmentation algorithms

[0134] Loss function. A hybrid loss function of Dice Loss and BCE Loss is used to jointly supervise image segmentation.

[0135] Dataset selection and experimental setup. This experiment used the TN3K thyroid nodule ultrasound dataset, which contains 3493 ultrasound images with pixel-level labels. The TN3K dataset was collected from Zhujiang Hospital of Southern Medical University and received appropriate approval from the institution's ethics committee.

[0136] To achieve more accurate segmentation of nodule regions, the thyroid ultrasound image dataset was preprocessed before segmentation. To address the challenge of limited dataset size, enhance the model's robustness and generalization ability, and reduce the risk of overfitting compared to other methods, a dynamic data augmentation strategy was employed. This strategy involves using different augmentation strategies at different epochs during training to further explore the potential of data augmentation. A series of augmentation operations were performed on the input images, including random translation, scaling, perspective adjustment, rotation, vertical flipping, and horizontal flipping.

[0137] Python was used as the primary programming language, and PyTorch was used as the deep learning framework. The model employed the Adam optimizer; the maximum epoch value was set to 1000, and the initial learning rate (lr) was set to 2*10^6. -4 `no_optim` is used to adjust the learning rate. Its initial value is 0. If the current loss function value is greater than or equal to the optimal loss function value (initially 100), `no_optim` is incremented by 1; otherwise, the optimal loss function value is updated and `no_optim` is reset to zero. The learning rate is dynamically updated with a threshold of 20. When `no_optim` is greater than 20, the updated learning rate is half of the old learning rate; when the learning rate is less than 4 * 10... -7If the error is not cleared, training is stopped. The loss function uses a combination of BCE loss and Dice loss, with the weight α set to 0.4. The number of samples passed to the network for training in a single iteration is 8. When epoch = 900, the model achieves a good fit, with a loss of only 0.0211.

[0138] Evaluation metrics. Through experiments, this algorithm achieved excellent results in all metrics, with Dice coefficient, accuracy (acc), precision (precision), intersection-union ratio (IOU), and Hausdorff distance (hd) reaching 83.87%, 97.36%, 87.33%, 75.22%, and 12.54, respectively.

[0139] Example 2: Performance analysis of each module proposed in this algorithm.

[0140] To accurately evaluate the performance of each module in the proposed model, a ResNet-34 pre-trained model and a UNet Decoder were selected as baseline models, and compared with different modules in different network structures. Five modified algorithms were used: baseline, baseline+GGM, baseline+PPM, baseline+HCSM, and HGP-Net. These five models were trained using the same training mechanism. The same test set was used to test the five algorithms, and the metrics from Example 1 were applied for analysis and comparison. The impact of the PPM, GGM, and HCSM modules on thyroid nodule segmentation metrics is shown in Table 2.

[0141] Table 2. Effects of PPM, GGM, and HCSM on Thyroid and Nodule Segmentation Indicators

[0142]

[0143]

[0144] Metric Analysis. Compared to the baseline, adding PPM improved accuracy, IOU, Dice, and precision by 0.15%, 2.39%, 2.19%, and 0.15%, respectively. Adding GGM improved accuracy, IOU, Dice, and precision by 0.67%, 5.19%, 4.64%, and 1.06%, respectively. Adding HCSM improved accuracy, IOU, Dice, and precision by 0.54%, 4.15%, 3.84%, and 0.38%, respectively. Adding GGM, PPM, and HCSM simultaneously improved accuracy, IOU, Dice, and precision by 0.73%, 5.70%, 4.92%, and 1.52%, respectively. It is evident that, compared to the baseline, the addition of each module improves model performance to varying degrees. The addition of GGM, PPM, and HCSM modules significantly improved the model's segmentation performance.

[0145] Example 3: Determining the weights of the hybrid loss function in this algorithm.

[0146] The mixed loss function is known to be Loss = αLBCE + (1-α)LDice. The weights α are set to 0.0, 0.2, 0.4, 0.6, 0.8, and 1.0. These six algorithms are trained using the same training mechanism. The models are tested using the same test set, and the metrics from Example 1 are applied for analysis and comparison. The metric results for each algorithm are shown in Appendix Table 3.

[0147] Table 3 Comparison of segmentation performance indicators with different weights

[0148]

[0149] Metric Analysis. Compared to an α setting of 0.0, this algorithm improved accuracy, IOU, Dice, and precision by 0.58%, 2.99%, 2.59%, and 1.49%, respectively. Compared to an α setting of 0.2, this algorithm improved accuracy, IOU, Dice, and precision by 0.40%, 1.67%, 1.40%, and 1.26%, respectively. Compared to an α setting of 0.6, this algorithm improved accuracy, IOU, Dice, and precision by 0.19%, 1.66%, 1.43%, and 0.50%, respectively. Compared to an α setting of 0.8, this algorithm improved accuracy, IOU, Dice, and precision by 0.69%, 1.32%, 1.18%, and 1.03%, respectively. Compared to setting α to 1.0, this algorithm improves accuracy, IOU, Dice, and precision metrics by 0.23%, 2.05%, 1.51%, and 1.7%, respectively. Based on the experimental results, when the hyperparameter α is set to 0.4, the model can achieve relatively accurate segmentation of thyroid nodules.

[0150] Figure 4 This is a schematic diagram of the structure of a training device for a thyroid nodule segmentation model provided in this embodiment. The training device for the thyroid nodule segmentation model may include: a first acquisition module 410, a construction module 420, and a training module 430.

[0151] The first acquisition module 410 is used to acquire target training samples, which include: multiple thyroid nodule ultrasound image data.

[0152] Module 420 is used to construct a preset network model, which includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct the information encoding path. The global guidance module is used to reconstruct the jump connections between the information encoding path and the information decoding path based on multi-stage global context information. The pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with preset convolution to generate a dimensionality-reduced context information representation to obtain global pyramid pooling features. The hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features. The decoder is used to output thyroid nodule feature maps.

[0153] Training module 430 is used to train a preset network model based on target training samples using a hybrid loss function to obtain a thyroid nodule segmentation model.

[0154] The hybrid loss function includes a first preset function and a second preset function. The first preset function describes the region-based loss function, and the second preset function describes the distribution-based loss function.

[0155] In this embodiment, optionally, the pyramid pooling module is used to downsample based on four different scales of global pooling: 1*1, 2*2, 3*3, and 6*6. It combines 1*1 convolution to generate a dimensionality-reduced contextual information representation. By reducing the number of channels generated by the pooling operation to 1, bilinear interpolation is used to upsample the low-resolution thyroid nodule feature map to the same size as the original input feature map. The upsampled feature map is then concatenated with the original input thyroid nodule feature map to obtain the global pyramid pooling feature. The global pyramid pooling feature is used to extract multi-scale information from the thyroid nodule feature map.

[0156] In this embodiment, optionally, the hybrid adaptive attention module includes: channel attention and spatial attention, which are connected in parallel to form the hybrid adaptive attention module; channel attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized channel weights with the original feature map channel by channel, and spatial attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized spatial weights with the original feature map element by element.

[0157] In this embodiment, optionally, the decoder includes: 4 decoding modules, each decoding module including: 2 1*1 convolutions and 1 3*3 transposed convolution; the 1*1 convolution is used to adjust the number of decoding channels in order to upgrade / reduce the dimension of the input thyroid nodule feature map.

[0158] In this embodiment, optionally, the first preset function is represented as:

[0159]

[0160] Where (i,j) is the model-predicted pixel, Pre(i,j) represents the probability that the model-predicted pixel (i,j) is normal, GT(i,j) represents the actual binary label, W is the width of the ultrasound image of the thyroid nodule in the target training sample, and H is the height of the ultrasound image of the thyroid nodule in the target training sample.

[0161] In this embodiment, optionally, the second preset function is represented as:

[0162]

[0163] Where (i,j) is the model-predicted pixel, Pre(i,j) represents the probability that the model-predicted pixel (i,j) is normal, GT(i,j) represents the actual binary label, W is the width of the ultrasound image of the thyroid nodule in the target training sample, and H is the height of the ultrasound image of the thyroid nodule in the target training sample.

[0164] The training device for the thyroid nodule segmentation model provided in this disclosure can execute the above-described method embodiments. For its specific implementation principle and technical effects, please refer to the above-described method embodiments. This disclosure will not repeat them here.

[0165] Figure 5 This is a schematic diagram of a thyroid nodule segmentation device provided in this embodiment, wherein the thyroid nodule segmentation device may include: a second acquisition module 510 and an input module 520.

[0166] The second acquisition module 510 is used to acquire ultrasound images of thyroid nodules.

[0167] The input module 520 is used to input the ultrasound image of the thyroid nodule into the thyroid nodule segmentation model, and to determine the segmentation result of the ultrasound image of the thyroid nodule based on the output result of the thyroid nodule segmentation model.

[0168] The thyroid nodule segmentation model is the thyroid nodule segmentation model trained and generated in the above embodiments.

[0169] The thyroid nodule segmentation device provided in this disclosure can perform the above-described method embodiments. Its specific implementation principle and technical effects can be found in the above-described method embodiments, and will not be repeated here.

[0170] This application also provides a computer device. Please refer to the following for details. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.

[0171] The computer device includes a memory 610 and a processor 620 that are communicatively connected to each other via a system bus. It should be noted that only a computer device with memory 610 and processor 620 is shown in the figure; however, it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0172] Computer devices can include desktop computers, laptops, handheld computers, and cloud servers. These devices allow for human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.

[0173] The memory 610 includes at least one type of readable storage medium, including non-volatile memory or volatile memory, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. RAM may include static RAM or dynamic RAM. In some embodiments, the memory 610 may be an internal storage unit of a computer device, such as the hard disk or RAM of the computer device. In other embodiments, the memory 610 may also be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or FlashCard. Of course, the memory 610 may include both internal and external storage units of the computer device. In this embodiment, the memory 610 is typically used to store the operating system and various application software installed on the computer device, such as the program code of the methods described above. Furthermore, the memory 610 may also be used to temporarily store various types of data that have been output or will be output.

[0174] The processor 620 is typically used to perform the overall operation of a computer device. In this embodiment, the memory 610 is used to store program code or instructions, including computer operation instructions. The processor 620 is used to execute the program code or instructions stored in the memory 610 or to process data, such as program code that runs the methods described above.

[0175] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus system can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0176] Another embodiment of this application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads computer-readable program code stored in the computer-readable medium, enabling the processor to execute the functional actions specified in each step or combination of steps in the above method; and to generate means for implementing the functional actions specified in each block or combination of blocks in the block diagram.

[0177] Computer-readable media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any suitable combination thereof, wherein the memory is used to store program code or instructions, the program code including computer operation instructions, and the processor is used to execute the program code or instructions of the above-described methods stored in the memory.

[0178] The definitions of memory and processor can be found in the description of the foregoing computer device embodiments, and will not be repeated here.

[0179] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0180] In the various embodiments of this application, the functional units or modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0181] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0182] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A training method for a thyroid nodule segmentation model, characterized in that, include: Obtain target training samples, which include: ultrasound image data of multiple thyroid nodules; A preset network model is constructed, which includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct the information encoding path. The global guidance module is used to reconstruct the jump connections between the information encoding path and the information decoding path based on multi-stage global context information. The pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with preset convolution to generate a dimensionality-reduced context information representation to obtain global pyramid pooling features. The hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features. The decoder is used to output thyroid nodule feature maps. The thyroid nodule segmentation model is obtained by training the preset network model based on the target training samples using a hybrid loss function. The hybrid loss function includes: a first preset function and a second preset function, wherein the first preset function is used to describe a region-based loss function and the second preset function is used to describe a distribution-based loss function; The hybrid adaptive attention module includes channel attention and spatial attention, which are connected in parallel to form the hybrid adaptive attention module. The channel attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized channel weights with the original feature map channel by channel, and the spatial attention is used to determine the thyroid nodule feature map obtained by multiplying the normalized spatial weights with the original feature map element by element.

2. The training method for the thyroid nodule segmentation model according to claim 1, characterized in that, The pyramid pooling module is used to downsample based on four different scales of global pooling: 1*1, 2*2, 3*3, and 6*6. It combines 1*1 convolution to generate a dimensionality-reduced contextual information representation. By reducing the number of channels generated by the pooling operation to 1, bilinear interpolation is used to upsample the low-resolution thyroid nodule feature map to the same size as the original input feature map. The upsampled feature map is then concatenated with the original input thyroid nodule feature map to obtain the global pyramid pooling feature. The global pyramid pooling feature is used to extract multi-scale information from the thyroid nodule feature map.

3. The training method for the thyroid nodule segmentation model according to claim 1, characterized in that, The decoder includes: 4 decoding modules, each of which includes: 2 1*1 convolutions and 1 3*3 transposed convolution; 1*1 convolutions are used to adjust the number of decoding channels to increase / decrease the dimensionality of the input thyroid nodule feature map.

4. The training method for the thyroid nodule segmentation model according to claim 1, characterized in that, The first preset function is expressed as: in, To predict pixels for the model, Indicates the model predicts pixels This is a normal probability. This represents the actual binary tag. W The width of the ultrasound image of the thyroid nodule in the target training sample. H The height of the ultrasound image of the thyroid nodule in the target training sample.

5. The training method for the thyroid nodule segmentation model according to claim 1, characterized in that, The second preset function is expressed as: in, To predict pixels for the model, Indicates the model predicts pixels This is a normal probability. This represents the actual binary tag. W The width of the ultrasound image of the thyroid nodule in the target training sample. H The height of the ultrasound image of the thyroid nodule in the target training sample.

6. A method for segmenting thyroid nodules, characterized in that, include: Obtain ultrasound images of thyroid nodules; The ultrasound image of the thyroid nodule is input into the thyroid nodule segmentation model, and the segmentation result of the ultrasound image of the thyroid nodule is determined based on the output result of the thyroid nodule segmentation model. The thyroid nodule segmentation model is the thyroid nodule segmentation model trained by the training method of the thyroid nodule segmentation model according to any one of claims 1 to 5.

7. A training device for a thyroid nodule segmentation model, characterized in that, A training method for executing the thyroid nodule segmentation model according to any one of claims 1 to 5, comprising: The first acquisition module is used to acquire target training samples, which include: multiple thyroid nodule ultrasound image data; The construction module is used to construct a preset network model, which includes an encoder, a global guidance module, a pyramid pooling module, a hybrid adaptive attention module, and a decoder. The encoder is used to construct the information encoding path. The global guidance module is used to reconstruct the jump connections between the information encoding path and the information decoding path based on multi-stage global context information. The pyramid pooling module is used to downsample based on four different scales of global pooling and combine it with preset convolution to generate a dimensionality-reduced context information representation to obtain global pyramid pooling features. The hybrid adaptive attention module is used to identify thyroid nodule feature maps with key nodule features. The decoder is used to output thyroid nodule feature maps. The training module is used to train the preset network model based on the target training samples using a hybrid loss function to obtain the thyroid nodule segmentation model; The hybrid loss function includes a first preset function and a second preset function, wherein the first preset function describes a region-based loss function and the second preset function describes a distribution-based loss function.

8. A thyroid nodule segmentation device, characterized in that, include: The second acquisition module is used to acquire ultrasound images of thyroid nodules; The input module is used to input the ultrasound image of the thyroid nodule into the thyroid nodule segmentation model, and determine the segmentation result of the ultrasound image of the thyroid nodule based on the output result of the thyroid nodule segmentation model. The thyroid nodule segmentation model is the thyroid nodule segmentation model trained by the training method of the thyroid nodule segmentation model according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Semantic segmentation method based on feature pyramid attention and mixed attention cascading

    CN112651973A

  • Thyroid ultrasound image region-of-interest positioning method based on CSAI-Grid RCNN

    CN116309806A