BackgroundSemi‐supervised learning has gained popularity in medical image segmentation due to its ability to reduce reliance on image annotation. A typical approach in semi‐supervised learning is to select reliable predictions as pseudo‐labels and eliminate unreliable predictions. Contrastive learning helps prevent the insufficient utilization of unreliable predictions, but neglecting the anatomical structure of medical images can lead to suboptimal optimization results.PurposeWe propose a novel approach for semi‐supervised liver segmentation using contrastive learning, which leverages unlabeled data and enhances the suitability of contrastive learning for liver segmentation.Method and materialsContrastive learning helps prevent the inappropriate utilization of unreliable predictions, but neglecting the anatomical structure of medical images can lead to suboptimal optimization results. Therefore, we propose a semi‐supervised contrastive learning method with local regions self‐supervision (LRS2). On one side, we employ Shannon entropy to distinguish between reliable and unreliable predictions and reduce the dissimilarity between their representations within regional artificial units. Within each unit of the liver image, we strongly encourage unreliable predictions to acquire valuable information pertaining to the correct category by leveraging the representations of reliable predictions in their vicinity. On the other side, we introduce a dynamic reliability threshold based on the Shannon entropy of each prediction, gradually evaluating the confidence threshold of reliable predictions as predictive accuracy improves. After selecting reliable predictions, we sequentially apply erosion and dilation to refine them for better selection of qualified positive and negative samples. We evaluate our proposed method on abdominal CT images, including 131 images (train data: 77, validation data: 26, and testing data: 28) from 2017 ISBI Liver Tumors Segmentation Challenge.ResultsOur method obtains satisfactory performance in different proportion by exploiting the unreliable predictions. Compared with the result of VNet only under supervised settings (with 10, 30, 50, 70% and full labeled data), LRS2, respectively, brings an improvement of Dice coefficient by +6.11, +3.55, +4.43, and +2.25%, achieving Dice coefficients of 93.44, 93.31, 94.85, and 95.12%, respectively.ConclusionIn this study, we carefully select appropriate positive and negative samples from reliable regions, ensuring that anchor pixels within unreliable regions are correctly assigned to their respective categories. With a consideration of the anatomical structure present in CT images, we partition the image representations into regional units, enabling anchor pixels to capture more precise sample information. Extensive experiments confirm the effectiveness of our method.