Double-branch weak supervision ultrasonic thyroid nodule segmentation method and system

Through the dual branch Transformer model and pseudo-label supervision Segformer network, combined with dynamic modulation module and background perception pooling, the problems of medium and low contrast and noise of ultrasonic thyroid nodule segmentation are solved, the accuracy and efficiency of segmentation are improved, and high accuracy is achieved ultrasound thyroid nodules segmentation.

CN119006510APending Publication Date: 2024-11-22CHANGZHOU NO 2 PEOPLES HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410949312.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Ultrasonic thyroid nodule segmentation faces the problem of blurred edges caused by low contrast, spots, shadows and noise, and existing weak supervision technologies are difficult to effectively solve.

Method used

The dual-branch Transformer model modulation network is used to classify the foreground and background of ultrasonic thyroid images, and the segmentation of ultrasonic thyroid nodules is achieved through pseudo-label supervision of the Segformer network, combining dynamic modulation module and background perception pooling to enhance feature extraction and segmentation accuracy.

Benefits of technology

It improves the accuracy and efficiency of ultrasonic thyroid nodule segmentation, reduces the difficulty of segmentation, and achieves the segmentation effect of short process, high accuracy and good results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006510A_ABST
    Figure CN119006510A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical ultrasonic thyroid nodule weak supervision segmentation, in particular to a double-branch weak supervision ultrasonic thyroid nodule segmentation method and system, and the method comprises the following steps: 1, preprocessing ultrasonic thyroid data, and adding the label of a target frame; 2, a dual-branch Transform model modulation network is adopted to carry out foreground and background classification on the ultrasonic thyroid; step 3, utilizing the classification network weight obtained by training in the step 2 to generate a pseudo label; step 4, segmenting the ultrasonic thyroid nodule by using a Segform network supervised by a pseudo tag; and step 5, segmentation of the ultrasonic thyroid nodule object of the web end system is used for medical diagnosis. In conclusion, the method has the characteristics of short process, high precision, good effect and high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of medical ultrasonic thyroid nodule weak-supervision segmentation, in particular to a dual-branch weak-supervision ultrasonic thyroid nodule segmentation method and system. Background Art

[0002] As one of the most common nodular lesions, the incidence of thyroid nodules has been on the rise in recent years, so accurate segmentation and diagnosis are crucial. Ultrasound imaging technology has become a widely used technology in medical diagnosis due to its portability, low cost, and non-invasiveness. At the same time, the recently proposed weakly supervised semantic segmentation work alleviates the subjective bias and time-consuming and laborious problems in the ultrasonic thyroid nodule segmentation process. However, ultrasound images have low contrast, spots, shadows, and a lot of noise, which leads to blurred edges of thyroid nodules, making the weakly supervised ultrasound thyroid nodule segmentation extremely challenging. Therefore, a more advanced weakly supervised ultrasound thyroid nodule segmentation technology is urgently needed. Summary of the invention

[0003] The technical problem to be solved by the present invention is: in order to overcome the deficiencies in the prior art, a dual-branch weakly supervised ultrasonic thyroid nodule segmentation method and system are provided.

[0004] The technical solution adopted by the present invention is: a dual-branch weakly supervised ultrasonic thyroid nodule segmentation method, comprising the following steps:

[0005] Step 1: Preprocess the ultrasound thyroid data and add target box annotations;

[0006] Step 2: Use a dual-branch Transformer model modulation network to classify the foreground and background of the ultrasound thyroid gland.

[0007] The dual-branch Transformer model modulation network includes a dual-branch Transformer model feature extraction network, a dynamic modulation module of an auxiliary branch, background-aware pooling and a mixed loss,

[0008] The two branches of the dual-branch Transformer model input the ultrasound thyroid image respectively, generate a multi-scale feature map through the Transformer backbone network, perform background-aware pooling on the deepest features in the feature map, and then pass it into the binary classifier to classify the foreground and background;

[0009] The perception of thyroid nodules and background uses background-aware pooling, which distinguishes the foreground and background in the target bounding box for retrieval tasks;

[0010] Step 3: Generate pseudo labels using the classification network weights trained in step 2;

[0011] Step 4: Use the Segformer network supervised by pseudo labels to segment ultrasound thyroid nodules;

[0012] Step 5: The ultrasonic thyroid nodule object segmentation of the web-based system is used for medical diagnosis.

[0013] Furthermore, the dual-branch Transformer model feature extraction network of step 2 is a Mix Transformer backbone network used in Segformer to enhance global attention to expand the perception of foreground class activation mapping.

[0014] Furthermore, the Mix Transformer backbone network includes four overlapping patch merges and four Transformer blocks;

[0015] The overlapping patch merging operation is sampled at four scales respectively, and the Transformer block is connected in series with Mix-FFN, which replaces the position encoding by capturing the position information through convolution.

[0016] Furthermore, the dynamic modulation module of the auxiliary branch includes a frequency channel dynamic kernel convolution branch, a spatial dynamic kernel convolution branch and a residual connection, and captures large-scale changes of thyroid nodules through dynamic kernel convolution of channel or spatial attention;

[0017] Dynamic modulation module input characteristics Output through the convolutional layer

[0018] Furthermore, the frequency channel dynamic kernel convolution branch evenly divides the channel dimension, assigns a frequency component to each set of features, concatenates all vectors to obtain a multi-spectral vector, and inputs the multi-spectral vector into a fully connected layer; the fully connected layer and the sigmoid function generate a frequency attention feature map, which is then evenly divided into frequency attention weights through the channel;

[0019] when When the channel division operation is performed again, convolution operations are performed in the pyramid arrangement of convolution kernels of different sizes, the multi-scale convolution features are multiplied by the corresponding frequency channel attention weights, the feature distribution of the object in the channel dimension is dynamically adjusted, and the channel dynamically selects the output of the kernel convolution branch.

[0020] Furthermore, the spatial dynamic kernel convolution branch,

[0021] First, in the channel dimension Using channel averaging,

[0022] Then, convolution operation is performed to obtain the spatial attention weights. Given the features after multi-scale convolution processing, average pooling operations are performed vertically and horizontally to obtain:

[0023] F i ap_w ∈R (c / 4)×w×1 (i=0,1,...,3) and F i ap_h ∈R (c / 4)×1×h (i=0,1,...,3)

[0024] Two characteristics;

[0025] Then multiply these two features together to obtain the spatial attention weight related to the position, the feature F enhanced by the strip space pooling i ap_wh ∈R (c / 4)×w×h (i=0,1,...,3);

[0026] Finally, the features of the spatial attention weight multiplied by the strip space pooling enhancement feature are spliced ​​to obtain the output value of the spatial dynamic selection kernel convolution branch; by connecting the residual connection features, the output value of the dynamic modulation module is obtained.

[0027] Furthermore, the background-aware pooling in step 2 performs the task of distinguishing the foreground and background in the target bounding box.

[0028] First, the dual-branch Transformer model features are divided into grids;

[0029] Then, the features in each grid are aggregated for retrieval query; given the query, the attention map of the background area in the bounding box is obtained: by calculating the cosine similarity between the features in the bounding box and the query, and normalizing to [0,1] through the ReLU activation function, and finally, the attention map is used to aggregate the foreground area in the bounding box.

[0030] Furthermore, the pseudo label of step 3 is to obtain the object area by weighted summing the foreground class activation map and the background class activation map of the two paths, and generate the pseudo label using the dense conditional random field method DenseCRF.

[0031] Furthermore, in step 4, the model outputs corresponding to the multi-scale parallel samples are averaged to achieve label correction, and additional supervision signals are provided to the network through regularization, thereby introducing adaptive feature fusion, improving the consistency of the parallel multi-scale model outputs, and achieving adaptation;

[0032] The samples of the Segformer segmentation model are set according to the size ratio, the output of the branch is restored to the same size and added to the channel dimension. After dimensionality reduction through convolution, it is divided into weighted weights of the corresponding scale features according to the channel dimension;

[0033] Finally, the regularization term consistency loss is constructed, the outputs of models of different scales are consistent with the adaptive fusion output, and the consistency correction loss and cross entropy loss are weighted to obtain the final loss.

[0034] A dual-branch weakly supervised ultrasound thyroid nodule segmentation system, including a thyroid data processing and target box annotation module, a thyroid foreground and background classification module, a pseudo-label generation module, an improved regularized segmentation module supervised by pseudo-labels, and a web segmentation display module;

[0035] The thyroid data processing and target frame annotation module is a module used to pre-process the ultrasonic thyroid data and add target frame annotations;

[0036] The thyroid foreground and background classification module is a module that uses a dual-branch Transformer modulation network to classify the foreground and background of the ultrasound thyroid;

[0037] A pseudo-label generation module is a module that generates pseudo-labels using the classification network weights obtained through training;

[0038] The pseudo-label supervised regularized segmentation module is a module that implements ultrasound thyroid nodule segmentation using an improved regularized Segformer network supervised by pseudo-labels.

[0039] The web segmentation display module is used to implement the segmentation of ultrasonic thyroid nodule objects in the web system for medical diagnosis module.

[0040] Compared with the prior art, the present invention has the following advantages: a dual-branch weakly supervised ultrasound thyroid nodule segmentation method and system of the present application solves the problem of low contrast in ultrasound images, spots, shadows and a large amount of noise, which leads to blurred edges of thyroid nodules, and reduces the difficulty of segmenting surfaces of weakly supervised ultrasound thyroid nodules. In summary, the present application has the characteristics of short process, high precision, good effect and high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0042] The present invention will now be described in further detail in conjunction with the accompanying drawings and preferred embodiments. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0043] like Figure 1 A dual-branch weakly supervised ultrasound thyroid nodule segmentation method is shown, comprising the following steps:

[0044] Step 1: Preprocess the ultrasound thyroid data and add target box annotations.

[0045] Ultrasonic thyroid data preprocessing: divide the data into training set, validation set and test set, and use data enhancement schemes such as horizontal flipping, random cropping, random scaling and color jittering.

[0046] The target box is labeled by manually labeling the thyroid nodule object using LabelImg software to obtain the foreground box of the nodule object.

[0047] Step 2: Use the improved dual-branch Transformer modulation network to classify the foreground and background of the ultrasound thyroid.

[0048] The classification of foreground and background of ultrasonic thyroid images adopts an improved dual-branch Transformer modulation network, including a dual-branch Transformer feature extraction network, a dynamic modulation module of the auxiliary branch, and improved background-aware pooling and mixing loss.

[0049] The two branches of the model input ultrasound thyroid images with dimensions of 512×512×3 respectively, and generate multi-scale feature maps through the Transformer backbone network, with the deepest feature dimension of 16×16×512. The deepest features are subjected to improved background-aware pooling and then passed into a binary classifier for foreground and background classification.

[0050] The dual-branch Transformer feature extraction network specifically replaces the currently widely used convolutional backbone network with the Mix Transformer backbone network in the more powerful Segformer to enhance global attention to expand the perception of foreground class activation mapping, and fix the defect that the current model only focuses on local information. The Mix Transformer backbone contains four overlapping patch merges and four Transformer blocks. The overlapping patch merge operation is downsampled at four scales respectively, and the Transformer block is connected in series with efficient self-attention and Mix-FFN. Efficient self-attention achieves less computation by reducing the size of K in the self-attention calculation. Mix-FFN replaces the position encoding by capturing position information through 3×3 convolution. The calculation method is as follows:

[0051] x Mix-FFN =MLP(GELU(Conv 3×3 (MLP(x in ))))+xin

[0052] Where MLP is the fully connected layer, GELU is the activation function, x in is the input of Mix-FFN.

[0053] The dynamic modulation module of the auxiliary branch is mainly used to emphasize the key areas of the thyroid nodule object compared to the main branch. It can capture the nodule area ignored by the main branch. It consists of three important elements, including the frequency channel dynamic kernel convolution branch, the spatial dynamic kernel convolution branch, and the residual connection. Through the dynamic kernel convolution of the channel or spatial attention, the large size changes of the thyroid nodule can be captured.

[0054] Dynamic modulation module, input features Through the convolutional layer, it becomes For the frequency channel dynamic kernel convolution branch, the channel dimension is evenly divided into For each set of features, we assign a specific 2D DCT frequency component as:

[0055]

[0056] where [u,v] is the 2D index of the frequency component, Freq i is a C'-dimensional vector.

[0057] Then, all vectors are concatenated to obtain the multispectral vector, which is calculated as follows:

[0058] Freq=cat([Freq 0 ,Freq 1 ,...,Freq n-1 ])

[0059] The multi-spectral vector is input into the fully connected layer, and then the fully connected layer and the sigmoid function generate the frequency attention feature map Z msatt , and then divided into frequency attention weights by channel average Z msatt The calculation is as follows: Z msatt =sigmoid(fc(Freq))

[0060] also, If the channel division operation is performed again, Feed it into four convolution kernel pyramid arrangements of different sizes. The features of the four convolution operations can be expressed as:

[0061]

[0062] Where W k×k represents the convolution matrix with kernel size equal to k.

[0063] Finally, the multi-scale convolution features are combined with the corresponding frequency channel attention weights Multiplying together can dynamically adjust the feature distribution of the object in the channel dimension. The output of the channel dynamic selection kernel convolution branch can be expressed as follows:

[0064]

[0065] Concat represents the concatenation operation of the channel dimension.

[0066] For the spatial dynamic kernel convolution branch, firstly Use channel average (AP) and then perform convolution operation H to obtain the spatial attention map w sa The implementation process can be described as follows:

[0067]

[0068] Given the feature F after multi-scale convolution processing i pc (i=0,1,...,2), we perform average pooling operations (AvgP_w and AvgP_h) in vertical and horizontal ways to obtain F i ap_w ∈R (c / 4)×w×1 (i=0,1,...,3) and F i ap_h ∈R (c / 4)×1×h (i=0,1,...,3).

[0069] We then multiply these two features to obtain the position-dependent attention map. Feature F enhanced with strip-shaped spatial information i ap_wh ∈R (c / 4)×w×h (i=0,1,...,3) is represented as follows:

[0070]

[0071] in Represents matrix multiplication.

[0072] Next, we perform a similar operation to the frequency channel dynamic kernel convolution branch, that is, to adjust the attention weight w sa With the strip pooling enhanced feature F i ap_wh The output of the spatial dynamic selection kernel convolution branch is expressed as follows:

[0073]

[0074] In summary, by connecting the residual connection features The formula for the output of the dynamic modulation module is:

[0075]

[0076] in Indicates pixel-by-pixel addition.

[0077] Improved background-aware pooling is used for the perception of nodules and background, which can establish more ideal boundaries for targets in the classification stage.

[0078] Background-aware pooling considers the distinction between foreground and background in the target bounding box as a retrieval task. Specifically, the Transformer feature f Trans Divided into N×N grids, and each grid is represented by G(j), 1≤j≤N 2 We then aggregate the features in each grid for the retrieved query as follows:

[0079]

[0080] Where M represents the mask of the background outside the bounding box, and M(p) = 1 represents the position p∈(1,2,...,N 2 ) does not belong to any object bounding box B, otherwise it is 0.

[0081] Given a query, we can obtain the attention map for the background region in the bounding box:

[0082]

[0083] Where J refers to the number of cells after deleting cells outside the bounding box that do not overlap with the background at all. j (p) By calculating the bounding box B and the query q j The cosine similarity between the features within is normalized to [0,1] using the ReLU activation function. The formula is as follows:

[0084]

[0085] Finally, we use the attention map to cluster the foreground regions in the bounding box:

[0086]

[0087] The starting point of the specific improved background-aware pooling is that there are a lot of black areas in the background area outside the thyroid nodule bounding box. Directly applying background-aware pooling will inevitably lead to performance degradation because the black background outside the target bounding box increases the possibility of black foreground. Specifically, when calculating the attention map within the bounding box, we set a threshold for the background grid area outside the object bounding box and exclude grids with a lot of black areas. Multiple experimental tests were conducted to determine the above thresholds by evaluating the feature accumulation values ​​of the corresponding areas.

[0088] Hybrid loss in addition to the classification loss of the main branch and auxiliary branch and It also includes the cross pseudo-supervision loss L of the foreground class activation map generated by the two branches cps , expressed as:

[0089] L cps =||M m -M c ||1

[0090] Among them, M m and M c Represent the foreground activation maps of the main branch and auxiliary branch, respectively.

[0091] The mixed loss is expressed as:

[0092]

[0093] Step 3: Generate pseudo labels using the trained classification network weights.

[0094] The trained classification network weights are used to generate pseudo labels. The specific details are that we perform a weighted summation of the foreground class activation map and the background class activation map from the two paths to obtain a more comprehensive representation of the object area, and use the dense conditional random field method DenseCRF to generate pseudo labels.

[0095] Step 4: Use the improved regularized Segformer network supervised by pseudo labels to achieve ultrasound thyroid nodule segmentation.

[0096] We use an improved regularized Segformer network supervised by pseudo labels to achieve ultrasound thyroid nodule segmentation. Specifically, we average the model outputs corresponding to multi-scale parallel samples to achieve label correction and provide additional supervision signals to the network through regularization (consistency loss) to prevent the network from overfitting to noisy areas of the labels. In addition, we introduce adaptive feature fusion to further improve the consistency of the parallel multi-scale model output and achieve adaptivity.

[0097] More specifically, we set the sample size ratios of the three Segformer segmentation models to 0.7, 1, and 1.5, respectively. The outputs of the three branches are restored to the same size and added to the channel dimension. After dimensionality reduction by 1×1 convolution, they are divided into weighted weights of the corresponding scale features according to the channel dimension. The corresponding weights are defined as:

[0098]

[0099]

[0100] in, It means adding channels by channel, performing bilinear interpolation on the output of the corresponding size samples of the model to maintain the original size, and then getting Y large ,Y ori ,Y small .Sp_c_1,Sp_c_2,Sp_c_3 represent channel division, and M refers to 1×1 convolution.

[0101] The output formula of the adaptive fusion model is:

[0102]

[0103] in Represents matrix multiplication.

[0104] Finally, we construct a regularization term consistency loss to ensure that the outputs of models at different scales are consistent with the adaptive fusion output Y af The corresponding loss formula is:

[0105]

[0106] Where KL represents the Kullback-Leibler divergence.

[0107] Based on the dynamic channel attention weights, the multi-scale label supervision loss is composed of the standard cross entropy loss, expressed as:

[0108]

[0109] in represents the cross entropy loss, Y l Refers to image pseudo labels.

[0110] Then the consistency correction loss and cross entropy loss are calculated by λ c Weighted, the final loss is defined as: L final =L msls +λ c *L consis .

[0111] Step 5: Implemented the segmentation of ultrasound thyroid nodule objects in the web-based system for medical diagnosis.

[0112] A dual-branch weakly supervised ultrasound thyroid nodule segmentation system includes a thyroid data processing and target box annotation module, a thyroid foreground and background classification module, a pseudo-label generation module, an improved regularized segmentation module supervised by pseudo-labels, and a web segmentation display module.

[0113] The thyroid data processing and target frame annotation module is used to preprocess the ultrasonic thyroid data and add target frame annotations.

[0114] The thyroid foreground and background classification module uses an improved dual-branch Transformer modulation network to classify the foreground and background of the ultrasonic thyroid.

[0115] The pseudo-label generation module generates pseudo-labels using the trained classification network weights.

[0116] The improved regularized segmentation module supervised by pseudo labels uses the Segformer network with improved regularization supervised by pseudo labels to achieve the segmentation of ultrasound thyroid nodules.

[0117] The web segmentation and display module realizes the segmentation of ultrasonic thyroid nodule objects in the web system for medical diagnosis.

[0118] The above description only describes the specific implementation mode of the present invention. Various examples do not limit the essential content of the present invention. After reading the description, ordinary technicians in the relevant technical field can modify or deform the specific implementation modes described above without departing from the essence and scope of the invention.

Claims

1. A dual-branch weakly supervised ultrasound thyroid nodule segmentation method, characterized by: The following steps are involved: Step 1: Preprocess the ultrasound thyroid data and add target box annotations; Step 2: Use a dual-branch Transformer model modulation network to classify the foreground and background of the ultrasound thyroid gland. The dual-branch Transformer model modulation network includes a dual-branch Transformer model feature extraction network, a dynamic modulation module of an auxiliary branch, background-aware pooling and a mixed loss, The two branches of the dual-branch Transformer model input the ultrasound thyroid image respectively, generate a multi-scale feature map through the Transformer backbone network, perform background-aware pooling on the deepest features in the feature map, and then pass it into the binary classifier to classify the foreground and background; The perception of thyroid nodules and background uses background-aware pooling, which distinguishes the foreground and background in the target bounding box for retrieval tasks; Step 3: Generate pseudo labels using the classification network weights trained in step 2; Step 4: Use the Segformer network supervised by pseudo labels to segment ultrasound thyroid nodules; Step 5: The ultrasonic thyroid nodule object segmentation of the web-based system is used for medical diagnosis.

2. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 1, characterized in that: The dual-branch Transformer model feature extraction network of step 2 is a Mix Transformer backbone network used in Segformer to enhance global attention to expand the perception of foreground class activation mapping.

3. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 2, characterized in that: The Mix Transformer backbone network contains four overlapping patch merges and four Transformer blocks; The overlapping patch merging operation is sampled at four scales respectively, and the Transformer block is connected in series with Mix-FFN, which replaces the position encoding by capturing the position information through convolution.

4. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 1, characterized in that: The dynamic modulation module of the auxiliary branch includes a frequency channel dynamic kernel convolution branch, a spatial dynamic kernel convolution branch and a residual connection, and captures large-scale changes of thyroid nodules through dynamic kernel convolution of channel or spatial attention; Dynamic modulation module input characteristics Output through the convolutional layer 5. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 4, characterized in that: The frequency channel dynamic kernel convolution branch evenly divides the channel dimension, assigns a frequency component to each set of features, concatenates all vectors to obtain a multi-spectral vector, and inputs the multi-spectral vector into a fully connected layer; the fully connected layer and the sigmoid function generate a frequency attention feature map, which is then evenly divided into frequency attention weights through the channel; when When the channel division operation is performed again, convolution operations are performed in the pyramid arrangement of convolution kernels of different sizes, the multi-scale convolution features are multiplied by the corresponding frequency channel attention weights, the feature distribution of the object in the channel dimension is dynamically adjusted, and the channel dynamically selects the output of the kernel convolution branch.

6. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 4, characterized in that: The spatial dynamic kernel convolution branch, First, in the channel dimension Using channel averaging, Then, convolution operation is performed to obtain the spatial attention weights. Given the features after multi-scale convolution processing, average pooling operations are performed vertically and horizontally to obtain: Two characteristics; Then multiply these two features together to obtain the spatial attention weight related to the position, the feature F enhanced by the strip space pooling i ap_wh ∈R (c / 4)×w×h (i=0,1,...,3); Finally, the features of the spatial attention weight multiplied by the strip space pooling enhancement feature are spliced ​​to obtain the output value of the spatial dynamic selection kernel convolution branch; by connecting the residual connection features, the output value of the dynamic modulation module is obtained.

7. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 1, characterized in that: The background-aware pooling in step 2 performs the task of distinguishing the foreground and background in the target bounding box. First, the dual-branch Transformer model features are divided into grids; Then, the features in each grid are aggregated for retrieval query; given the query, the attention map of the background area in the bounding box is obtained: by calculating the cosine similarity between the features in the bounding box and the query, and normalizing to [0,1] through the ReLU activation function, and finally, the attention map is used to aggregate the foreground area in the bounding box.

8. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 1, characterized in that: The pseudo label of step 3 is to obtain the object area by weighted summing the foreground class activation map and the background class activation map of the two paths, and generate the pseudo label using the dense conditional random field method DenseCRF.

9. A dual-branch weakly supervised ultrasonic thyroid nodule segmentation method according to claim 1, characterized in that: In step 4, the model outputs corresponding to the multi-scale parallel samples are averaged to achieve label correction, and additional supervision signals are provided to the network through regularization, thereby introducing adaptive feature fusion, improving the consistency of the parallel multi-scale model outputs, and achieving adaptation; The samples of the Segformer segmentation model are set according to the size ratio, the output of the branch is restored to the same size and added to the channel dimension. After dimensionality reduction through convolution, it is divided into weighted weights of the corresponding scale features according to the channel dimension; Finally, the regularization term consistency loss is constructed, the outputs of models of different scales are consistent with the adaptive fusion output, and the consistency correction loss and cross entropy loss are weighted to obtain the final loss.

10. A dual-branch weakly supervised ultrasound thyroid nodule segmentation system, characterized in that: It includes thyroid data processing and target box annotation module, thyroid foreground and background classification module, pseudo label generation module, improved regularized segmentation module supervised by pseudo labels and web segmentation display module; The thyroid data processing and target frame annotation module is a module used to pre-process the ultrasonic thyroid data and add target frame annotations; The thyroid foreground and background classification module is a module that uses a dual-branch Transformer modulation network to classify the foreground and background of the ultrasound thyroid; A pseudo-label generation module is a module that generates pseudo-labels using the classification network weights obtained through training; The pseudo-label supervised regularized segmentation module is a module that implements ultrasound thyroid nodule segmentation using an improved regularized Segformer network supervised by pseudo-labels. The web segmentation display module is used to implement the segmentation of ultrasonic thyroid nodule objects in the web system for medical diagnosis module.