CN-121999227-A - Passive domain self-adaptive fundus image segmentation method based on self-adaptive mask and curvature regularization
Abstract
The invention belongs to the technical field of image processing, and particularly relates to a passive domain self-adaptive fundus image segmentation method based on self-adaptive mask and curvature regularization, which comprises the steps of constructing a teacher-student self-training frame, generating a pseudo tag by using a weak enhanced teacher model to guide student model training, introducing an adaptive mask consistency strategy in the training process, carrying out self-adaptive mask processing on a target domain image, adaptively adjusting mask proportion and size according to sample difficulty and pseudo tag area size, and guiding the model to maintain prediction consistency under a shielding condition, thereby improving pseudo tag reliability and context modeling capability; meanwhile, by introducing average negative curvature regularization constraint, irregular boundaries in the prediction result are suppressed, smoothness and structural continuity of the segmentation result are enhanced, and finally precision and generalization capability of the model in cross-equipment and cross-dataset fundus image segmentation tasks are improved.
Inventors
- WANG SHIYAN
- GAO SHUN
- Teng Yuqiang
Assignees
- 重庆邮电大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260210
Claims (10)
- 1. The passive domain self-adaptive fundus image segmentation method based on self-adaptive mask and curvature regularization is characterized by comprising the following steps of: S1, pre-training an image segmentation model on a source domain marked fundus image dataset to obtain a pre-training model; s2, initializing a teacher model and a student model based on the pre-training model; S3, inputting the target domain non-labeling fundus image into a teacher model and a student model respectively, wherein the teacher model weakly enhances the image and generates a corresponding pseudo tag, and the student model strongly enhances the image; s4, carrying out mask processing on the target domain strong enhancement image according to the self-adaptive mask strategy to obtain a mask image, and inputting the mask image into a student model to obtain a prediction result; S5, constructing a mask consistency loss function according to a prediction result of the student model on the mask image and a pseudo tag generated by the teacher model, so that the prediction of the student model on the mask image is consistent with the pseudo tag of the teacher model; s6, calculating an average negative curvature regularization loss function based on a prediction result of the student model so as to restrict a spatial structure of a prediction boundary; s7, constructing a total loss function according to the mask consistency loss function and the average negative curvature regularization loss function, and updating student model parameters based on the total loss function; S8, updating teacher model parameters according to student model parameters by using an index sliding average method; s9, repeatedly executing the steps S3-S8 until the number of the training rounds reaches the preset number, and obtaining a trained student model; And S10, completing segmentation of the target domain non-labeling fundus image through the trained student model.
- 2. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization of claim 1, wherein the pre-training of the image segmentation model on the source domain labeled fundus image dataset to obtain a pre-training model comprises: S11, recording the source domain data set as , wherein, Representing an nth source domain fundus image sample, Representing a pixel-level annotation corresponding to the source-domain fundus image, The number of source domain samples; S12, constructing an image segmentation model Wherein For model parameters, use the source domain dataset Performing supervision training to update model parameters by minimizing supervision loss function After training convergence, a pre-training segmentation model is obtained , wherein, Model parameters after the pre-training is completed; The image segmentation model adopts DeepLabv & lt3+ & gt structure and MobileNetV & lt 2 & gt as backbone network, model optimization adopts Adam optimizer, momentum coefficients are respectively set to 0.9 and 0.99, and initial learning rate in source model training stage is set to Each epoch decays by 0.98, training continues for 200 epochs, and the pre-trained segmentation model is obtained.
- 3. A passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization as claimed in claim 1, wherein initializing a teacher model and a student model based on the pre-trained model comprises: Based on the pre-training segmentation model Respectively constructing teacher models With student model The teacher model With student model All adopt and said pre-train segmentation model And copying the parameters of the pre-training model to a teacher model and a student model to realize parameter initialization.
- 4. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization of claim 1, wherein the target domain non-labeling fundus image is respectively input into a teacher model and a student model, wherein the teacher model weakly enhances the image and generates corresponding pseudo labels, and the student model strongly enhances the image, comprising: s31, setting the target field non-labeling fundus image dataset as , wherein, Representing a sample of the fundus image of the target region, For the number of target domain samples; s32, for any target domain sample Respectively constructing a weak enhancement view and a strong enhancement view, respectively inputting a teacher model and a student model, wherein the teacher model generates pixel-level pseudo labels for the weak enhancement image, and the student model predicts the strong enhancement image; S321, defining the weak enhancement operator as The strong enhancement operator is Generating weak enhanced samples Sum-strength enhanced samples Wherein, the method comprises the steps of, Representing a target domain fundus image sample; S322, the weak enhanced sample Input teacher model To obtain a predictive probability map And (c) subjecting the strongly enhanced sample Input student model Obtaining a predictive probability map 。
- 5. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization of claim 1, wherein masking the target domain strong enhancement image according to an adaptive masking strategy to obtain a mask image, and inputting the mask image into a student model to obtain a prediction result, comprises: S41, setting a pseudo tag generated by a teacher model as To generate foreground pixel count , wherein, The pixel positions are indicated and the pixel positions are indicated, As a set of foreground classes, Is an indication function; S42, counting according to foreground pixels Generating a target equivalent side length: ; s43, setting a mask side length: , wherein, Is a coefficient of proportionality and is used for the control of the power supply, And (3) with The lower limit and the upper limit of the side length of the mask block are respectively; s44, calculating a difficulty value according to the prediction difference of the teacher model and the student model on the image of the same target domain , wherein, And (3) with The prediction results of the teacher model and the student model on the target domain image are respectively, Representing a symmetric class weighted cross-scale metric; s45 based on the difficulty value Determining a masking ratio: , wherein, And (3) with The lower limit and the upper limit of the shielding proportion are respectively; s46, at the time of determination And (3) with Then adopting a random block mode to generate a binary mask Randomly sampling mask block positions in image space and taking side lengths as the lengths Generating square shielding blocks to ensure that the total shielding area meets Wherein, For the height of the image to be high, Is the width of the image; s46, applying a mask to the target domain strong enhanced image by element-wise multiplication To obtain a mask image Wherein, the method comprises the steps of, Representing element-by-element multiplication; s47, the mask image is processed Input student model Obtaining a prediction probability map of the student model to the mask image , wherein, Is a student model.
- 6. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization according to claim 1, wherein constructing a mask consistency loss function according to a prediction result of a mask image by a student model and a pseudo tag generated by a teacher model comprises: ; Wherein, the In order to mask the consistency loss function, For the pixel location(s), As the number of pixels in the foreground region, As a two-class cross entropy function, The pseudo tag generated for the teacher model, For a predictive probability map of the student model versus the mask image, Is a collection of pixels that participates in a consistency constraint.
- 7. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization of claim 1, wherein calculating the average negative curvature regularization loss based on the prediction of the student model comprises: Wherein, the Representing the average negative curvature regularization loss function, For the number of categories to be considered, As a set of foreground classes, As a set of edge pixels, For the pixel location(s), Is a pixel Curvature at that point.
- 8. A passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization as claimed in claim 1, wherein constructing a total loss function from the masking consistency loss function and an average negative curvature regularization loss function comprises: Wherein, the As a function of the total loss, And (3) with To balance the weight coefficients used to balance the impact of consistency constraints and boundary geometry regularities on the training process, A two-class cross entropy loss function for keeping student model predictions consistent with teacher pseudo tags.
- 9. A passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization as claimed in claim 1, wherein updating student model parameters based on the total loss function comprises: maintaining teacher model parameters during each iteration of training Direct update of student model parameters without back propagation Calculation of total loss With respect to And updating student model parameters by adopting a gradient descent optimization method , wherein, As a function of the total loss, Is the learning rate.
- 10. The passive domain adaptive fundus image segmentation method based on adaptive masking and curvature regularization of claim 1, wherein updating teacher model parameters from student model parameters using an exponential sliding average method comprises: wherein t is the number of training steps, For controlling the teacher model to blend the smoothing coefficients of the weights of the historical parameters and the current student model parameters, As a parameter of the model of the teacher, Is a student model parameter.
Description
Passive domain self-adaptive fundus image segmentation method based on self-adaptive mask and curvature regularization Technical Field The invention belongs to the technical field of image processing, and particularly relates to a passive domain self-adaptive fundus image segmentation method based on self-adaptive mask and curvature regularization. Background In recent years, medical image segmentation technology based on deep learning has been widely used in the field of ophthalmic auxiliary diagnosis, and particularly, remarkable progress has been made in automatic segmentation of blood vessels, optic discs and lesion areas in fundus images. However, the existing segmentation method generally depends on a large amount of training data accurately marked, the pixel-by-pixel marking of fundus images needs to be completed by a professional doctor, marking cost is high, period is long, obvious distribution differences exist between different medical institutions and imaging devices, and performance of the model is obviously reduced when the model is applied across devices and scenes. In order to alleviate the problem of annotation dependence, the unsupervised domain adaptation method improves the generalization capability of the model to a certain extent by utilizing knowledge of the migration of source domain annotation data to target domain non-annotation data. However, in an actual medical scene, source domain data is often limited by privacy protection and data sharing policies, and is difficult to directly acquire, so that the passive domain self-adaptive learning requirement is induced. The existing passive domain self-adaptive segmentation method mostly adopts a teacher-student self-training framework, generates pseudo labels through a model to carry out iterative optimization, but due to lack of real label constraint, pseudo label noise is easy to accumulate continuously in the training process, especially in long and thin structures such as blood vessels and boundary areas, the problems of fracture, saw tooth, structural degradation and the like are easy to occur, and the reliability of segmentation results and clinical application value are seriously affected. The existing self-training strategy generally takes a model state (such as a student model or a teacher model which is iterated previously) at a historical moment as a supervision source of current training, and in the early stage of training, as the model is not fully converged, a pseudo tag generated by the teacher model on a target domain image is easily influenced by domain offset to generate noise and deviation, and error supervision signals introduced by the inaccurate pseudo tag can be continuously accumulated in the iterative optimization process, so that error propagation and deviation confirmation problems are caused, and the segmentation performance and boundary stability of the model on the target domain are reduced. Disclosure of Invention In order to solve the technical problems, the invention provides a passive domain self-adaptive fundus image segmentation method based on self-adaptive mask and curvature regularization, which comprises the following steps: S1, pre-training an image segmentation model on a source domain marked fundus image dataset to obtain a pre-training model; s2, initializing a teacher model and a student model based on the pre-training model; S3, inputting the target domain non-labeling fundus image into a teacher model and a student model respectively, wherein the teacher model weakly enhances the image and generates a corresponding pseudo tag, and the student model strongly enhances the image; s4, carrying out mask processing on the target domain strong enhancement image according to the self-adaptive mask strategy to obtain a mask image, and inputting the mask image into a student model to obtain a prediction result; S5, constructing a mask consistency loss function according to a prediction result of the student model on the mask image and a pseudo tag generated by the teacher model, so that the prediction of the student model on the mask image is consistent with the pseudo tag of the teacher model; s6, calculating an average negative curvature regularization loss function based on a prediction result of the student model so as to restrict a spatial structure of a prediction boundary; s7, constructing a total loss function according to the mask consistency loss function and the average negative curvature regularization loss function, and updating student model parameters based on the total loss function; S8, updating teacher model parameters according to student model parameters by using an index sliding average method; s9, repeatedly executing the steps S3-S8 until the number of the training rounds reaches the preset number, and obtaining a trained student model; And S10, completing segmentation of the target domain non-labeling fundus image through the trained student model. The invention has the benefi