Construction method of multi-stage semi-supervised segmentation model based on data reliability weighting
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-08-11
AI Technical Summary
传统的self-training存在如下问题:教师模型与学生模型之间存在严重的耦合,学生模型容易与教师模型做出相似的判断,难以学到额外的信息;学生模型对伪标签中的噪声过拟合;不同未标记图像的伪标签质量和可靠性不同,不加选择地全部直接使用会错误诱导模型的训练
[0042] As can be seen from the above embodiments, this application uses a dual-teacher model structure, overcoming the limitation of a single model's limited ability to correct its own errors, and can better identify noise in pseudo-labels; a comprehensive and accurate selection scheme for pseudo-label reliability is designed. Evaluation criteria for image and pixel reliability are designed based on the similarity between pseudo-labels. Image reliability guides multi-stage training, and pixel reliability weights the loss function, enabling training to focus on more reliable knowledge.
Smart Images

Figure CN118097130B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting. Background Technology
[0002] Semantic segmentation, a classic computer vision problem, involves taking images as input and transforming them into masks with highlighted regions of interest, where each pixel in the image is assigned a category ID based on the object it belongs to. Training requires a large number of samples with pixel-level annotations, but obtaining pixel-level annotations is a very time-consuming task. Semi-supervised learning (SSL) is one approach to address this challenge, using a large amount of unlabeled data and a small amount of labeled data for pattern recognition.
[0003] Currently, two common paradigms for semi-supervised semantic segmentation (SLS) are entropy minimization and consistency regularization. Self-training is a form of entropy minimization in SSL. Traditional self-training suffers from the following problems: there is severe coupling between the teacher and student models, making it easy for the student model to make similar judgments to the teacher model and hindering the learning of additional information; the student model overfits to noise in pseudo-labels; and the quality and reliability of pseudo-labels for different unlabeled images vary, leading to incorrect training of the model if all pseudo-labels are used indiscriminately. Previous works have only designed pseudo-label selection schemes at the image or pixel level, and using only a single model in the scheme design makes it difficult to offset its own errors. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting. This method can reduce overfitting of noisy labels and comprehensively evaluate the reliability of pseudo labels.
[0005] According to a first aspect of the embodiments of this application, a method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting is provided, comprising:
[0006] Obtain an image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as validation data;
[0007] Two teacher models for semantic segmentation are trained using the labeled data, and then the unlabeled data is used to predict two pseudo-labels.
[0008] The reliability of the pseudo-labels is evaluated at the image level, and the unlabeled images and their pseudo-labels are sorted.
[0009] The reliability of the pseudo-labels is evaluated at the pixel level to obtain the weight map corresponding to the pseudo-labels;
[0010] Based on the sorting of the unlabeled images and their pseudo-labels, the top α% and 100% of images are selected sequentially for multi-stage training of the student model. During training, strong data augmentation is applied to the unlabeled images, and the weight map is added to weight the loss value. α is a positive number less than 100.
[0011] Optionally, an image dataset is acquired, and the image dataset is divided into labeled data and unlabeled data, and a portion of the data is selected as validation data, including:
[0012] Obtain an image dataset, randomly divide it into labeled and unlabeled data according to a set ratio, and select a portion of the data as validation data. Both the labeled and validation data must have corresponding semantic segmentation labels. If the dataset lacks corresponding labels, they must be labeled using an annotation tool.
[0013] Optionally, two teacher models for semantic segmentation are trained using the labeled data, and then predictions are made on the unlabeled data to obtain two types of pseudo-labels, including:
[0014] Two different semantic segmentation models, denoted as the first teacher model and the second teacher model, are iteratively trained on the labeled data, respectively.
[0015] The performance of the model is evaluated using the average intersection-over-union ratio (AUI), which represents the accuracy of the network model in segmenting images. A higher AUI value indicates better image segmentation results.
[0016] After each round of training, the network model is evaluated using the validation data. The model is saved according to the best result of the average intersection-over-union ratio until the number of iterations reaches the set value, at which point training stops and the trained model is saved.
[0017] The unlabeled data is predicted using the trained first teacher model and second teacher model respectively. Each unlabeled image will have two pseudo-labels, referred to as the first pseudo-label and the second pseudo-label.
[0018] Optionally, a reliability assessment of the pseudo-labels is performed at the image level, and the unlabeled images and their pseudo-labels are sorted, including:
[0019] For each of the unlabeled images, the average cross-union ratio (CUI) of its two pseudo-labels is calculated. At the image level, the higher the average CUI of the two pseudo-labels, the higher the probability that the overall prediction of the two pseudo-labels is correct, the more reliable the pseudo-labels are, and the better the image is predicted.
[0020] All the unlabeled images are sorted according to the average intersection-union ratio (IU), with the sorting method being from high to low IU.
[0021] Optionally, a reliability assessment is performed on the pseudo-labels at the pixel level to obtain a weight map corresponding to the pseudo-labels, including:
[0022] For a given pixel, its category in the first pseudo-label is y1. In the second teacher model's output of class_num channels at that pixel location, the value of channel y1, ranked from largest to smallest, is at the x-th position. Therefore, the weight of the first pseudo-label at that pixel is:
[0023] w = e -ax
[0024] In the formula, a is a predefined parameter; x = 0, 1, ..., class_num-1;
[0025] The weight calculation is performed on all pixels of the unlabeled image to obtain a weight map of the unlabeled image and save it.
[0026] Optionally, based on the ranking of the unlabeled images and their pseudo-labels, the top α% and 100% of images are selected sequentially for multi-stage training of the student model. During training, strong data augmentation is applied to the unlabeled images, and the weight map is added to weight the loss value, including:
[0027] Strong data augmentation processing is applied to the unlabeled image;
[0028] The top α% of the unlabeled images and their first pseudo-labels are selected from the sorting, and the first student model is trained together with the labeled data. During training, a weight map of the unlabeled images is introduced to weight the loss value. The first student model has the same structure as the first teacher model.
[0029] The first student model, after training, is used to relabel the unlabeled images in the latter (1-α%) to obtain a third pseudo-label. The unlabeled images in the first α% and their first pseudo-label, the unlabeled images in the latter (1-α%) and their third pseudo-label, are combined with the labeled data to train the second student model. During training, a weight map of the unlabeled images is introduced to weight the loss value. The second student model has the same structure as the first teacher model.
[0030] According to a second aspect of the embodiments of this application, an apparatus for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting is provided, comprising:
[0031] The partitioning module is used to acquire an image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as validation data.
[0032] The training prediction module is used to train two teacher models for semantic segmentation using the labeled data, and then predict the unlabeled data to obtain two pseudo-labels;
[0033] An evaluation and sorting module is used to evaluate the reliability of the pseudo-labels at the image level and sort the unlabeled images and their pseudo-labels.
[0034] An evaluation module is used to perform reliability evaluation on the pseudo-labels at the pixel level and obtain the weight map corresponding to the pseudo-labels.
[0035] The multi-stage training module is used to select the top α% and 100% of images in sequence for multi-stage training of the student model based on the sorting of the unlabeled images and their pseudo-labels. During training, strong data augmentation is applied to the unlabeled images and the weight map is added to weight the loss value, where α is a positive number less than 100.
[0036] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising:
[0037] One or more processors;
[0038] Memory, used to store one or more programs;
[0039] When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in the first aspect.
[0040] According to a third aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.
[0041] The technical solutions provided by the embodiments of this application may include the following beneficial effects:
[0042] As can be seen from the above embodiments, this application uses a dual-teacher model structure, overcoming the limitation of a single model's limited ability to correct its own errors, and can better identify noise in pseudo-labels; a comprehensive and accurate selection scheme for pseudo-label reliability is designed. Evaluation criteria for image and pixel reliability are designed based on the similarity between pseudo-labels. Image reliability guides multi-stage training, and pixel reliability weights the loss function, enabling training to focus on more reliable knowledge. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0044] Figure 1 This is a flowchart illustrating a method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting, according to an exemplary embodiment.
[0045] Figure 2 This is a flowchart illustrating a method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting, according to an exemplary embodiment.
[0046] Figure 3 This is an image weight map illustrated according to an exemplary embodiment.
[0047] Figure 4 This is a structural diagram of a construction device for a multi-stage semi-supervised segmentation model based on data reliability weighting, according to an exemplary embodiment.
[0048] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0050] Figure 1 and Figure 2 This is a flowchart illustrating a method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting, according to an exemplary embodiment. Figure 1 and Figure 2 As shown, the method may include the following steps:
[0051] S1: Obtain the image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as verification data;
[0052] S2: Use the labeled data to train two teacher models for semantic segmentation, and then predict the unlabeled data to obtain two pseudo-labels;
[0053] S3: Perform a reliability assessment of the pseudo-labels at the image level, and sort the unlabeled images and their pseudo-labels;
[0054] S4: Perform a reliability assessment on the pseudo-label at the pixel level to obtain the weight map corresponding to the pseudo-label;
[0055] S5: Based on the sorting of the unlabeled images and their pseudo-labels, select the top α% and 100% of images in sequence for multi-stage training of the student model. During training, use strong data augmentation processing on the unlabeled images and add the weight map to weight the loss value. α is a positive number less than 100.
[0056] As can be seen from the above embodiments, this application uses a dual-teacher model structure, overcoming the limitation of a single model's limited ability to correct its own errors, and can better identify noise in pseudo-labels; a comprehensive and accurate selection scheme for pseudo-label reliability is designed. Evaluation criteria for image and pixel reliability are designed based on the similarity between pseudo-labels. Image reliability guides multi-stage training, and pixel reliability weights the loss function, enabling training to focus on more reliable knowledge.
[0057] In the specific implementation of S1, an image dataset is acquired, the image dataset is divided into labeled data and unlabeled data, and a portion of the data is selected as verification data;
[0058] Specifically, an image dataset is acquired and randomly divided into labeled and unlabeled data according to a set ratio. A portion of this data is then selected as validation data. Both the labeled and validation data must have corresponding semantic segmentation labels. If the dataset lacks corresponding labels, they must be labeled using an annotation tool.
[0059] More specifically, the VOC2012 dataset was randomly divided into labeled and unlabeled data at a ratio of 1:7, and a portion of the data was selected as validation data. VOC is a commonly used dataset for semantic segmentation, containing 20 object classes, including humans, motor vehicles, etc. The obtained VOC dataset already has corresponding labels; simply place the labeled images into the corresponding folders, no additional annotation is required. Otherwise, software such as Labelme needs to be used to annotate the object regions.
[0060] In the specific implementation of S2, two teacher models for semantic segmentation are trained using the labeled data, and then predictions are made on the unlabeled data to obtain two pseudo-labels. This may include the following sub-steps:
[0061] S21: Two different semantic segmentation models, denoted as the first teacher model and the second teacher model, are trained iteratively on the labeled data respectively.
[0062] Specifically, two different semantic segmentation models, DeepLabv3+ and PSPNet, were used and denoted as the first teacher model and the second teacher model, respectively, and were trained iteratively on labeled data.
[0063] S22: The performance of the model is evaluated using the average intersection-over-union ratio (AUC). The AUC represents the accuracy of the network model in segmenting images. The higher the AUC value, the better the image segmentation effect.
[0064] Specifically, the method for calculating the average intersection-union ratio (MIoU) is as follows:
[0065]
[0066] In the formula, TP represents a correct model prediction, meaning both the model prediction and the actual case are positive examples; FP represents an incorrect model prediction, meaning the model predicted the class to be a positive example, but the actual case is a negative example; FN represents an incorrect model prediction, meaning the model predicted the class to be a negative example, but the actual case is a positive example; K represents the number of classes.
[0067] S23: After each round of training, the network model is evaluated using the validation data. The model is saved according to the optimal result of the average intersection-over-union ratio until the number of iterations reaches the set value, at which point training is stopped and the trained model is saved.
[0068] S24: The unlabeled data is predicted using the trained first teacher model and second teacher model respectively. Each unlabeled image will have two pseudo-labels, referred to as the first pseudo-label and the second pseudo-label.
[0069] Specifically, the first type of pseudo-label participates in subsequent training; the second type of pseudo-label does not participate in subsequent training, but can be compared with the first type of pseudo-label as a reliability evaluation metric. Due to the limited ability of a single model to correct its own errors, integrating the information from both types of pseudo-labels allows for better identification of noise in the pseudo-labels.
[0070] In the specific implementation of S3, the reliability of the pseudo-labels is evaluated at the image level, and the unlabeled images and their pseudo-labels are sorted, including:
[0071] S31: For each of the unlabeled images, calculate the average cross-union ratio of its two pseudo-labels. At the image level, the higher the average cross-union ratio of the two pseudo-labels, the higher the probability that the overall prediction of the two pseudo-labels is correct, the more reliable the pseudo-labels are, and the better the image is predicted.
[0072] S32: Sort all the unlabeled images according to the average intersection-union ratio, in descending order of average intersection-union ratio.
[0073] Specifically, by ranking images by reliability at the image level, images of different reliability can be selected to participate in subsequent multi-stage training. This avoids the indiscriminate use of all unlabeled images, which could incorrectly induce model training.
[0074] In the specific implementation of S4, a reliability assessment of the pseudo-label is performed at the pixel level to obtain the weight map corresponding to the pseudo-label, including:
[0075] S41: For a certain pixel, its category in the first pseudo-label is y1. In the class_num channels output by the second teacher model at this pixel position, the value of the y1 channel is at the xth position from largest to smallest. Then, the weight of the first pseudo-label at this pixel is:
[0076] w = e -ax
[0077] In the formula, a is a predefined parameter; x = 0, 1, ..., class_num-1;
[0078] Specifically, for the VOC dataset, the semantic segmentation network model's output layer has 21 channels (20 target classes and 1 background class). For a given pixel, assuming its category in the first pseudo-label is y1, and the value of channel y1 in the 21 channels output by the second teacher model at that pixel is at the x-th position from largest to smallest, then the weight of pseudo-label 1 at that pixel is:
[0079] w = e -ax
[0080] In the formula, a is a predefined parameter, which is taken as 2 here; x = 0, 1, ..., 20;
[0081] S42: Perform the weight calculation on all pixels of the unlabeled image to obtain the weight map of the unlabeled image and save it.
[0082] Specifically, pixels with higher reliability correspond to higher values in the weight map, while pixels with lower reliability correspond to lower values. Applying the weight map to subsequent loss value weighting allows us to focus on more reliable regions in the image during training, thus improving the training results.
[0083] Figure 3 This is an image weight map illustrated according to an exemplary embodiment.
[0084] In the specific implementation of S5, based on the ranking of the unlabeled images and their pseudo-labels, the top α% and 100% of images are selected sequentially for multi-stage training of the student model. During training, strong data augmentation is applied to the unlabeled images, and the weight map is added to weight the loss value, including:
[0085] S51: Apply strong data augmentation processing to the unlabeled image;
[0086] Specifically, in order to alleviate the overfitting of the noise labels and the prediction coupling problem between the student model and the teacher model, strong data augmentation processing is applied to the unlabeled images. The strong data augmentation methods include colorjitter, grayscale, blur and cutout.
[0087] S52: Select the top α% of the unlabeled images and their first pseudo-labels from the sorting, and train the first student model together with the labeled data. During training, a weight map of the unlabeled images is introduced to weight the loss value. The first student model has the same structure as the first teacher model.
[0088] Specifically, α is set to 50, and the first student model structure is DeepLabv3+;
[0089] S53: The first student model, after training, is used to relabel the remaining (1-α%) of the unlabeled images to obtain a third pseudo-label. The first α% of the unlabeled images and their first pseudo-labels, the remaining (1-α%) of the unlabeled images and their third pseudo-labels, are combined with the labeled data to train the second student model. During training, a weight map of the unlabeled images is introduced to weight the loss values. The second student model has the same structure as the first teacher model.
[0090] Specifically, the second student model has a DeepLabv3+ architecture. The trained second student model exhibits the best segmentation performance, which is the desired outcome.
[0091] In this embodiment, 1323 images were used to train the teacher model, 1449 images were used for validation, and 9259 unlabeled images were used. The performance of this invention on the validation set was evaluated using MIoU. The evaluation metric calculation results and comparisons with other methods are shown in the table below:
[0092]
[0093] The evaluation metrics show that this invention has good segmentation performance, with a 5.7% improvement over fully supervised performance and a 2.99% improvement over traditional self-training performance on the VOC dataset.
[0094] Corresponding to the aforementioned embodiment of the method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting, the present invention also provides an embodiment of an apparatus for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting.
[0095] Figure 4 This is a block diagram illustrating a construction apparatus for a multi-stage semi-supervised segmentation model based on data reliability weighting, according to an exemplary embodiment. (Refer to...) Figure 4 The device includes:
[0096] The partitioning module 1 is used to acquire an image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as verification data.
[0097] Training prediction module 2 is used to train two teacher models for semantic segmentation using the labeled data, and then predict the unlabeled data to obtain two pseudo-labels;
[0098] Evaluation and sorting module 3 is used to evaluate the reliability of the pseudo-labels at the image level and sort the unlabeled images and their pseudo-labels.
[0099] Evaluation module 4 is used to perform reliability evaluation on the pseudo-label at the pixel level and obtain the weight map corresponding to the pseudo-label;
[0100] The multi-stage training module 5 is used to select the top α% and 100% of images in sequence for multi-stage training of the student model according to the sorting of the unlabeled images and their pseudo-labels. During training, strong data augmentation is applied to the unlabeled images and the weight map is added to weight the loss value, where α is a positive number less than 100.
[0101] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0102] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0103] Accordingly, this application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the above-described method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting. Figure 5 The diagram shown is a hardware structure diagram of any device with data processing capabilities, which is a construction device for a multi-stage semi-supervised segmentation model based on data reliability weighting provided in an embodiment of the present invention. Except for... Figure 5In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0104] Accordingly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the aforementioned method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting. The computer-readable storage medium can be an internal storage unit of any data-processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of a wind turbine, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data-processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data-processing device, and can also be used to temporarily store data that has been output or will be output.
[0105] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting, characterized in that, include: Obtain an image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as validation data; Two teacher models for semantic segmentation are trained using the labeled data, and then the unlabeled data is used to predict two pseudo-labels. The reliability of the pseudo-labels is evaluated at the image level, and the unlabeled images and their pseudo-labels are sorted. The reliability of the pseudo-labels is evaluated at the pixel level to obtain the weight map corresponding to the pseudo-labels; Based on the sorting of the unlabeled images and their pseudo-labels, the top α% and 100% of the images are selected sequentially for multi-stage training of the student model. During training, strong data augmentation is applied to the unlabeled images and the weight map is added to weight the loss value, where α is a positive number less than 100. Specifically, two teacher models for semantic segmentation are trained using the labeled data, and then predictions are made on the unlabeled data to obtain two types of pseudo-labels, including: Two different semantic segmentation models, denoted as the first teacher model and the second teacher model, are iteratively trained on the labeled data, respectively. The performance of the model is evaluated using the average intersection-over-union ratio (AUI), which represents the accuracy of the network model in segmenting images. A higher AUI value indicates better image segmentation results. After each round of training, the network model is evaluated using the validation data. The model is saved according to the best result of the average intersection-over-union ratio until the number of iterations reaches the set value, at which point training stops and the trained model is saved. The unlabeled data is predicted using the trained first teacher model and second teacher model respectively. Each unlabeled image will have two pseudo-labels, referred to as the first pseudo-label and the second pseudo-label. The process includes performing a reliability assessment on the pseudo-labels at the pixel level to obtain a weight map corresponding to the pseudo-labels, including: For a given pixel, its category in the first pseudo-label is y1. In the second teacher model's output of class_num channels at that pixel location, the value of channel y1, ranked from largest to smallest, is at the x-th position. Therefore, the weight of the first pseudo-label at that pixel is: ; In the formula, a These are predefined parameters; x =0,1,…,class_num-1; The weight calculation is performed on all pixels of the unlabeled image to obtain a weight map of the unlabeled image and save it.
2. The method according to claim 1, characterized in that, Obtain an image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as validation data, including: Obtain an image dataset, randomly divide it into labeled and unlabeled data according to a certain ratio, and select a portion of the data as validation data. The labeled and validation data must have corresponding semantic segmentation labels. If the dataset does not have corresponding labels, it must be labeled using an annotation tool.
3. The method according to claim 1, characterized in that, The reliability of the pseudo-labels is evaluated at the image level, and the unlabeled images and their pseudo-labels are sorted, including: For each of the unlabeled images, the average cross-union ratio (CUI) of its two pseudo-labels is calculated. At the image level, the higher the average CUI of the two pseudo-labels, the higher the probability that the overall prediction of the two pseudo-labels is correct, the more reliable the pseudo-labels are, and the better the image is predicted. All the unlabeled images are sorted according to the average intersection-union ratio (IU), with the sorting method being from high to low IU.
4. The method according to claim 1, characterized in that, Based on the ranking of the unlabeled images and their pseudo-labels, the top α% and 100% of images are selected sequentially for multi-stage training of the student model. During training, strong data augmentation is applied to the unlabeled images, and the weight map is added to weight the loss value, including: Strong data augmentation processing is applied to the unlabeled image; The top α% of the unlabeled images and their first pseudo-labels are selected from the sorting, and the first student model is trained together with the labeled data. During training, a weight map of the unlabeled images is introduced to weight the loss value. The first student model has the same structure as the first teacher model. The first student model, after training, is used to relabel the unlabeled images in the latter (1-α%) to obtain a third pseudo-label. The unlabeled images in the first α% and their first pseudo-label, the unlabeled images in the latter (1-α%) and their third pseudo-label, are combined with the labeled data to train the second student model. During training, a weight map of the unlabeled images is introduced to weight the loss value. The second student model has the same structure as the first teacher model.
5. A device for constructing a multi-stage semi-supervised segmentation model based on data reliability weighting, characterized in that, include: The partitioning module is used to acquire an image dataset, divide the image dataset into labeled data and unlabeled data, and select a portion of the data as validation data. The training prediction module is used to train two teacher models for semantic segmentation using the labeled data, and then predict the unlabeled data to obtain two pseudo-labels; An evaluation and sorting module is used to evaluate the reliability of the pseudo-labels at the image level and sort the unlabeled images and their pseudo-labels. An evaluation module is used to perform reliability evaluation on the pseudo-labels at the pixel level and obtain the weight map corresponding to the pseudo-labels. The multi-stage training module is used to select the top α% and 100% of images in sequence for multi-stage training of the student model according to the sorting of the unlabeled images and their pseudo-labels. During training, strong data augmentation is applied to the unlabeled images and the weight map is added to weight the loss value, where α is a positive number less than 100. Specifically, two teacher models for semantic segmentation are trained using the labeled data, and then predictions are made on the unlabeled data to obtain two types of pseudo-labels, including: Two different semantic segmentation models, denoted as the first teacher model and the second teacher model, are iteratively trained on the labeled data, respectively. The performance of the model is evaluated using the average intersection-over-union ratio (AUI), which represents the accuracy of the network model in segmenting images. A higher AUI value indicates better image segmentation results. After each round of training, the network model is evaluated using the validation data. The model is saved according to the best result of the average intersection-over-union ratio until the number of iterations reaches the set value, at which point training stops and the trained model is saved. The unlabeled data is predicted using the trained first teacher model and second teacher model respectively. Each unlabeled image will have two pseudo-labels, referred to as the first pseudo-label and the second pseudo-label. The process includes performing a reliability assessment on the pseudo-labels at the pixel level to obtain a weight map corresponding to the pseudo-labels, including: For a given pixel, its category in the first pseudo-label is y1. In the second teacher model's output of class_num channels at that pixel location, the value of channel y1, ranked from largest to smallest, is at the x-th position. Therefore, the weight of the first pseudo-label at that pixel is: ; In the formula, a These are predefined parameters; x =0,1,…,class_num-1; The weight calculation is performed on all pixels of the unlabeled image to obtain a weight map of the unlabeled image and save it.
6. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-4.
7. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-4.