A semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency

By adopting the adversarial mutual training method of strong and weak consistency in semi-supervised semantic segmentation, the deeplabV3+ differential feature consistency fusion pseudo-label branch supervised segmentation network is constructed, which solves the problem of model collapse caused by branch assimilation in the dual-branch network, and realizes the model's Good performance and generalization ability under less labeled data.

CN118447256BActive Publication Date: 2024-10-18NANJING UNIV OF INFORMATION SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410903539.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-18
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Existing semi-supervised semantic segmentation methods have the problem of branch assimilation leading to model collapse in dual-branch networks, and it is difficult to effectively utilize unlabeled data to assist model training.

Method used

A semi-supervised adversarial mutual training method based on strong and weak consistency is adopted, by constructing an improved deeplabV3+ differential feature consistency fusion pseudo-label branch supervised segmentation network, using fast enhancement network and heavy augmentation network for feature extraction and pseudo-label synthesis, combined with cross The supervision module performs model training to avoid confirmation bias and force model generalization.

Benefits of technology

It achieves good performance of the model when the image contains less effective information, enhances the generalization ability of the model, and effectively uses unlabeled data to assist labeled data for training, avoiding model collapse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447256B_ABST
    Figure CN118447256B_ABST
Patent Text Reader

Abstract

The present invention discloses a semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency, comprising the following steps: (1) obtaining a Pascal VOC2012 data set from an open source website and performing preprocessing; (2) constructing a supervised segmentation network based on improved deeplabV3+ difference feature consistency fusion pseudo-label branch and training it, including: a fast enhancement network and a heavy augmentation network; (3) outputting a segmentation map; the present invention uses the idea of ​​mutual training to construct an adversarial joint training architecture method based on strong and weak consistency for semi-supervised semantic segmentation, which not only has good end-to-end training, but also uses a mutual training method in training. The mutual supervision of the two branches avoids the influence of confirmation bias, and the idea of ​​feature adversarial forces the model to have stronger generalization ability. The strong and weak consistency also allows the model to have good performance when the image contains less effective information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of semantic segmentation, and in particular to a semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency. Background Art

[0002] Semantic segmentation is a basic visual task in the field of computer vision, which aims to classify pixels in an image into different categories. In recent years, deep neural networks have shown great potential in semantic segmentation. However, the success of deep neural networks is mainly due to large annotated datasets. For semantic segmentation tasks, pixel-level annotations are usually required, which means that annotators need to manually label hundreds of thousands of pixels of each image. Therefore, collecting accurately labeled data for training deep neural networks requires great labor costs. In addition, for some specific semantic categories, labeled samples may be difficult to obtain, resulting in limited performance of the model.

[0003] To solve these problems, semi-supervised learning technology was introduced into the semantic segmentation task, with the goal of learning the network model by using a small set of pixel-accurately labeled data and a large amount of unlabeled data. In semi-supervised semantic segmentation, unlabeled images can be used to learn richer representations to help the model understand a wider range of semantic information. However, the information from labeled data is very limited because the amount of labeled data is much smaller than the amount of unlabeled data. Therefore, how to fully use unlabeled data to assist labeled data in model training becomes a key issue.

[0004] In recent years, the rapid development of deep learning technology has brought new opportunities for semi-supervised semantic segmentation. By applying deep convolutional neural networks (CNNs) to semantic segmentation tasks, researchers have made significant progress. However, existing semi-supervised semantic segmentation methods still face some challenges, such as the reasonable use of unlabeled data, the unbalanced distribution of labeled samples, and the collapse of the model caused by branch assimilation in a two-branch network. Summary of the invention

[0005] Purpose of the invention: The purpose of the present invention is to provide a semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency to solve the problem of model collapse caused by branch assimilation in a two-branch network.

[0006] Technical solution: The semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency described in the present invention comprises the following steps:

[0007] S1 obtains the Pascal VOC2012 data set from the open source website and performs preprocessing;

[0008] S2 builds and trains a supervised segmentation network based on the improved deeplabV3+ difference feature consistency fusion pseudo-label branch, including: fast enhancement network and heavy augmentation network;

[0009] S3 outputs the segmentation map.

[0010] Furthermore, in step S1, the Pascal VOC2012 dataset has 1464 fully annotated images for training, 1449 images for verification, and 1456 images for testing; among them, 1464 images are randomly divided into labeled images and unlabeled images; the preprocessing is as follows: the training images are randomly scaled, cropped, and horizontally flipped as the input of the fast enhancement network; the randomly scaled, cropped, and horizontally flipped images are randomly adjusted using color jitter transforms.ColorJitter to adjust the brightness, contrast, saturation, and hue of the images; the images are randomly converted into grayscale images using random grayscale transforms.RandomGrayscale and then randomly blurred as the input of the heavy augmentation network; that is, a set of images completely annotated by pixels is obtained. and a set of unlabeled images ; Where M and N represent the number of labeled images and unlabeled images, where , ; Wherein, C represents channel; H represents height; W represents width; is the one-hot label for each pixel, where Y represents the number of segmentation categories.

[0011] Furthermore, in step S2, the fast enhancement network and the heavy augmentation network include: a feature difference extraction module, a feature decoding module, a pseudo-label synthesis module, and a cross-supervision module; wherein the feature difference extraction module is used to extract features of the image; the feature decoding module is used to perform perturbation features and non-perturbation features in the fast enhancement network and the heavy augmentation network, respectively, wherein the non-perturbation features are performed using a two-way perturbation consisting of image perturbation and feature perturbation dropout; then the perturbations are input into two shared weight decoders of the fast enhancement network and the heavy augmentation network for decoding to obtain two prediction images of the fast enhancement network and two prediction images of the heavy augmentation network, respectively; the pseudo-label synthesis module generates pseudo-labels using neighboring pixel predictions; wherein the fast enhancement network and the heavy augmentation network generate a first pseudo-label and a second pseudo-label, respectively; the cross-supervision module is used to synthesize the prediction images that are not perturbed in the fast enhancement network into pseudo-labels, and then use the pseudo-labels to supervise the training of the prediction images of the heavy augmentation network.

[0012] Furthermore, the feature difference extraction module is as follows: Assume that the feature extractors of the fast augmented network and the heavily augmented network are Ψ f and the classifier is Ψcls , passing the view through the feature extractor Ψ f The characteristic representation is f α ;for and The preprocessed image views are input into the fast enhancement network and the heavy augmentation network respectively, and two feature representations are obtained after the feature extractors of the two subnetworks. and ; Use difference loss Minimize two feature representations and The cosine similarity between is expressed as:

[0013] ;

[0014] in, Represents labeled data and unlabeled data, represents the feature information extracted by the fast enhancement branch, Extract information for the heavily augmented branch.

[0015] Furthermore, in the feature decoding module, the unperturbed features are passed through the classifier Ψ cls The subsequent prediction is recorded as , the features with dropout perturbation are passed through the classifier Ψ cls The subsequent prediction is recorded as , then the supervision loss is expressed as:

[0016] ;

[0017] Among them, l represents the label image, is the supervised training loss for labeled images, M represents the number of labeled images, W and H represent the width and height of the image, is the cross entropy loss, is the nth pixel of the mth label image, w and s are the fast augmentation network and the heavy augmentation network respectively, To quickly enhance the perturbation-free prediction of branches, To quickly enhance branch perturbation prediction; denote the unperturbed and perturbed predictions of the heavily augmented network, respectively, is the true label.

[0018] Furthermore, the pseudo-label synthesis module formula is as follows: Given a prediction A pixel in and the corresponding prediction for each category , check the neighboring pixels in the surrounding N×N pixel neighborhood ,calculate and The joint probability of belonging to the same class c , and then calculate the probability that at least one of the two pixels belongs to category c, the formula is as follows:

[0019] ;

[0020] in, represents the fast augmented network and the heavily augmented network, For prediction The pixel point at row j and column k of Pixel Neighborhood pixels of ; Represents pixels , The predicted probability for category c;

[0021] For each class c, select the neighbor with the maximum information entropy, the formula is as follows:

[0022] ;

[0023] Among them, max means maximum value screening, Indicates searching for pixels in all 3*3 neighborhoods The maximum value of .

[0024] Furthermore, the cross-supervision module formula is as follows:

[0025] ;

[0026] in, represents the fast augmented network and the heavily augmented network, represents the unsupervised consistency loss of branch i. represents the high confidence consistency loss for branch i’s prediction and label conflicts, is the unlabeled consistency loss of branch i in other cases. is the weight of consistency loss in the case of high confidence conflict; The formula is as follows:

[0027] ;

[0028] The formula is as follows:

[0029] ;

[0030] Where N is the number of unlabeled images, W and H are the width and height of the image, is the nth pixel prediction of the mth image of branch i, The nth pixel label of the mth image of the pseudo label generated by the (3-i)th branch; Indicates in the prediction and tags In case of conflict and when the confidence is above the threshold, it is 1. Indicates situations other than high confidence conflicts.

[0031] Furthermore, in model training, the total loss function is composed of supervision loss, consistency loss and feature difference loss, and the formula is as follows:

[0032] ;

[0033] in, is the total loss function, represents the supervision loss, is the unlabeled consistency loss, is the feature difference loss, are the adjustment weights of the three loss functions.

[0034] Beneficial effect: Compared with the prior art, the present invention has the following significant advantages: the idea of ​​mutual training is used to construct an adversarial joint training architecture method based on strong and weak consistency, which is used for semi-supervised semantic segmentation. It not only has good end-to-end training, but also uses the mutual training method in training. The mutual supervision of the two branches avoids the influence of confirmation bias, and the idea of ​​feature adversarial forces the model to have stronger generalization ability. Strong and weak consistency also enables the model to have good performance when the image contains less effective information. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is an unlabeled graph of the present invention;

[0036] Figure 2 It is a label diagram of the present invention;

[0037] Figure 3 Generate a pseudo-label graph for the present invention. DETAILED DESCRIPTION

[0038] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0039] like Figure 1 , Figure 2 and Figure 3 As shown, the embodiment of the present invention provides a semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency, comprising the following steps:

[0040] (1) Obtain the Pascal VOC2012 data set from the open source website and perform preprocessing; specifically, the PascalVOC2012 data set contains 1464 fully annotated images for training, 1449 images for verification, and 1456 images for testing; of which 1464 images are randomly divided into labeled images and unlabeled images; the preprocessing is as follows: the training images are randomly scaled, cropped, and horizontally flipped and used as the input of the fast augmentation network; the randomly scaled, cropped, and horizontally flipped images are randomly adjusted using color jitter transforms.ColorJitter to adjust the brightness, contrast, saturation, and hue of the images; the images are randomly converted into grayscale images using random grayscale transforms.RandomGrayscale and then randomly blurred as the input of the heavy augmentation network; thus, a set of images completely annotated by pixel is obtained. and a set of unlabeled images ; Where M and N represent the number of labeled images and unlabeled images, where , ; Wherein, C represents channel; H represents height; W represents width; is the one-hot label for each pixel, where Y represents the number of segmentation categories.

[0041] (2) Construct and train a pseudo-label branch supervised segmentation network based on the improved deeplabV3+ difference feature consistency fusion, including: a fast enhancement network and a heavy augmentation network; wherein the fast enhancement network and the heavy augmentation network include: a feature difference extraction module, a feature decoding module, a pseudo-label synthesis module, and a cross-supervision module; wherein the feature difference extraction module is used to extract image features; the feature decoding module is used to perform perturbation features and non-perturbation features in the fast enhancement network and the heavy augmentation network, respectively, wherein the non-perturbation features are performed using a two-way perturbation consisting of image perturbation and feature perturbation dropout; then the perturbation features are input into two shared weight decoders of the fast enhancement network and the heavy augmentation network for decoding to obtain two prediction images of the fast enhancement network and two prediction images of the heavy augmentation network; the pseudo-label synthesis module generates pseudo-labels using neighboring pixel predictions; wherein the fast enhancement network and the heavy augmentation network generate the first pseudo-label and the second pseudo-label respectively; the cross-supervision module is used to synthesize the non-perturbed prediction images in the fast enhancement network into pseudo-labels, and then use the pseudo-labels to supervise the training of the prediction images of the heavy augmentation network; wherein,

[0042] The feature difference extraction module is as follows: Assume that the feature extractors of the fast augmented network and the heavily augmented network are Ψ f and the classifier is Ψ cls , passing the view through the feature extractor Ψ f The characteristic representation is fα ;for and The preprocessed image views are input into the fast enhancement network and the heavy augmentation network respectively, and two feature representations are obtained after the feature extractors of the two subnetworks. and ; Use difference loss Minimize two feature representations and The cosine similarity between is expressed as:

[0043] ;

[0044] in, Represents labeled data and unlabeled data, represents the feature information extracted by the fast enhancement branch, Extract information for the heavily augmented branch.

[0045] The feature decoding module is as follows: the unperturbed features are passed through the classifier Ψ cls The subsequent prediction is recorded as , the features with dropout perturbation are passed through the classifier Ψ cls The subsequent prediction is recorded as , then the supervision loss is expressed as:

[0046] ;

[0047] Among them, l represents the label image, is the supervised training loss for labeled images, M represents the number of labeled images, W and H represent the width and height of the image, is the cross entropy loss, is the nth pixel of the mth label image, w and s are the fast augmentation network and the heavy augmentation network respectively, To quickly enhance the perturbation-free prediction of branches, To quickly enhance branch perturbation prediction; denote the unperturbed and perturbed predictions of the heavily augmented network, respectively, is the true label.

[0048] The pseudo-label synthesis module formula is as follows: Given a prediction A pixel in and the corresponding prediction for each category , check the neighboring pixels in the surrounding N×N pixel neighborhood ,calculate and The joint probability of belonging to the same class c , and then calculate the probability that at least one of the two pixels belongs to category c, the formula is as follows:

[0049] ;

[0050] in, represents the fast augmented network and the heavily augmented network, For prediction The pixel point at row j and column k of Pixel Neighborhood pixels of ; Represents pixels , The predicted probability for category c;

[0051] For each class c, select the neighbor with the maximum information entropy, the formula is as follows:

[0052] ;

[0053] Among them, max means maximum value screening, Indicates searching for pixels in all 3*3 neighborhoods The maximum value of .

[0054] The cross-supervision module formula is as follows:

[0055] ;

[0056] in, represents the fast augmented network and the heavily augmented network, represents the unsupervised consistency loss of branch i. represents the high confidence consistency loss for branch i’s prediction and label conflicts, is the unlabeled consistency loss of branch i in other cases. is the weight of consistency loss in the case of high confidence conflict; The formula is as follows:

[0057] ;

[0058] The formula is as follows:

[0059] ;

[0060] Where N is the number of unlabeled images, W and H are the width and height of the image, is the nth pixel prediction of the mth image of branch i, The nth pixel label of the mth image of the pseudo label generated by the (3-i)th branch; Indicates in the prediction and tags In case of conflict and when the confidence is above the threshold, it is 1. Indicates situations other than high confidence conflicts.

[0061] The model training is as follows: In model training, the total loss function is composed of supervision loss, consistency loss and feature difference loss, and the formula is as follows:

[0062] ;

[0063] in, is the total loss function, represents the supervision loss, is the unlabeled consistency loss, is the feature difference loss, are the adjustment weights of the three loss functions.

[0064] Use DeepLabv3+ as the segmentation model, and use ResNet pre-trained on ImageNet as the backbone network; according to the requirements of the Pascal VOC 2012 dataset, use the SGD optimizer and set the learning rate to 0.001. Set the conflict loss weight in the cross pseudo-label is 2.0. At the feature perturbation level, dropout=0.5 is used. They are set to 5.0, 1.0, and 2.0 respectively. Label threshold is set to 0.9, the pseudo-label neighborhood size N is set to 3, and the relative label threshold is set to 0.8, batchsize is set to 24, crop size is set to 512, and training epoch = 80. As shown in Table 1, the segmentation method of the present invention has better training effect on the PASCAL visual object category recognition challenge dataset than other existing segmentation methods.

[0065] Table 1 The training effect of the segmentation method of the present invention and other existing segmentation methods on the PASCAL visual object category recognition challenge dataset

[0066] .

[0067] (3) Output segmentation map.

Claims

1. A semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency, characterized in that: The following steps are involved: S1 obtains the Pascal VOC2012 dataset from the open source website and performs preprocessing; specifically as follows: the Pascal VOC2012 dataset has 1464 fully annotated images for training, 1449 images for verification, and 1456 images for testing; among them, 1464 images are randomly divided into labeled images and unlabeled images; the preprocessing is as follows: the training images are randomly scaled, cropped, and horizontally flipped as the input of the fast enhancement network; the randomly scaled, cropped, and horizontally flipped images are randomly adjusted using color jitter transforms.ColorJitter to adjust the brightness, contrast, saturation, and hue of the images; the random grayscale transforms.RandomGrayscale is used to randomly convert the images into grayscale images and then randomly blur them as the input of the heavy augmentation network; that is, a set of images completely annotated by pixels is obtained and a set of unlabeled images ; Where M and N represent the number of labeled images and unlabeled images, where , ; Wherein, C represents channel; H represents height; W represents width; is the one-hot label for each pixel, where Y represents the number of segmentation categories; S2 uses deeplabv3+ to construct a semi-supervised semantic segmentation network, which includes a fast enhancement network and a heavy augmentation network; wherein the fast enhancement network and the heavy augmentation network include: a feature difference extraction module, a feature decoding module, a pseudo-label synthesis module, and a cross-supervision module; wherein the feature difference extraction module is used to extract image features; the feature decoding module is used to perform perturbation features and non-perturbation features in the fast enhancement network and the heavy augmentation network, respectively, wherein the non-perturbation features are performed using a two-way perturbation consisting of image perturbation and feature perturbation dropout; then the perturbation features are input into two shared weight decoders of the fast enhancement network and the heavy augmentation network for decoding to obtain two prediction images of the fast enhancement network and two prediction images of the heavy augmentation network respectively; the pseudo-label synthesis module generates pseudo-labels using neighboring pixel predictions; wherein the fast enhancement network and the heavy augmentation network generate a first pseudo-label and a second pseudo-label respectively; the cross-supervision module is used to synthesize the prediction images that are not perturbed in the fast enhancement network into pseudo-labels, and then use the pseudo-labels to supervise the training of the prediction images of the heavy augmentation network; S3 outputs the segmentation map.

2. According to the method of claim 1, the semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency is characterized in that: The feature difference extraction module is as follows: Assume that the feature extractors of the fast augmented network and the heavily augmented network are Ψ f and the classifier is Ψ cls , passing the view through the feature extractor Ψ f The characteristic representation is f α ;for and The preprocessed image views are input into the fast enhancement network and the heavy augmentation network respectively, and two feature representations are obtained after the feature extractors of the two subnetworks. and ; Use difference loss Minimize two feature representations and The cosine similarity between is expressed as: ; in, Represents labeled data and unlabeled data, represents the feature information extracted by the fast enhancement branch, Extract information for the heavily augmented branch.

3. According to the method of semi-supervised adversarial mutual training semantic segmentation based on strong and weak consistency in claim 1, it is characterized in that: In the feature decoding module, the unperturbed features are passed through the classifier Ψ cls The subsequent prediction is recorded as , the features with dropout perturbation are passed through the classifier Ψ cls The subsequent prediction is recorded as , then the supervision loss is expressed as: ; Among them, l represents the label image, is the supervised training loss for labeled images, M represents the number of labeled images, W and H represent the width and height of the image, is the cross entropy loss, is the nth pixel of the mth label image, w and s are the fast augmentation network and the heavy augmentation network respectively, To quickly enhance the perturbation-free prediction of branches, To quickly enhance branch perturbation prediction; denote the unperturbed and perturbed predictions of the heavily augmented network, respectively, is the true label.

4. The semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency according to claim 1, characterized in that: The pseudo-label synthesis module formula is as follows: Given a prediction A pixel in and the corresponding prediction for each category , check the neighboring pixels in the surrounding N×N pixel neighborhood ,calculate and The joint probability of belonging to the same class c , and then calculate the probability that at least one of the two pixels belongs to category c, the formula is as follows: ; in, represents the fast augmented network and the heavily augmented network, For prediction The pixel point at row j and column k of Pixel Neighborhood pixels of ; Represents pixels , The predicted probability for category c; For each class c, select the neighbor with the maximum information entropy, the formula is as follows: ; Among them, max means maximum value screening, Indicates searching for pixels in all 3*3 neighborhoods The maximum value of .

5. The semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency according to claim 1, characterized in that: The cross-supervision module formula is as follows: ; in, represents the fast augmented network and the heavily augmented network, represents the unsupervised consistency loss of branch i; represents the high-confidence consistency loss indicating that the prediction and label of branch i conflict, is the unlabeled consistency loss of branch i in other cases; is the weight of consistency loss in the case of high confidence conflict; The formula is as follows: ; The formula is as follows: ; Where N is the number of unlabeled images, W and H are the width and height of the image, is the nth pixel prediction of the mth image of branch i, The nth pixel label of the mth image of the pseudo label generated by the (3-i)th branch; Indicates in the prediction and tags In case of conflict and when the confidence is above the threshold, it is 1. Indicates situations other than high confidence conflicts.

6. The semi-supervised adversarial mutual training semantic segmentation method based on strong and weak consistency according to claim 1, characterized in that: In model training, the total loss function is composed of supervision loss, consistency loss and feature difference loss, and the formula is as follows: ; in, is the total loss function, represents the supervision loss, is the unlabeled consistency loss, is the feature difference loss, are the adjustment weights of the three loss functions.

Citation Information

Patent Citations

  • Image semantic segmentation method based on cross-network disturbance mechanism

    CN118135221A