Semi-supervised image analysis method and device, computer equipment and storage medium
By distinguishing causal and non-causal characteristics in semi-supervised learning and using mutual information constraints, the problem of unclear distinction between causal and non-causal characteristics in the existing technology is solved, and the generalization ability and accuracy of medical image analysis models are improved. , achieve excellent performance in the case of scarcity of label samples.
Patent Information
- Application Number
- CN202411142647.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-20
AI Technical Summary
The existing semi-supervised learning methods have problems in the unclear distinction between causal and non-causal features in medical image analysis, which leads to the possibility of false consistency when using unlabeled data, which weakens the generalization ability of the model. and accuracy.
By obtaining sample images in the training set, using the initial student model and the teacher model for prediction, we obtain the predicted distribution of causal and non-causal characteristics, combined with mutual information constraints, determine the target loss function, and update the network parameters of the student model to distinguish causal and effect and non-causal characteristics, strengthening the generalization ability and efficiency of the model.
The generalization ability and accuracy of the model are improved, especially in medical image classification tasks, which exceeds the traditional semi-supervised learning method, and is more significant especially in the case of scarce marker samples.
Smart Images

Figure CN118941928A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of semi-supervised image analysis, and in particular to a semi-supervised image analysis method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of deep learning and computer vision, medical image analysis based on computer-aided diagnosis has achieved unprecedented performance. Existing methods usually focus on supervised learning models, which require the use of large-scale labeled sample datasets. However, unlike natural images, the annotation of medical images must be performed by experienced clinicians, which makes the process time-consuming, expensive and challenging. Therefore, in the case of scarce labeled samples, making full use of a large number of unlabeled samples to improve the accuracy of machine learning models has important research value in the field of medical image analysis. Semi-supervised learning has very important theoretical and practical significance in improving model performance by utilizing limited labeled data and a large amount of unlabeled data.
[0003] Among semi-supervised learning methods, pseudo-labeling methods are usually limited by threshold selection strategies, by using algorithms to annotate (pseudo-label) unlabeled samples, which are then used as new labeled samples for retraining models. Such methods usually face a trade-off in threshold selection. When the threshold is strict, the quality of the pseudo-label is better, but the number of new samples used for retraining each time is less, and vice versa. On the other hand, consistency regularization techniques are also commonly used in semi-supervised learning methods, such as Temporal Ensembling models and Mean-Teacher models. They aim to make similar logical distributions (such as predictions) between different views of the same sample consistent, thereby enhancing the semantic representation of the target. However, since such models do not explicitly distinguish between causal and non-causal features in different perturbations, non-causal but discriminative features may replace inherent semantic information when considering invariant constraints, resulting in false consistency. Therefore, applying traditional consistency constraints to indiscriminately align sample features or prediction distributions by leveraging unlabeled data may lead to suboptimal results. Considering the weaknesses of existing consistency regularization methods, it is necessary to re-evaluate these methods. Traditional methods indiscriminately enforce consistency across all parts between batches in both teacher and student models. Such extensive enforcement usually includes a lot of invalid and confounding information, which provide little valuable learning information. These confounding factors may not only distract the learning process, but also dilute the content of valid semantic information, thus weakening the potential advantages of consistency-based regularization methods. Summary of the invention
[0004] Based on this, it is necessary to propose a semi-supervised image analysis method, device, computer equipment and storage medium to address the technical problem that the existing technology based on semi-supervised image analysis has poor effect.
[0005] In a first aspect, a semi-supervised image analysis method is provided, the method comprising:
[0006] Get sample images in the training set;
[0007] Predicting based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature;
[0008] Perform prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature;
[0009] Determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature;
[0010] Based on the target loss function, the network parameters in the initial student model are updated, and the updated initial student model is used as the trained student model.
[0011] In a second aspect, a semi-supervised image analysis device is provided, the device comprising:
[0012] An acquisition module is used to acquire sample images in a training set;
[0013] A first prediction module, configured to perform prediction based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature;
[0014] A second prediction module, configured to make a prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature;
[0015] A determination module, configured to determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature;
[0016] The training module is used to update the network parameters in the initial student model based on the target loss function, and use the updated initial student model as the trained student model.
[0017] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned semi-supervised image analysis method when executing the computer program.
[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned semi-supervised image analysis method are implemented.
[0019] The semi-supervised image analysis method proposed in the present invention obtains sample images in the training set, and then predicts based on the sample images and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature, and then predicts based on the sample images and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature, thereby determining the target loss function based on the first prediction distribution, the second prediction distribution, the third prediction distribution, the first causal feature, the second causal feature, and the non-causal feature, and finally updating the network parameters in the initial student model based on the target loss function, and using the updated initial student model as the trained student model. The initial student model can be trained by the target loss function to obtain a trained student model, which has the characteristics of strong model generalization ability, high efficiency and accuracy, and then the student model is used to analyze the image, thereby improving the effect of image analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] in:
[0022] Figure 1 A diagram showing an application environment of a semi-supervised image analysis method in one embodiment;
[0023] Figure 2 is a flow chart of a semi-supervised image analysis method in one embodiment;
[0024] Figure 3 A schematic diagram of the structure of a semi-supervised image analysis method in one embodiment;
[0025] Figure 4 is a structural block diagram of a semi-supervised image analysis device in one embodiment;
[0026] Figure 5 is a structural block diagram of a computer device in one embodiment;
[0027] Figure 6 It is a structural block diagram of a computer device in another embodiment. DETAILED DESCRIPTION
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] The semi-supervised image analysis method provided by the embodiment of the present invention can be applied in Figure 1In the application environment, the client 110 communicates with the server 120 through the network. The server 120 can receive the sample image in the training set through the client 110, and then the server 120 predicts based on the sample image and the initial student model to obtain the first prediction distribution corresponding to the non-causal feature and the second prediction distribution corresponding to the first causal feature. Then the server 120 predicts based on the sample image and the initial teacher model to obtain the third prediction distribution corresponding to the second causal feature, so that the server 120 determines the target loss function based on the first prediction distribution, the second prediction distribution, the third prediction distribution, the first causal feature, the second causal feature, and the non-causal feature. Finally, the server 120 updates the network parameters in the initial student model based on the target loss function, and uses the updated initial student model as the trained student model. The initial student model can be trained by the target loss function to obtain a trained student model, which has the characteristics of strong model generalization ability, high efficiency and accuracy, and then the student model is used to analyze the image, thereby improving the effect of image analysis. Among them, the client 110 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server 120 can be implemented by an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0032] See also Figure 2 As shown, Figure 2 A schematic flow chart of a semi-supervised image analysis method provided by an embodiment of the present invention includes the following steps:
[0033] Step S101: obtaining sample images in a training set;
[0034] The sample images may include labeled samples and unlabeled samples, and the sample images may be medical images, such as human organ images.
[0035] Step S102: performing prediction based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature;
[0036] In one embodiment, a first feature is obtained based on the sample image input and the encoder in the initial student model; a first mask is obtained based on the first feature and the scoring function, and a second mask is determined based on the first mask; a first causal feature is obtained based on the first feature and the first mask, and a non-causal feature is obtained based on the first feature and the second mask; a first prediction distribution corresponding to the non-causal feature is obtained based on the first linear classifier and the non-causal feature in the initial student model; and a second prediction distribution corresponding to the first causal feature is obtained based on the second linear classifier and the first causal feature in the initial student model.
[0037] Specifically, Figure 3 As shown in Figure 2, in order to achieve effective causal feature learning, causal features and non-causal features must be separated. In this work, an attention mechanism is used to distinguish the causal part from the non-causal part, namely the causal indicator. Given the encoder in the initial student model is F s (.), using the score function f on the final convolution feature output by the encoder score To estimate the importance score of the causal component and generate the causal score mask M C , the M C refers to the first mask. The generated causal score mask has the same spatial resolution as the feature map. Similarly, the mask M of irrelevant / non-causal features can be obtained B , M B Refers to the second mask:
[0038] M C =σ(f score (F s (x i θ s ,π s )),θ m )
[0039] M B =1-M C
[0040] Among them, f score Denote the parameter as θ m The convolutional layer is used to project the feature components of each position to obtain a score; θ s The student branch network refers to the parameters of the encoder network, π s Represents the sample x i The disturbance of σ(.) indicates that the sigmoid function is used to further normalize the score result to the interval (0, 1). The first feature refers to F s (x i θ s ,π s). After defining the causal indicator, we need to extract the causal and bias features. Specifically, we decompose the original feature embedding (first feature) into the first causal feature and deviation characteristics The deviation characteristic refers to non-causal features and is passed through a linear classifier and The following classification predictions are obtained:
[0041]
[0042] where ⊙ represents the Hadamard product, Represents the first linear classifier Parameters, Represents the second linear classifier The causal feature aims to obtain the core information about the disease, which should have the ability to distinguish disease categories. refers to the second predictive distribution, refers to the first predictive distribution, the first causal feature Non-causal features
[0043] Step S103: performing prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature;
[0044] In one embodiment, the step of performing prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature:
[0045] Step S1031: obtaining a second feature based on the sample image input and the encoder in the initial student model;
[0046] Step S1032: obtaining a second causal feature based on the second feature and the first mask obtained by sharing the initial teacher model;
[0047] Step S1033: Based on the third linear classifier and the second causal feature in the initial teacher model, a third prediction distribution corresponding to the second causal feature is obtained.
[0048] In this embodiment, an exponential moving average is applied to update the parameters of the teacher branch. During the entire framework optimization process, only the initial student network is optimized and updated. Specifically, the teacher model parameter θ at the Tth iteration is t Updated as follows: Where α represents the weighting coefficient.
[0049] In one embodiment, the initial teacher and initial student branches share the learned causal mask M CSimilarly, the second causal feature of the teacher branch can be obtained and the third predicted distribution
[0050]
[0051] Among them, the encoder in the initial teacher model is F t , is the second causal characteristic, is the third prediction distribution, Represents the third linear classifier Parameters.
[0052] Step S104: determining a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature;
[0053] In one embodiment, the objective loss function includes a supervision loss, and the supervision loss is expressed as follows:
[0054]
[0055] in, Expressed as the second predictive distribution, l ce represents the cross entropy loss, y i represents the true label, N l represents the number of labeled samples, x i is a sample image, To monitor losses;
[0056] At the same time, the bias part contains content that is irrelevant to disease identification and cannot be used as a clue for classification. Therefore, the target loss function also includes alignment loss, which is expressed as follows:
[0057]
[0058] in, is the first prediction distribution, y unif is uniformly distributed, KL represents Kullback-Leibler entropy, is the alignment loss.
[0059] In one embodiment, in order to make robust predictions, it is not enough to emphasize only causally significant features. It is also important to ensure that these causal features are distinct and independent from irrelevant non-causal features. This separation ensures that the model does not rely on spurious correlations between the causal and non-causal parts, resulting in better generalization. The dependency between different features can be measured by mutual information (MI). The goal is to minimize the mutual information To restrict the first causal feature and bias The objective loss function also includes a mutual information function, which is expressed as follows:
[0060]
[0061] Among them, q θ (.|.) represents the variational approximation of the true distribution, refers to the first causal characteristic, refers to non-causal features, MI refers to mutual information, Refers to the mutual information function. By introducing the MI independence constraint in the supervised learning process, the model can better learn representations that clearly separate causal features from non-causal features. This approach ensures that the decision-making process of the model is mainly affected by causal features, and the causal features are more capable of predicting the true results of medical image classification tasks.
[0062] In one embodiment, in order to improve the performance of consistency learning, in the framework of the invention, the causal features or causal predictions of the student and teacher models are used for constraints under different enhancement methods. Without loss of generality, two causal consistency alignment losses are defined, one is the first causal consistency alignment loss, and the other is the second causal consistency alignment loss.
[0063] The objective loss function also includes a first causal consistency alignment loss, which is expressed as follows:
[0064]
[0065] Among them, N u The number of unlabeled examples in the training set, refers to the third predictive distribution, is the first causal consistency alignment loss;
[0066] The objective loss function also includes a second causal consistency alignment loss, which is expressed as follows:
[0067]
[0068] in, is the second causal consistency alignment loss, which describes the consistency mechanism between samples based on causal alignment, which constrains the consistency of causal feature outputs from different branches; R represents the relationship definition function, which is used to construct the correlation relationship between causal features of multiple samples; the mini-batch B of the training data set, l con Refers to consistency constraints.
[0069] The objective loss function is expressed as follows:
[0070]
[0071] Wherein, L refers to the target loss function.
[0072] Step S105: Based on the target loss function, the network parameters in the initial student model are updated, and the updated initial student model is used as the trained student model.
[0073] In one embodiment, after the step of updating the network parameters in the initial student model based on the target loss function and using the updated initial student model as the trained student model, the method further comprises:
[0074] Step S201: Acquire a medical image;
[0075] Step S202: Predicting is performed based on the medical image and the trained student model to obtain a target prediction distribution corresponding to the third causal feature.
[0076] In one embodiment, the student model proposed by the present invention is feasible after experimental verification. The best semi-supervised learning performance was achieved in the experiments of three medical image classification datasets. On the ISIC dataset, the proposed causal-driven consistency method achieved the best classification performance under various labeled sample configurations (5%, 10%, 20%, 30%). Specifically, in all labeled data ratio settings, the student model of the present invention almost improved the baseline by 3% in F1 score. Compared with other state-of-the-art semi-supervised methods such as SimMatch, ACPL, FixMatch and TEAR, the framework of the present invention has also consistently achieved excellent results. Under the data settings of 5% and 30%, the student model of the present invention is 2.33%-2.87% and 2.09%-3.35% higher than FixMatch and ACPL in F1 score, respectively. Compared with TEAR, the student model of the present invention exceeds it by 1.09%-1.74% and 1.47%-3.13% when the labeled data is set to 10% and 20%, respectively. Consistent with the model and settings used in ISIC, experiments were conducted on the Kvasir-Capsule dataset, and the student model of the present invention showed an improvement of 3.56%-5.14% in F1 score over the baseline model under the minimum 5% labeled data configuration. When the available labeled samples reached 30%, the student model of the present invention showed more significant improvements (4.11%-7.68%) compared to the original model.
[0077] It should be noted that the present invention breaks through the deficiency of traditional deep learning models based on statistical dependency generative representation in establishing false relationships between learning features and labels. The method of the invention focuses on the semantically invariant causal features in the image through causal learning, thereby improving the generalization ability and interpretability of the model. The present invention proposes a new causal relationship driven consistency regularized semi-supervised learning paradigm. This innovative method can be widely applied to existing semi-supervised architectures based on consistency regularization, improving their efficiency and accuracy. The present invention enhances the effect of causal learning by integrating a decoupled representation of mutual information constraints in the supervision process. At the same time, in order to effectively utilize the semantic information in unlabeled samples, two general causal-driven consistency mechanisms are developed.
[0078] It should also be noted that the traditional semi-supervised model based on consistency regularization does not explicitly distinguish between different causal features and non-causal features, so those non-causal but distinguishable features may replace the inherent causal semantic information through the invariant constraint, resulting in false consistency alignment learning. Therefore, when utilizing unlabeled data, applying traditional consistency constraints to alignment-enhanced sample features or predicted distributions may lead to suboptimal learning effects. In response to the above problems, the present invention proposes a new causality-driven semi-supervised learning framework to improve the consistency learning process and reduce the impact of confounding factors or biases on effective medical image classification performance. Combined with causal reasoning, the framework of the present invention emphasizes the extraction and utilization of causal features, thereby improving the generalization ability and interpretability of the model. The proposed causality-driven consistency paradigm can be independently designed or applied to existing semi-supervised architectures based on consistency regularization to improve their efficiency and accuracy without significantly increasing parameters and computational burden.
[0079] See also Figure 4 As shown, in one embodiment, a semi-supervised image analysis device is provided, the device comprising: an acquisition module 10, for acquiring sample images in a training set;
[0080] A first prediction module 20, configured to perform prediction based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature;
[0081] A second prediction module 30, configured to perform prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature;
[0082] A determination module 40, configured to determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature;
[0083] The training module 50 is used to update the network parameters in the initial student model based on the target loss function, and use the updated initial student model as the trained student model.
[0084] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a semi-supervised image analysis method server side.
[0085] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a client side of a semi-supervised image analysis method.
[0086] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0087] Get sample images in the training set;
[0088] Predicting based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature;
[0089] Perform prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature;
[0090] Determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature;
[0091] Based on the target loss function, the network parameters in the initial student model are updated, and the updated initial student model is used as the trained student model.
[0092] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0093] Get sample images in the training set;
[0094] Predicting based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature;
[0095] Perform prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature;
[0096] Determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature;
[0097] Based on the target loss function, the network parameters in the initial student model are updated, and the updated initial student model is used as the trained student model.
[0098] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0099] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0100] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0101] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A semi-supervised image analysis method, characterized in that: The semi-supervised image analysis method comprises: Get sample images in the training set; Predicting based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature; Perform prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature; Determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature; Based on the target loss function, the network parameters in the initial student model are updated, and the updated initial student model is used as the trained student model.
2. The semi-supervised image analysis method according to claim 1, characterized in that: The step of performing prediction based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature comprises: Based on the sample image input and the encoder in the initial student model, obtain a first feature; Obtaining a first mask based on the first feature and the score function, and determining a second mask based on the first mask; Based on the first feature and the first mask, a first causal feature is obtained, and based on the first feature and the second mask, a non-causal feature is obtained; Based on the first linear classifier and the non-causal feature in the initial student model, obtaining a first prediction distribution corresponding to the non-causal feature; Based on the second linear classifier and the first causal feature in the initial student model, a second prediction distribution corresponding to the first causal feature is obtained.
3. The semi-supervised image analysis method according to claim 2, characterized in that: The step of performing prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature: Based on the sample image input and the encoder in the initial student model, obtain a second feature; Obtain a second causal feature based on the second feature and the first mask obtained by sharing the initial teacher model; Based on the third linear classifier and the second causal feature in the initial teacher model, a third prediction distribution corresponding to the second causal feature is obtained.
4. The semi-supervised image analysis method according to claim 3, characterized in that: The objective loss function includes a supervision loss, which is expressed as follows: in, Expressed as the second predictive distribution, l ce represents the cross entropy loss, y i represents the true label, N l represents the number of labeled samples, x i is a sample image, To monitor losses; The objective loss function also includes an alignment loss, which is expressed as follows: in, is the first prediction distribution, y unif is uniformly distributed, KL represents Kullback-Leibler entropy, is the alignment loss.
5. The semi-supervised image analysis method according to claim 4, characterized in that: The target loss function also includes a mutual information function, which is expressed as follows: Among them, q θ (.|.) represents the variational approximation of the true distribution, refers to the first causal characteristic, refers to non-causal features, MI refers to mutual information, It refers to the mutual information function.
6. The semi-supervised image analysis method according to claim 5, characterized in that: The objective loss function also includes a first causal consistency alignment loss, which is expressed as follows: Among them, N u The number of unlabeled examples in the training set, refers to the third predictive distribution, is the first causal consistency alignment loss; The objective loss function also includes a second causal consistency alignment loss, which is expressed as follows: in, is the second causal consistency alignment loss, which describes the consistency mechanism between samples based on causal alignment, which constrains the consistency of causal feature outputs from different branches; R represents the relationship definition function, which is used to construct the correlation relationship between causal features of multiple samples; the mini-batch B of the training data set, l con Refers to consistency constraints. The objective loss function is expressed as follows: Wherein, L refers to the target loss function.
7. The semi-supervised image analysis method according to any one of claims 1 to 6, characterized in that: After the step of updating the network parameters in the initial student model based on the target loss function and using the updated initial student model as the trained student model, the method further comprises: Acquiring medical images; Prediction is performed based on the medical image and the trained student model to obtain a target prediction distribution corresponding to the third causal feature.
8. A semi-supervised image analysis device, characterized in that: The semi-supervised image analysis device comprises: An acquisition module is used to acquire sample images in a training set; A first prediction module, configured to perform prediction based on the sample image and the initial student model to obtain a first prediction distribution corresponding to the non-causal feature and a second prediction distribution corresponding to the first causal feature; A second prediction module, configured to make a prediction based on the sample image and the initial teacher model to obtain a third prediction distribution corresponding to the second causal feature; A determination module, configured to determine a target loss function based on the first predicted distribution, the second predicted distribution, the third predicted distribution, the first causal feature, the second causal feature, and the non-causal feature; The training module is used to update the network parameters in the initial student model based on the target loss function, and use the updated initial student model as the trained student model.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the semi-supervised image analysis method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the semi-supervised image analysis method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Semi-supervised text recognition method based on self-distillation
CN117746449A
Bearing fault diagnosis method based on causal priori knowledge distillation framework
CN118504407A
Protecting machine learning models from privacy attacks
US20210064760A1
Cited By
Weak supervision medical image segmentation method and system based on causal intervention
CN119693642A
A weakly supervised medical image segmentation method and system based on causal intervention
CN119693642B
