A single-stage weakly supervised semantic segmentation method
Patent Information
- Application Number
- CN202611017823.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-27
AI Technical Summary
但是这类单阶段方法大多遵循“以伪标签为中心”的范式,即主要关注如何生成准确完整的类激活图,却往往忽视了对分割网络本身的优化,将其视为一个被动的接收者
[0054](1)本发明在缺乏像素级精准标注的弱监督环境中,通过自适应特征交互模块(AFIM)充分融合多视图双分支特征,利用通道注意力与动态交互因子实现跨分支互补信息的有效提取,并有效抑制了特征同质化,显著提升了模型学习多样化特征表示与保持语义一致性的能力,防止训练被单一视图偏差所主导,从而生成更高保真度与覆盖率的类激活图(CAMs) 。
Smart Images

Figure CN122990190A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and image processing, and specifically relates to a single-stage weakly supervised semantic segmentation method, particularly a single-stage weakly supervised semantic segmentation method based on adaptive feature interaction and dynamic reliable learning. Background Technology
[0002] Semantic segmentation is one of the core tasks in computer vision, aiming to assign a category label to each individual pixel in an image. It has wide applications in various practical scenarios such as autonomous driving, medical image analysis, and intelligent security. While fully supervised semantic segmentation methods have made significant progress driven by deep neural networks, they heavily rely on large-scale pixel-level labeled data, leading to high data acquisition costs and difficulty in meeting the scalability requirements of practical applications. Therefore, weakly supervised semantic segmentation (WSSS), utilizing extremely low-cost annotation information such as image-level labels, has become a key technology for effectively reducing the annotation burden. The main goal of WSSS is to generate class activation maps (CAMs) through a classification network as initial pseudo-labels to guide the training of the segmentation network. This task is not limited to simple local object discrimination but also needs to overcome the inherent deficiency of image-level labels lacking clear spatial localization information. Through refined feature representation and pseudo-label extraction strategies, it ensures complete coverage and accurate segmentation of the target object.
[0003] Existing methods are mainly divided into multi-stage and single-stage frameworks. Multi-stage methods typically require training an image classification network sequentially to generate class activation maps, extracting pseudo-labels through post-processing, and finally using the pseudo-labels to train an independent semantic segmentation model. However, this pipeline mode greatly increases the complexity of the training process and reduces the overall computational efficiency of the system. To simplify the process, recent research has begun to explore single-stage schemes, attempting to synchronize pseudo-label generation with the training of the segmentation network. However, most of these single-stage methods follow a "pseudo-label-centric" paradigm, focusing primarily on generating accurate and complete class activation maps, while often neglecting the optimization of the segmentation network itself, treating it as a passive receiver. Since the generation mechanism of class activation maps usually only highlights the most discriminative regions of the target, it fails to capture the complete object structure and fine details. In addition, existing single-stage methods typically use a fixed, static high threshold to filter unreliable pseudo-labels and maintain a fixed cross-entropy loss throughout the training process. This rigid filtering and static supervision method easily ignores a large amount of real and effective pseudo-label information, leading to the accumulation of errors in low-confidence regions. Studies have shown that improvements in the quality of pseudo-labels in class activation maps (e.g., increased mIoU scores) do not necessarily translate into improved final segmentation performance; there is a significant difference between the two, and the vast majority of errors are concentrated in the boundary regions of the target.
[0004] Therefore, how to design a single-stage weakly supervised semantic segmentation method that can fully utilize multi-view feature interaction, dynamically evaluate the reliability of pseudo-label supervision, and has efficient boundary awareness and feature refinement mechanisms under the condition of lacking pixel-level accurate annotation, so as to effectively bridge the gap between pseudo-label quality and final segmentation performance and achieve synergistic optimization of complete activation of target region and accurate boundary localization, remains a technical problem that urgently needs to be solved in the field of computer vision and image segmentation. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and to provide a single-stage weakly supervised semantic segmentation method. Based on adaptive feature interaction and dynamic reliable learning, this method makes full use of multi-view feature interaction and dynamically evaluates the reliability of pseudo-label supervision to achieve accurate characterization of target contours in complex backgrounds, bridges the gap between pseudo-label quality and final segmentation performance, and enhances the accuracy of target boundary localization and the visual performance of final semantic segmentation.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A single-stage weakly supervised semantic segmentation method, the specific steps of which are as follows:
[0008] S1. Perform preprocessing operations such as weak data augmentation on the input original image to generate two complementary views, and input them into the multi-view dual-branch backbone network to extract feature maps with semantic consistency.
[0009] S2. Using the classification heads corresponding to the first and second branches in the multi-view dual-branch backbone network described in step S1, the feature maps extracted by each branch are processed independently to generate corresponding class activation maps, and the class activation maps are converted into initial pseudo labels by combining a threshold strategy.
[0010] S3. Through the adaptive feature interaction module, the feature map obtained in step S1 is reweighted and similarity-guided fusion is performed using the channel attention mechanism and dynamic interaction factor to extract complementary information across branches and suppress feature homogenization, thereby obtaining enhanced features.
[0011] S4. Construct a quality-aware supervision module, use a lightweight convolutional network to process the enhanced features obtained in step S3, dynamically evaluate pixel-level prediction confidence, and generate continuous quality score maps to distinguish between reliable and uncertain regions.
[0012] S5. The quality score map generated in step S4 is used to refine the residuals of the enhanced features obtained in step S3, and a dynamic time weighting strategy based on the cosine function is introduced to adaptively adjust the supervision intensity of the initial pseudo-label according to the training stage, so as to realize progressive learning from high confidence to low confidence regions.
[0013] S6. Using a dual-path boundary-sensitive segmentation head, global context information is extracted using the main segmentation branch, local high-frequency boundary details are captured using the edge refinement branch, and the global semantic features extracted by the main segmentation branch are fused with the local boundary features extracted by the edge refinement branch to enhance the local boundary representation.
[0014] S7 employs a symmetric cross-supervision mechanism, using the initial pseudo-labels generated in step S2 as supervision signals to cross-supervise the segmentation prediction results of the other branch, and jointly optimizes the feature interaction loss, quality-aware loss, and segmentation loss end-to-end to reduce error accumulation.
[0015] S8 generates the final high-quality segmentation result image, achieving fine separation between the target region and the boundary, and improving the boundary consistency and detail perception quality of the segmentation result.
[0016] As a further technical solution of the present invention, the multi-view dual-branch backbone network in step S1 includes a ViT network based on visual Transformer, and the extracted first... Feature map of each branch Represented as: ,in, , For batch size, The number of feature channels, and These represent the spatial height and width of the feature map, respectively.
[0017] As a further technical solution of the present invention, the class activation graph obtained in step S2... Represented as:
[0018] ,
[0019] in This represents the category index, indicating the category currently being calculated. Represents the sample index, corresponding to the first... One input image; Use the feature channel index to traverse all channels of the convolution output feature map; These are the spatial coordinates of the feature map, corresponding to the pixel positions; Indicates the first The sample at the th Each channel, location The feature activation value; Indicates the first in the classification layer Class corresponding to the first The weight of each channel; for An activation function is used to ensure that the output is non-negative. This formula is used to generate categories. The CAM (Class Activation Map) is obtained by weighted summation of feature channels followed by ReLU (Recursive LU) to obtain the response intensity of each spatial location to that category, which is used for pseudo-label generation. The process of transforming the class activation map into initial pseudo-labels involves mapping the class activation map to a minimum-maximum normalization (MIN) map. The interval is obtained Combined with a preset foreground threshold With background threshold ,Will Convert to initial binary pseudo-labels This is used for subsequent weakly supervised training of the segmentation network.
[0020] As a further technical solution of the present invention, the adaptive feature interaction module (AFIM) in step S3 includes a channel attention network respectively set in the two feature extraction branches, a dynamic interaction factor generation unit for controlling the intensity of information interaction between branches, and a fusion network for realizing the fusion of dual-branch features. The channel attention network performs global average pooling, convolution mapping, and activation operations on the input features to obtain channel attention weights; the dynamic interaction factor generation unit dynamically generates interaction factors according to the number of training iterations; the fusion network concatenates and fuses the dynamically modulated dual-branch features, and uses residual connections to feed the fusion result back to the output of each branch, so as to realize the progressive interaction and collaborative optimization of dual-branch features. The specific working process is as follows:
[0021] S31. The intermediate features generated by the dual-branch backbone network As input, perform global average pooling to obtain channel-level global descriptors. : ;
[0022] S32. Use an unbiased convolutional layer to perform linear projection and obtain the channel attention weights. :
[0023] ,
[0024] in and For the initialized learnable projection parameter matrix, The channel dimensionality reduction scaling factor. for Activation function;
[0025] S33, Introducing a dependency on the number of training iterations Dynamic interaction factors :
[0026] ,
[0027] in This is a threshold for the number of iterations in the initial stage of training. The threshold for the later stages of training;
[0028] S34. Utilizing dynamic interaction factors With attention weight The original input features are dynamically modulated to generate reweighted features. :
[0029] ;
[0030] in, This indicates an element-wise multiplication operation along the channel dimension;
[0031] S35, Reweighted Features and Connections are made along the channel dimension using a lightweight feature fusion network. Perform cross-channel aggregation, and the aggregated features are processed through interaction factors. Adjusted symmetric residual connections are added to their respective branches to generate enhanced features after interaction. : ,in, This indicates a splicing operation at the channel dimension.
[0032] As a further technical solution of the present invention, the Quality-Aware Supervision Module (QASM) constructed in step S4 includes a quality assessment network, a feature refinement network, and a quality-aware supervision unit. The quality assessment network is used to assess the quality of the input features and generate a pixel-level quality score map; the feature refinement network is used to fuse the quality score map with the original features and achieve feature enhancement through residual connections; the quality-aware supervision unit is used to dynamically adjust the pseudo-label supervision weights according to the quality score map, thereby improving the supervision strength in high-confidence regions and suppressing noise propagation in low-confidence regions. The working process is as follows: the enhanced features output in step S3 are... The input is fed into a lightweight convolutional network of the quality-aware supervision module to generate a normalized continuous pixel-level quality score map. :
[0033] ,
[0034] Where BN represents batch normalization operation, These are the learnable weights of the convolutional layer.
[0035] As a further technical solution of the present invention, the specific process of step S5 is as follows:
[0036] S51. The enhanced features output in step S3 With mass fraction graph Perform channel splicing and residual refinement module The correlation between the quality score map and enhanced features is learned through convolutional transformation, and residual connections are used to preserve the original semantic information, thereby improving the model's sensitivity to high-confidence regions and obtaining refined features. : ;
[0037] S52. During training, a dynamic adjustment strategy based on the cosine function is introduced to improve the quality supervision weights of the pseudo-labels. With the current number of training iterations Dynamic updates are performed, and the update rules are as follows:
[0038] ,
[0039] in, This represents the current iteration number. This represents the total number of iterations. and These represent the lower and upper bounds of the pseudo-label quality weights at the initial stage and the end of training, respectively.
[0040] As a further technical solution of the present invention, the specific process of step S6 is as follows:
[0041] S61. Given the refined features output from step S5. As input to the dual-path boundary-sensitive segmentation head (BSHead), two layers of dilated convolutions are used in the main segmentation branch of the BSHead to extract global contextual semantic features. : ,in Indicates the main branch number Intermediate features of the layer Indicated for expanding the receptive field Dilated convolution operation; then through Convolution performs channel-dimensional projection to generate main branch feature maps. : ;in This represents the Sigmoid activation function.
[0042] S62. In the edge refinement branch, a two-layer shallow convolutional structure is used to extract specific edge features. :
[0043] ,in Indicates the edge branch number Intermediate features of the layer;
[0044] After passing through Convolution processing to generate edge prediction features : ;
[0045] S63. Utilize the global contextual semantic features of the main branch. With edge-specific features Connected along the channel dimension, and through Convolution enables cross-channel information exchange, generating refined segmentation prediction results. : ,in, This indicates a splicing operation along the channel dimension.
[0046] As a further technical solution of the present invention, the specific process of step S7 is as follows: segmenting the loss through cross-supervision. Use the pseudo-labels generated by one branch to supervise the prediction output of the corresponding branch:
[0047] ,
[0048] in, This represents the pixel-level cross-entropy loss function. These are the segmentation prediction results for the two branches, respectively. These are pseudo-labels for the two branches; in addition to pixel-level supervision, a contrastive learning mechanism based on patch tokens is introduced to calculate the contrast loss of the patches. To enhance the local discriminative power of semantic features:
[0049]
[0050] in, Representing tile-level features and Cosine similarity between them and Let represent the number of positive sample pairs and the number of negative sample pairs, respectively; the final joint optimization objective function. The overall optimization objective formula is expressed as:
[0051] ,
[0052] in, Basic classification loss, Multi-scale auxiliary classification loss; The feature interaction loss described in step S3, This refers to the quality-perceived supervision loss described in step S5; These are the hyperparameter weights.
[0053] Compared with existing technologies, this invention solves the problems of mismatch between pseudo-label quality and final segmentation performance in a single-stage framework, and the tendency for errors to concentrate in the target boundary region. Specifically, it has the following advantages:
[0054] (1) In a weakly supervised environment lacking pixel-level precise annotation, this invention fully integrates multi-view dual-branch features through the adaptive feature interaction module (AFIM), utilizes channel attention and dynamic interaction factors to effectively extract cross-branch complementary information, effectively suppresses feature homogenization, significantly improves the model's ability to learn diverse feature representations and maintain semantic consistency, prevents training from being dominated by single-view bias, and thus generates class activation maps (CAMs) with higher fidelity and coverage.
[0055] (2) In the pseudo-label supervision process, the present invention introduces a dynamic quality-aware mechanism (QASM), which can adaptively evaluate the reliability of pseudo-labels based on pixel-level prediction confidence and dynamically adjust the supervision weights in combination with the time scheduling mechanism. This effectively suppresses noise interference and error accumulation introduced by traditional fixed static thresholds in the early training stage, and realizes smooth and progressive learning from high confidence to low confidence regions, thereby greatly improving the stability of the model in uncertain regions and the robustness of the overall network.
[0056] (3) The present invention adopts a dual-path boundary reconstruction strategy (BSHead) that combines global context and local details. It simultaneously extracts and fuses the main semantic structure and high-frequency edge information of the target under different receptive fields, provides explicit boundary structure constraints for the network, effectively alleviates the problem of excessive smoothing in the feature representation of the visual model, achieves accurate characterization of the target contour in complex backgrounds, significantly bridges the gap between pseudo-label quality and final segmentation performance, and greatly enhances the accuracy of target boundary localization and the visual performance of final semantic segmentation. Attached Figure Description
[0057] Figure 1 The flowchart illustrates the steps of the single-stage weakly supervised semantic segmentation method provided by this invention.
[0058] Figure 2 This is a schematic diagram illustrating the overall network structure principle for implementing single-stage weakly supervised semantic segmentation in this invention.
[0059] Figure 3 This is a schematic diagram of the network structure principle of the Adaptive Feature Interaction Module (AFIM) provided by the present invention.
[0060] Figure 4 This is a visual comparison diagram of the class activation graph (CAM) of this invention with other single-stage weakly supervised semantic segmentation methods.
[0061] Figure 5 This is a visual comparison of the final segmentation results of this invention with other single-stage weakly supervised semantic segmentation methods. Detailed Implementation
[0062] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0063] Example 1:
[0064] like Figure 1 As shown, this embodiment provides a single-stage weakly supervised semantic segmentation method, which specifically includes the following steps:
[0065] S1. Image Input and Multi-Scale Feature Extraction: First, input the original image... Weak data augmentation is performed, including random scaling, horizontal flipping, and cropping, to generate two complementary image views. These two views are then fed into the backbone network of a multi-view, dual-branch architecture. In this embodiment, a ViT network based on Visual Transformer is used to extract an initial multi-scale feature map with semantic consistency and rich contextual information. The extracted feature map is represented as: ,in, , For batch size, The number of feature channels, and These represent the spatial height and width of the feature map, respectively. The dual-branch structure design enables the model to capture target priors from different scales and perspectives, avoiding prediction bias from a single view.
[0066] S2. Class activation map generation and initial pseudo-label extraction, using the feature map extracted in step S1. The spatial dimension is compressed through global average pooling (GAP), and then a fully connected layer is used to generate image-level classification predictions. Finally, the feature channels are weighted and summed using classification weights to generate category-specific predictions. Class Activation Graph (CAM) :
[0067] ,
[0068] in This represents the category index, indicating the category currently being calculated. Represents the sample index, corresponding to the first... One input image; Use the feature channel index to traverse all channels of the convolution output feature map; These are the spatial coordinates of the feature map, corresponding to the pixel positions; Indicates the first The sample at the th Each channel, location The feature activation value; Indicates the first in the classification layer Class corresponding to the first The weight of each channel; for An activation function is used to ensure that the output is non-negative. This formula is used to generate categories. The CAM (Class Activation Map) is obtained by weighted summation of feature channels followed by ReLU (Recursive Unified Algorithm) to obtain the response intensity of each spatial location to that category, which is used for pseudo-label generation. To standardize across different images, this embodiment uses min-max normalization to map the class activation map to... The interval is obtained And combined with a preset foreground threshold With background threshold ,Will Convert to initial binary pseudo-labels This is used for subsequent weakly supervised training of the segmentation network.
[0069] S3, Adaptive Feature Interaction (AFIM), aims to extract complementary information across branches and suppress feature homogenization by... The input adaptive feature interaction module (AFIM) includes channel attention networks set in the two feature extraction branches respectively, a dynamic interaction factor generation unit for controlling the intensity of information interaction between branches, and a fusion network for realizing the fusion of features between the two branches. Specifically, the channel attention network performs global average pooling, convolution mapping, and activation operations on the input features to obtain channel attention weights; the dynamic interaction factor generation unit dynamically generates interaction factors based on the number of training iterations; and the fusion network concatenates and fuses the dynamically modulated features between the two branches, and uses residual connections to feed the fusion result back to the output of each branch to achieve progressive interaction and collaborative optimization of the features between the two branches. The specific working process is as follows:
[0070] First, perform global average pooling to obtain the channel-level global descriptor. Then, through linear projection using two unbiased convolutional layers, the most discriminative channel attention weights are obtained. :
[0071] ,
[0072] in, and To provide a learnable projection matrix and to maintain branch independence in the early stages of training while promoting interaction in later stages, a dynamic interaction factor is introduced. :
[0073] ,
[0074] use With attention weight The input features are reweighted to generate modulation features. Then, the dual-branch modulation features are concatenated along the channel dimension and processed through a feature fusion network. Perform cross-channel aggregation and symmetrically add the residuals to their respective branches to generate enhanced features after interaction. :
[0075] .
[0076] S4. Quality-Perceived Confidence Assessment: Construct a Quality-Perceived Supervision Module (QASM). The QASM includes a quality assessment network, a feature refinement network, and a quality-perceived supervision unit. The quality assessment network evaluates the input features and generates pixel-level quality score maps. The feature refinement network fuses the quality score maps with the original features and enhances features through residual connections. The quality-perceived supervision unit dynamically adjusts the pseudo-label supervision weights based on the quality score maps, thereby increasing the supervision strength in high-confidence regions and suppressing noise propagation in low-confidence regions. This enhances the features obtained in step S3. (Right now The input is fed into a lightweight convolutional network to model prediction confidence and dynamically generate normalized continuous pixel-level quality score maps. :
[0077] ,
[0078] in, For batch normalization operations, As the weights of the convolutional layers, the quality score map is designed to adaptively distinguish between high-confidence reliable pixels and uncertain edge noise.
[0079] S5. Feature refinement and dynamic time weighting, using quality score plots. The guided features are refined, and the enhanced features obtained in step S3 are... Channel stitching with the quality map, using the residual refinement module. Improve the model's sensitivity to high-confidence regions to obtain refined features. Meanwhile, to mitigate the interference from early unreliable false labels, a dynamic weighting strategy based on the cosine function is introduced to adjust the supervision intensity of the false labels. :
[0080] ,
[0081] in, This represents the current iteration number. The total number of iterations is used to ensure that training initially relies only on high-confidence regions (to suppress noise), and gradually incorporates low-confidence regions as training progresses, thus achieving stable learning.
[0082] S6. Dual-path boundary-sensitive feature fusion: The refined features are input into the dual-path boundary-sensitive segmentation head (BSHead). In the main segmentation branch, two layers are used... Dilated convolution extracts global contextual semantic features under a large receptive field, and then processes them... Convolutional dimensionality reduction to generate main branch mapping :
[0083] ,
[0084] In the edge refinement branch, the focus is on capturing local high-frequency details, and shallow convolutional structures are used to generate edge feature maps. :
[0085] ,
[0086] Finally, the global features of the main branch are... Detail features of edge branches Connected along the channel dimension, and through $1 Convolutional cross-channel interaction generates a refined segmentation prediction probability map. : ,in, This indicates a channel splicing operation.
[0087] S7. Symmetrical cross-supervision and multi-loss joint optimization: To break the self-circulating error of fixed pseudo-labels in a single branch, a bidirectional symmetric cross-supervision strategy is adopted: that is, utilizing the pseudo-labels generated by branch 1. Desupervised branch 2 prediction output Conversely, construct a cross-supervised segmentation loss. Furthermore, to address the oversmoothing problem that often occurs in visual Transformers, a contrast loss based on tile tokens is introduced. :
[0088] ,
[0089] The overall optimization objective function of the model Based on basic classification loss Auxiliary layer classification loss Patch contrast loss Feature interaction constraint loss Perceived quality loss and cross-segmentation loss The weighted summation consists of:
[0090]
[0091] By jointly optimizing the above objectives through end-to-end backpropagation, the model parameters can be updated smoothly.
[0092] S8. Generate the final high-fidelity segmentation prediction mask. In the inference stage, the image to be segmented is input into the trained network. Through multi-scale testing strategy and post-processing techniques such as Conditional Random Field (CRF), the final pixel-level semantic segmentation mask is output.
[0093] This embodiment addresses the core pain points of existing single-stage frameworks, such as poor pseudo-label quality in class activation maps, blurred boundaries, and noise accumulation caused by static thresholds. It effectively extracts cross-branch complementary features and possesses adaptive pseudo-label confidence assessment and dynamic noise resistance. Through bidirectional collaboration between global context and local high-frequency edges, this method significantly improves the localization accuracy and segmentation fidelity of target contours in complex backgrounds. It demonstrates excellent generalization ability, application potential, and high practical value in downstream vision tasks that are extremely sensitive to annotation costs, such as autonomous driving, medical image analysis, and intelligent security.
[0094] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A single-stage weakly supervised semantic segmentation method, characterized in that, The specific steps are as follows: S1. Perform preprocessing operations such as weak data augmentation on the input original image to generate two complementary views, and input them into the multi-view dual-branch backbone network to extract feature maps with semantic consistency. S2. Using the classification heads corresponding to the first and second branches in the multi-view dual-branch backbone network described in step S1, the feature maps extracted by each branch are processed independently to generate corresponding class activation maps, and the class activation maps are converted into initial pseudo labels by combining a threshold strategy. S3. Through the adaptive feature interaction module, the feature map obtained in step S1 is reweighted and similarity-guided fusion is performed using the channel attention mechanism and dynamic interaction factor to extract complementary information across branches and suppress feature homogenization, thereby obtaining enhanced features. S4. Construct a quality-aware supervision module, use a lightweight convolutional network to process the enhanced features obtained in step S3, dynamically evaluate pixel-level prediction confidence, and generate continuous quality score maps to distinguish between reliable and uncertain regions. S5. The quality score map generated in step S4 is used to refine the residuals of the enhanced features obtained in step S3, and a dynamic time weighting strategy based on the cosine function is introduced to adaptively adjust the supervision intensity of the initial pseudo-label according to the training stage, so as to realize progressive learning from high confidence to low confidence regions. S6. Using a dual-path boundary-sensitive segmentation head, global context information is extracted using the main segmentation branch, local high-frequency boundary details are captured using the edge refinement branch, and the global semantic features extracted by the main segmentation branch are fused with the local boundary features extracted by the edge refinement branch to enhance the local boundary representation. S7 employs a symmetric cross-supervision mechanism, using the initial pseudo-labels generated in step S2 as supervision signals to cross-supervise the segmentation prediction results of the other branch, and jointly optimizes the feature interaction loss, quality-aware loss, and segmentation loss end-to-end to reduce error accumulation. S8 generates the final high-quality segmentation result image, achieving fine separation between the target region and the boundary, and improving the boundary consistency and detail perception quality of the segmentation result.
2. The single-stage weakly supervised semantic segmentation method according to claim 1, characterized in that, The multi-view dual-branch backbone network in step S1 includes a ViT network based on Visual Transformer, and the extracted first... Feature map of each branch Represented as: ,in, , For batch size, The number of feature channels, and These represent the spatial height and width of the feature map, respectively.
3. The single-stage weakly supervised semantic segmentation method according to claim 2, characterized in that, The class activation graph obtained in step S2 Represented as: , in This represents the category index, indicating the category currently being calculated. Represents the sample index, corresponding to the first... One input image; Use the feature channel index to traverse all channels of the convolution output feature map; These are the spatial coordinates of the feature map, corresponding to the pixel positions; Indicates the first The sample at the th Each channel, location The feature activation value; Indicates the first in the classification layer Class corresponding to the first The weight of each channel; for An activation function is used to ensure that the output is non-negative. This formula is used to generate categories. The CAM (Class Activation Map) is obtained by weighted summation of feature channels followed by ReLU (Recursive LU) to obtain the response intensity of each spatial location to that category, which is used for pseudo-label generation. The process of transforming the class activation map into initial pseudo-labels involves mapping the class activation map to a minimum-maximum normalization (MIN) map. The interval is obtained Combined with a preset foreground threshold With background threshold ,Will Convert to initial binary pseudo-labels This is used for subsequent weakly supervised training of the segmentation network.
4. The single-stage weakly supervised semantic segmentation method according to claim 3, characterized in that, The adaptive feature interaction module in step S3 includes channel attention networks set in the two feature extraction branches respectively, a dynamic interaction factor generation unit for controlling the intensity of information interaction between branches, and a fusion network for realizing the fusion of features in the two branches. The channel attention network performs global average pooling, convolution mapping, and activation operations on the input features to obtain channel attention weights; the dynamic interaction factor generation unit dynamically generates interaction factors based on the number of training iterations; the fusion network concatenates and fuses the dynamically modulated features in the two branches, and uses residual connections to feed the fusion result back to the output of each branch, thereby realizing the progressive interaction and collaborative optimization of the features in the two branches. The specific working process is as follows: S31. The intermediate features generated by the dual-branch backbone network As input, perform global average pooling to obtain channel-level global descriptors. : ; S32. Use an unbiased convolutional layer to perform linear projection and obtain the channel attention weights. : , in and For the initialized learnable projection parameter matrix, The channel dimensionality reduction scaling factor. for Activation function; S33, Introducing a dependency on the number of training iterations Dynamic interaction factors : , in This is a threshold for the number of iterations in the initial stage of training. The threshold for the later stages of training; S34. Utilizing dynamic interaction factors With attention weight The original input features are dynamically modulated to generate reweighted features. : ; in, This indicates an element-wise multiplication operation along the channel dimension; S35, Reweighted Features and Connections are made along the channel dimension using a lightweight feature fusion network. Perform cross-channel aggregation, and the aggregated features are processed through interaction factors. Adjusted symmetric residual connections are added to their respective branches to generate enhanced features after interaction. : ,in, This indicates a splicing operation at the channel dimension.
5. The single-stage weakly supervised semantic segmentation method according to claim 4, characterized in that, The quality-aware supervision module constructed in step S4 includes a quality evaluation network, a feature refinement network, and a quality-aware supervision unit. The quality evaluation network evaluates the input features and generates pixel-level quality score maps. The feature refinement network fuses the quality score maps with the original features and enhances features through residual connections. The quality-aware supervision unit dynamically adjusts the pseudo-label supervision weights based on the quality score maps, thereby increasing the supervision strength in high-confidence regions and suppressing noise propagation in low-confidence regions. The process involves: processing the enhanced features output in step S3... The input is fed into a lightweight convolutional network of the quality-aware supervision module to generate a normalized continuous pixel-level quality score map. : , Where BN represents batch normalization operation, These are the learnable weights of the convolutional layer.
6. The single-stage weakly supervised semantic segmentation method according to claim 5, characterized in that, The specific process of step S5 is as follows: S51. The enhanced features output in step S3 With mass fraction graph Perform channel splicing and residual refinement module The correlation between the quality score map and enhanced features is learned through convolutional transformation, and residual connections are used to preserve the original semantic information, thereby improving the model's sensitivity to high-confidence regions and obtaining refined features. : ; S52. During training, a dynamic adjustment strategy based on the cosine function is introduced to improve the quality supervision weights of the pseudo-labels. With the current number of training iterations Dynamic updates are performed, and the update rules are as follows: , in, This represents the current iteration number. This represents the total number of iterations. and These represent the lower and upper bounds of the pseudo-label quality weights at the initial stage and the end of training, respectively.
7. The single-stage weakly supervised semantic segmentation method according to claim 6, characterized in that, The specific process of step S6 is as follows: S61. Given the refined features output from step S5. As input to the dual-path boundary-sensitive segmentation head, two layers of dilated convolution are used in the main segmentation branch of the dual-path boundary-sensitive segmentation head to extract global contextual semantic features. : ,in Indicates the main branch number Intermediate features of the layer Indicated for expanding the receptive field Dilated convolution operation; then through Convolution performs channel-dimensional projection to generate main branch feature maps. : ;in This represents the Sigmoid activation function; S62. In the edge refinement branch, a two-layer shallow convolutional structure is used to extract specific edge features. : ,in Indicates the edge branch number Intermediate features of the layer; After passing through Convolution processing to generate edge prediction features : ; S63. Utilize the global contextual semantic features of the main branch. With edge-specific features Connected along the channel dimension, and through Convolution enables cross-channel information exchange, generating refined segmentation prediction results. : ,in, This indicates a splicing operation along the channel dimension.
8. The single-stage weakly supervised semantic segmentation method according to claim 7, characterized in that, The specific process of step S7 is as follows: segment the loss through cross-supervision. Use the pseudo-labels generated by one branch to supervise the prediction output of the corresponding branch: , in, This represents the pixel-level cross-entropy loss function. These are the segmentation prediction results for the two branches, respectively. These are pseudo-labels for the two branches; in addition to pixel-level supervision, a contrastive learning mechanism based on tile tokens is introduced to calculate the contrastive loss of the tiles. To enhance the local discriminative power of semantic features: , in, Representing tile-level features and Cosine similarity between them and Let represent the number of positive sample pairs and the number of negative sample pairs, respectively; the final joint optimization objective function. The overall optimization objective formula is expressed as: , in, Basic classification loss, Multi-scale auxiliary classification loss; The feature interaction loss described in step S3, This refers to the quality-perceived supervision loss described in step S5; These are the hyperparameter weights.