A weakly supervised medical image segmentation method and system based on causal intervention

By constructing a causal intervention module, decoupling causal features and confounding features, and optimizing the loss function, the problems of lack of pixel-level annotation and data confounding factors in medical image segmentation are solved, thereby improving the accuracy of weakly supervised medical image segmentation.

CN119693642BActive Publication Date: 2026-05-19XI AN JIAOTONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2024-11-30
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, medical image segmentation methods face problems such as a lack of pixel-level fine annotation and interference from data confounding factors, resulting in insufficient accuracy of weakly supervised medical image segmentation.

Method used

We adopt a weakly supervised medical image segmentation method based on causal intervention. By constructing a causal intervention module, we decouple causal features and confounding features, use causal intervention to remove the influence of confounding features on the prediction results, and combine causal features and confounding features to optimize the loss function, thereby improving the accuracy of the segmentation model.

Benefits of technology

Despite interference from confounding factors, it significantly improves the accuracy of pseudo-segmentation masks for brain images, thereby enhancing the diagnostic effectiveness of brain images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693642B_ABST
    Figure CN119693642B_ABST
Patent Text Reader

Abstract

The application discloses a kind of weakly supervised medical image segmentation method and system based on causal intervention, after pre-processing to original image sample, construct causal intervention module, design causal feature loss, confounding feature loss and intervention loss;And by average pooling respectively obtain causal class score, confounding class score, respectively as the input of causal loss and confounding loss;Causal feature and randomly transformed confounding feature are combined to obtain confounding score, as the input of intervention loss;Improved weakly supervised medical image segmentation model is built, can more effectively locate target area, under the interference of confounding factor, still can obtain the weakly supervised brain tumor image segmentation model that fitting is better, improve the accuracy of brain image pseudo segmentation mask, improve the diagnosis effect of brain image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer-aided medical image technology, specifically relating to a weakly supervised medical image segmentation method and system based on causal intervention. Background Technology

[0002] With continuous social development and technological advancements, computer-aided diagnostic technology plays an increasingly important role in routine medical care. Medical image segmentation technology, often a primary component of diagnostic and medical systems, is widely used to preserve and remove key tissues from images, demonstrating significant application value in areas such as assisted identification, treatment planning, and prognostic assessment. Therefore, the robustness and accuracy of medical image segmentation technology are constantly being pursued. Early methods for medical image segmentation typically relied on traditional methods such as edge detection, template matching, and active contours. While these methods achieved good results to some extent, image segmentation remains one of the most challenging topics in computer vision due to difficulties in feature representation. In recent years, deep learning-based image segmentation technology has developed rapidly, giving rise to many automatic segmentation techniques based on convolutional neural networks, gradually replacing traditional methods.

[0003] The current field of deep learning for medical image segmentation faces two main challenges: 1. Lack of pixel-level fine annotation. First, collecting large amounts of medical image data is extremely difficult. For patients, medical images involve personal privacy and health information, and the use of related data requires explicit consent from the patient, which increases the difficulty of acquiring medical images. Second, the annotation of medical image data requires certain technical skills and experience from doctors, making the annotation work highly demanding. Furthermore, the process of annotating lesion regions pixel by pixel is tedious and time-consuming. 2. Confounding factors in the data significantly interfere with segmentation performance. Collected medical image data often comes from multiple medical centers, and differences in related equipment and protocols lead to different imaging effects on the same tissue. Images of varying quality can have a certain impact on subsequent research.

[0004] In recent years, an increasing number of researchers have focused on weakly supervised medical image segmentation methods. Compared to fully supervised methods, weakly supervised methods use readily available labels, which not only reduces the skill requirements for annotators but also simplifies the annotation process significantly, reducing the cost of acquiring data labels. This is because the annotation work is reduced from pixel-by-pixel annotation to simply outlining the target or determining the presence or absence of the target on the entire image. Furthermore, the varying levels of medical facilities and services across different regions make accurate identification results crucial, especially given the interference of confounding factors. Therefore, how to remove the interference of confounding factors and further improve the accuracy of weakly supervised medical image segmentation is an urgent problem to be solved. Summary of the Invention

[0005] The purpose of this invention is to provide a weakly supervised medical image segmentation method and system based on causal intervention, so as to overcome the shortcomings of the prior art.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A weakly supervised medical image segmentation method based on causal intervention includes the following steps:

[0008] S1, Preprocessing raw brain MRI data;

[0009] S2, Construct a weakly supervised medical image segmentation model based on the causal intervention module, and train the weakly supervised medical image segmentation model using preprocessed data to obtain a trained weakly supervised segmentation model for brain tumors.

[0010] S3. Input the test set into the network model to obtain a class attention map. After threshold adjustment, a pseudo segmentation mask is obtained. The adjusted model is then used to segment the medical image.

[0011] Preferably, the data is first preprocessed by labeling the collected brain images, dividing them into training, validation and test sets, and then performing data augmentation on the training set.

[0012] Preferably, the preprocessed two-dimensional brain image is divided into multiple small blocks, and an embedding dimension is set for each small block for linear mapping transformation. Then, the transformed data is encoded with positional codes and used as model input for model training.

[0013] Preferably, the label setting divides the image into two categories based on the presence or absence of lesion areas: 0 (normal image) and 1 (target image).

[0014] Preferably, the data enhancement specifically includes scaling, cropping, and translation.

[0015] Preferably, a weakly supervised medical image segmentation model based on a causal intervention module is constructed to decouple causal features and confounding features, and causal intervention is used to remove the influence of confounding features on the prediction results.

[0016] Preferably, the weakly supervised medical image segmentation structure is modified to construct a weakly supervised medical image segmentation model based on causal intervention, and the model is pre-trained. The training set is then input into the model for training to obtain a trained weakly supervised medical image segmentation model based on causal intervention.

[0017] Preferably, the weakly supervised medical image segmentation structure is modified as follows: using McTemper as the basic network structure, the number of input category tokens is doubled, with the first half used to capture causal features and the second half used to capture confounding features; the causal features and confounding features obtained from the last Transformer Block are averaged and pooled to obtain causal category scores and confounding category scores, which are used as inputs to the causal classification loss and confounding classification loss, respectively; the causal category scores are combined with randomly arranged confounding category scores to generate a mixed classification score, which is used as input to the intervention loss.

[0018] Preferably, the test set is input into the weakly supervised image segmentation model to obtain a pseudo-segmentation mask; based on the comparison between the pseudo-segmentation mask and the real mask, the brain tumor image evaluation result of the segmentation model is obtained.

[0019] A weakly supervised medical image segmentation system based on causal intervention includes a preprocessing module, a training module, and a segmentation module.

[0020] The preprocessing module preprocesses the raw brain MRI data;

[0021] The training module constructs a weakly supervised medical image segmentation model based on the causal intervention module. The preprocessed data is used to train the weakly supervised medical image segmentation model to obtain a trained weakly supervised segmentation model for brain tumors.

[0022] The segmentation module inputs the test set into the network model to obtain a class attention map, and obtains a pseudo-segmentation mask after threshold adjustment. The adjusted model is then used to segment the medical image.

[0023] Compared with the prior art, the present invention has the following beneficial technical effects:

[0024] This invention is a weakly supervised medical image segmentation method based on causal intervention. After preprocessing the original image samples, an improved weakly supervised medical image segmentation model is built, which can more effectively locate the target region. Even under the interference of confounding factors, a well-fitting weakly supervised brain tumor image segmentation model can still be obtained, improving the accuracy of pseudo-segmentation masks for brain images and improving the diagnostic effect of brain images.

[0025] Furthermore, a causal intervention module is constructed, and causal feature loss, confounding feature loss, and intervention loss are designed. Causal category scores and confounding category scores are obtained by average pooling, which are used as inputs to the causal loss and confounding loss, respectively. The confounding score is obtained by combining the causal features with the randomly transformed confounding features, which is used as input to the intervention loss. Attached Figure Description

[0026] Figure 1This is a flowchart illustrating the implementation of the weakly supervised medical image segmentation method based on causal intervention in this embodiment of the invention.

[0027] Figure 2 This is a weakly supervised causal model of medical image structure in this embodiment of the invention.

[0028] Figure 3 This is a structural diagram of the causal intervention module constructed in an embodiment of the present invention.

[0029] Figure 4 This is an improved weakly supervised medical image segmentation model in the embodiments of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] like Figure 1 As shown, the present invention provides a weakly supervised medical image segmentation method based on causal intervention, comprising the following steps;

[0033] S1, preprocess the raw brain MRI data and divide the preprocessed image data into training set, validation set and test set;

[0034] Brain images are obtained by processing raw brain MRI scan data with identified target information. These brain images are then labeled to obtain a set of labeled samples. This sample set is then augmented and proportionally divided into training, validation, and test sets.

[0035] S2, construct a weakly supervised medical image segmentation model based on the causal intervention module, and input the above training set into the weakly supervised medical image segmentation model for training to obtain a trained brain tumor weakly supervised segmentation model;

[0036] S3. Input the test set into the network model to obtain a class attention map. After threshold adjustment, a pseudo segmentation mask is obtained. The adjusted model is then used to segment the medical image.

[0037] Specifically, this application improves the accuracy of segmentation through a causal intervention module and an improved weakly supervised medical image segmentation model, and segments brain images using a causal intervention-based weakly supervised medical image segmentation model.

[0038] First, the data is preprocessed by labeling the collected brain images, dividing them into training, validation, and test sets, and performing data augmentation on the training set. The labeling is based on the presence or absence of lesion areas, dividing the images into two categories: 0 (normal images) and 1 (target images).

[0039] Preprocessed two-dimensional brain images Shape Divided into size The patch (small chunk), after being divided, will yield One patch. For each shape with a size of... The patch sets the embedding dimension. Transformed into shape by linear mapping The use of patch tokens (which divide an image into multiple smaller pieces) helps reduce the computational cost of the model and improves its image processing capabilities. Using MCTformer as the underlying weakly supervised segmentation network architecture, the number of patch tokens corresponds to the number of dataset categories. Here, the patch token is doubled, becoming twice the number of MCTformer tokens. , among which the former Each patch token is used to capture causal features, and then... Each patch token is used to capture profane features. After the above operations, the current data dimension becomes... Then add position encoding to the tokens (input). The dimensions of the position encoding and the tokens are equal, so they are directly superimposed, thus the data dimensions remain unchanged, resulting in a shape and size of [value missing]. of , which serves as the input to the Transformer Encoder.

[0040]

[0041] The Transformer Encoder consists of 12 consecutive Transformer Blocks. Each Transformer Block comprises the following components: Multi-Head Self-Attention (MHSA), Multilayer Perceptron (MLP), residual connections, and Layer Normalization (LN). Token sequence. After the first Layer Transformer Block becomes :

[0042]

[0043] The final pseudo-segmentation mask is obtained through the class attention map. The generation of the class attention map consists of two stages: a generation stage and a refinement stage. In the class attention map generation stage, the class attention map can be extracted from the attention weight matrix of the MHSA layer. Specifically, the... The token sequence of the layer will first be transformed into a triple through three linear transformation layers: , and This serves as the input to the MHSA layer. For each MHSA layer, the attention weight matrix is ​​computed using the Scaled Dot-Product Attention mechanism. :

[0044]

[0045] The attention of the causal category token to the patch token can be obtained from the attention weight matrix above. To obtain a higher level of category representation, the final fusion... The Transformer Block obtained A preliminary class attention map is obtained after shape transformation. :

[0046]

[0047] This approach, referencing convolutional neural network-based refinement methods, fully leverages the generated attention weight matrix to refine the class attention map. (Attention between patches) It can help the model better capture contextual information and play a supplementary role in the target localization process. For ease of computation, it is first... Obtain by performing shape transformation The above process is defined as follows:

[0048] (8)

[0049] (9)

[0050] (10)

[0051] In the causal intervention module construction phase, the first step is to establish a structural causal model to analyze the causal relationships throughout the process. The structural causal model contains four variables: medical images. causal characteristics Mixed characteristics and prediction results Between two of the nodes Representative: Reason result.

[0052] The causal relationships between the variables are as follows:

[0053] Confounding and causal features are extracted from medical images, and causal relationships are naturally formed.

[0054] The prediction results should only be affected by causal characteristics, but due to the presence of confounding factors, the prediction results are also affected by confounding characteristics.

[0055] The network is affected by confounding features when extracting causal features.

[0056] To eliminate the influence of hybrid features, define Given a set of mixed features, causal intervention is achieved through backdoor adjustment to eliminate backdoor paths: Specifically, the do operation is used to estimate causal features: According to Bohr's theory of causality, we can obtain:

[0057] (11)

[0058] To obtain a more accurate class attention map, we added a causal intervention module. Causal intervention mainly consists of two steps: decoupling and intervention. Causal intervention weakens... Extracted target features The impact. Specifically, from When extracting features, we will use causal features. Features of confusion Decoupling, and ensuring Subject only to the target causal characteristics The impact of this is noteworthy. It's important to note that decoupling and intervention jointly achieve the causal intervention operation. First, in the decoupling phase, causal features and confounding features are supervised separately. Since the actual distribution of confounding features is unavailable, this phase only initially decouples causal and confounding features, thus requiring an intervention phase as a supplement. In the intervention phase, randomly transformed confounding features are combined with causal features and subjected to image-level supervision, forcing the model to learn the target's causal features.

[0059] The first stage of causal intervention: decoupling causal features and confounding features. In this part, we initially decouple causal features from confounding features. Specifically, we use MCTformer as the base model and follow... Figure 2 The class tokens are copied in the manner shown. The first C class tokens represent causal features, and the last C class tokens represent confounding features. The categories of confounding factors are diverse, but they are roughly divided into C categories here for two main reasons: 1. We don't care whether each confounding factor is correctly classified; we only need to distinguish between confounding and causal features. 2. Having a consistent number of confounding categories with the target object is beneficial for subsequent calculations, such as obtaining the attention matrix and optimizing the total loss. Average pooling is performed on the causal and confounding features to obtain the causal category scores. and mixed category scores During training, classification loss and KL divergence optimization are used to facilitate the model's learning of causal and confounding features:

[0060] (12)

[0061] (13)

[0062] (14)

[0063] (15)

[0064] The second phase of causal intervention: using confounding interventions to predict causal features. This phase is a necessary supplement to further separate causal features from confounding features. Specifically, the confounding score... Randomly transformed and associated with causal scores The results are combined to obtain a mixed score. Finally, a multi-label soft-edge loss is applied to the mixed score:

[0065] (16)

[0066] (17)

[0067] Finally, the processed and segmented test set is input into the trained weakly supervised medical image segmentation model based on causal intervention to obtain the pseudo-segmentation mask for each brain image and to obtain the overall evaluation result of the test set.

[0068] Example

[0069] A weakly supervised medical image segmentation method based on causal intervention includes the following steps:

[0070] S1, collect data and label the data. The specific workflow is as follows:

[0071] 1.1 First, an MRI scan of the patient's brain was performed to obtain raw data showing the patient's brain.

[0072] 1.2. Select and extract brain images from 1.1, perform manual diagnosis and classification and pixel-by-pixel annotation, and assign labels to the diagnostic results. The pixel-by-pixel annotation labels are only used to evaluate the model's inference results on the test set.

[0073] S2 involves partitioning and augmenting the data. The specific workflow is as follows:

[0074] 2.1 Divide the sample set in 1.2 into a training set, a validation set, and a test set in a ratio of 8:1:1;

[0075] 2.2. Perform data augmentation on the training set from 2.1, i.e., scaling, cropping, and translating, to increase the diversity of training samples by utilizing existing medical image data;

[0076] S3, Construct a causal intervention module, such as Figure 3 As shown. The specific workflow is as follows:

[0077] 3.1 Constructing a causal feature-supervised loss based on image-level labels;

[0078] 3.2 Usage Divergence is used to construct a supervisory loss for hybrid features;

[0079] 3.3 Constructing hybrid features based on causal and confounding features;

[0080] 3.4. Continue using the loss structure from 3.1 in section 3.3 to construct the intervention loss and complete the causal intervention module construction;

[0081] S4, Construct a weakly supervised brain tumor segmentation model, such as Figure 4 As shown. The specific workflow is as follows:

[0082] 4.1 Modify the Embedding layer, adding the following before position encoding: Each category of token;

[0083] 4.2, Building a system by A Transformer Encoder consisting of cascaded Transformer Blocks;

[0084] 4.3 Add the constructed causal intervention module after the last Transformer Block;

[0085] 4.4. The attention weight matrices of the last three Transformer Blocks are fused to obtain the final attention weight matrix;

[0086] 4.5 Extract the class attention map and patch-wise attention matrix from the attention weight matrix in 4.4;

[0087] 4.6. Use the patch-wise attention matrix obtained in (4,5) to refine the class attention graph to complete the construction of the entire weakly supervised segmentation model;

[0088] S5 trains an improved weakly supervised brain tumor segmentation model. The specific workflow is as follows:

[0089] 5.1 Input the data from 2.2 into the improved weakly supervised brain tumor segmentation model 4.3;

[0090] 5.2 When data passes through the Embedding layer, add the following during the location encoding operation: Each type of token is assigned a location and then sent to Transformer Block 1.

[0091] 5.3 Normalize the tokens obtained in step 5.2 above;

[0092] 5.4 Input the features obtained in 5.3 above into the Multi-Head Attention module;

[0093] 5.5. After concatenating the features obtained in 5.4 and 5.2, normalize them;

[0094] 5.6. Input the features obtained in 5.5 into the MLP module;

[0095] 5.7. Connect the features obtained in 5.6 with the features obtained in 5.4 and use them as input for the next Transformer Block;

[0096] 5.8 Repeat steps 5.3 to 5.8. The Transformer Encoder is then implemented to obtain a trained weakly supervised medical image segmentation model based on causal intervention.

[0097] S6, Test the weakly supervised brain tumor segmentation model based on causal intervention and derive the pseudo-segmentation mask. The specific workflow is as follows:

[0098] 6.1 Input the test set from the data in 2.1 into the trained weakly supervised brain tumor segmentation model based on causal inference in 5.8;

[0099] 6.2 By adjusting the threshold, the current optimal result is selected, and the pseudo-segmentation mask of each image and the overall evaluation result are obtained;

[0100] 6.3. Compile the evaluation results obtained in 6.2 into a table to compare the improvement effect after the improvement.

[0101] In another embodiment of the present invention, a weakly supervised medical image segmentation system based on causal intervention is provided, comprising a preprocessing module, a training module, and a segmentation module:

[0102] The preprocessing module preprocesses the raw brain MRI data;

[0103] The training module constructs a weakly supervised medical image segmentation model based on the causal intervention module. The preprocessed data is used to train the weakly supervised medical image segmentation model to obtain a trained weakly supervised segmentation model for brain tumors.

[0104] The segmentation module inputs the test set into the network model to obtain a class attention map, and obtains a pseudo-segmentation mask after threshold adjustment. The adjusted model is then used to segment the medical image.

[0105] In another embodiment of the present invention, a terminal device is provided, the terminal device including a processor and a memory, the memory being used to store a computer program, the computer program including program instructions, and the processor being used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, and is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to realize the corresponding method flow or corresponding function. The processor described in this embodiment of the invention can be used for the operation of a weakly supervised medical image segmentation method based on causal intervention, including the following steps: preprocessing raw brain MRI data; constructing a weakly supervised medical image segmentation model based on a causal intervention module, training the weakly supervised medical image segmentation model with the preprocessed data to obtain a trained brain tumor weakly supervised segmentation model; inputting the test set into the network model to obtain a class attention map, obtaining a pseudo-segmentation mask after threshold adjustment, and using the adjusted model to segment the medical image.

[0106] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory). This computer-readable storage medium is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device.

[0107] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the weakly supervised medical image segmentation method based on causal intervention in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps: preprocessing raw brain MRI data; constructing a weakly supervised medical image segmentation model based on a causal intervention module, training the weakly supervised medical image segmentation model with the preprocessed data to obtain a trained brain tumor weakly supervised segmentation model; inputting the test set into the network model to obtain a class attention map, obtaining a pseudo-segmentation mask after threshold adjustment, and using the adjusted model to segment the medical image.

[0108] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0109] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A weakly supervised medical image segmentation method based on causal intervention, characterized in that, Includes the following steps: S1, Preprocessing raw brain MRI data; S2, Construct a weakly supervised medical image segmentation model based on the causal intervention module, and train the weakly supervised medical image segmentation model using preprocessed data to obtain a trained weakly supervised segmentation model for brain tumors. S3. Input the test set into the network model to obtain the class attention map. After threshold adjustment, a pseudo segmentation mask is obtained. The adjusted model is then used to segment medical images. A weakly supervised medical image segmentation model based on a causal intervention module is constructed to decouple causal features and confounding features. Causal intervention is used to remove the influence of confounding features on the prediction results. The weakly supervised medical image segmentation structure is modified, and the model is pre-trained by inputting the training set into the model for training. The modified weakly supervised medical image segmentation structure is as follows: based on McTeiformer as the basic network structure, the number of input category tokens is doubled. The first half is used to capture causal features, and the second half is used to capture confounding features. The causal features and heterogeneous features obtained from the last Transformer Block are average pooled to obtain causal class scores and heterogeneous class scores, which are used as inputs to the causal classification loss and heterogeneous classification loss, respectively. The causal class scores are combined with the randomly arranged heterogeneous class scores to generate a mixed classification score, which is used as input to the intervention loss.

2. The weakly supervised medical image segmentation method based on causal intervention according to claim 1, characterized in that, First, the data is preprocessed by labeling the collected brain images, dividing them into training, validation, and test sets, and then performing data augmentation on the training set.

3. The weakly supervised medical image segmentation method based on causal intervention according to claim 2, characterized in that, The preprocessed two-dimensional brain image is divided into multiple small blocks. An embedding dimension is set for each small block and a linear mapping transformation is performed. Then, the transformed data is encoded with positional codes and used as model input for model training.

4. The weakly supervised medical image segmentation method based on causal intervention according to claim 2, characterized in that, The labeling settings divide the images into two categories based on the presence or absence of lesion areas: 0 (normal image) and 1 (target image).

5. The weakly supervised medical image segmentation method based on causal intervention according to claim 2, characterized in that, The data augmentation specifically includes scaling, cropping, and panning.

6. The weakly supervised medical image segmentation method based on causal intervention according to claim 2, characterized in that, The test set is input into the weakly supervised image segmentation model to obtain a pseudo-segmentation mask; the brain tumor image evaluation result of the segmentation model is obtained by comparing the pseudo-segmentation mask and the real mask.

7. A weakly supervised medical image segmentation system based on causal intervention for the method of claim 1, characterized in that, It includes a preprocessing module, a training module, and a segmentation module: The preprocessing module preprocesses the raw brain MRI data; The training module constructs a weakly supervised medical image segmentation model based on the causal intervention module. The preprocessed data is used to train the weakly supervised medical image segmentation model to obtain a trained weakly supervised segmentation model for brain tumors. The segmentation module inputs the test set into the network model to obtain a class attention map, and obtains a pseudo-segmentation mask after threshold adjustment. The adjusted model is then used to segment the medical image.