The present invention proposes a semi-supervised
MRI brain tumor segmentation method based on a contrast-guided
diffusion model, belonging to the field of
image segmentation. In step S1, the T1 sequence data of the BraST2018 dataset is sliced, and the slice data without tumors is partially occluded; in step S2, pairs of
lesion and healthy image data are generated, and the
minimum bounding rectangle occlusion is constructed using the
brain tumor sample
mask, and the
lesion area is restored to
healthy tissue; in step S3, through the data pairs obtained in S2, the contrast information is used to guide the
diffusion model to denoise and generate
lesion labels. Thereafter, pre-training is performed with
labeled data, and pseudo-labels are generated for unlabeled data through the pre-trained model, and then brought into the model together with the
labeled data for the re-training process; in step S4, the structural contrast loss is used to improve the
information mining ability of the model when the confidence of the pseudo-labels is insufficient; in step S5, only a small amount of
labeled data is used for training and validation. The present invention realizes the
lesion segmentation of
MRI brain tumors by constructing a semi-supervised segmentation method based on a contrast-guided
diffusion model, on the premise of only requiring a small amount of labeled data. This method solves the problem that traditional
deep learning segmentation methods overly rely on a large amount of labeled data and improves the segmentation performance of the model under the condition of a small amount of labeled data.