Automatic scoring method and system for benign and malignant nodules based on thyroid ultrasound images

By combining the encoder-decoder architecture and dynamic attention mechanism with the Swin Transformer model, the problems of insufficient feature extraction and automated grading in the assessment of benign and malignant thyroid nodules are solved, achieving high-precision nodule detection and risk scoring, which is suitable for medical environments with limited resources.

CN120070438BActive Publication Date: 2025-09-19HUAQIAO UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510541657.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-09-19
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

Existing technologies for assessing benign and malignant thyroid nodules have problems with insufficient extraction of nodule features in ultrasound images, susceptibility to artifacts and noise, lack of automated risk grading methods, reliance on physician experience, and highly subjective diagnostic results. Furthermore, deep learning models are highly complex, with poor real-time and applicability, making it difficult to meet the needs of medical scenarios with limited resources.

Method used

This deep learning model, employing an encoder-decoder architecture, combined with a dynamic attention mechanism and the Swin Transformer model, achieves accurate detection and automatic grading of thyroid nodules through both a nodule recognition network and a nodule classification network. The encoder extracts basic features and enhances them using a dynamic attention mechanism, while the decoder performs progressive dimensionality reduction. The nodule classification network uses the Swin Transformer to perform grading and calculate a benign or malignancy risk score.

Benefits of technology

It improves the accuracy of thyroid nodule detection and automatic grading, reduces the risk of misdiagnosis and missed diagnosis, improves diagnostic efficiency and the clinical usability of the model, and is suitable for medical scenarios with limited resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070438B_ABST
    Figure CN120070438B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for automatically scoring the benign and malignant nature of nodules based on thyroid ultrasound images, which relates to the field of image processing technology. The method includes: constructing a deep learning model including a nodule recognition network and a nodule classification network and training them to obtain an automatic scoring model; the automatic scoring model obtains thyroid nodule recognition results based on thyroid ultrasound images, and calculates benign and malignant risk scores. The nodule recognition network uses an encoder to extract basic features from the input image and uses a dynamic attention mechanism for feature enhancement; a decoder is used to gradually reduce the dimension of the enhanced features output by the encoder and output the thyroid nodule recognition results; the nodule classification network uses a Swin Transformer model to calculate the benign and malignant risk scores based on the thyroid nodule recognition results. The present invention has high accuracy and real-time performance in the detection and classification of thyroid nodules, and can assist doctors in improving diagnostic efficiency and reducing the risk of misdiagnosis and missed diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for automatically scoring benign and malignant nodules based on thyroid ultrasound images. Background Art

[0002] The present invention relates to the fields of medical image processing and artificial intelligence technology, and specifically to a method for automatically scoring the benign and malignant nature of thyroid nodules based on ultrasound images. The method aims to provide an intelligent auxiliary diagnostic tool for the detection and classification of thyroid nodules through a deep learning model.

[0003] Thyroid nodules are a common clinical problem, and accurate assessment of their benign or malignant nature is crucial for the early diagnosis and treatment of thyroid cancer. Currently, ultrasound imaging is widely used for the detection and classification of thyroid nodules. However, due to artifacts, noise, and the complex nature of nodules in ultrasound images, physicians face a degree of subjectivity and risk of misdiagnosis. Accurately determining the benign or malignant nature of nodules is particularly challenging for inexperienced physicians or resource-limited medical institutions.

[0004] To standardize the diagnostic criteria for thyroid nodules, the Chinese Thyroid Ultrasound Reporting and Data System (C-TIRADS) proposed a multi-feature risk grading system for quantifying nodule risk. However, in actual clinical practice, doctors must manually analyze a large number of nodule features, which is not only time-consuming and labor-intensive, but can also lead to inconsistent diagnostic results due to its complexity. Therefore, how to leverage advanced artificial intelligence technology to achieve automated nodule detection and risk scoring based on ultrasound images has become a hot topic of research.

[0005] A paper (Yang D, Xia J, Li R, et al. Automatic thyroid nodule detection in ultrasound imaging with improved YOLOv5 neural network [J]. IEEE Access, 2024) proposes an improved YOLOv5 neural network to assist physicians in diagnosing thyroid cancer. It includes a coordinate attention (CA) module and a label smoothing regularization (LSR) module. The paper (Jin Z, Zhu Y, Zhang S, et al. Ultrasound computer-aided diagnosis (CAD) based on the thyroid imaging reporting and data system (TI-RADS) to distinguish benign from malignant thyroid nodules and the diagnostic performance of radiologists with different diagnostic experience[J]. Medical Science Monitor: International Medical Journal of Experimental and Clinical Research, 2020, 26: e918452-1.) proposed a computer-aided diagnosis (CAD) system based on the thyroid imaging reporting and data system (TI-RADS). CAD was developed using an improved TI-RADS based on convolutional neural network (CNN). The paper (Yang Q, Geng C, Chen R, et al. DMU-Net: Dual-route mirroring U-Net with mutual learning for malignant thyroid nodule segmentation[J]. Biomedical Signal Processing and Control, 2022, 77: 103805.) proposed a deep learning-based CAD (computer-aided diagnosis) method called dual-route mirroring U-Net (DMU-Net) to automatically segment malignant thyroid nodules.

[0006] With the development of technology, computer-aided diagnosis technology for thyroid nodules has gradually matured. The current research on the assessment of benign and malignant thyroid nodules mainly has the following problems: insufficient extraction of key features of nodules in ultrasound images (such as boundaries, echo distribution, calcification characteristics, etc.), which are easily interfered with by artifacts and background noise; lack of automated risk grading methods combined with the C-TIRADS standard, and diagnostic results are too dependent on the doctor's experience and are subjective; at the same time, existing deep learning models are highly complex, with poor real-time and applicability, making it difficult to meet the needs of medical scenarios with limited resources. To address the above problems, this paper proposes an automatic scoring method for benign and malignant thyroid nodules based on deep learning and the C-TIRADS standard, aiming to improve the accuracy of feature extraction, achieve accurate detection and automatic grading of nodules, and enhance diagnostic efficiency and the clinical usability of the model. Summary of the Invention

[0007] The purpose of the present invention is to solve the problems in the prior art.

[0008] The technical solution adopted by the present invention to solve the technical problem is to provide a method for automatically scoring benign and malignant nodules based on thyroid ultrasound images, comprising the following steps:

[0009] Obtain and annotate a thyroid ultrasound image dataset to construct a training dataset;

[0010] Build a deep learning model that includes a nodule recognition network and a nodule classification network, use the training dataset to train the model, and obtain the trained deep learning model as the automatic scoring model;

[0011] The thyroid ultrasound images were input into the automatic scoring model to obtain the thyroid nodule identification results and calculate the benign and malignant risk scores;

[0012] The nodule recognition network adopts an encoder-decoder architecture. The encoder extracts basic features of the input image and uses a dynamic attention mechanism to enhance the features. The decoder gradually reduces the dimension of the enhanced features output by the encoder and finally outputs the thyroid nodule recognition results. The nodule classification network uses the Swin Transformer model to classify the thyroid nodule recognition results and calculate the benign and malignant risk score.

[0013] Preferably, the encoder extracts basic features from the input image, which is expressed as:

[0014] ;

[0015] in, Represents the basic features, represents the input image, Represents the feature extraction operation of ShuffleNetV2.

[0016] Preferably, the feature enhancement using the dynamic attention mechanism comprises the following steps:

[0017] Channel attention is used to enhance the attention on important feature channels in basic features to obtain channel enhanced features;

[0018] Spatial attention is used to enhance the key areas in the channel features to obtain enhanced features.

[0019] Preferably, the method of using channel attention to enhance attention to important feature channels in basic features to obtain channel enhanced features comprises the following steps:

[0020] The importance of each channel is extracted by global average pooling, which is expressed as:

[0021] ;

[0022] in, represents the global description of channel-level features, and Represents basic features respectively The height and width, Represents basic features The median coordinate is Pixels of

[0023] The channel attention weight is calculated through the fully connected layer and expressed as:

[0024] ;

[0025] in, Indicates that the first fully connected layer performs a linear transformation on the global pooling features; represents the activation function; Further refine the attention information for the second fully connected layer; σ represents the Sigmoid activation function; W represents the channel attention weight matrix;

[0026] The channel enhancement feature is calculated by channel weighting, which is expressed as:

[0027] ;

[0028] in, Represents channel enhancement features.

[0029] Preferably, the method of enhancing the key areas of the features by using spatial attention enhancement channels to obtain enhanced features comprises the following steps:

[0030] Use maximum pooling and average pooling to obtain the global information of the feature map, expressed as:

[0031] ;

[0032] in, is the maximum pooling result, represents maximum pooling, is the average pooling result, represents average pooling;

[0033] The spatial attention weight is calculated using convolution, which is expressed as:

[0034] ;

[0035] Among them, A represents the spatial attention weight, express Convolution operation; σ represents the Sigmoid activation function;

[0036] The enhanced features are calculated by spatial weighting, which is expressed as:

[0037] ;

[0038] in, Indicates an enhanced feature.

[0039] Preferably, the decoder performs step-by-step dimensionality reduction on the enhanced features output by the encoder and finally outputs a thyroid nodule recognition result, comprising the following steps:

[0040] The feature dimension is gradually reduced through two layers of 3×3 convolution, which can be expressed as:

[0041] ;

[0042] ;

[0043] in, is the feature map output by the first layer 3×3 convolution, Represents the feature map of the second layer 3×3 convolution output; express Convolution operation; represents the activation function;

[0044] Global average pooling is used to convert spatial features into vectors, which can be expressed as:

[0045] ;

[0046] in, Representation feature map The median coordinate is Pixels of

[0047] The final classification is performed through the fully connected layer, expressed as:

[0048] ;

[0049] Among them, Y represents the output category probability, b represents the bias term, and W represents the channel attention weight matrix.

[0050] Preferably, the nodule classification network uses a Swin Transformer model to grade thyroid nodule identification results and calculate benign and malignant risk scores, comprising the following steps:

[0051] The nodule region is cropped from the thyroid nodule recognition results output by the nodule recognition network and input into the SwinTransformer model;

[0052] The Swin Transformer model uses a local window attention mechanism to extract features from nodule regions and a sliding window strategy to capture image information at different scales, obtaining key features including morphology, edges, structure, echoes, and hyperechoic foci.

[0053] The C-TIRADS scoring system was used to score the key features and sum them to obtain the final benign and malignant risk score.

[0054] The present invention also provides an automatic scoring system for benign and malignant nodules based on thyroid ultrasound images, comprising:

[0055] The dataset acquisition module acquires and annotates the thyroid ultrasound image dataset to construct a training dataset;

[0056] The model training module builds a deep learning model including a nodule recognition network and a nodule classification network, uses the training dataset to train the model, and obtains the trained deep learning model as the automatic scoring model;

[0057] The risk scoring module inputs thyroid ultrasound images into the automatic scoring model to obtain thyroid nodule identification results and calculate the benign and malignant risk scores;

[0058] The nodule recognition network adopts an encoder-decoder architecture. The encoder extracts basic features of the input image and uses a dynamic attention mechanism to enhance the features. The decoder gradually reduces the dimension of the enhanced features output by the encoder and finally outputs the thyroid nodule recognition results. The nodule classification network uses the Swin Transformer model to classify the thyroid nodule recognition results and calculate the benign and malignant risk score.

[0059] The present invention has the following beneficial effects:

[0060] (1) The present invention uses the encoder and decoder structure in the deep learning model to introduce a dynamic attention mechanism combined with dynamic convolution to achieve accurate positioning and feature extraction of nodule areas in ultrasound images. Specifically, dynamic channel attention is used to calculate the importance weight of each channel, so that the model can adaptively adjust the contribution of channel information. Dynamic spatial attention can adaptively enhance the model's attention to the lesion area and improve classification performance. Dynamic attention combined with dynamic convolution can retain the low-level feature information of the original ultrasound image, while enhancing important features related to the nodule area, thereby improving recognition accuracy.

[0061] (2) The present invention designs a nodule classification network based on the C-TIRADS standard, further refines the nodule features in multiple aspects of the recognition results of the recognition network, and thus performs quantitative grading and generates risk level assessment results.

[0062] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention is not limited to the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is a diagram showing the steps of a method for automatically scoring benign and malignant nodules based on thyroid ultrasound images according to an embodiment of the present invention;

[0064] Figure 2 Schematic diagram of the structure of an automatic scoring model of a method for automatically scoring benign and malignant nodules based on thyroid ultrasound images according to an embodiment of the present invention;

[0065] Figure 3 This figure is a schematic diagram of the structure of a dynamic attention unit for an automatic scoring method for benign and malignant nodules based on thyroid ultrasound images according to an embodiment of the present invention, combining dynamic channel attention and dynamic spatial attention.

[0066] Figure 4 Schematic diagram of input images and output results of the automatic scoring method for benign and malignant nodules based on thyroid ultrasound images according to an embodiment of the present invention;

[0067] Figure 5 4 is a structural diagram of an automatic scoring system for benign and malignant nodules based on thyroid ultrasound images according to an embodiment of the present invention. DETAILED DESCRIPTION

[0068] See also Figure 1 As shown, the automatic scoring method for benign and malignant nodules based on thyroid ultrasound images according to an embodiment of the present invention includes the following steps:

[0069] S101, obtaining and annotating a thyroid ultrasound image dataset to construct a training dataset;

[0070] S102, constructing a deep learning model including a nodule recognition network and a nodule classification network, training the model using a training data set, and obtaining a trained deep learning model as an automatic scoring model;

[0071] S103 inputs the thyroid ultrasound image into the automatic scoring model to obtain thyroid nodule recognition results and calculate the benign and malignant risk score;

[0072] Specifically, the network structure of the automatic scoring model can be found in Figure 2 As shown, the network consists of a nodule recognition network and a nodule classification network. The nodule recognition network uses ShuffleNetV2 as its backbone network. Its encoder incorporates a dynamic attention mechanism to extract high-level features from the input image. These features contain spatial and channel information, representing characteristics such as the texture, morphology, and boundaries of thyroid nodules. ShuffleNetV2 is an efficient and lightweight convolutional neural network that uses grouped convolution and channel shuffle techniques to improve computational efficiency while maintaining strong feature extraction capabilities. The decoder's primary task is to convert the high-level features extracted by the encoder into the final classification result. Because the encoder output features are typically high-dimensional and contain little spatial information, the decoder requires progressive dimensionality reduction and ultimately outputs the thyroid nodule recognition result. The decoder first performs feature fusion through two 3×3 convolutional layers. The first convolutional layer reduces the high-dimensional input features from 512 to 256 dimensions and introduces nonlinearity using the ReLU activation function. The second convolutional layer further reduces the dimensionality to 128 dimensions and again uses the ReLU activation function. Through these two layers of convolution, the decoder reduces computational complexity while maintaining feature expression capabilities.

[0073] Ultrasound images of thyroid nodules are initially identified using a nodule recognition network. The identified nodules are then cropped and fed into the nodule classification network. The Swin Transformer model is used to grade the thyroid nodules and calculate a benign or malignant risk score. The Swin Transformer (Shifted Window Transformer) model is an improved Visual Transformer (ViT) model specifically designed for computer vision tasks such as image classification, object detection, and medical image analysis. Its hierarchical structure and shifted window attention improve computational efficiency, making the Transformer suitable for high-resolution image processing.

[0074] For details, see Figure 3, which is a structural diagram of the dynamic attention mechanism of an embodiment of the present invention, including dynamic channel attention (Dynamic Channel Attention) and dynamic spatial attention (Dynamic SpatialAttention).

[0075] Different channels in a thyroid ultrasound image may contain distinct feature information, such as edges, morphology, and echo distribution. Traditional CNN processing treats the features of each channel equally, failing to highlight key feature channels. This embodiment of the present invention, after extracting features using ShuffleNetV2, also employs dynamic channel attention to calculate the importance weights of each channel, enabling the model to adaptively adjust the contribution of channel information. The calculation process is as follows:

[0076] Global information gathering, Global Average Pooling (GAP) obtains global information of each channel:

[0077] ;

[0078] in , represents the global feature of each channel.

[0079] Calculate channel attention weight: Use a two-layer fully connected (FC) network to calculate dynamic attention weight:

[0080] ;

[0081] in: , is a trainable parameter, σ is the Sigmoid activation function, which ensures that the attention weight is between 0 and 1.

[0082] Weighted channel features: Apply the calculated attention weight w to the original features:

[0083] ;

[0084] Here It represents channel-by-channel multiplication, which means enhancing important channels and suppressing irrelevant channels.

[0085] In ultrasound images of thyroid nodules, different spatial locations contain information of varying importance. For example, the lesion area is more important than the background area. Traditional CNN processing treats all spatial regions equally, which can cause the model to overemphasize irrelevant areas, affecting classification performance. This embodiment of the present invention uses dynamic spatial attention to adaptively enhance the model's focus on lesion areas, improving classification performance. The calculation process is as follows:

[0086] Assume input feature map The dimension is C×H×W, and the channel attention calculation process is as follows:

[0087] Spatial information extraction uses Max Pooling and Average Pooling to extract global information of features:

[0088] ;

[0089] in , represent the maximum pooling features and average pooling features respectively.

[0090] Calculate the spatial attention weight, use 3×3 convolution, and calculate the spatial attention distribution:

[0091] ;

[0092] in: .

[0093] Weighted spatial features, calculate the final enhanced features:

[0094] ;

[0095] Here It represents element-wise multiplication, which enhances the features of key spatial regions and suppresses background information.

[0096] The overall calculation process of dynamic attention is: After calculating the channel importance through channel attention and performing weighted enhancement, we get . Enter Spatial Attention, calculate the spatial attention distribution, and perform weighted enhancement to obtain the final feature :

[0097] ;

[0098] This step can retain the low-level feature information of the original ultrasound image while enhancing the important features related to the nodule area and improving the recognition accuracy.

[0099] Specifically, the nodule classification network performs an in-depth analysis of the cropped nodule region image to extract and determine five key features: nodule morphology, edges, structure, echogenicity, and hyperechoic foci. Morphological features (such as vertical or horizontal) can be directly calculated based on the geometry of the detection box from the previous stage, eliminating the need for additional data collection or calculation. The Swin Transformer employs a local window attention mechanism for feature extraction and a sliding window strategy to capture image information at different scales.

[0100] The model uses the C-TIRADS scoring system to classify nodules based on five major features and predict the corresponding C-TIRADS grade. The corresponding scoring criteria for these features are shown in Table 1.

[0101] Table 1 - Feature Scoring Criteria:

[0102]

[0103] The morphological features are calculated from the detection frame in the previous stage and are divided into vertical (1 point) and horizontal (0 point); the edge features are divided into four categories: smooth, irregular, fuzzy, and extrathyroidal extension. Except for smooth, the other three categories are all scored 1 point. After discussion with professional clinicians, we simplified the edge features into two categories: smooth and non-smooth. Smooth edge features are scored 0 points, non-smooth is scored 1 point; structural features, solid or solid mainly are scored 1 point, cystic or cystic mainly are scored 0 points, and a new mixed cystic-solid category is scored 0 points; echo features, extremely low echoes are scored 1 point, high echoes or equal echoes are scored 0 points; strong echo focus features, comet tails are benign signs, scored -1 point, and point-like strong echoes are malignant signs, scored 1 point; the five categories of feature scores for each nodule are summed to calculate the final risk score. The C-TIRADS level and malignancy rate corresponding to the risk score are shown in Table 2:

[0104] Table 2 - Scoring corresponding to risk:

[0105]

[0106] Specifically, a verification experiment was conducted on the embodiment of the present invention. The experimental platform and environment included: hardware configuration, operating system: Windows 10, CPU: Intel(R) Core(TM) i7-11700, memory: 16 GB, GPU: NVIDIA GeForce GTX 3060, equipped with 12 GB video memory; software environment: programming language: Python 3.7, deep learning framework: PyTorch 1.10.1. The automatic scoring model ultimately outputs an evaluation report, which includes the nodule's detection location, morphological description, risk level, and recommended clinical treatment plan. The experimental results are shown in [1]. Figure 4 As shown in the output image, the nodule is identified and labeled with relevant features: the shape of the nodule in the figure is identified as wider than tall, the composition is solid, the echo characteristics are anechogenic, there are no echogenic foci, the edge is extra-thyroidal extension, the total score is 0, and according to the C-TIRADS guidelines, the nodule is classified as benign (Score: 0 - Benign).

[0107] Based on multiple validation experiments, the nodule recognition network of the present invention achieved a precision of 0.887, a recall of 0.874, and a mean average precision (mAP@.5) of 0.915 on the validation set. The model achieved a peak F1 score of 0.89 when the confidence threshold was set to 0.289. The nodule classification network, using the Swin Transformer model, achieved accuracy rates of 0.985, 0.845, 0.826, and 0.867 for structure, echo, edge, and hyperechoic foci, respectively, for an average accuracy of 0.883.

[0108] See also Figure 5 FIG. 1 is a system structure diagram of an embodiment of the present invention, including:

[0109] The data set acquisition module 501 acquires and annotates a thyroid ultrasound image data set to construct a training data set;

[0110] Model training module 502, constructing a deep learning model including a nodule recognition network and a nodule classification network, using a training data set to perform model training, and obtaining a trained deep learning model as an automatic scoring model;

[0111] The risk scoring module 503 inputs the thyroid ultrasound image into the automatic scoring model to obtain the thyroid nodule recognition result and calculate the benign or malignant risk score.

[0112] The workflow of each module of this system is the same as the automatic scoring method for benign and malignant nodules based on thyroid ultrasound images, which will not be repeated here.

[0113] It can be seen that the present invention has high accuracy and real-time performance in the detection and classification of thyroid nodules, which can assist doctors in improving diagnostic efficiency, reducing the risk of misdiagnosis and missed diagnosis, and providing effective support for the early detection and treatment of thyroid diseases.

[0114] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for automatically scoring benign and malignant nodules based on thyroid ultrasound images, characterized in that: The following steps are involved: Obtain and annotate a thyroid ultrasound image dataset to construct a training dataset; Build a deep learning model that includes a nodule recognition network and a nodule classification network, use the training dataset to train the model, and obtain the trained deep learning model as the automatic scoring model; The thyroid ultrasound images were input into the automatic scoring model to obtain the thyroid nodule identification results and calculate the benign and malignant risk scores; The nodule recognition network adopts an encoder-decoder architecture, where the encoder extracts basic features from the input image and uses a dynamic attention mechanism to enhance features. The decoder gradually reduces the dimension of the enhanced features output by the encoder and finally outputs the thyroid nodule recognition result; the nodule classification network uses the Swin Transformer model to classify the thyroid nodule recognition results and calculate the benign and malignant risk score; The feature enhancement using the dynamic attention mechanism includes the following steps: Channel attention is used to enhance the attention on important feature channels in basic features to obtain channel enhanced features; The key areas in the feature enhancement channel are enhanced using spatial attention to obtain enhanced features; The method of using channel attention to enhance attention to important feature channels in basic features to obtain channel enhanced features includes the following steps: The importance of each channel is extracted by global average pooling, which is expressed as: Among them, F gap Represents the global description of channel-level features, H , and W , Represent the basic features F base The height and width, F base (i, j) represents the basic feature F base The pixel point with coordinates (i, j); The channel attention weight is calculated through the fully connected layer and expressed as: W=σ(W2·ReLU(W1·F gap )); Among them, W1·F gap ReLU represents the first fully connected layer that performs a linear transformation on the global pooling features; W2 represents the second fully connected layer that further refines the attention information; σ represents the Sigmoid activation function; W represents the channel attention weight matrix; The channel enhancement feature is calculated by channel weighting, which is expressed as: F att =W·F base ; Among them, F att represents the channel enhancement feature; The decoder gradually reduces the dimension of the enhanced features output by the encoder and finally outputs the thyroid nodule recognition result, including the following steps: The feature dimension is gradually reduced through two layers of 3×3 convolution, which can be expressed as: F dec1 =ReLU(Conv 3×3 (F enc )); F dec2 =ReLU(Conv 3×3 (F dec1 )); Among them, F dec1 is the feature map output by the first layer 3×3 convolution, F dec2 Represents the feature map of the second layer 3×3 convolution output; Conv 3×3 Represents a 3×3 convolution operation; ReLU represents the activation function; F enc Indicates enhanced features; Global average pooling is used to convert spatial features into vectors, which can be expressed as: Among them, F dec2 (p, q) represents the feature map F dec2 The pixel point with coordinates (p, q); The final classification is performed through the fully connected layer, expressed as: Y=Softmax(W·F global +b) Among them, Y represents the output category probability, b represents the bias term, and W represents the channel attention weight matrix.

2. The automatic scoring method for benign and malignant nodules based on thyroid ultrasound images according to claim 1, characterized in that: The encoder extracts basic features from the input image, which is expressed as: F base =ShuffleNetV2(X); Among them, F base Represents the basic features, X represents the input image, and ShuffleNetV2 represents the feature extraction operation of ShuffleNetV2.

3. The automatic scoring method for benign and malignant nodules based on thyroid ultrasound images according to claim 1, characterized in that: The method of enhancing the key areas of the features by using spatial attention enhancement channels to obtain enhanced features includes the following steps: Use maximum pooling and average pooling to obtain the global information of the feature map, expressed as: F max =MaxPool(F att ),F avg =AvgPool(F att ); Among them, F max is the maximum pooling result, MaxPool represents the maximum pooling, F avg is the average pooling result, AvgPool represents average pooling; The spatial attention weight is calculated using convolution, which is expressed as: A=σ(Conv 3×3 ([F max ,F avg ])); Among them, A represents the spatial attention weight, Conv 3×3 represents a 3×3 convolution operation; σ represents a Sigmoid activation function; The enhanced features are calculated by spatial weighting, which is expressed as: F enc =A·F att ; Among them, F enc Indicates an enhanced feature.

4. The automatic scoring method for benign and malignant nodules based on thyroid ultrasound images according to claim 1, characterized in that: The nodule classification network uses the Swin Transformer model to classify thyroid nodule recognition results and calculate the benign and malignant risk score, including the following steps: The nodule region is cropped from the thyroid nodule recognition results output by the nodule recognition network and input into the SwinTransformer model; The Swin Transformer model uses a local window attention mechanism to extract features from nodule regions and a sliding window strategy to capture image information at different scales, obtaining key features including morphology, edges, structure, echoes, and hyperechoic foci. The C-TIRADS scoring system was used to score the key features and sum them up to obtain the final benign and malignant risk score.

5. An automatic scoring system for benign and malignant nodules based on thyroid ultrasound images, characterized in that: include: The dataset acquisition module acquires and annotates the thyroid ultrasound image dataset to construct a training dataset; The model training module builds a deep learning model including a nodule recognition network and a nodule classification network, uses the training dataset to train the model, and obtains the trained deep learning model as the automatic scoring model; The risk scoring module inputs thyroid ultrasound images into the automatic scoring model to obtain thyroid nodule identification results and calculate the benign and malignant risk scores; The nodule recognition network adopts an encoder-decoder architecture, where the encoder extracts basic features from the input image and uses a dynamic attention mechanism to enhance features. The decoder gradually reduces the dimension of the enhanced features output by the encoder and finally outputs the thyroid nodule recognition result; the nodule classification network uses the Swin Transformer model to classify the thyroid nodule recognition results and calculate the benign and malignant risk score; The feature enhancement using the dynamic attention mechanism includes the following steps: Channel attention is used to enhance the attention on important feature channels in basic features to obtain channel enhanced features; The key areas in the feature enhancement channel are enhanced using spatial attention to obtain enhanced features; The method of using channel attention to enhance attention to important feature channels in basic features to obtain channel enhanced features includes the following steps: The importance of each channel is extracted by global average pooling, which is expressed as: Among them, F gap Represents the global description of channel-level features, H' and W' represent the basic features F base The height and width, F base (i, j) represents the basic feature F base The pixel point with coordinates (i, j); The channel attention weight is calculated through the fully connected layer and expressed as: W=σ(W2·ReLU(W1·F gap )); Among them, W1·F gap ReLU represents the first fully connected layer that performs a linear transformation on the global pooling features; W2 represents the second fully connected layer that further refines the attention information; σ represents the Sigmoid activation function; W represents the channel attention weight matrix; The channel enhancement feature is calculated by channel weighting, which is expressed as: F att =W·F base ; Among them, F att represents the channel enhancement feature; The decoder gradually reduces the dimension of the enhanced features output by the encoder and finally outputs the thyroid nodule recognition result, including the following steps: The feature dimension is gradually reduced through two layers of 3×3 convolution, which can be expressed as: F dec1 =ReLU(Conv 3×3 (F enc )); F dec2 =ReLU(Conv 3×3 (F dec1 )); Among them, F dec1 is the feature map output by the first layer 3×3 convolution, F dec2 Represents the feature map of the second layer 3×3 convolution output; Conv 3×3 Represents a 3×3 convolution operation; ReLU represents the activation function; F enc Indicates enhanced features; Global average pooling is used to convert spatial features into vectors, which can be expressed as: Among them, F dec2 (p, q) represents the feature map F dec2 The pixel point with coordinates (p, q); The final classification is performed through the fully connected layer, expressed as: Y=Softmax(W·F global +b) Among them, Y represents the output category probability, b represents the bias term, and W represents the channel attention weight matrix.

Citation Information

Patent Citations

  • Thyroid nodule ultrasonic image auxiliary diagnosis method fused with medical priori knowledge

    CN117611895A