A semi-supervised polyp image segmentation method based on double network dynamic collaboration

CN122990184APending Publication Date: 2026-10-27CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610741536.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0007]本发明的目的在于提供一种基于双网络动态协同的半监督息肉图像分割方法,以解决现有交叉伪监督方法中伪标签噪声难以控制、小目标息肉易漏标、边界区域伪标签质量低下等问题,以及现有半监督改进方法训练复杂度高、部署效率低的问题

Benefits of technology

[0038]1. 本发明通过引入动态置信度阈值机制,显著改善了标准CPS中小目标息肉因固定高阈值而被系统性滤除的问题,显著提升了小目标息肉的分割召回率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990184A_ABST
    Figure CN122990184A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on double network dynamic coordination's semi-supervised polyp image segmentation method, belong to medical image processing, image segmentation and semi-supervised learning technical field.This method obtains labeled polyp image and unlabeled polyp image, constructs two segmentation networks with same structure but different initialization weights;Weak data enhancement is carried out to the labeled polyp image, and strong data enhancement is carried out to the unlabeled image, and the two networks are pre-trained with labeled image supervision;Unlabeled enhanced image is input into two networks, and based on prediction probability map, mixed pseudo-label containing hard label region and soft label region is generated by dynamic confidence threshold and edge perception mechanism;Bidirectional cross pseudo-supervision training is carried out using the mixed pseudo-label, and the two networks are optimized jointly by combining supervised loss and cross pseudo-supervision loss;In inference stage, only the single network after training is retained to complete polyp segmentation.The method can effectively improve small target polyp segmentation recall rate and boundary segmentation precision while reducing labeling requirements, and does not increase the computational burden in inference stage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image processing, image segmentation, and semi-supervised learning, specifically to a semi-supervised polyp image segmentation method based on dual-network dynamic collaboration. Background Technology

[0002] Colorectal cancer is one of the most common malignant tumors worldwide, and early detection and removal of polyps are important means of preventing colorectal cancer. Colonoscopy is the gold standard for polyp detection, and accurate polyp segmentation technology can automatically delineate polyp areas in colonoscopy images, assisting doctors in lesion localization, morphological assessment, and subsequent treatment decisions.

[0003] With the widespread application of deep learning technology in medical image analysis, the performance of polyp segmentation methods based on fully supervised learning highly depends on a large number of high-quality pixel-level annotations. However, medical image annotation requires doctors to draw each pixel, which is time-consuming, labor-intensive, costly, and subject to subjective differences. Models are prone to overfitting with small-scale annotations, and cross-domain generalization performance drops sharply when there are differences in lighting and equipment between the training data and the target scene. Furthermore, polyps have low contrast with the background, blurred boundaries, and significant differences in morphological scale. Small polyps occupy only a few pixels and are easily missed, and their boundary delineation is even more uncertain, further exacerbating the scarcity and difficulty of annotations. These factors make annotation scarcity the core bottleneck restricting the performance of fully supervised methods.

[0004] On the other hand, semi-supervised learning methods offer a feasible approach to improve model performance under limited labeled data conditions. Among them, the cross-pseudo-supervised method constructs two independently initialized segmentation networks, allowing them to generate pseudo-labels for each other on unlabeled data, thus achieving co-training. While this can improve segmentation accuracy to some extent, it still faces challenges in ensuring the quality of pseudo-labels in complex learning scenarios such as polyp segmentation, characterized by ambiguous boundaries, multi-scale targets, and dynamic training changes. Particularly in the polyp boundary region, model predictions exhibit uncertainty. The hard labeling method used in standard cross-pseudo-supervised learning forces binary classification of model predictions, easily introducing significant labeling noise in uncertain polyp boundary regions. Furthermore, its use of a fixed confidence threshold to filter pseudo-labels fails to consider the difference in prediction confidence between targets of different scales, causing small polyps to be systematically filtered out due to insufficient confidence. The combined effect of boundary noise and the problem of missed detection of small targets severely restricts the performance of semi-supervised methods in polyp segmentation tasks.

[0005] Furthermore, some existing methods introduce additional teacher networks, temporal ensembles, or multi-stage training strategies into the cross-supervised framework to improve pseudo-label quality. While these methods alleviate the aforementioned problems to some extent, they also increase the complexity and computational cost of the training process, hindering the practical deployment and widespread application of the methods. In some cases, additional network structures or training stages may introduce new hyperparameter sensitivities or training instabilities, thereby weakening the overall effectiveness of semi-supervised learning.

[0006] Therefore, there is an urgent need for a method to improve the quality of pseudo-labels without introducing additional complex architectures. Thus, in the polyp segmentation scenario, how to construct a semi-supervised learning method that can dynamically optimize pseudo-labels through dual-network collaboration, effectively control boundary noise, and also consider the learning ability of small target polyps has become a pressing technical problem to be solved in this field. Summary of the Invention

[0007] The purpose of this invention is to provide a semi-supervised polyp image segmentation method based on dual-network dynamic collaboration, in order to solve the problems of difficult control of pseudo-label noise, easy omission of small target polyps, and low quality of pseudo-labels in boundary regions in existing cross-pseudo-supervised methods, as well as the problems of high training complexity and low deployment efficiency of existing semi-supervised improved methods.

[0008] Another objective of this invention is to provide a method that utilizes a dual-network dynamic collaboration and hybrid pseudo-label mechanism for semi-supervised learning during the training phase, and retains only a single network to complete segmentation inference during the inference phase, thereby reducing the labeling requirements while ensuring segmentation performance, and without increasing the computational burden during the inference phase.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0010] 1) Obtain labeled polyp images and unlabeled polyp images, and construct a first segmentation network and a second segmentation network based on the two types of images. The first segmentation network and the second segmentation network have the same structure but different initial weights.

[0011] 2) Perform weak data augmentation on the labeled polyp image to generate a labeled augmented polyp image, and perform strong data augmentation on the unlabeled polyp image to generate an unlabeled augmented polyp image.

[0012] 3) Supervised pre-training of the first segmentation network and the second segmentation network is performed using the labeled enhanced polyp images, so that the two networks have basic polyp segmentation capabilities.

[0013] 4) Input the unlabeled enhanced polyp image into the first segmentation network and the second segmentation network respectively to obtain the first prediction probability map and the second prediction probability map.

[0014] 5) Based on the first predicted probability map, a first hybrid pseudo-label is generated through a dynamic confidence threshold and an edge-aware mechanism. The first hybrid pseudo-label includes a hard label region and a soft label region.

[0015] 6) Use the first hybrid pseudo-label to supervise the second prediction probability map of the second segmentation network, and calculate the first cross-pseudo-supervision loss.

[0016] 7) Symmetrically, a second hybrid pseudo-label is generated based on the second predicted probability map, and the second hybrid pseudo-label is used to supervise the first predicted probability map of the first segmentation network, and a second cross-supervision loss is calculated.

[0017] 8) Combine the supervised loss, the first cross-suppression pseudo-supervision loss, and the second cross-suppression pseudo-supervision loss to jointly optimize the first segmentation network and the second segmentation network.

[0018] 9) Remove the second segmentation network during the inference phase and retain only the trained first segmentation network for polyp segmentation.

[0019] Specifically, step 1) includes:

[0020] This invention first acquires labeled and unlabeled polyp images for training. The labeled polyp images are colonoscopy images with pixel-level annotations (i.e., each pixel is labeled as either a polyp or background), while the unlabeled polyp images are colonoscopy images without any annotations. Subsequently, two segmentation networks with identical structures but independently and randomly initialized weights are constructed, denoted as the first segmentation network (Net A) and the second segmentation network (Net B), respectively. The segmentation network employs an encoder-decoder structure, where the encoder extracts multi-scale features, and the decoder progressively restores the spatial resolution and outputs a segmentation probability map.

[0021] Specifically, step 2) includes:

[0022] This invention employs an asymmetric enhancement strategy for both labeled and unlabeled data to construct a consistency regularization constraint. For labeled polyp images, only weak enhancements such as random horizontal and vertical flips are applied to strictly maintain the spatial correspondence of pixel-level annotations, ensuring the integrity of the supervised signal. For unlabeled polyp images, a strong enhancement perturbation, including random color jitter and Gaussian blur, is introduced on top of the weak enhancements. This aims to maximize input diversity and force the two segmentation networks to output consistent predictions under different enhanced views. This consistency regularization mechanism guides the model to learn invariant features robust to changes in illumination, color shifts, and texture differences, providing a reliable perturbation basis for subsequent cross-supervision.

[0023] Specifically, step 3) includes:

[0024] This invention utilizes labeled, enhanced polyp images to perform supervised pre-training on Net A and Net B respectively. During the supervised training phase, a joint optimization of the Dice loss function and cross-entropy loss function based on the polyp foreground category is employed, enabling both networks to quickly establish basic polyp discrimination capabilities, providing initial assurance for the subsequent generation of high-quality pseudo-labels.

[0025] Specifically, step 4) includes:

[0026] In the semi-supervised co-training phase, for each training batch, labeled and unlabeled augmented images are input into Net A and Net B, respectively. The labeled images, after forward propagation through both networks, are used to calculate the supervised loss; the unlabeled images, after forward propagation through Net A, obtain a first predicted probability map, and after forward propagation through Net B, obtain a second predicted probability map. Both the first and second predicted probability maps are class probability distributions normalized by the Softmax function, with each pixel containing the probability values ​​for belonging to the background class and the polyp class, the sum of which is 1. Because the two networks are initialized differently and updated independently, their prediction results for the same unlabeled image differ, and this difference constitutes the source of information for cross-supervision.

[0027] Specifically, step 5) includes:

[0028] Based on the first predicted probability map output by Net A, this invention generates a first hybrid pseudo-label through a dynamic confidence threshold and an edge-aware mechanism. First, the dynamic confidence threshold is calculated based on the training progress coefficient α and the scale compensation coefficient β. ,in polyp_area represents the predicted percentage of polyp area. The threshold is a scale-sensitive hyperparameter; it is maintained at a high level in the early stages of training to ensure the quality of pseudo-labels, and gradually decreased as training progresses to expand the effective learning region. Scale compensation is automatically applied to small polyps with a relatively small area. Secondly, the spatial gradient magnitude is extracted from the polyp category probability map using the Sobel operator and normalized sample-by-sample, and the edge weights are calculated. , This is a hyperparameter for edge sensitivity; edge weights are set to be greater than a threshold. The pixels were determined as the soft tag region. This corresponds to locations with blurred boundaries; the maximum class probability within the non-soft-labeled region is higher than... The pixels are divided into hard label areas This corresponds to the internal stable position with high prediction confidence. Based on this, the argmax class is taken as the hard label for the hard label region, and the remaining regions are marked as ignored indexes; the prediction probability distribution is retained as the soft label for the soft label region to maintain boundary uncertainty, thereby generating a first hybrid pseudo-label that simultaneously contains hard labels, soft labels and their supervision type masks.

[0029] Specifically, step 6) includes:

[0030] This invention generates the first hybrid pseudo-label from Net A. As a supervisory signal, the second predicted probability map of Net B on the same unlabeled augmented image is supervised, and the first cross-pseudo-supervision loss is calculated. For hard-labeled regions, strong supervision is achieved using Dice loss and cross-entropy loss based on the polyp foreground category, automatically ignoring pixels marked as ignored during loss calculation. For soft-labeled regions, the KL divergence loss function is used to align the second predicted probability distribution of Net B with the first predicted probability distribution of Net A, thereby learning the uncertainty modeling ability at polyp boundaries. The first hybrid pseudo-label is separated from the computation graph after generation, serving as a fixed supervision target to prevent Net A's gradient from being backpropagated to itself through the pseudo-label.

[0031] Specifically, step 7) includes:

[0032] Symmetrically, based on the second prediction probability map of Net B, a second hybrid pseudo-label is generated according to the same dynamic confidence threshold and edge-aware mechanism as in step 5). . use Supervise the first predicted probability map of Net A and calculate the second cross-supervision loss. This symmetrical design allows the two networks to act as teacher and student to each other; on the one hand, Net A... On the one hand, it guides Net B's learning; on the other hand, Net B... The two networks learn by guiding each other's predictions. The predictions of the two networks serve as each other's learning targets, and they also tend to align with each other's predictions during their own training. Through bidirectional constraints, they gradually achieve prediction consistency on unlabeled data, while each retains the discriminative ability learned from labeled data.

[0033] Specifically, step 8) includes:

[0034] The total loss function for joint optimization in this invention is: .in, and These are the supervised losses for Net A and Net B on labeled augmented images, respectively, each including the Dice loss and cross-entropy loss that only compute the polyp foreground category; and These are the second and first cross-pseudo-supervised losses, respectively. λ(t) is the unsupervised loss weight function, which gradually increases from 0 to 1 in the early stages of training, ensuring the model initially focuses on supervised signals as the primary learning target. As the quality of the pseudo-labels improves, the contribution of the unsupervised loss gradually increases. The network parameters of Net A and Net B are updated synchronously through backpropagation of the gradient of the total loss. The two networks remain synchronously updated during training, eliminating the need to freeze either network or maintain independent exponential moving average teacher models, thus achieving effective semi-supervised learning while maintaining training simplicity.

[0035] Specifically, step 9) includes:

[0036] After training, both Net A and Net B demonstrate good polyp segmentation capabilities. Since the two networks have fully absorbed information from the unlabeled data through co-training, only one network (such as Net A) needs to be retained during the inference phase to complete the segmentation task. During inference, the colonoscopy image to be segmented is directly input into Net A to obtain a segmentation probability map, and the final segmentation result is obtained through threshold binarization. This approach ensures that the computational complexity during the inference phase is completely consistent with that of the fully supervised model, without the need to introduce additional teacher networks or multi-model ensembles.

[0037] Compared with existing technologies, this invention introduces a dual mechanism of dynamic confidence threshold and edge-aware hybrid pseudo-labels, achieving adaptive optimization of pseudo-label quality without the need for additional network structures, and has at least the following beneficial effects:

[0038] 1. This invention significantly improves the problem of small target polyps being systematically filtered out in standard CPS due to a fixed high threshold by introducing a dynamic confidence threshold mechanism, and significantly improves the segmentation recall rate of small target polyps.

[0039] 2. This invention introduces an edge-aware hybrid pseudo-label mechanism, applying hard labels to stable internal regions for strong supervision and applying soft labels to regions with ambiguous boundaries to retain uncertainty, effectively reducing boundary pseudo-label noise and improving polyp boundary segmentation accuracy.

[0040] 3. This invention employs a dual-network dynamic collaboration and training-inference structure decoupling design, eliminating the need to maintain additional teacher networks or ensemble models during the training phase and retaining only a single segmentation network during the inference phase. Its inference cost is completely consistent with that of a fully supervised model, reducing training complexity without increasing any deployment burden, making it suitable for the real-time requirements of clinical scenarios.

[0041] 4. The basic segmentation network provided by this invention is a replaceable encoder-decoder architecture, which is compatible with various backbone networks such as ResNet and UNet, and has good flexibility and scalability. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the overall process of the semi-supervised polyp image segmentation method based on dual-network dynamic collaboration of the present invention.

[0043] Figure 2 This is a schematic diagram of the dynamic confidence threshold generation mechanism of the present invention.

[0044] Figure 3 This is a schematic diagram of the edge-aware hybrid pseudo-label generation mechanism of the present invention.

[0045] Figure 4 This is a schematic diagram of the dual-network cross-pseudo-supervised training architecture of the present invention.

[0046] Figure 5 This is a schematic diagram illustrating the decoupling deployment method of the training and inference phases of the present invention. Detailed Implementation

[0047] 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.

[0048] This embodiment provides a semi-supervised polyp image segmentation method based on dual-network dynamic collaboration, applied to polyp segmentation in colonoscopy images. The method can be deployed both on the model training and online inference ends of a medical image-assisted diagnostic system, or on the offline training and online service modules of the same computing platform. Figure 1 As shown, the overall process of this invention includes segmentation network construction, supervised pre-training, dynamic hybrid pseudo-label generation, dual-network cross-supervised training, and lightweight deployment in the inference stage.

[0049] In this embodiment, the input data includes at least:

[0050] 1. A labeled polyp image dataset, containing colonoscopy images and their corresponding pixel-level polyp annotations;

[0051] 2. Unlabeled polyp image dataset, containing only colonoscopy images themselves, without pixel-level annotations;

[0052] This invention proposes a semi-supervised polyp image segmentation method based on dual-network dynamic collaboration. The main process of the method is shown in the attached figure. Figure 1 As shown, the specific steps include:

[0053] 1) Construct two segmentation networks with the same structure but different initial weights.

[0054] 2) Perform weak data augmentation on the labeled polyp image to generate a labeled augmented polyp image, and perform strong data augmentation on the unlabeled polyp image to generate an unlabeled augmented polyp image.

[0055] 3) Supervised pre-training of the two networks was performed using labeled augmented polyp images.

[0056] 4) Input the unlabeled augmented polyp image into the two networks to obtain their respective predicted probability maps.

[0057] 5) Based on the predicted probability map, hybrid pseudo-labels are generated through dynamic confidence threshold and edge awareness mechanism.

[0058] 6) Use hybrid pseudo-labels for bidirectional cross-supervised training.

[0059] 7) Combine supervised loss and cross-supervised loss for joint optimization.

[0060] 8) During the inference phase, remove one of the networks and keep only the single network to complete the polyp splitting.

[0061] Specifically, step 1) includes:

[0062] First, labeled and unlabeled polyp images are acquired for semi-supervised training. The labeled polyp images are colonoscopy images with pixel-level annotations, where each pixel is labeled as either a polyp or background category. The unlabeled polyp images are colonoscopy images without any annotations. The labeled and unlabeled images can be derived from random partitions of the same dataset, or from colonoscopy data collected in different batches or from different medical centers. Subsequently, a first segmentation network (Net A) and a second segmentation network (Net B) are constructed. The two networks have identical structures but use different random seeds for weight initialization, ensuring the difference in the initial state. This allows the two networks to learn from different perspectives during training, providing complementary prediction perspectives for subsequent cross-supervision and avoiding degradation into a single model's self-training due to homogenization.

[0063] Specifically, step 2) includes:

[0064] This invention employs a differentiated data augmentation strategy for training data. For labeled polyp images, weak data augmentation is used, primarily including random horizontal and vertical flipping, to maintain the integrity of the annotation information while introducing limited geometric perturbations, providing a stable supervised signal for the model. For unlabeled polyp images, strong data augmentation is introduced in addition to the weak augmentation operations. This strong data augmentation includes at least one or more of the following: random brightness adjustment, random contrast adjustment, random saturation adjustment, random hue shift, and random Gaussian blur. By applying stronger input perturbations to unlabeled images, the diversity of training samples is increased, forcing the two segmentation networks to output consistent prediction results under different augmented views. This enhances the model's robustness to changes in illumination, color differences, and texture fluctuations, providing a richer perturbation basis for subsequent cross-supervised learning.

[0065] Furthermore, in the supervised pre-training stage, this invention utilizes labeled enhanced polyp images to perform supervised pre-training on Net A and Net B respectively. During the supervised training stage, the Dice loss function based on the polyp foreground category and the cross-entropy loss function are jointly optimized, enabling both networks to quickly establish basic discrimination capabilities regarding polyp shape, texture, and boundaries. This provides the necessary initial conditions for generating valuable pseudo-labels on unlabeled images. Specifically, the Dice loss only calculates the polyp foreground category to avoid model learning bias caused by background pixel dominance; its calculation formula is as follows: ,in and ε is the predicted probability and true value of the foreground category, respectively, and ε is the smoothing constant.

[0066] Specifically, step 3) includes:

[0067] In the semi-supervised co-training phase, each training batch contains both labeled and unlabeled augmented images. Labeled images are input into Net A and Net B respectively to obtain supervised prediction results used to calculate the supervised loss; unlabeled images are input into Net A and Net B respectively to obtain a first prediction probability map P_A and a second prediction probability map P_B. Both probability maps are softmax normalized, and each pixel location contains a probability value belonging to the background category and the polyp category, the sum of which is 1. Because the two networks are initialized differently and updated independently, their prediction results for the same unlabeled image differ, and this difference constitutes the source of cross-supervision information.

[0068] Specifically, step 4) includes:

[0069] Based on the first predicted probability map P_A output by Net A, this invention generates a first hybrid pseudo-label through a dynamic confidence threshold and an edge-aware mechanism. First, the dynamic confidence threshold is calculated based on the training progress coefficient α and the scale compensation coefficient β. , where epoch is the current training epoch and E is the total number of training epochs; ,in To predict the proportion of polyp pixels to the total number of pixels, The scale sensitivity hyperparameter; the final dynamic confidence threshold. ,in To preset the basic threshold, A preset minimum threshold is set. This dynamic threshold is maintained at a high level in the early stages of training to ensure the quality of pseudo-labels, and gradually decreases as training progresses to expand the effective learning area. Scale compensation is automatically applied to small target polyps with a small area proportion. Secondly, the spatial gradient magnitude of the probability values ​​of the polyp category channels in P_A is calculated using the Sobel operator and independently normalized to the [0, 1] interval for each sample, and the edge weights are calculated. ,in This is the hyperparameter for edge sensitivity; edge weights are set to be greater than a preset threshold. The pixels were determined as the soft tag region. This corresponds to the location where the polyp boundary is blurred; the maximum class probability in the non-soft-labeled region is higher than The pixels were determined as hard label regions. This corresponds to stable locations within the polyp with high prediction confidence. Based on this, the argmax class is used as the hard label for hard-labeled regions, while pixels that do not meet the conditions are marked as ignored indices. The predicted probability distribution is retained as the soft label for soft-labeled regions to maintain boundary uncertainty, thus generating a first hybrid pseudo-label that simultaneously contains hard-labeled regions, soft-labeled regions, and their corresponding supervision type masks. .

[0070] Specifically, step 5) includes:

[0071] First hybrid pseudo-label generated using Net A The second predicted probability map P_B of Net B on the same unlabeled augmented image is supervised, and the first cross-pseudo-supervision loss is calculated. In this system, the hard-labeled region employs Dice loss and cross-entropy loss based on the polyp foreground category for strong supervision, automatically ignoring pixels marked as ignored during loss calculation. The soft-labeled region uses KL divergence loss to align the predicted probability distribution of Net B with that of Net A, thereby learning the uncertainty modeling ability at the polyp boundary. The first hybrid pseudo-label is separated from the computation graph after generation, serving as a fixed supervision target to prevent the gradient of Net A from being backpropagated to itself through the pseudo-label.

[0072] Specifically, step 6) includes:

[0073] Symmetrically, based on the second predicted probability map P_B of Net B, a second hybrid pseudo-label is generated according to the same dynamic confidence threshold and edge-aware mechanism as in step 4). . use Supervise the first predicted probability map P_A of Net A and calculate the second cross-pseudo-supervision loss. This symmetrical design allows the two networks to act as teacher and student to each other; Net A, through... Guided learning of Net B, Net B through The system guides Net A to learn by using bidirectional constraints to gradually achieve predictive consistency between the two on unlabeled data, while each retains the discriminative ability learned from labeled data.

[0074] Specifically, step 7) includes:

[0075] The total loss function of joint optimization is .in, and The supervised losses for Net A and Net B on labeled augmented images are respectively, each including the Dice loss and cross-entropy loss that only calculate the polyp foreground category; and These represent the second and first cross-pseudo-supervised losses, respectively; λ(t) is the unsupervised loss weight function, which in this embodiment employs a linear ramp-up strategy, gradually increasing from 0 to 1 in the early stages of training. This allows the model to initially focus on supervised signals as the primary learning target, gradually increasing the contribution of the unsupervised loss as the quality of the pseudo-labels improves. The optimizer used is Adam, which synchronously updates the network parameters of Net A and Net B through backpropagation of the gradient of the total loss. The two networks remain synchronously updated during training, eliminating the need to freeze either network or maintain an independent exponential moving average teacher model, thus achieving effective semi-supervised learning while maintaining training simplicity.

[0076] Specifically, step 8) includes:

[0077] After joint training, both Net A and Net B have fully absorbed information from the unlabeled data through dual-network collaboration, demonstrating excellent polyp segmentation capabilities. During the inference phase, this invention removes Net B and all its associated training modules and loss calculation units, retaining only the trained Net A as the final segmentation model. After performing weak enhancement preprocessing on the colonoscopy images to be segmented, consistent with the training phase, the images are directly input into Net A for forward inference. Net A outputs 2-channel segmentation logits, which are then normalized using Softmax to obtain a probability map. The probability values ​​for different polyp types are then binarized using a preset threshold to obtain the final segmentation mask. Since only a single network is needed for end-to-end forward computation during the inference phase, eliminating the need for dual-network collaborative inference or ensemble prediction, the inference complexity is identical to that of a fully supervised model with the same structure, without introducing any additional inference overhead. Compared to semi-supervised methods that require retaining a teacher model or multi-model ensemble during the inference phase, this invention decouples the training and inference phases, improving model performance using unlabeled data without increasing deployment costs or online inference latency.

[0078] The method described in this embodiment is applicable to polyp segmentation in colonoscopy images. By providing cross-supervision through dynamic collaborative training of two networks and completing semi-supervised learning during the training phase, while retaining only a single network during the inference phase, this method can reduce annotation requirements while maintaining segmentation accuracy. Furthermore, by employing a hybrid pseudo-labeling mechanism combining dynamic confidence thresholding and edge awareness, the recall rate of small polyps and the segmentation accuracy of boundary regions can be further improved, enhancing the applicability of semi-supervised methods in polyp segmentation scenarios.

[0079] 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 semi-supervised polyp image segmentation method based on dual-network dynamic collaboration, characterized in that, Includes the following steps: 1) Obtain labeled polyp images and unlabeled polyp images, and construct a first segmentation network and a second segmentation network based on the two types of images. Both the first segmentation network and the second segmentation network contain an encoder and a decoder. 2) Perform weak data augmentation on the labeled polyp image to generate a labeled augmented polyp image, and perform strong data augmentation on the unlabeled polyp image to generate an unlabeled augmented polyp image; 3) After generating the labeled enhanced polyp image, the first segmentation network and the second segmentation network are supervised pre-trained using the image to enable the two networks to have basic polyp segmentation capabilities. 4) Input the unlabeled enhanced polyp image into the first segmentation network and the second segmentation network respectively to obtain the first prediction probability map and the second prediction probability map; 5) Based on the first predicted probability map, a first hybrid pseudo-label is generated through a dynamic confidence threshold and an edge-aware mechanism. The first hybrid pseudo-label includes a hard label region and a soft label region. 6) Use the first hybrid pseudo-label to supervise the second prediction probability map of the second segmentation network, and calculate the first cross-pseudo-supervision loss; 7) Symmetrically, a second hybrid pseudo-label is generated based on the second predicted probability map, and the second hybrid pseudo-label is used to supervise the first predicted probability map of the first segmentation network, and the second cross-pseudo-supervision loss is calculated. 8) Combine the supervised loss, the first cross-parallel pseudo-supervised loss, and the second cross-parallel pseudo-supervised loss to jointly optimize the first segmentation network and the second segmentation network; 9) Remove the second segmentation network during the inference phase, retaining only one of the trained segmentation networks.

2. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 1, characterized in that, The first segmentation network and the second segmentation network have the same structure but different initial weights; the encoder uses a convolutional neural network pre-trained on a large-scale natural image dataset (such as ImageNet) as the backbone network to extract multi-scale polyp features; the decoder fuses the multi-scale features of the encoder through skip connections and gradually upsamples to restore the original image resolution.

3. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 1, characterized in that, The dynamic confidence threshold mentioned in step 5) is dynamically calculated based on the current training progress coefficient and the scale information of the predicted polyp target in the unlabeled polyp image. Specifically, the dynamic confidence threshold... , in, Based on the threshold, The minimum threshold, This represents the ratio of the current training round to the total number of training rounds. The scale compensation coefficient is calculated based on the proportion of the target polyp area. The scale compensation coefficient Where polyp_area is the percentage of the predicted polyp area in pixels. This is the scale sensitivity hyperparameter.

4. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 3, characterized in that, The dynamic confidence threshold has the following characteristics: In the early stages of training, the dynamic confidence threshold is close to... Only high-confidence pixels are used as pseudo-labels; the dynamic confidence threshold is gradually reduced to near [a certain value] in the later stages of training. More pixels are included in the training; when the area of ​​the polyp target in the unlabeled polyp image is relatively small, the dynamic confidence threshold is reduced accordingly to avoid small target polyps being completely filtered out due to insufficient confidence.

5. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 1, characterized in that, The edge-aware mechanism described in step 5) includes: Calculate the gradient magnitude of the probability map of polyp types in the first predicted probability map to generate an edge weight map; According to the edge weight map, the region with an edge weight higher than a preset threshold is determined as a soft label region, and the soft label region corresponds to the region with blurred polyp boundary. Pixels that are not soft-labeled regions and whose maximum class probability exceeds the dynamic confidence threshold are identified as hard-labeled regions, and the hard-labeled regions correspond to the stable regions inside the polyps.

6. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 5, characterized in that, The gradient magnitude is calculated using the Sobel operator and normalized sample-by-sample to independently normalize the gradient magnitude of each image. The interval is used to avoid uneven region division caused by differences in edge intensity between different images within the same batch.

7. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 5, characterized in that, In the first hybrid pseudo-label, the hard label region adopts the category label in one-hot form and applies Dice loss and cross-entropy loss; the soft label region adopts the category probability distribution of the first predicted probability map and applies KL divergence loss, so that the second segmentation network learns the uncertainty distribution of the polyp boundary.

8. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 1, characterized in that, The total loss of the joint optimization described in step 8) is: , in, and The supervised losses of the first segmentation network and the second segmentation network on the labeled polyp image are respectively. and These are the second cross-spurious supervision loss and the first cross-spurious supervision loss, respectively. These are weight coefficients that increase non-linearly with each training round; The supervised loss employs the Dice loss, which only calculates the polyp foreground class, to avoid class imbalance that could cause the model to be biased towards predicting the background.

9. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 1, characterized in that, After the first and second hybrid pseudo-labels are generated, gradient backpropagation is stopped, so that the pseudo-label generation network is not disturbed by the gradient of the supervised network; the first segmentation network and the second segmentation network keep updated synchronously during the joint optimization process, without freezing either network.

10. The semi-supervised polyp image segmentation method with dual-network dynamic collaboration according to claim 1, characterized in that, The segmentation network retained during the inference phase has the same network structure as during joint training, and directly outputs the polyp segmentation probability map without the need to introduce additional projection layers or bridging structures.