Passive domain adaptive eye fundus image segmentation method based on adaptive mask and curvature regularization

By employing adaptive mask consistency and average negative curvature regularization, the problem of pseudo-label noise accumulation in passive domain adaptive fundus image segmentation is solved, improving the cross-domain stability and segmentation performance of the model. This approach is suitable for fundus image segmentation tasks involving multiple devices and datasets.

CN121999227APending Publication Date: 2026-05-08CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202610191209.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-10
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing passive domain adaptive fundus image segmentation methods, pseudo-label noise is prone to accumulate, leading to a decrease in segmentation performance and boundary stability when the model is applied across devices and scenarios. In particular, problems such as breakage, jagged edges, and structural degradation occur in slender structures and boundary regions, such as blood vessels.

Method used

An adaptive mask consistency mechanism and mean negative curvature regularization are introduced to improve the reliability of pseudo-labels through adaptive mask processing, constrain the spatial structure of the prediction boundary, suppress irregular depressions and structural fractures, and use the exponential moving average method to update the teacher model parameters.

Benefits of technology

It significantly improves the model's generalization performance and cross-domain stability in fundus image segmentation tasks across multiple devices and datasets, enhances the smoothness and structural continuity of the segmentation results, and has good clinical application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121999227A_ABST
    Figure CN121999227A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly relates to a passive domain adaptive eye fundus image segmentation method based on adaptive mask and curvature regularization, which comprises the following steps: constructing a teacher-student self-training framework, and generating a pseudo tag by using a weak enhancement teacher model to guide student model training, an adaptive mask consistency strategy is introduced in the training process, adaptive mask processing is carried out on a target domain image, the mask proportion and size are adaptively adjusted according to the sample difficulty and the size of a pseudo-label area, a model is guided to keep prediction consistency under the shielding condition, and thus the pseudo-label reliability and the context modeling capability are improved; meanwhile, by introducing an average negative curvature regularization constraint, an irregular boundary in a prediction result is suppressed, the smoothness and structural continuity of a segmentation result are enhanced, and finally the precision and generalization ability of the model in a cross-device and cross-dataset fundus image segmentation task are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to a passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization. Background Technology

[0002] In recent years, deep learning-based medical image segmentation technology has been widely used in the field of ophthalmic auxiliary diagnosis, especially in the automatic segmentation of blood vessels, optic discs, and lesion regions in fundus images. However, existing segmentation methods usually rely on a large amount of precisely labeled training data, while pixel-by-pixel annotation of fundus images requires professional doctors, which is costly, time-consuming, and has significant distributional differences among different medical institutions and imaging devices, resulting in a significant performance degradation of the model when applied across devices and scenarios.

[0003] To alleviate the label dependency problem, unsupervised domain adaptation methods improve the model's generalization ability to some extent by transferring knowledge from labeled source domain data to unlabeled target domain data. However, in real-world medical scenarios, source domain data is often restricted by privacy protection and data sharing policies, making it difficult to obtain directly, thus creating a demand for passive domain adaptive learning. Existing passive domain adaptive segmentation methods mostly employ a teacher-student self-training framework, using pseudo-labels generated by the model itself for iterative optimization. However, due to the lack of real label constraints, pseudo-label noise tends to accumulate during training, especially in slender structures such as blood vessels and boundary regions, easily leading to problems such as breakage, jagged edges, and structural degradation, seriously affecting the reliability of segmentation results and their clinical application value.

[0004] Existing self-training strategies typically use the model state at historical moments (such as the student model or teacher model from previous iterations) as the source of supervision for the current training. However, in the early stages of training, since the model has not yet fully converged, the pseudo-labels generated by the teacher model for the target domain image are easily affected by domain offset, resulting in noise and bias. The erroneous supervision signals introduced by the aforementioned inaccurate pseudo-labels will continue to accumulate during the iterative optimization process, thereby causing error propagation and confirmation bias problems, leading to a decrease in the model's segmentation performance and boundary stability in the target domain. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization, comprising:

[0006] S1: Pre-train the image segmentation model on a source domain labeled fundus image dataset to obtain a pre-trained model;

[0007] S2: Initialize the teacher model and student model based on the pre-trained model;

[0008] S3: Input the unlabeled fundus image of the target domain into the teacher model and the student model respectively. The teacher model performs weak enhancement on the image and generates corresponding pseudo-labels, while the student model performs strong enhancement on the image.

[0009] S4: Perform masking processing on the target domain strongly enhanced image according to the adaptive masking strategy to obtain a masked image, and input the masked image into the student model to obtain the prediction result;

[0010] S5: Construct a mask consistency loss function based on the student model's prediction of the mask image and the pseudo-labels generated by the teacher model, so that the student model's prediction of the mask image is consistent with the teacher model's pseudo-labels.

[0011] S6: Calculate the average negative curvature regularization loss function based on the prediction results of the student model to constrain the spatial structure of the prediction boundary;

[0012] S7: Construct a total loss function based on the mask consistency loss function and the average negative curvature regularization loss function, and update the student model parameters based on the total loss function;

[0013] S8: Update the teacher model parameters based on the student model parameters using the exponential moving average method;

[0014] S9: Repeat steps S3-S8 until the preset number of training rounds is reached to obtain the trained student model;

[0015] S10: Segment the unlabeled fundus image of the target domain using a trained student model.

[0016] The beneficial effects of this invention are:

[0017] This invention addresses the problem of spurious label noise accumulation in passive domain adaptive segmentation by introducing an adaptive mask consistency mechanism. Through adaptive masking of the target domain image, the model is guided to learn stable contextual consistency features under occlusion conditions, thereby effectively improving the reliability of spurious labels. Simultaneously, by introducing an average negative curvature regularization constraint, irregular depressions and structural breaks in the predicted boundaries are suppressed, enhancing the smoothness and structural continuity of the segmentation results. This method does not require access to source domain data and can significantly improve the model's generalization performance and cross-domain stability in multi-device, multi-dataset fundus image segmentation tasks, demonstrating good clinical application value. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the overall framework of the present invention;

[0019] Figure 2 This is a schematic diagram of the mask used in this invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0021] A passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization, such as... Figure 1 As shown, it includes:

[0022] S1: Pre-train the image segmentation model on a source domain labeled fundus image dataset to obtain a pre-trained model;

[0023] In this embodiment, the source domain dataset is denoted as... ,in This represents a source domain fundus image sample. This represents the pixel-level annotation corresponding to the source domain fundus image. The number of source domain samples. Preferably, the pixel-level annotation includes segmentation annotations of anatomical structures such as the optic disc and optic cup.

[0024] Furthermore, an image segmentation model is constructed. ,in These are the model parameters. For the source domain dataset... Supervised training is performed, and the model parameters are updated by minimizing the supervised loss function. After training converges, the source domain pre-trained segmentation model is obtained. ,in These are the model parameters after pre-training.

[0025] Preferably, the image segmentation model adopts a DeepLabv3+ architecture and uses MobileNetV2 as the backbone network; the model optimization uses the Adam optimizer, with momentum coefficients set to 0.9 and 0.99 respectively; the initial learning rate of the source model during training is set to... The pre-trained model is obtained by decaying by 0.98 per epoch and training for 200 epochs.

[0026] It should be noted that in the subsequent passive domain adaptation stage (corresponding to subsequent steps S2–S9), the source domain data is inaccessible due to privacy or compliance restrictions. This invention only uses the pre-trained model parameters obtained in step S1 as initialization and knowledge source, and no longer depends on the source domain samples themselves.

[0027] S2: Initialize the teacher model and student model based on the pre-trained model;

[0028] In this embodiment, the source domain pre-trained segmentation model obtained in step S1 is used. Construct teacher models separately With student model The teacher model With student model Both adopt the same source domain pre-trained segmentation model as in step S1. The network architecture is exactly the same to ensure that all three are processed in a unified feature representation space.

[0029] Furthermore, the parameters of the pre-trained model are copied to the teacher model and the student model to initialize the parameters, which can be specifically represented as follows: ;

[0030] By using the above initialization method, the teacher model and the student model have the same initial parameter state at the beginning of training, thereby providing stable initial conditions for subsequent self-training iterations on unlabeled data in the target domain.

[0031] It should be noted that during subsequent training, the student model parameters... The teacher model parameters will be updated based on the loss function via backpropagation. Instead of directly participating in backpropagation updates, the student model parameters are updated using an exponential moving average strategy to achieve a more stable pseudo-label generation capability.

[0032] S3: Input the unlabeled fundus image of the target domain into the teacher model for weak enhancement processing to generate corresponding pseudo-labels, and at the same time input the target domain image into the student model for strong enhancement processing.

[0033] In this embodiment, the target domain unlabeled fundus image dataset is assumed to be... ,in This represents a sample of fundus image in the target domain. This represents the number of samples in the target domain. For any sample in the target domain... Weakly enhanced and strongly enhanced views are constructed and input into the teacher model and student model respectively: the teacher model generates pixel-level pseudo-labels for the weakly enhanced image, and the student model makes predictions for the strongly enhanced image.

[0034] Specifically, the weak enhancement operator is defined as Strong enhancement operator for Then we have:

[0035]

[0036] Subsequently, the weakly enhanced sample Input Teacher Model To obtain the predicted probability map .

[0037] The strongly enhanced sample Input student model The predicted probability map is obtained. .

[0038] The above process can be represented as:

[0039]

[0040] Preferably, the weak enhancement is used to maintain the stability of the supervision signal without significantly damaging the anatomical structure; the strong enhancement is used to encourage the student model to learn more robust feature representations under stronger perturbation input conditions, thereby improving its adaptability to changes in the distribution of the target domain.

[0041] S4: Perform masking processing on the target domain image according to the adaptive masking strategy to obtain a masked image, and input the masked image into the student model to obtain the prediction result;

[0042] In this embodiment, the target domain strongly enhanced image obtained in step S3 is... An adaptive masking strategy is applied to generate a binary mask aligned with the image space. And construct a mask image based on this. Then, the masked image is input into the student model to obtain the prediction result.

[0043] To avoid excessive occlusion or insufficient perturbation of targets of different scales due to a fixed mask size, this invention adaptively sets the side length of the mask block according to the size of the foreground region of the pseudo-label corresponding to the target domain sample.

[0044] Specifically, let the pseudo-labels generated by the teacher model be... Its foreground pixel count is:

[0045]

[0046] in, Indicates pixel position, Foreground category set, This is an indicator function.

[0047] To facilitate determining the scale, the equivalent side length of the target is defined as follows:

[0048]

[0049] Furthermore, the side length of the mask block Determine as follows:

[0050]

[0051] in, This is the proportionality coefficient. and These are the lower and upper limits of the mask block's side length, used to prevent the mask block from being too small or too large.

[0052] Furthermore, to ensure that samples of varying difficulty receive context-enhanced training signals of different intensities, this invention adaptively determines the occlusion ratio based on the sample difficulty. Preferably, the sample difficulty is determined by the difference in predictions between the teacher model and the student model for the same target domain image, and the difficulty value is defined as... :

[0053]

[0054] in and These represent the prediction results of the teacher model and the student model for the target domain image, respectively. This represents a symmetric category-weighted intersection-union ratio (IUGR) metric. The occlusion ratio is determined based on the difficulty value. :

[0055]

[0056] in, and These represent the lower and upper limits of the occlusion ratio, respectively.

[0057] In determining and Then, a binary mask is generated. Preferably, such as Figure 2 As shown, the binary mask is generated using a random block method: the mask block positions are randomly sampled in the image space, and the values ​​are calculated using the side length... Generate square shading blocks to ensure the total shading area meets the requirements. The preset proportional relationship. The mask can be randomly distributed throughout the image, or more preferably, it can be combined with the pseudo-label foreground region for distribution constraint to improve the context mining effect of structural regions.

[0058] Subsequently, the mask is applied to the strongly enhanced image through element-wise multiplication to obtain the mask image. :

[0059]

[0060] in, This indicates element-wise multiplication.

[0061] The mask image Input student model The predicted probability map of the student model for the masked image is obtained as follows:

[0062]

[0063] The predicted probability map In subsequent step S5, the pseudo-labels generated by the teacher model will be used to construct an adaptive mask consistency constraint to guide the student model to maintain stable and reliable semantic predictions even when local information is missing.

[0064] S5: Construct mask consistency constraints to ensure that the student model's predictions of the masked image are consistent with the teacher model's pseudo-labels.

[0065] In this embodiment, in order to use the pseudo-labels generated by the teacher model to provide stable supervision of the student model and to enable the student model to make consistent predictions with the help of context even when local information is missing, this step constructs a mask consistency constraint loss based on the teacher pseudo-labels obtained in step S3 and the student mask predictions obtained in step S4.

[0066] (1) Construction of teacher pseudo-labels and confidence plots:

[0067] Teacher model for weakly enhanced images in the target domain The output is denoted as a pixel-level class probability map:

[0068]

[0069] in These are the image height and width, respectively. This represents the number of categories.

[0070] Generating pseudo-labels based on the probability graph:

[0071]

[0072] Furthermore, the pseudo-label confidence level for each pixel position u is defined as:

[0073]

[0074] To reduce the accumulation of errors caused by noise and false labels, a confidence threshold is preferably set. Only high-confidence pixels are selected to participate in the consistency constraint, resulting in a reliable pixel set:

[0075]

[0076] (2) Definition of consistency constraints based on mask region:

[0077] Student model for masked image The output is denoted as:

[0078]

[0079] To reflect the purpose of mask learning (i.e., context-dependent reasoning at the masked location), it is preferable to construct consistency constraints only in the masked region. Let the binary mask generated in step S4 be... ,in Represents pixels Occluded, define the set of occluded pixels:

[0080]

[0081] Furthermore, the intersection of the reliable pixel set and the occluded pixel set is obtained to obtain the final pixel set participating in the consistency constraint:

[0082]

[0083] when When the set is empty, to avoid training instability, it can degenerate into using only a reliable set of pixels. Construct consistency constraints.

[0084] (3) Calculation of adaptive mask consistency loss:

[0085] The prediction probability map of the mask image based on the student model obtained in step S4 Pseudo-labels generated by the teacher model Construct an adaptive mask consistency loss. Preferably, only the pixel set participating in the consistency constraint... The calculations were performed, and the alignment was achieved using binary cross-entropy loss, yielding the following results:

[0086]

[0087] in, Indicates pixel position, This represents the number of pixels in the foreground region, used to normalize the loss. This is the binary cross-entropy function.

[0088] By using the aforementioned adaptive mask consistency loss, the student model can maintain consistency with the supervision signal provided by the teacher model when the local input region is masked, thereby improving the prediction stability and robustness under cross-domain conditions.

[0089] S6: Calculate the average negative curvature regularization loss based on the prediction results of the student model, which is used to constrain the spatial structure of the segmentation boundary;

[0090] In this embodiment, in order to suppress common structural instability phenomena such as jagged edges, fractures and unreasonable depressions in the predicted boundary of the target domain, this step performs edge extraction and curvature calculation based on the predicted probability map of the student model, and applies penalty constraints to the boundary region with negative curvature, thereby obtaining the average negative curvature regularization loss.

[0091] Suppose the student model's prediction probability graph for the target domain samples is as follows:

[0092]

[0093] in, , These are the image height and width, respectively. For the number of categories, Indicates the first The predicted probability map for each class. To avoid interference from the background with the boundary geometric constraints, this step only applies to the foreground class set. Calculate the regularization term.

[0094] (1) Edge prediction extraction:

[0095] For each foreground category For the prediction probability map Apply edge detection operators to extract predicted edge maps For example, using the Canny edge detection operator, it can be represented as:

[0096]

[0097] in This represents the Canny edge detection operator.

[0098] Furthermore, define the set of edge pixels:

[0099]

[0100] in This represents the pixel position.

[0101] (2) Boundary curvature calculation:

[0102] Based on edge map Calculate its curvature .make They are respectively along axis, The first derivative of the axis, Let the second derivative and the mixed second derivative be respectively, then the pixel The curvature at that point can be expressed as:

[0103]

[0104] in, To prevent constant terms with zero denominators. Positive curvature indicates that the boundary is convex outward, and negative curvature indicates that the boundary is concave inward.

[0105] (3) Boundary curvature regularization loss:

[0106] To specifically suppress unstable structures such as concave edges, sharp corners, and jagged edges at the boundaries, this step only applies penalties to regions with negative curvature, defining the negative curvature response as:

[0107]

[0108] Furthermore, the average negative curvature regularization loss is defined as the average of the negative curvature responses at the edge pixels of each foreground category:

[0109]

[0110] By using the above method, when there are many negative curvature points on the predicted boundary, the corresponding average negative curvature regularization loss increases, thereby prompting the model to reduce unreasonable concavities and jagged structures during training, and improving the smoothness and structural continuity of the segmentation boundary.

[0111] S7: Construct a total loss function based on the mask consistency loss function and the boundary curvature regularization loss function, and update the student model parameters based on the total loss function;

[0112] In this embodiment, the pseudo-labels of the teacher model obtained in step S3 are used. The prediction results of the student model for strongly enhanced images in the target domain. A binary cross-entropy loss is constructed to provide pixel-level supervision constraints for the student model; simultaneously, the adaptive mask consistency loss obtained in step S5 and the average negative curvature regularization loss obtained in step S6 are jointly incorporated into the optimization objective to form the total loss function used to update the student model parameters:

[0113]

[0114] in, and , which are weighting coefficients used to balance the impact of consistency constraints and boundary geometric regularization on the training process.

[0115] The binary cross-entropy loss To ensure that student model predictions are consistent with teacher pseudo-labels, the preferred representation is:

[0116]

[0117] in, Where N is the pixel position, and N is the number of pixels involved in the calculation; The cross-entropy function for binary classification has the following form:

[0118]

[0119] in, These are the pixel values ​​of the pseudo-label. This represents the student model's prediction probability that the pixel belongs to the foreground.

[0120] In each iteration of training, maintain the teacher model parameters. Instead of updating directly through backpropagation, only the student model parameters are updated. Calculate the total loss about The gradient is calculated, and the student model parameters are updated using gradient descent-based optimization methods:

[0121]

[0122] in, The learning rate is used. Through the above update method, the student model is simultaneously subject to binary cross-entropy supervision, adaptive mask consistency constraint, and average negative curvature regularization constraint on unlabeled data in the target domain, thereby gradually acquiring adaptive segmentation ability to adapt to changes in the distribution of the target domain. After completing the update of the student model parameters, step S8 is performed to update the teacher model parameters using an exponential moving average.

[0123] S8: Update teacher model parameters based on student model parameters using the exponential moving average method;

[0124] In this embodiment, to improve the stability of pseudo-label generation and reduce error accumulation caused by noise supervision in the early stages of training, the teacher model parameters are not directly updated through backpropagation, but are updated using an exponential moving average (EMA) method based on the latest parameters of the student model. Let the... After the second iteration, the student model parameters are: The teacher model parameters are The teacher model parameter update rule is as follows:

[0125]

[0126] Where t is the number of training steps. The smoothing coefficient controls the weighting of the teacher model in fusing historical parameters with current student parameters; a larger smoothing coefficient indicates smoother teacher model updates and more stable pseudo-labels.

[0127] Through the EMA update method described above, the teacher model can be smoothly evolved from the current state of the student model, thus continuously providing more stable and reliable pseudo-label supervision signals in subsequent iterations. After completing the teacher model parameter update, proceed to step S9, and repeat steps S3 to S8 until training ends.

[0128] S9: Repeat steps S3 to S8 until the preset number of training rounds is reached to obtain the trained student model.

[0129] In this embodiment, steps S3 to S8 are treated as a training iteration cycle and repeatedly executed on the unlabeled dataset in the target domain to gradually complete the adaptive optimization of the student model in the target domain. Specifically, in each iteration, the teacher model generates pseudo-labels based on the weakly enhanced target domain image, and the student model makes predictions based on the strongly enhanced and adaptively masked target domain image, and sequentially calculates the adaptive mask consistency loss, the average negative curvature regularization loss, and the binary classification cross-entropy loss; then, the student model parameters are updated according to the total loss, and the teacher model parameters are updated using an exponential moving average strategy.

[0130] The above iterative process can be expressed as: for Repeat the following steps:

[0131]

[0132]

[0133] Where T is the preset number of training iterations or the maximum number of iterations corresponding to the training termination condition. For learning rate, This is the EMA smoothing coefficient.

[0134] Iterative training stops when a preset termination condition is met. The termination condition includes, but is not limited to, reaching the maximum number of iterations T, the training loss converging, or the verification metric no longer improving.

[0135] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization, characterized in that, include: S1: Pre-train the image segmentation model on a source domain labeled fundus image dataset to obtain a pre-trained model; S2: Initialize the teacher model and student model based on the pre-trained model; S3: Input the unlabeled fundus image of the target domain into the teacher model and the student model respectively. The teacher model performs weak enhancement on the image and generates corresponding pseudo-labels, while the student model performs strong enhancement on the image. S4: Perform masking processing on the target domain strongly enhanced image according to the adaptive masking strategy to obtain a masked image, and input the masked image into the student model to obtain the prediction result; S5: Construct a mask consistency loss function based on the student model's prediction of the mask image and the pseudo-labels generated by the teacher model, so that the student model's prediction of the mask image is consistent with the teacher model's pseudo-labels. S6: Calculate the average negative curvature regularization loss function based on the prediction results of the student model to constrain the spatial structure of the prediction boundary; S7: Construct a total loss function based on the mask consistency loss function and the average negative curvature regularization loss function, and update the student model parameters based on the total loss function; S8: Update the teacher model parameters based on the student model parameters using the exponential moving average method; S9: Repeat steps S3-S8 until the preset number of training rounds is reached to obtain the trained student model; S10: Segment the unlabeled fundus image of the target domain using a trained student model.

2. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, The image segmentation model is pre-trained on a dataset of labeled fundus images in the source domain to obtain a pre-trained model, including: S11: The source domain dataset is denoted as... ,in, This represents the nth source domain fundus image sample. This represents the pixel-level annotation corresponding to the source domain fundus image. This represents the number of samples in the source domain. S12: Constructing an image segmentation model ,in The source domain dataset is used as the model parameters. Supervised training is performed, and the model parameters are updated by minimizing the supervised loss function. After training converges, a pre-trained segmentation model is obtained. ,in, These are the model parameters after pre-training; The image segmentation model adopts the DeepLabv3+ architecture and uses MobileNetV2 as the backbone network; the model optimization uses the Adam optimizer, with momentum coefficients set to 0.9 and 0.99 respectively; the initial learning rate of the source model during training is set to... Each epoch decays by 0.98, and training continues for 200 epochs to obtain the pre-trained segmentation model.

3. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, Initializing the teacher and student models based on the pre-trained model includes: Based on the pre-trained segmentation model Construct teacher models separately With student model The teacher model With student model All of them use the same pre-trained segmentation model. The network architecture is exactly the same; and the parameters of the pre-trained model are copied to the teacher model and the student model to initialize the parameters.

4. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, Unlabeled fundus images of the target domain are input into the teacher model and the student model, respectively. The teacher model performs weak enhancement on the images and generates corresponding pseudo-labels, while the student model performs strong enhancement on the images, including: S31: Let the target domain be an unlabeled fundus image dataset. ,in, This represents a sample of fundus image in the target domain. The number of samples in the target domain; S32: For any target domain sample Weakly enhanced and strongly enhanced views are constructed and input into the teacher model and student model respectively. The teacher model generates pixel-level pseudo-labels for the weakly enhanced image and the student model makes predictions for the strongly enhanced image. S321: Define the weak enhancement operator as Strongly enhance the operator for Generate weakly enhanced samples and strongly enhanced samples ;in, Represents a sample of fundus image in the target domain; S322: Transfer the weakly enhanced sample Input teacher model To obtain the predicted probability map The strongly enhanced sample Input student model The predicted probability map is obtained. .

5. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, The target domain strongly enhanced image is masked according to an adaptive masking strategy to obtain a masked image, and the masked image is input into the student model to obtain the prediction result, including: S41: Let the pseudo-labels generated by the teacher model be... To generate foreground pixel count ,in, Indicates pixel position, Foreground category set, For indicator functions; S42: Counting based on foreground pixels Generate the target equivalent side length: ; S43: Set mask side length: ,in, This is the proportionality coefficient. and These are the lower and upper limits of the mask block side length, respectively; S44: Calculate the difficulty value based on the difference in predictions between the teacher model and the student model for the same target domain image. ,in, and The images represent the prediction results of the teacher model and the student model for the target domain image, respectively. This represents a symmetric category-weighted intersection-union ratio (IUU) measure. S45: Based on Difficulty Value Determine the shading ratio: ,in, and These are the lower and upper limits of the occlusion ratio, respectively; S46: In determining and Then, a binary mask is generated using a random block method. Randomly sample mask block positions in the image space and use the side length Generate square shading blocks to ensure the total shading area meets the requirements. The preset proportional relationship, where, For the height of the image, The width of the image; S46: Apply a mask to the target domain image for strong enhancement using element-wise multiplication. To obtain the mask image ;in, This represents element-wise multiplication; S47: Apply the mask image Input student model The student model's prediction probability map of the masked image is obtained. ,in, For the student model.

6. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, A mask consistency loss function is constructed based on the student model's predictions of the masked image and the pseudo-labels generated by the teacher model, including: ; in, Let be the mask consistency loss function. For pixel position, This represents the number of pixels in the foreground region. For binary classification, the cross-entropy function is used. Pseudo-labels generated for the teacher model This is a probability map showing the student model's predictions for the masked image. The set of pixels that participate in the consistency constraint.

7. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, The mean negative curvature regularization loss is calculated based on the prediction results of the student model, including: in, This represents the mean negative curvature regularization loss function. For the number of categories, Foreground category set, For the set of edge pixels, For pixel position, For pixels The curvature at that point.

8. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, The total loss function is constructed based on the mask consistency loss function and the mean negative curvature regularization loss function, including: in, For the total loss function, and These are the weighting coefficients used to balance the impact of consistency constraints and boundary geometry regularization on the training process. This is a binary cross-entropy loss function used to ensure that student model predictions are consistent with teacher pseudo-labels.

9. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, Updating student model parameters based on the total loss function includes: In each iteration of training, maintain the teacher model parameters. Instead of updating directly through backpropagation, only the student model parameters are updated. Calculate total loss about The gradient is calculated, and the student model parameters are updated using gradient descent-type optimization methods. ,in, For the total loss function, This is the learning rate.

10. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, characterized in that, The teacher model parameters are updated based on the student model parameters using the exponential moving average method, including: Where t is the number of training steps, This is used to control the smoothing coefficient of the teacher model's weights for fusing historical parameters with current student model parameters. For teacher model parameters, These are the parameters for the student model.

Citation Information

Cited By

  • Model training method, device and storage medium for medical image segmentation

    CN122244066A