Multi-behavior-pattern cooperative training method for semi-supervised semantic segmentation training
By introducing a behavioral pattern vector extraction module and feature perturbation into semi-supervised semantic segmentation training, the sub-network differences are optimized, the problems of pseudo-label noise and cognitive bias are solved, the image segmentation performance is improved, and the model avoids rapid convergence.
Patent Information
- Application Number
- CN202410657543.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-26
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-05-26
AI Technical Summary
In existing semi-supervised semantic segmentation training, pseudo-label noise and cognitive bias lead to limited model performance improvement. The sub-networks of the collaborative training framework tend to quickly converge and lose their differentiation, affecting performance.
By introducing a behavioral pattern vector extraction module in semi-supervised semantic segmentation training, increasing data flow and applying feature perturbations, optimizing the dissimilarity of subnetworks, improving the difference of the collaborative training framework, and using different feature perturbations on shallow and deep features Training is performed, combining cross-entropy loss and pseudo-label loss functions, and optimizing the total loss function to promote subnetwork differentiation.
It improves the image segmentation performance, enhances the difference of subnetworks, prevents the model from quickly converging to consistency, and improves the performance of the segmentation model.
Smart Images

Figure CN118628733A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training. Background Art
[0002] Semantic segmentation is a typical computer vision problem that involves taking some raw data (e.g., flat images) as input and converting them into masks with highlighted regions of interest. Many people use the term full-pixel semantic segmentation, where each pixel in the image is assigned a class ID based on the object of interest it belongs to.
[0003] Early computer vision problems only found elements such as edges (lines and curves) or gradients, but they never fully provided pixel-level image understanding in the way humans perceive. Semantic segmentation solves this problem by grouping together parts of an image that belong to the same object, thus expanding its application areas.
[0004] The current success of semantic segmentation is mainly due to supervised training mode, but supervised training requires a mask corresponding to each image, and detailed mask annotation consumes a lot of manpower and time. Compared with the difficulty of obtaining masks, it is much easier to obtain images, so semi-supervised semantic segmentation has attracted a lot of attention, hoping to use a small amount of labeled data and a large amount of unlabeled data to train the segmentation model.
[0005] The current mainstream method is a combination of pseudo-labeling technology and consistency regularization technology. It has shown good results based on the average teacher framework, FixMatch and other frameworks. The main steps of the process are: 1. The model itself (under the FixMatch framework) or its average teacher (under the average teacher framework) predicts the weakly enhanced unlabeled data, and screens the prediction confidence. The prediction that passes the prediction confidence screening becomes a pseudo-label as a supervisory signal for the unlabeled data. 2. The model predicts the strongly enhanced unlabeled data and is supervised by the pseudo-label at the corresponding pixel position obtained in the previous step.
[0006] Based on the above methods, what currently hinders the semi-supervised semantic segmentation training paradigm from further improving performance is that the pseudo-labels generated in the pseudo-labeling technology will inevitably contain noise. This is because: 1. In semi-supervised semantic segmentation training, the cross entropy loss function is usually used for training, which will cause the model to be overconfident in its own predictions. 2. In semi-supervised semantic segmentation training, the limited labeled data cannot cover the diversity of the entire category, resulting in cognitive biases in the model. 3. Cognitive biases lead to incorrect predictions, and the incorrect predictions become pseudo-labels through prediction confidence screening due to the characteristics of overconfidence. Since the noise generated by its own cognitive bias becomes a supervisory signal, it is more difficult for the model to have the opportunity to jump out of its cognitive bias, limiting further performance improvements.
[0007] For this problem, the collaborative training framework performs better than the above two common frameworks. The main difference between the collaborative training framework and the above two is that there are two dissimilar subnets in the expectation framework, and the prediction of one subnet is used as a supervisory signal to supervise the training of the other subnet after pseudo-labeling technology. Since the supervisory signal comes from a subnet that is dissimilar to itself, the collaborative training framework performs better than the FixMatch framework and the average teacher framework when facing the above problem.
[0008] However, due to the cross-supervision in the collaborative framework (the supervision signal comes from another subnet), such mutual learning makes it easy for the subnets in the collaborative framework to converge quickly. Subnets that converge means that different subnets will make the same predictions, thus losing the superiority mentioned above. Therefore, it is extremely critical to create and maintain the dissimilarity of the subnets in the collaborative framework.
[0009] Current methods include CPS: Semi-Supervised Semantic Segmentation with CrossPseudo Supervision: obtaining two dissimilar subnets by initializing them differently; and CCVC: Conflict-Based Cross-View Consistency for Semi-Supervised Semantic Segmentation: creating and maintaining differences between subnets by constraining the dissimilarity of features extracted by the two subnets for the same image. In current methods such as CPS, as cross-supervision continues in its framework, the network tends to quickly converge to consistency and lose its differences. Or CCVC, which directly optimizes the dissimilarity of features extracted by the two subnets for the same image; however, current deep learning model training mainly loads pre-trained weights for fine-tuning, and directly expects that the dissimilar features used for specific downstream tasks will face a trade-off between differences and performance. Summary of the invention
[0010] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training. The present invention improves the segmentation performance by enhancing the diversity of subnets in the collaborative training framework.
[0011] To achieve the above object, the technical solution adopted by the present invention is: a multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training, comprising the following steps:
[0012] Step 1: Model R1 and model R2 are learned using labeled images and each subnet generates pseudo labels for unlabeled data;
[0013] Step 2: Add a behavior pattern vector extraction module to each model;
[0014] Step 3: Introduce a new data stream for each subnet and apply different feature perturbations to the data stream;
[0015] Step 4: Integrate steps 1 to 3 to obtain the total loss function of each model during training.
[0016] As a further improvement of the present invention, in step 1, the loss function of the labeled image is as follows:
[0017]
[0018] Among them, M x is a labeled data field, H and W represent the height and width of the image, L ce represents the cross entropy loss function, p ij represents the predicted value of the pixel at the i-th row and j-th column, GT represents its corresponding label value, and A w represents the weak perturbation operation of the image, x i Represents the i-th labeled image.
[0019] As a further improvement of the present invention, in step 1, each subnet generates a pseudo label y for the unlabeled data 1 ,y 2 , the generation process is as follows:
[0020] The pseudo-label of each subnet is filtered by the confidence threshold and used as the supervision signal of another subnet in the unlabeled image training. The loss function is as follows:
[0021]
[0022] Among them, M u represents the unlabeled data domain, A s Represents the strong perturbation operation of the image, u i Represents the i-th unlabeled image.
[0023] As a further improvement of the present invention, the step 2 is specifically as follows:
[0024] The behavior pattern vector extracted by model R1 and model R2 is called v 1 and v 2 , and optimize their dissimilarity during training to promote different behavior patterns in different encoders:
[0025]
[0026] in, represents the behavior pattern vector extracted by R1 for the i-th image. It represents the behavior pattern vector extracted by R2 for the i-th image, and sim represents the cosine similarity calculation.
[0027] As a further improvement of the present invention, the step 3 is specifically as follows:
[0028] In the training of model R1, a data stream is introduced: the image is weakly enhanced at the input level and then sent to the encoder to extract features, then weak perturbations are performed on shallow features and strong perturbations are performed on deep features; in the training of model R2, a data stream is introduced: the image is weakly enhanced at the input level and then sent to the encoder to extract features, then strong perturbations are performed on shallow features and weak perturbations are performed on deep features; the loss function is as follows:
[0029]
[0030] Among them A dfp Represents the above differential feature perturbation.
[0031] As a further improvement of the present invention, in step 4, the total loss function is as follows:
[0032] L total =λ x L x +λ u L u +λ sim L sim +λ dfp L dfp
[0033] Among them, λ x , u , sim , dfp are all hyperparameters.
[0034] The beneficial effects of the present invention are:
[0035] The present invention does not directly involve the features extracted by the encoder or the prediction results obtained by the decoder, but improves the image segmentation performance by improving the differences of the subnets in the collaborative training framework. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 Schematic diagram of the structure of a behavior pattern vector extraction module in an embodiment of the present invention;
[0037] Figure 2 This is a comparison chart of prediction visualization in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0039] Example
[0040] A multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training comprises the following steps:
[0041] Step 1: In the common collaborative training framework for semi-supervised training, there are two models R1 and R2. Each model uses labeled images for learning. The loss function of labeled images can be described as:
[0042]
[0043] Among them, M x is a labeled data field, H and W represent the height and width of the image, L ce represents the cross entropy loss function, p ij represents the predicted value of the pixel at the i-th row and j-th column, GT represents its corresponding label value, and A w Represents the weak perturbation operation of the image (for example, flipping, resizing, etc.), x i Represents the i-th unlabeled image.
[0044] In addition, each subnetwork generates a pseudo label y for each unlabeled image 1 ,y 2 , the generation process is as follows:
[0045]
[0046] After the confidence threshold is passed, the pseudo-labels of each subnet will be used as the supervision signal of another subnet in the unlabeled image training. Taking R1 as an example, the loss function can be described as:
[0047]
[0048] Among them, M u is the unlabeled data domain, A srepresents the strong perturbation operation of the image (for example: color jitter, random grayscale, etc.), u i Represents the i-th unlabeled image.
[0049] Step 2: Add a behavior pattern vector extraction module (BPVEM) to each model. The specific structure and forward propagation method of this module are as follows Figure 1 As shown, Figure 1 Medium, F 1 , F 2 Represents the encoder of Model 1 and Model 2, C 0 , C 1 etc. are the shallow to deep features extracted by the encoder, and BPV is the behavior pattern vector extracted by this module for each subnet.
[0050] The behavior pattern vector extracted by R1 and R2 is called v 1 and v 2 , and optimize their dissimilarity during training to promote different behavior patterns in different encoders.
[0051]
[0052] in, represents the behavior pattern vector extracted by R1 for the i-th image. It represents the behavior pattern vector extracted by R2 for the i-th image, and sim represents the cosine similarity calculation.
[0053] Step 3: Introduce a new data stream for each subnet and apply different feature perturbations on the data stream. Specifically, a data stream is introduced in the training of R1: the image is weakly enhanced at the input level and then sent to the encoder to extract features, and then weak perturbations are performed on shallow features (for example: 20% random channel loss) and strong perturbations are performed on deep features (for example: 80% random channel loss). In the training of R2, the opposite is true: shallow features are strongly perturbed and deep features are weakly perturbed. Different behavioral patterns in different decoders are cultivated through differential feature perturbations. Taking R1 as an example, the loss function of this step can be described as:
[0054]
[0055] Among them A dfp Represents the above differential feature perturbation.
[0056] Step 4: By integrating the above steps, the total loss function of each model in training can be described as:
[0057] L total =λ x L x +λu L u +λ sim L sim +λ dfp L dfp
[0058] Among them, the values of the four hyperparameters from left to right are 1, 0.5, 1, and 0.5 respectively.
[0059] On the classic dataset Pascal VOC 2012, the mIoU values of the DeepLabv3plus+ResNet101 / ResNet-50 model trained using the proposed method and the most recent mainstream method are compared during validation. The specific values are shown in Tables 1 and 2, which indicate the specific backbone models used and the amount of labeled data used.
[0060]
[0061] Table 1
[0062]
[0063] Table 2
[0064] In addition, this embodiment is also compared with other methods on a more challenging city landscape dataset (Cityscapes), and the results are shown in Table 3:
[0065]
[0066] Table 3
[0067] In addition, if Figure 2 As shown, the predictions of the method of this embodiment and other methods during validation are visualized for a more intuitive comparison. Figure 2 In the figure, from left to right are the input image, the prediction result of the nearest method (UniMatch), the prediction result of the method proposed in this embodiment, and the true value.
[0068] The above-mentioned embodiments only express the specific implementation of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training, characterized in that: The following steps are involved: Step 1: Model R1 and model R2 are learned using labeled images and each subnet generates pseudo labels for unlabeled data; Step 2: Add a behavior pattern vector extraction module to each model; Step 3: Introduce a new data stream for each subnet and apply different feature perturbations to the data stream; Step 4: Integrate steps 1 to 3 to obtain the total loss function of each model during training.
2. The multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training according to claim 1, characterized in that: In step 1, the loss function of the labeled image is as follows: Among them, M x is a labeled data field, H and W represent the height and width of the image, L ce represents the cross entropy loss function, p ij represents the predicted value of the pixel at the i-th row and j-th column, GT represents its corresponding label value, and A w represents the weak perturbation operation of the image, x i Represents the i-th labeled image.
3. The multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training according to claim 2, characterized in that: In step 1, each subnet generates pseudo labels y for unlabeled data 1 ,y 2 , the generation process is as follows: The pseudo-label of each subnet is filtered by the confidence threshold and used as the supervision signal of another subnet in the unlabeled image training. The loss function is as follows: Among them, M u is the unlabeled data domain, A s Represents the strong perturbation operation of the image, u i Represents the i-th unlabeled image.
4. The multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training according to claim 3, characterized in that: The step 2 is specifically as follows: The behavior pattern vector extracted by model R1 and model R2 is called v 1 and v 2 , and optimize their dissimilarity during training to promote different behavior patterns in different encoders: in, represents the behavior pattern vector extracted by R1 for the i-th image. It represents the behavior pattern vector extracted by R2 for the i-th image, and sim represents the cosine similarity calculation.
5. The multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training according to claim 4, characterized in that: The step 3 is as follows: In the training of model R1, a data stream is introduced: the image is weakly enhanced at the input level and then sent to the encoder to extract features, then weak perturbations are performed on shallow features and strong perturbations are performed on deep features; in the training of model R2, a data stream is introduced: the image is weakly enhanced at the input level and then sent to the encoder to extract features, then strong perturbations are performed on shallow features and weak perturbations are performed on deep features; the loss function is as follows: Among them A dfp Represents the above differential feature perturbation.
6. The multi-behavior pattern collaborative training method for semi-supervised semantic segmentation training according to claim 5, characterized in that: In step 4, the total loss function is as follows: L total =λ x L x +λ u L u +λ sim L sim +λ dfp L dfp Among them, λ x , u , sim , dfp are all hyperparameters.
Citation Information
Patent Citations
Pancreatic tumor image segmentation method and system based on reinforcement learning and attention
CN114663431A
Image semi-supervised semantic segmentation method based on conservative aggressive collaborative learning
CN114821053A
Flight training equipment intelligent identification and warning system based on AI visual identification
CN115083229A
Semi-supervised image semantic segmentation method based on similarity weighted multi-teacher network model
CN116433909A
Image semantic segmentation method based on dual-network collaborative segmentation model
CN116468888A
