Abstract:A semi-supervised convolutional neural network segmentation method of medical images based on contrastive learning is proposed. The cardiac magnetic resonance imaging (MRI) images to be segmented are preprocessed to obtain positive and negative samples by labels. The U-Net shrinks network is applied to extract features of the positive samples, negative samples, and input samples. In addition, an unbalanced contrastive loss function is proposed, which is weighted with the binary cross-entropy loss function to obtain the total loss function. The model is pre-trained with labeled samples, and unlabeled images are predicted by the pre-trained model to generate pseudo-labels. A pseudo-label post-processing algorithm for removing disconnected regions and hole filling of pseudo-labels is proposed to guide the training process of semi-supervised networks. The results on the Sunnybrook dataset show that the segmentation results of this model are better, with a higher dice coefficient, accuracy, and recall rate.