Structure consistency oriented optimization method for salient object detection
Patent Information
- Application Number
- CN202610724480.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]本发明的目的是提供面向结构一致性优化的显著目标检测方法,解决了现有显著目标检测技术中显著区域与边缘结构交互不足的问题
本发明面向结构一致性优化的显著目标检测方法,以Transformer层次化编码器为基础,构建显著性特征流与边缘结构特征流的双流协同框架,通过多分支结构特征增强、交叉引导轴向注意力、预测感知融合和结构一致性约束共同完成显著目标检测任务。本发明能够显式建模显著区域与边界结构之间的依赖关系,增强薄结构、弱边界和细长目标的响应,抑制不可靠预测和结构伪影,克服复杂背景、低对比度和边界模糊场景下前景断裂、轮廓不完整等问题,提高检测结果的完整性、边界清晰度和结构一致性,为复杂场景下显著目标检测提供了一种新的技术方案。
Smart Images

Figure CN122597762A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of computer vision and image processing methods, specifically relating to a salient target detection method oriented towards structural consistency optimization. Background Technology
[0002] Salient object detection aims to automatically locate and segment the most visually salient target regions from input images. It is a crucial foundation for downstream tasks such as image understanding, scene analysis, target tracking, intelligent monitoring, autonomous driving, robot vision perception, and medical image analysis. With the development of deep neural networks and large-scale labeled data, salient object detection methods based on convolutional neural networks and Transformers have been able to extract multi-level semantic information and achieve good detection results in conventional scenarios.
[0003] However, in complex natural scenes, salient targets often have characteristics such as weak boundaries, elongated structures, multiple target occlusions, low contrast, and complex textured backgrounds. Although existing methods can improve boundary quality through multi-scale feature fusion or edge supervision, most methods still treat edge information as an auxiliary constraint and fail to explicitly model the interdependence between salient semantics and edge structure. This can easily lead to problems such as inconsistencies between salient regions and true contours, fragmented target objects, blurred boundaries, or omissions of thin structures.
[0004] Furthermore, existing multi-scale prediction fusion methods typically use simple addition, averaging, or fixed-weight concatenation to process prediction results from different decoding stages, making it difficult to dynamically determine the reliability of saliency prediction and edge prediction at each scale based on the current image content. When local textures are complex or edge responses are unstable, direct fusion can introduce noise responses and structural artifacts, reducing the integrity and stability of the final saliency map. Summary of the Invention
[0005] The purpose of this invention is to provide a salient target detection method optimized for structural consistency, which solves the problem of insufficient interaction between salient regions and edge structures in existing salient target detection technologies.
[0006] The technical solution adopted in this invention is a salient target detection method for structural consistency optimization, which is implemented according to the following steps: Step 1: Perform data preprocessing and construct supervised edge structure samples; Step 2: Construct a hierarchical encoder based on Transformer; Step 3: Construct a multi-branch structure feature enhancement module; Step 4: Construct the cross-guided axial attention module.
[0007] The invention is further characterized in that, Step 1 is implemented in the following steps: Step 1.1: Obtain publicly available training samples and the image to be detected; Step 1.2: Perform size unification and data augmentation on the training images and saliency annotation maps; Step 1.3: Normalize the image; Step 1.4: Generate edge structure supervision samples based on the saliency annotation map.
[0008] Step 1.2 is implemented according to the following steps: Step 1.2.1: Scale the training images and corresponding saliency annotation maps to a preset input size H×W, where H and W are both set to 384; Step 1.2.2: Perform at least one of the following enhancement operations on the training image: random horizontal flip, random rotation, random scaling, brightness perturbation, and cropping padding, and perform the same geometric transformation on the saliency map to keep the image consistent with the annotation space. Step 1.4 is implemented in accordance with the following steps: Step 1.4.1: Perform morphological gradient, contour extraction or Sobel edge extraction operations on the saliency-labeled map Y to obtain the initial edge map D; Step 1.4.2: Thresholding and optional dilation are performed on the initial edge map D to generate edge structure annotations D, so as to alleviate the training instability problem caused by sparse edge pixels.
[0009] Step 2 is implemented in the following steps: Step 2.1: Divide the input image into several image blocks and map each image block to a uniform feature dimension so that it can be used as input to the Transformer encoder; Step 2.2: Since the Transformer itself does not have explicit spatial location awareness, positional encoding is added to the image patch features to enable the model to preserve the spatial arrangement relationship between image patches. The feature sequence after positional encoding is represented as follows:
[0010] in, This represents the position encoding matrix. By adding position encoding, the encoder can maintain its ability to perceive the target position, boundary distribution, and spatial structure relationships during the global modeling process. Step 2.3: Model the global dependencies between image patches using Transformer coded blocks, for input features First, calculate the query matrix, key matrix, and value matrix:
[0011] Multi-head self-attention further concatenates and maps the results from multiple attention heads: ; Step 2.4: The encoder adopts a multi-stage structure, outputting feature maps of different scales at different stages. As the network depth increases, the spatial resolution of the feature maps gradually decreases, while the number of channels and semantic expressive power gradually increase. The output of the four stages can be represented as follows: .
[0012] Step 2.1 is implemented according to the following steps: Step 2.1.1: Let the image patch size be P×P, then the input image is divided into N image patches:
[0013] The image patch set is represented as: ; Step 2.1.2: Unfold each image patch and map it to a C-dimensional feature space:
[0014] in, It is a linear mapping matrix. This is the bias term; after embedding all image patches, the initial feature sequence is obtained: .
[0015] Step 3 is implemented in the following steps: Step 3.1: First, receive the multi-scale feature map output by the encoder. Since the feature maps at different stages have different numbers of channels and spatial resolutions, it is necessary to first align the channels of the features at each stage to facilitate subsequent unified processing. Let the input feature of the i-th stage be:
[0016] Mapping it to a uniform channel dimension C using a 1×1 convolution yields the aligned features: ; Step 3.2 is used to construct a multi-branch structural feature enhancement module on each scale feature. This module consists of a standard convolution branch, an asymmetric convolution branch, and a dilated convolution branch, which extract local appearance information, directional boundary information, and contextual structure information, respectively. Step 3.3 involves concatenating the features obtained from the three branches along the channel dimension and generating enhanced structural features through a fusion operation. This process can be represented as follows:
[0017] in, Indicates channel splicing. The fusion operation, consisting of convolution, batch normalization, and nonlinear activation, results in the enhanced features represented as follows: ; Step 3.4: The saliency feature stream and edge structure feature stream are used as the final output for bidirectional interaction with the subsequent cross-guided axial attention module. The final output can be expressed as:
[0018] Here, S represents multi-scale salient semantic features, and B represents multi-scale edge structure features. Through this dual-stream design, the software can learn the target region and the target boundary simultaneously, so that the subsequent detection process can focus on both the overall region of the salient target and the details of the target structure.
[0019] Step 3.2 is implemented as follows: Step 3.2.1: The standard convolution branch uses a 3×3 convolution to model the local neighborhood of the input features, preserving the texture, color, and local appearance information of the target region. Its output is represented as follows:
[0020] This branch can enhance the local expressive power of features, providing basic features for the identification of salient target regions; Step 3.2.2: The asymmetric convolution branch is used to enhance the directional structural information of the target boundary. This branch simultaneously employs 3×3, 3×1, and 1×3 convolutions, where 3×1 convolutions strengthen the vertical structure and 1×3 convolutions strengthen the horizontal structure. This is suitable for characterizing slender boundaries and thin structural regions. Its calculation process is expressed as follows:
[0021] in, This indicates a batch normalization operation. This indicates the output of an asymmetric convolution branch. By combining convolutions in different directions, this branch can enhance the response intensity of the target boundary and directional contour. Step 3.2.3, the dilated convolution branch is used to expand the receptive field, enabling the module to capture a wider range of contextual information without significantly increasing the number of parameters. Assuming the dilation rate is d=2, the output of this branch is:
[0022] in, PReLU represents a 3×3 convolution with an inflation rate of 2. ) represents the parameterized linear rectified activation function, which enhances the perception of large-scale target structures and context regions.
[0023] Step 4 is implemented in the following steps: Step 4.1 is used to generate coarse prediction results from the saliency features and edge structure features at the current scale. The coarse prediction results are not used as the final output, but as structural priors to guide subsequent feature refinement. Step 4.2: Generate a structural prior mask using saliency coarse prediction and edge coarse prediction. Saliency coarse prediction is used to provide the prior of the target region, and edge coarse prediction is used to provide the prior of the boundary structure. The two together guide the subsequent feature enhancement and cross interaction. Step 4.3 is used to perform long-distance dependency modeling within the salient feature flow and edge structure feature flow. An axial attention approach is adopted to decompose the two-dimensional spatial attention into horizontal and vertical attention calculations, thereby capturing global structural relationships while reducing computational cost. Step 4.4 is used to establish a mutual guidance relationship between saliency features and edge structure features in the channel dimension. Saliency features can provide target region information, while edge structure features can provide boundary constraint information. The two can achieve complementary enhancement through channel interaction. Step 4.5 is used to establish the interaction relationship between the saliency mask and the edge mask in the spatial dimension, enabling the network to perform joint refinement at the target region and boundary locations, and to concatenate the saliency structure prior mask and the edge structure prior mask in the channel dimension:
[0024] The concatenated structural prior is input into a lightweight convolutional predictor to generate spatial gating weights for salient and marginal branches:
[0025] in, Indicates saliency branch space gating, Indicates the spatial gating of the edge structure branch. and Represents a lightweight convolutional mapping function. Spatial gating can emphasize important locations near the target boundary and inside salient regions, while suppressing irrelevant background noise. Step 4.6 is used to fuse the axial attention enhancement results, channel interaction results, and spatial interaction results to obtain the saliency features and edge structure features after structural consistency refinement; firstly, the axial attention enhancement results are residually fused with the original features:
[0026] in, and These represent the saliency features and edge structure features after fusing long-range dependencies, respectively. Then, channel gating and spatial gating are used to jointly modulate the features to obtain the final output:
[0027] in, This represents a lightweight feature refinement operation, typically consisting of convolution, batch normalization, and nonlinear activation. These are the refined salient features. These are the refined edge structure features.
[0028] Step 4.2 is implemented as follows: Step 4.2.1: Since the coarse prediction result may not be consistent with the current feature map resolution, it is first upsampled to the feature resolution, and then converted into a soft mask using the Sigmoid function.
[0029] in, This represents the upsampling operation, and σ() represents the Sigmoid activation function. For saliency structure prior mask, As a priori mask for edge structure, the generated structural prior mask is used to perform residual modulation on salient features and edge structure features, so that the network enhances the response related to the target region and boundary structure; Step 4.2.2: Residual modulation is performed on salient features and edge structure features using the generated structural prior mask to enhance the network response related to the target region and boundary structure.
[0030] Here, ⊙ represents element-wise multiplication, and α is the modulation coefficient, which is used to control the degree of influence of structural prior on feature enhancement. Through this operation, the saliency branch can pay more attention to the foreground region, and the edge branch can pay more attention to the structural boundary.
[0031] Step 4.3 is implemented in the following steps: Step 4.3.1: The spatial dependencies of the axial attention are calculated along the horizontal and vertical directions, respectively. The calculation process is as follows:
[0032] in, Indicates horizontal attention. This represents vertical attention, where d represents the channel dimension of each attention head; Step 4.3.2: Fuse the attention results in the horizontal and vertical directions, and obtain the axial attention enhancement result through output mapping:
[0033] Therefore, the axial attention enhancement features for salient branches and marginal structure branches are as follows:
[0034] in, Long-distance dependency enhancement results representing saliency features, This represents the long-distance dependency enhancement result of edge structure features.
[0035] The beneficial effects of this invention are: This invention presents a salient target detection method optimized for structural consistency. Based on a Transformer hierarchical encoder, it constructs a dual-stream collaborative framework of salient feature stream and edge structure feature stream. The method achieves salient target detection through multi-branch structural feature enhancement, cross-guided axial attention, predictive-perceptual fusion, and structural consistency constraints. This invention can explicitly model the dependency between salient regions and boundary structures, enhance the response of thin structures, weak boundaries, and slender targets, suppress unreliable predictions and structural artifacts, and overcome problems such as foreground fragmentation and incomplete contours in complex backgrounds, low-contrast, and blurred boundary scenes. It improves the completeness, boundary clarity, and structural consistency of detection results, providing a new technical solution for salient target detection in complex scenes. Attached Figure Description
[0036] Figure 1 This is the overall network architecture diagram of the salient target detection method for structural consistency optimization of the present invention; Figure 2 This is an architecture diagram of the multi-branch structural feature enhancement module in step 3 of the salient target detection method for structural consistency optimization in this invention; Figure 3 This is a diagram of the cross-guided axial attention module architecture in step 4 of the salient target detection method for structural consistency optimization in this invention. Figure 4 This is a comparison chart of the estimation results of the salient target detection method of this invention, which is oriented towards structural consistency optimization, with other mainstream models. Detailed Implementation
[0037] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0038] This invention provides a salient target detection method for structural consistency optimization, which is implemented according to the following steps: Step 1: Perform data preprocessing and edge structure supervision sample construction. Perform size unification, data augmentation, normalization and edge structure annotation on training images, saliency annotation maps and images to be detected to obtain standardized samples that can be input into the network. Step 2: Construct a Transformer-based hierarchical encoder to perform image patch embedding, position encoding, and multi-stage global context modeling on the standardized image, and output feature maps with different spatial resolutions and semantic levels. Step 3: Construct a multi-branch structure feature enhancement module, and establish a salient feature flow and edge structure feature flow based on the enhanced multi-scale features, so that the network can learn the semantic information of the target region and the structural information of the target boundary at the same time; Step 4: Construct a cross-guided axial attention module, generate structural priors using saliency coarse prediction and edge coarse prediction, and perform channel, spatial and long-distance dependency interactions between saliency feature flow and edge structural feature flow to achieve structural consistency refinement.
[0039] Example 1 A salient target detection method for structural consistency optimization, wherein step 1 is implemented according to the following steps: Step 1.1: Obtain publicly available training samples and the image to be detected; Step 1.2: Perform size unification and data augmentation on the training images and saliency annotation maps; Step 1.3: Normalize the image; Step 1.4: Generate edge structure supervision samples based on the saliency annotation map.
[0040] Step 1.2 is implemented in the following steps: Step 1.2.1: Scale the training images and corresponding saliency annotation maps to a preset input size H×W, where H and W are both set to 384; Step 1.2.2: Perform at least one of the following enhancement operations on the training image: random horizontal flip, random rotation, random scaling, brightness perturbation, and cropping padding, and perform the same geometric transformation on the saliency map to keep the image consistent with the annotation space. Step 1.4 is implemented in the following steps: Step 1.4.1: Perform morphological gradient, contour extraction or Sobel edge extraction operations on the saliency-labeled map Y to obtain the initial edge map D; Step 1.4.2 involves thresholding and optional dilation of the initial edge map D to generate edge structure annotations D, thereby mitigating the training instability caused by sparse edge pixels. Example 2 A salient target detection method oriented towards structural consistency optimization, such as Figure 1 As shown, step 2 is implemented in the following steps: Step 2.1: Divide the input image into several image blocks and map each image block to a uniform feature dimension so that it can be used as input to the Transformer encoder; Step 2.2: Since the Transformer itself does not have explicit spatial location awareness, positional encoding is added to the image patch features to enable the model to preserve the spatial arrangement relationship between image patches. The feature sequence after positional encoding is represented as follows:
[0041] in, This represents the position encoding matrix. By adding position encoding, the encoder can maintain its ability to perceive the target position, boundary distribution, and spatial structure relationships during the global modeling process. Step 2.3: Model the global dependencies between image patches using Transformer coded blocks, for input features First, calculate the query matrix, key matrix, and value matrix:
[0042] Multi-head self-attention further concatenates and maps the results from multiple attention heads: ; Step 2.4: The encoder adopts a multi-stage structure, outputting feature maps of different scales at different stages. As the network depth increases, the spatial resolution of the feature maps gradually decreases, while the number of channels and semantic expressive power gradually increase. The output of the four stages can be represented as follows:
[0043] Through the above steps, the encoder can convert the input image into a multi-scale, multi-level feature representation, providing reliable input for subsequent multi-branch structure feature enhancement, saliency and edge feature interaction, and final saliency map generation.
[0044] Example 3 A salient target detection method for structural consistency optimization, wherein step 2.1 is implemented according to the following steps: Step 2.1.1: Let the image patch size be P×P, then the input image is divided into N image patches:
[0045] The image patch set is represented as: ; Step 2.1.2: Unfold each image patch and map it to a C-dimensional feature space:
[0046] in, It is a linear mapping matrix. This is the bias term; after embedding all image patches, the initial feature sequence is obtained: .
[0047] Example 4 A salient target detection method for structural consistency optimization, wherein step 3 is as follows: Figure 2 As shown, please follow these steps: Step 3.1: First, receive the multi-scale feature map output by the encoder. Since the feature maps at different stages have different numbers of channels and spatial resolutions, it is necessary to first align the channels of the features at each stage to facilitate subsequent unified processing. Let the input feature of the i-th stage be:
[0048] Mapping it to a uniform channel dimension C using a 1×1 convolution yields the aligned features:
[0049] This step can reduce channel differences between features at different stages, enabling subsequent multi-branch enhancement modules to perform feature processing in a unified dimension; Step 3.2 is used to construct a multi-branch structural feature enhancement module on each scale feature. This module consists of a standard convolution branch, an asymmetric convolution branch, and a dilated convolution branch, which extract local appearance information, directional boundary information, and contextual structure information, respectively. Step 3.3 involves concatenating the features obtained from the three branches along the channel dimension and generating enhanced structural features through a fusion operation. This process can be represented as follows:
[0050] in, Indicates channel splicing. The fusion operation, consisting of convolution, batch normalization, and nonlinear activation, results in the enhanced features represented as follows:
[0051] After this step, the features at each scale simultaneously contain local details, directional structure, and contextual semantic information, which helps improve the model's comprehensive ability to express the target region and target boundary. Step 3.4: The saliency feature stream and edge structure feature stream are used as the final output for bidirectional interaction with the subsequent cross-guided axial attention module. The final output can be expressed as:
[0052] Here, S represents multi-scale salient semantic features, and B represents multi-scale edge structure features. Through this dual-stream design, the software can learn the target region and the target boundary simultaneously, so that the subsequent detection process can focus on both the overall region of the salient target and the details of the target structure.
[0053] Example 5 A salient target detection method for structural consistency optimization, wherein step 3.2 is implemented in the following steps: Step 3.2.1: The standard convolution branch uses a 3×3 convolution to model the local neighborhood of the input features, preserving the texture, color, and local appearance information of the target region. Its output is represented as follows:
[0054] This branch can enhance the local expressive power of features, providing basic features for the identification of salient target regions; Step 3.2.2: The asymmetric convolution branch is used to enhance the directional structural information of the target boundary. This branch simultaneously employs 3×3, 3×1, and 1×3 convolutions, where 3×1 convolutions strengthen the vertical structure and 1×3 convolutions strengthen the horizontal structure. This is suitable for characterizing slender boundaries and thin structural regions. Its calculation process is expressed as follows:
[0055] in, This indicates a batch normalization operation. This indicates the output of an asymmetric convolution branch. By combining convolutions in different directions, this branch can enhance the response intensity of the target boundary and directional contour. Step 3.2.3, the dilated convolution branch is used to expand the receptive field, enabling the module to capture a wider range of contextual information without significantly increasing the number of parameters. Assuming the dilation rate is d=2, the output of this branch is:
[0056] in, PReLU represents a 3×3 convolution with an inflation rate of 2. ) represents the parameterized linear rectified activation function, which enhances the perception of large-scale target structures and context regions.
[0057] Example 6 A salient target detection method for structural consistency optimization, wherein step 4 is as follows: Figure 3 As shown, please follow these steps: Step 4.1 is used to generate coarse prediction results from the saliency features and edge structure features at the current scale. The coarse prediction results are not used as the final output, but as structural priors to guide subsequent feature refinement. Step 4.2: Generate a structural prior mask using saliency coarse prediction and edge coarse prediction. Saliency coarse prediction is used to provide the prior of the target region, and edge coarse prediction is used to provide the prior of the boundary structure. The two together guide the subsequent feature enhancement and cross interaction. Step 4.3 is used to perform long-distance dependency modeling within the salient feature flow and edge structure feature flow. An axial attention approach is adopted to decompose the two-dimensional spatial attention into horizontal and vertical attention calculations, thereby capturing global structural relationships while reducing computational cost. Step 4.4 is used to establish a mutual guidance relationship between saliency features and edge structure features in the channel dimension. Saliency features can provide target region information, while edge structure features can provide boundary constraint information. The two can achieve complementary enhancement through channel interaction. Step 4.5 is used to establish the interaction relationship between the saliency mask and the edge mask in the spatial dimension, enabling the network to perform joint refinement at the target region and boundary locations, and to concatenate the saliency structure prior mask and the edge structure prior mask in the channel dimension:
[0058] The concatenated structural prior is input into a lightweight convolutional predictor to generate spatial gating weights for salient and marginal branches:
[0059] in, Indicates saliency branch space gating, Indicates the spatial gating of the edge structure branch. and Represents a lightweight convolutional mapping function. Spatial gating can emphasize important locations near the target boundary and inside salient regions, while suppressing irrelevant background noise. Step 4.6 is used to fuse the axial attention enhancement results, channel interaction results, and spatial interaction results to obtain the saliency features and edge structure features after structural consistency refinement; firstly, the axial attention enhancement results are residually fused with the original features:
[0060] in, and These represent the saliency features and edge structure features after fusing long-range dependencies, respectively. Then, channel gating and spatial gating are used to jointly modulate the features to obtain the final output:
[0061] in, This represents a lightweight feature refinement operation, typically consisting of convolution, batch normalization, and nonlinear activation. These are the refined salient features. These are the refined edge structure features.
[0062] Example 7 A salient target detection method for structural consistency optimization, wherein step 4.2 is implemented in the following steps: Step 4.2.1: Since the coarse prediction result may not be consistent with the current feature map resolution, it is first upsampled to the feature resolution, and then converted into a soft mask using the Sigmoid function.
[0063] in, This represents the upsampling operation, and σ() represents the Sigmoid activation function. For saliency structure prior mask, As a priori mask for edge structure, the generated structural prior mask is used to perform residual modulation on salient features and edge structure features, so that the network enhances the response related to the target region and boundary structure; Step 4.2.2: Residual modulation is performed on salient features and edge structure features using the generated structural prior mask to enhance the network response related to the target region and boundary structure.
[0064] Here, ⊙ represents element-wise multiplication, and α is the modulation coefficient, which is used to control the degree of influence of structural prior on feature enhancement. Through this operation, the saliency branch can pay more attention to the foreground region, and the edge branch can pay more attention to the structural boundary.
[0065] Example 8 A salient target detection method for structural consistency optimization, wherein step 4.3 is implemented in the following steps: Step 4.3.1: The spatial dependencies of the axial attention are calculated along the horizontal and vertical directions, respectively. The calculation process is as follows:
[0066] in, Indicates horizontal attention. This represents vertical attention, where d represents the channel dimension of each attention head; Step 4.3.2: Fuse the attention results in the horizontal and vertical directions, and obtain the axial attention enhancement result through output mapping:
[0067] Therefore, the axial attention enhancement features for salient branches and marginal structure branches are as follows:
[0068] in, Long-distance dependency enhancement results representing saliency features, This represents the long-distance dependency enhancement result of edge structure features.
[0069] Example 8 To verify the effectiveness of the method of this invention, experiments were conducted using multiple publicly available salient object detection datasets, including ECSSD, DUTS-TE, DUT-OMRON, HKU-IS, and PASCAL-S. These datasets contain complex backgrounds, multiple targets, low contrast, fine boundaries, and targets of different scales. The estimated structural contrast images are shown below. Figure 4 As shown, the robustness and applicability of the software algorithm can be comprehensively verified. The experimental results are shown in Table 1 below: Table 1
[0070] This invention proposes a salient target detection method optimized for structural consistency. Based on a Transformer hierarchical encoder, it constructs a dual-stream collaborative framework of salient feature stream and edge structure feature stream. The salient target detection task is accomplished through multi-branch structural feature enhancement, cross-guided axial attention, predictive-perceptual fusion, and structural consistency constraints. This invention can explicitly model the dependency between salient regions and boundary structures, enhance the response of thin structures, weak boundaries, and slender targets, suppress unreliable predictions and structural artifacts, and overcome problems such as foreground fragmentation and incomplete contours in complex backgrounds, low-contrast, and blurred boundary scenes. It improves the completeness, boundary clarity, and structural consistency of the detection results, providing a new technical solution for salient target detection in complex scenes.
Claims
1. A method for salient object detection oriented to structural consistency optimization, characterized in that, The specific steps are as follows: Step 1: Perform data preprocessing and construct supervised edge structure samples; Step 2: Construct a hierarchical encoder based on Transformer; Step 3: Construct a multi-branch structure feature enhancement module; Step 4: Construct the cross-guided axial attention module.
2. The salient target detection method for structural consistency optimization according to claim 1, characterized in that, Step 1 is implemented in the following steps: Step 1.1: Obtain publicly available training samples and the image to be detected; Step 1.2: Perform size unification and data augmentation on the training images and saliency annotation maps; Step 1.3: Normalize the image; Step 1.4: Generate edge structure supervision samples based on the saliency annotation map.
3. The salient target detection method for structural consistency optimization according to claim 2, characterized in that, Step 1.2 is implemented in the following steps: Step 1.2.1: Scale the training images and corresponding saliency annotation maps to a preset input size H×W, where H and W are both set to 384; Step 1.2.2: Perform at least one of the following enhancement operations on the training image: random horizontal flip, random rotation, random scaling, brightness perturbation, and cropping padding, and perform the same geometric transformation on the saliency map to keep the image consistent with the annotation space. Step 1.4 is implemented in accordance with the following steps: Step 1.4.1: Perform morphological gradient, contour extraction or Sobel edge extraction operations on the saliency-labeled map Y to obtain the initial edge map D; Step 1.4.2: Thresholding and optional dilation are performed on the initial edge map D to generate edge structure annotations D, so as to alleviate the training instability problem caused by sparse edge pixels.
4. The salient target detection method for structural consistency optimization according to claim 1, characterized in that, Step 2 is implemented in the following steps: Step 2.1: Divide the input image into several image blocks and map each image block to a uniform feature dimension so that it can be used as input to the Transformer encoder; Step 2.2: Since the Transformer itself does not have explicit spatial location awareness, positional encoding is added to the image patch features to enable the model to preserve the spatial arrangement relationship between image patches. The feature sequence after positional encoding is represented as follows: in, This represents the position encoding matrix. By adding position encoding, the encoder can maintain its ability to perceive the target position, boundary distribution, and spatial structure relationships during the global modeling process. Step 2.3: Model the global dependencies between image patches using Transformer coded blocks, for input features First, calculate the query matrix, key matrix, and value matrix: Multi-head self-attention further concatenates and maps the results from multiple attention heads: ; Step 2.4: The encoder adopts a multi-stage structure, outputting feature maps of different scales at different stages. As the network depth increases, the spatial resolution of the feature maps gradually decreases, while the number of channels and semantic expressive power gradually increase. The output of the four stages can be represented as follows: 。 5. The salient target detection method for structural consistency optimization according to claim 4, characterized in that, Step 2.1 is implemented in the following steps: Step 2.1.1: Let the image patch size be P×P, then the input image is divided into N image patches: The image patch set is represented as: ; Step 2.1.2: Unfold each image patch and map it to a C-dimensional feature space: in, It is a linear mapping matrix. This is the bias term; after embedding all image patches, the initial feature sequence is obtained: 。 6. The salient target detection method for structural consistency optimization according to claim 1, characterized in that, Step 3 is implemented in the following steps: Step 3.1: First, receive the multi-scale feature map output by the encoder. Since the feature maps at different stages have different numbers of channels and spatial resolutions, it is necessary to first align the channels of the features at each stage to facilitate subsequent unified processing. Let the input feature of the i-th stage be: Mapping it to a uniform channel dimension C using a 1×1 convolution yields the aligned features: ; Step 3.2 is used to construct a multi-branch structural feature enhancement module on each scale feature. This module consists of a standard convolution branch, an asymmetric convolution branch, and a dilated convolution branch, which extract local appearance information, directional boundary information, and contextual structure information, respectively. Step 3.3 involves concatenating the features obtained from the three branches along the channel dimension and generating enhanced structural features through a fusion operation. This process can be represented as follows: in, Indicates channel splicing. The fusion operation, consisting of convolution, batch normalization, and nonlinear activation, results in the enhanced features represented as follows: ; Step 3.4: The saliency feature stream and edge structure feature stream are used as the final output for bidirectional interaction with the subsequent cross-guided axial attention module. The final output can be expressed as: Here, S represents multi-scale salient semantic features, and B represents multi-scale edge structure features. Through this dual-stream design, the software can learn the target region and the target boundary simultaneously, so that the subsequent detection process can focus on both the overall region of the salient target and the details of the target structure.
7. The salient target detection method for structural consistency optimization according to claim 6, characterized in that, Step 3.2 is implemented in the following steps: Step 3.2.1: The standard convolution branch uses a 3×3 convolution to model the local neighborhood of the input features, preserving the texture, color, and local appearance information of the target region. Its output is represented as follows: This branch can enhance the local expressive power of features, providing basic features for the identification of salient target regions; Step 3.2.2: The asymmetric convolution branch is used to enhance the directional structural information of the target boundary. This branch simultaneously employs 3×3, 3×1, and 1×3 convolutions, where 3×1 convolutions strengthen the vertical structure and 1×3 convolutions strengthen the horizontal structure. This is suitable for characterizing slender boundaries and thin structural regions. Its calculation process is expressed as follows: in, This indicates a batch normalization operation. This indicates the output of an asymmetric convolution branch. By combining convolutions in different directions, this branch can enhance the response intensity of the target boundary and directional contour. Step 3.2.3, the dilated convolution branch is used to expand the receptive field, enabling the module to capture a wider range of contextual information without significantly increasing the number of parameters. Assuming the dilation rate is d=2, the output of this branch is: in, PReLU represents a 3×3 convolution with an inflation rate of 2. ) represents the parameterized linear rectified activation function, which enhances the perception of large-scale target structures and context regions.
8. The salient target detection method for structural consistency optimization according to claim 1, characterized in that, Step 4 is implemented in the following steps: Step 4.1 is used to generate coarse prediction results from the saliency features and edge structure features at the current scale. The coarse prediction results are not used as the final output, but as structural priors to guide subsequent feature refinement. Step 4.2: Generate a structural prior mask using saliency coarse prediction and edge coarse prediction. Saliency coarse prediction is used to provide the prior of the target region, and edge coarse prediction is used to provide the prior of the boundary structure. The two together guide the subsequent feature enhancement and cross interaction. Step 4.3 is used to perform long-distance dependency modeling within the salient feature flow and edge structure feature flow. An axial attention approach is adopted to decompose the two-dimensional spatial attention into horizontal and vertical attention calculations, thereby capturing global structural relationships while reducing computational cost. Step 4.4 is used to establish a mutual guidance relationship between saliency features and edge structure features in the channel dimension. Saliency features can provide target region information, while edge structure features can provide boundary constraint information. The two can achieve complementary enhancement through channel interaction. Step 4.5 is used to establish the interaction relationship between the saliency mask and the edge mask in the spatial dimension, enabling the network to perform joint refinement at the target region and boundary locations, and to concatenate the saliency structure prior mask and the edge structure prior mask in the channel dimension: The concatenated structural prior is input into a lightweight convolutional predictor to generate spatial gating weights for salient and marginal branches: in, Indicates saliency branch space gating, Indicates the spatial gating of the edge structure branch. and Represents a lightweight convolutional mapping function. Spatial gating can emphasize important locations near the target boundary and inside salient regions, while suppressing irrelevant background noise. Step 4.6 is used to fuse the axial attention enhancement results, channel interaction results, and spatial interaction results to obtain the saliency features and edge structure features after structural consistency refinement; firstly, the axial attention enhancement results are residually fused with the original features: in, and These represent the saliency features and edge structure features after fusing long-range dependencies, respectively. Then, channel gating and spatial gating are used to jointly modulate the features to obtain the final output: in, This represents a lightweight feature refinement operation, typically consisting of convolution, batch normalization, and nonlinear activation. These are the refined salient features. These are the refined edge structure features.
9. The salient target detection method for structural consistency optimization according to claim 8, characterized in that, Step 4.2 is implemented in the following steps: Step 4.2.1: Since the coarse prediction result may not be consistent with the current feature map resolution, it is first upsampled to the feature resolution, and then converted into a soft mask using the Sigmoid function. in, This represents the upsampling operation, and σ() represents the Sigmoid activation function. For saliency structure prior mask, As a priori mask for edge structure, the generated structural prior mask is used to perform residual modulation on salient features and edge structure features, so that the network enhances the response related to the target region and boundary structure; Step 4.2.2: Residual modulation is performed on salient features and edge structure features using the generated structural prior mask to enhance the network response related to the target region and boundary structure. Here, ⊙ represents element-wise multiplication, and α is the modulation coefficient, which is used to control the degree of influence of structural prior on feature enhancement. Through this operation, the saliency branch can pay more attention to the foreground region, and the edge branch can pay more attention to the structural boundary.
10. The salient target detection method for structural consistency optimization according to claim 8, characterized in that, Step 4.3 is implemented in the following steps: Step 4.3.1: The spatial dependencies of the axial attention are calculated along the horizontal and vertical directions, respectively. The calculation process is as follows: in, Indicates horizontal attention. This represents vertical attention, where d represents the channel dimension of each attention head; Step 4.3.2: Fuse the attention results in the horizontal and vertical directions, and obtain the axial attention enhancement result through output mapping: Therefore, the axial attention enhancement features for salient branches and marginal structure branches are as follows: in, Long-distance dependency enhancement results representing saliency features, This represents the long-distance dependency enhancement result of edge structure features.