Saliency detection method based on mask prior distribution fusion and marginal probability estimation

By using mask prior distribution fusion and edge probability estimation in saliency detection, the problem of saliency detection errors and boundary blurring in the interference background of traditional methods is solved, the accuracy and robustness of detection are improved, and the for clearer detection results.

CN118657919APending Publication Date: 2024-09-17CENT SOUTH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410772683.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

When traditional saliency detection methods deal with images with interfering backgrounds, the salient subject is judged incorrectly and the boundary is difficult to judge, and high-magnification upsampling results in blurred boundaries and poor accuracy in the detection results.

Method used

A saliency detection method based on mask prior distribution fusion and edge probability estimation is adopted. The group convolution mechanism is used to reduce information redundancy in feature maps and improve semantic diversity. The cross-attention mechanism is used to integrate label distribution into multi-scale features. Combined with edge probability estimation, it provides guidance for edge enhancement and improves detection accuracy.

Benefits of technology

It improves the accuracy and robustness of saliency detection, enhances the anti-interference ability against interfering backgrounds, and improves edge accuracy and clarity of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0004894622360000011
    Figure HDA0004894622360000011
  • Figure BDA0004894622350000061
    Figure BDA0004894622350000061
  • Figure BDA0004894622350000062
    Figure BDA0004894622350000062
Patent Text Reader

Abstract

The invention discloses a saliency detection method based on mask prior distribution fusion and marginal probability estimation. The method mainly solves the problems that in the prior art, saliency subject judgment is wrong, and target edges in detection results are fuzzy. The implementation scheme is as follows: 1) acquiring a data set and a detection label; 2) obtaining detection label distribution; 3) acquiring an edge probability label; 4) constructing a detection model; 5) constructing a loss function; 6) training the detection model; and 7) saliency detection. According to the constructed detection model, through a receptive field module and a grouping convolution mechanism, information redundancy in a feature map is reduced, and semantic diversity is improved; through a cross attention mechanism, prior distribution of labels is fused into multi-scale features, prior position information is provided for judgment of a saliency target subject, and occurrence of saliency subject judgment errors in a detection result is avoided; through edge probability estimation, guidance is provided for edge enhancement, and the problem of edge blurring in a detection result is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a saliency detection method based on mask prior distribution fusion and edge probability estimation. Background Art

[0002] As an image preprocessing method, saliency detection can reduce the complexity of image processing and improve the operating efficiency of image processing algorithms by detecting salient objects in images. Therefore, it has a wide range of applications and development prospects. In the field of autonomous driving, road images can be preprocessed by saliency detection, so that the target detection algorithm can prioritize the identification of salient areas, thereby increasing the priority of processing salient area targets in the autonomous driving system and ensuring the safety of the autonomous driving system. Traditional saliency detection methods mainly use artificial features such as color, texture, and center priors to segment salient targets. Such methods have problems such as low detection accuracy and poor robustness, so they have gradually been replaced by deep learning methods. Most of the existing saliency detection models based on deep learning use a fully convolutional network based on an encoder-decoder structure to complete the training of saliency detection models in an end-to-end mode. When these models process images with interfering backgrounds, they will have problems with misjudging the salient subject. In addition, the interfering background makes it difficult to judge the boundary between the salient subject and the background, and the high-magnification upsampling leads to blurred boundaries in the detection results, resulting in poor accuracy of the generated saliency detection map. Summary of the invention

[0003] The present invention fully considers the shortcomings of the existing methods, and aims to provide a saliency detection method based on mask prior distribution fusion and edge probability estimation. It uses the grouped convolution mechanism to reduce information redundancy in feature maps and improve semantic diversity. Through the cross-attention mechanism, the label distribution is integrated into the multi-scale features to provide prior information for the positioning of salient targets. Through edge probability estimation, it provides guidance for edge enhancement to improve the accuracy of saliency detection.

[0004] 1. Technical Principle

[0005] At present, most saliency detection models based on convolutional neural networks directly adopt the encoding-decoding structure. The encoder of the model obtains deep semantic information by stacking repeated convolutional layers and pooling layers, and the decoder gradually restores the resolution of the image through the upsampling layer to obtain the final detection result. When extracting features, convolutional neural networks will generate a lot of redundant information, which interferes with the algorithm's accurate recognition of the target. In addition, due to the limitations of the convolution algorithm, the convolutional neural network has defects in extracting global features and global contrast features, resulting in the saliency detection model being unable to consider the overall features of the image when determining salient targets, resulting in the problem of misjudgment of salient subjects, especially when there is an interfering background in the image, the discrimination of salient subjects is more difficult; in addition, high-rate upsampling in the saliency detection algorithm will also lead to blurred boundaries of saliency detection results. In order to reduce the redundant information in multi-scale features, the present invention designs a receptive field module (RFBL), which enhances the semantic diversity of features and improves the information density of features through grouped convolution. In order to assist the saliency detection model in locating salient targets, the present invention designs a distribution fusion module (PQ), which adopts a cross-attention mechanism to integrate the prior distribution information of salient targets into multi-scale features, provides prior position information for the positioning of salient targets, and provides guidance for edge enhancement through edge probability estimation, thereby improving the prediction accuracy of the model.

[0006] 2. According to the above principle, the present invention is implemented by the following scheme:

[0007] A saliency detection method based on mask prior distribution fusion and edge probability estimation comprises the following steps:

[0008] (1) Obtaining datasets and detection labels:

[0009] Obtain saliency detection public datasets and corresponding detection labels;

[0010] (2) Obtain the detection label distribution, normalize the detection labels in the data set, traverse all detection labels, and obtain the label distribution Dis. The calculation formula of Dis is as follows:

[0011]

[0012]

[0013] Where N is the number of labels in the dataset, H is the height of the normalized label, H is a positive integer and H∈[2,1000], W is the width of the normalized label, W is a positive integer and W∈[2,1000], Represents the label value of the point (i, j) in the kth label, is an integer and Dis_o means Dis_o i,jThe array is composed of i∈[1,H],j∈[1,W], min(·) means calculating the minimum value, and max(·) means calculating the maximum value;

[0014] (3) Obtain edge probability labels, use the Canny operator to extract the edge contour of the detection label, use Gaussian blur to process the edge contour, and obtain the edge probability label of the salient target;

[0015] (4) Construct a saliency detection model, which consists of an encoder, a neck module, a decoder, a detail extraction module, and an edge enhancement module. The specific construction process includes the following steps:

[0016] (4-a) Construct an encoder and use ResNet-50 as the encoder to extract features. The input image is processed by the encoder to obtain four feature maps f with increasing scales. 1 、f 2 、f 3 and f 4 ;

[0017] (4-b) Construct the neck module, which consists of four receptive field modules RFBL. The feature map f obtained in step (4-a) 1 、f 2 、f 3 and f 4 As four receptive field modules RFBL 1 ,RFBL 2 ,RFBL 3 and RFBL 4 Input, get the processing result and

[0018] The receptive field module RFBL in this step is constructed as follows:

[0019] The receptive field module consists of a feature grouping module, a feature concatenation module, a convolution module Convs and five branch modules. The convolution module consists of a convolution layer and a Relu activation function. Among the five branch modules, branch module 1 consists of two convolution layers, branch modules 2, 3 and 4 each consist of four convolution layers, and branch module 5 consists of one convolution layer. The input features of the receptive field module are first processed by the feature grouping module, which evenly divides the input features in the channel dimension to obtain five groups of features G 1 , G 2 , G 3 , G 4 and G 5, when the number of channels of the input feature cannot be divided by five, the features of N channels are discarded so that the number of channels of the remaining features is an integer multiple of five, where N is a positive integer and N∈[1,4]; the first set of features G 1 Processed by branch module 1, the first set of receptive field features R is obtained 1 , the second set of features G 2 Processed by branch module 2, the second set of receptive field features R is obtained 2 , the third group of features G 3 Processed by branch module 3, the third set of receptive field features R is obtained 3 , the fourth group of features G 4 Processed by branch module 4, the fourth set of receptive field features R 4 , the fifth group of features G 5 Processed by branch module 5, the fifth set of receptive field features R is obtained 5 ; The five sets of receptive field features are processed by the feature splicing module and then processed by the convolution module Convs to obtain the output features;

[0020] (4-c) Construct a decoder. The decoder consists of four distributed fusion modules PQ and a convolution module Convs. The convolution module consists of a convolution layer and a Relu activation function. The processing result obtained in step (4-b) Together with the label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 1 , the output result after upsampling is the same as the processing result obtained in step (4-b) Add pixel by pixel to get the fusion result 1 fusion 1 Together with the label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 2 , the output result after upsampling is the same as the processing result obtained in step (4-b) Add pixel by pixel to get the fusion result 2 fusion 2 Together with the label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 3 , the output result after upsampling is the same as the processing result obtained in step (4-b) Add pixel by pixel to get the fusion result 3 fusion 3 Together with the label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 4 , the result is processed by upsampling and a convolution module Convs in turn to obtain the decoding result;

[0021] The distribution fusion module PQ in this step is constructed as follows:

[0022] The input of the distribution fusion module includes the deep features and the label distribution Dis obtained in step (2). The label distribution is processed by the shape change layer 1 to obtain Dis r , the deep features are processed by the shape change layer 2 to obtain Deep r , Dis r and Deep r Input the cross attention module together to obtain feature T 1 , where Dis r Query, Deep as a Cross-Attention Module r As the key and value of the cross attention module; feature T 1 After being processed by the forgetting layer 1, feature T is obtained 2 , the feature T 2 With Deep r Input the point-wise addition layer 1 together to get the feature T 3 , feature T 3 After normalization layer 1, feature T is obtained 4 , feature T 4 After the linear layer processing, the feature T is obtained 5 , feature T 5 After being processed by the forgetting layer 2, feature T is obtained 6 , feature T 6 With feature T 4 Input the point-wise addition layer 2 together to get the feature T 7 , feature T 7 After being processed by normalization layer 2 and shape change layer 3 in sequence, the output features are obtained;

[0023] The distributed fusion module PQ 1 The processing result obtained in step (4-b) For deep features, distribution fusion module PQ 2 , PQ 3 and PQ 4 Fusion 1 、fusion 2 and fusion 3 is the deep feature;

[0024] (4-d) Construct a detail extraction module, which consists of a convolution layer. After the input image is processed by the convolution layer, the detail feature detail is obtained;

[0025] (4-e) constructing an edge enhancement module, which is composed of an edge auxiliary module EA. The detail feature detail obtained in step (4-d) and the decoding result obtained in step (4-c) are input into the edge auxiliary module to obtain edge estimation results and detection results;

[0026] The edge auxiliary module EA in this step is constructed as follows:

[0027] The edge auxiliary module is composed of four convolutional layers Conv1, Conv2, Conv3 and Conv4. The input includes the decoding result obtained in step (4-c) and the detail feature detail obtained in step (4-d); the detail feature and the decoding result are concatenated in the channel dimension, and then processed by Conv1 and Conv2 in turn to obtain the edge estimation result; the edge estimation result and the decoding result are added pixel by pixel, and then processed by Conv3 and Conv4 in turn to obtain the detection result;

[0028] (5) Construct loss function:

[0029] Construct the following hybrid loss function L mix :

[0030] L mix =L BCE (SOD GT ,SOD Pre )+L BCE (Edge GT ,Edge Pre )

[0031] Among them, SOD GT The label representing the saliency detection, SOD Pre Represents the saliency detection result, Edge GT Edge represents the edge probability label of the salient target. Pre Represents the edge estimation result of the salient target, L BCE represents the binary cross entropy loss function;

[0032] (6) Training saliency detection model:

[0033] The saliency detection model constructed in step (4) is trained using the data set obtained in step (1); the hybrid loss function L constructed in step (5) is used. mix Calculate the error between the detection result and the label output by the model, and between the edge estimation result and the edge probability label; use the Adam algorithm to update the model parameters during training, and use L-2 regularization as a constraint until the loss no longer decreases, and obtain a trained saliency detection model;

[0034] (7) Significance detection:

[0035] After the test image is normalized, it is input into the trained saliency detection model. The detection result input by the edge enhancement module in the model is the final saliency detection result.

[0036] In step (2), H and W are preferably both 352.

[0037] Compared with the prior art, the present invention has the following advantages:

[0038] (1) The receptive field module RFBL constructed by the present invention eliminates redundant information in features by means of feature grouping, improves the semantic diversity of features, avoids the influence of redundant information on the discrimination of salient targets during the decoding process, and improves the robustness of the saliency detection method.

[0039] (2) The distribution fusion module PQ constructed by the present invention integrates the label distribution into the multi-scale features through the cross-attention mechanism, which provides prior position information for the positioning of significant targets in the decoding process, improves the algorithm's ability to resist interference background, and improves the method's saliency detection accuracy.

[0040] (3) The edge auxiliary module EA constructed by the present invention provides guidance for edge enhancement through edge probability estimation, improves the algorithm's boundary distinction ability under the influence of interference background, and improves the edge accuracy of saliency detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Flow chart of a saliency detection method based on mask prior distribution fusion and edge probability estimation according to an embodiment of the present invention;

[0042] Figure 2 A structural diagram of a saliency detection model according to an embodiment of the present invention;

[0043] Figure 3 A structural diagram of a receptive field module RFBL according to an embodiment of the present invention;

[0044] Figure 4 A structural diagram of a distributed fusion module PQ according to an embodiment of the present invention;

[0045] Figure 5 A structural diagram of an edge assistance module EA according to an embodiment of the present invention;

[0046] Figure 6 Comparison diagram of the significance detection results of the embodiment of the present invention and the detection results of other methods. DETAILED DESCRIPTION

[0047] The specific implementation mode of the present invention is described below:

[0048] Example 1

[0049] Figure 1 FIG. 1 is a flow chart of a saliency detection method based on mask prior distribution fusion and edge probability estimation according to an embodiment of the present invention. The specific steps are as follows:

[0050] Step 1: Get the dataset and detection labels.

[0051] Get the public dataset of saliency detection and the corresponding detection labels.

[0052] Step 2: Get the detection label distribution, normalize the detection labels in the data set, traverse all detection labels, and get the label distribution Dis. The calculation formula of Dis is as follows:

[0053]

[0054]

[0055] Where N is the number of labels in the dataset, H is the height of the normalized label, and W is the width of the normalized label. Represents the label value of the point (i, j) in the kth label, is an integer and Dis_o means Dis_o i,j The array is composed of i∈[1,H],j∈[1,W], min(·) represents the calculation of the minimum value, and max(·) represents the calculation of the maximum value. In this embodiment, N is 10533, and H and W are both 352.

[0056] Step 3: Obtain edge probability labels, use the Canny operator to extract the edge contour of the detection label, use Gaussian blur to process the edge contour, and obtain the edge probability label of the salient target.

[0057] Step 4: construct a saliency detection model, which consists of an encoder, a neck module, a decoder, a detail extraction module, and an edge enhancement module. The specific construction process includes the following steps:

[0058] Figure 2 The figure shows a structural diagram of a saliency detection model constructed in an embodiment of the present invention. The specific steps are as follows:

[0059] (4-a) Construct an encoder and use ResNet-50 as the encoder for feature extraction. The input image with a size of 3×352×352 is processed by the encoder to obtain feature maps f with sizes of 2048×11×11, 1024×22×22, 512×44×44, and 256×88×88, respectively. 1 、f 2 、f 3 and f 4 .

[0060] (4-b) Construct the neck module, which consists of four receptive field modules RFBL. The feature map f obtained in step (4-a) 1 、f 2 、f 3 and f 4 As four receptive field modules RFBL 1 ,RFBL 2 ,RFBL 3 and RFBL 4 The input size is 196×11×11, 196×22×22, 196×44×44 and 196×88×88 respectively. and

[0061] The receptive field module RFBL in this step is constructed as follows:

[0062] Figure 3 : The structural diagram of the receptive field module RFBL according to the embodiment of the present invention, the receptive field module is composed of a feature grouping module, a feature splicing module, a convolution module and five branch modules. The convolution module is composed of a convolution layer with a convolution kernel size of 3×3 and a Relu activation function. Among the five branch modules, branch module 1 is composed of two convolution layers, and the convolution kernel sizes are 1×1 and 3×3, respectively, and the void rates are 0×0 and 1×1, respectively. Branch module 2 is composed of four convolution layers, and the convolution kernel sizes are 1×1, 1×3, 3×1 and 3×3, respectively, and the void rates are 0×0, 0×1, 1×0 and 3×3, respectively. Branch module 3 consists of four convolutional layers, with convolution kernel sizes of 1×1, 1×5, 5×1 and 3×3, and void rates of 0×0, 0×2, 2×0 and 5×5, respectively. Branch module 4 consists of four convolutional layers, with convolution kernel sizes of 1×1, 1×7, 7×1 and 3×3, and void rates of 0×0, 0×3, 3×0 and 7×7, respectively. Branch module 5 consists of one convolutional layer with a convolution kernel size of 1×1. The input features of size C×H×W in the receptive field module are first processed by the feature grouping module, which evenly divides the input features in the channel dimension to obtain five groups of features G 1 , G 2 , G 3 , G 4 and G 5 , when the number of channels of the input feature cannot be divided by five, the features of N channels are discarded so that the number of channels of the remaining features is an integer multiple of five, where N is a positive integer and N∈[1,4], and the sizes of the five sets of features are The first set of features G 1 Processed by branch module 1, the first set of receptive field features R is obtained 1 , the second set of features G 2Processed by branch module 2, the second set of receptive field features E is obtained 2 , the third group of features G 3 Processed by branch module 3, the third set of receptive field features E is obtained 3 , the fourth group of features G 4 Processed by branch module 4, the fourth set of receptive field features R 4 , the fifth group of features G 5 Processed by branch module 5, the fifth set of receptive field features R is obtained 5 ; The sizes of the five sets of receptive field features are The five sets of receptive field features are processed by the feature concatenation module, which concatenates the five sets of input features in the channel dimension to obtain a size of The concatenation result,is processed by the convolution module to obtain an output feature with a size of,C1×H×W.

[0063] In RFBL 1 In , the size of the input feature is 2048×11×11, N is 3, the size of the five sets of features and the size of the five sets of receptive field features are 409×11×11, the size of the splicing result is 2045×11×11, and the size of the output feature is 196×11×11; in RFBL 2 In , the size of the input feature is 1024×22×22, N is 4, the size of the five sets of features and the size of the five sets of receptive field features are 204×22×22, the size of the splicing result is 1020×22×22, and the size of the output feature is 196×22×22; in RFBL 3 In , the size of the input feature is 512×44×44, N is 2, the size of the five sets of features and the size of the five sets of receptive field features are 102×44×44, the size of the splicing result is 510×44×44, and the size of the output feature is 196×44×44; in RFBL 4 In , the size of the input feature is 256×88×88, N is 1, the size of the five groups of features and the size of the five groups of receptive field features are 51×88×88, the concatenated result size is 255×88×88, and the output feature size is 196×88×88.

[0064] (4-c) Construct a decoder. The decoder consists of four distributed fusion modules PQ and a convolution module Convs. The convolution module consists of a convolution layer with a convolution kernel size of 3×3 and a Relu activation function. The processing result of the size of 196×11×11 obtained in step (4-b) is Together with the 352×352 label distribution Dis obtained in step (2), it is input into PQ 1 , the output result after upsampling is the same as the processing result of the size 196×22×22 obtained in step (4-b) Add pixel by pixel to get the fusion result of size 196×22×22 1 fusion 1 Together with the 352×352 label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 2 , the output result after upsampling is the same as the processing result of 196×44×44 obtained in step (4-b) Add pixel by pixel to get the fusion result of size 196×44×44 2 fusion 2 Together with the 352×352 label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 3 , the output result after upsampling is the same as the processing result of 196×88×88 obtained in step (4-b) Add pixel by pixel to get the fusion result of size 196×88×88 3 fusion 3 Together with the 352×352 label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ 4 The result is processed by upsampling and a convolution module Convs in turn, and a decoding result with a size of 1×352×352 is obtained.

[0065] The distribution fusion module PQ in this step is constructed as follows:

[0066] Figure 4 The structure diagram of the distribution fusion module PQ of the embodiment of the present invention. The input of the distribution fusion module includes the depth feature of size 196×H×W and the label distribution Dis of size 352×352 obtained in step (2). The label distribution is processed by the shape change layer 1 to obtain the Dis of size (H*W)×196. r After the deep features are processed by the shape change layer 2, the Deep r , Dis r and Deep r Input them into the cross attention module together to get the feature T of size (H*W)×196 1 , where Dis r Query, Deep as a Cross-Attention Module r As the key and value of the cross attention module; feature T 1 After being processed by the forgetting layer 1, the feature T with a size of (H*W)×196 is obtained 2 , the feature T 2 With Deepr Input the point-by-point addition layer 1 together to obtain a feature T of size (H*W)×196 3 , feature T 3 After normalization layer 1, the feature T with a size of (H*W)×196 is obtained 4 , feature T 4 After the linear layer processing, the feature T with the size of (H*W)×196 is obtained 5 , feature T 5 After being processed by the forgetting layer 2, the feature T with a size of (H*W)×196 is obtained. 6 , feature T 6 With feature T 4 Input them together into the pointwise addition layer 2 to get the feature T of size (H*W)×196 7 , feature T 7 After being processed by normalization layer 2 and shape change layer 3, an output feature with a size of 196×H×W is obtained.

[0067] The distributed fusion module PQ 1 The processing result f with a size of 196×11×11 obtained in step (4-b) 1 rfb For deep features, distribution fusion module PQ 2 The feature fusion of size 196×22×22 1 For deep features, distribution fusion module PQ 3 The feature fusion with size of 196×44×44 2 For deep features, distribution fusion module PQ 4 The feature fusion with size of 196×88×88 3 is a deep feature.

[0068] (4-d) Construct a detail extraction module, which consists of a convolution layer with a convolution kernel size of 3×3. After the input image is processed by the convolution layer, a detail feature detail with a size of 3×352×352 is obtained;

[0069] (4-e) construct an edge enhancement module, which is composed of an edge auxiliary module EA. The detail feature detail with a size of 3×352×352 obtained in step (4-d) and the decoding result with a size of 1×352×352 obtained in step (4-c) are input into the edge auxiliary module to obtain an edge estimation result with a size of 1×352×352 and a detection result with a size of 1×352×352;

[0070] The edge auxiliary module EA in this step is constructed as follows:

[0071] Figure 5This is a structural diagram of an edge auxiliary module EA according to an embodiment of the present invention. The edge auxiliary module is composed of four convolutional layers Conv1, Conv2, Conv3 and Conv4, and the convolution kernel size is 3×3. The input includes the detail feature of size 3×352×352 obtained in step (4-d) and the decoding result of size 1×352×352 obtained in step (4-c). The detail feature and the decoding result are spliced ​​in the channel dimension. The spliced ​​result of size 4×352×352 is processed by Conv1 and Conv2 in turn to obtain an edge estimation result of size 1×352×352. The edge estimation result of size 1×352×352 and the decoding result of size 1×352×352 are added pixel by pixel, and processed by Conv3 and Conv4 in turn to obtain a detection result of size 1×352×352.

[0072] Step 5, construct the loss function:

[0073] Construct the following hybrid loss function L mix :

[0074] L mix =L BCE (SOD GT ,SOD Pre )+L BCE (Edge GT ,Edge Pre )

[0075] Among them, SOD GT The label representing the saliency detection, SOD Pre Represents the saliency detection result, Edge GT Edge represents the edge probability label of the salient target. Pre Represents the edge estimation result of the salient target, L BCE represents the binary cross entropy loss function.

[0076] Step 6: Train the saliency detection model:

[0077] The saliency detection model constructed in step (4) is trained using the data set obtained in step (1); the hybrid loss function L constructed in step (5) is used. mix The error between the detection result and the label output by the model, and the error between the edge estimation result and the edge probability label are calculated. During the training process, the Adam algorithm is used to update the model parameters, and L-2 regularization is used as a constraint until the loss no longer decreases, thus obtaining a trained saliency detection model.

[0078] Step 7, saliency detection:

[0079] After the test image is normalized, it is input into the trained saliency detection model. The detection result input by the edge enhancement module in the model is the final saliency detection result.

[0080] Example 2

[0081] The method in Example 1 was used to perform a saliency detection experiment on the public dataset DUTs (Learning to detect salient objects with image-level supervision), where the DUTs-TR dataset was used for training and the DUTs-TE dataset was used for testing. The experimental operating system was Windows 10, and the PyTorch 1.10.0 framework based on CUDA 10.2 was used for training and testing on a personal computer equipped with Intel (R) Xeon (R) W-2123 CPU (3.60 GHz) and NVIDIA GeForce RTX 2080Ti (11 GB) hardware.

[0082] This embodiment uses five indicators, namely, Average Absolute Error, Maximum F-measure (Max-F), Maximum E-measure (Max-E), Average Structural Similarity (SM) and Average Precision (AP), to compare the seven detection networks of CTD, DSR, MSF, DCE, DIPO, EDN and RCSB with the method of the present invention on the DUTs-TE dataset. The comparison results are shown in Table 1. It can be found that compared with other methods, the present invention can obtain accurate segmentation results on the DUTs-TE dataset. Among all five evaluation indicators, four evaluation indicators are optimal.

[0083] Figure 6 The figure shows the comparison of the saliency detection results of the embodiment of the present invention and the detection results of other methods. The results show that the model designed by the present invention can well process images with interfering backgrounds, especially images where the salient subject is located at the edge of the image and there is a large non-salient target in the center of the image (such as Figure 6 The model can also handle scenes with multiple salient objects in the image well (e.g. Figure 6 The fourth row), the saliency detection results generated by this method are clearer and more accurate.

[0084] The above-described embodiments are only preferred embodiments of the present invention and are not intended to limit the scope of implementation of the present invention. Therefore, all changes made based on the structure and principle of the present invention should be included in the protection scope of the present invention.

[0085] Table 1

[0086]

Claims

1. A saliency detection method based on mask prior distribution fusion and edge probability estimation, characterized in that The following steps are involved: (1) Obtaining datasets and detection labels: Obtain saliency detection public datasets and corresponding detection labels; (2) Obtain the detection label distribution, normalize the detection labels in the dataset, traverse all detection labels, and obtain the label distribution Dis; (3) Obtain edge probability labels, use the Canny operator to extract the edge contour of the detection label, use Gaussian blur to process the edge contour, and obtain the edge probability label of the salient target; (4) Construct a saliency detection model, which consists of an encoder, a neck module, a decoder, a detail extraction module, and an edge enhancement module. The specific construction process includes the following steps: (4-a) Construct an encoder and use ResNet-50 as the encoder to perform feature extraction. The input image is processed by the encoder to obtain four feature maps f1, f2, f3 and f4 with increasing scales. (4-b) Construct a neck module, which consists of four receptive field modules RFBL. The feature maps f1, f2, f3 and f4 obtained in step (4-a) are used as the inputs of the four receptive field modules RFBL1, RFBL2, RFBL3 and RFBL4 respectively, and the processing result f1 is obtained. rfb 、f2 rfb 、f3 rfb With f4 rfb ; The receptive field module RFBL in this step is constructed as follows: The receptive field module is composed of a feature grouping module, a feature splicing module, a convolution module Convs and five branch modules; the input features of the receptive field module are first processed by the feature grouping module to obtain five groups of features G1, G2, G3, G4 and G5; the first group of features G1 is processed by the branch module 1 to obtain the first group of receptive field features R1, the second group of features G2 is processed by the branch module 2 to obtain the second group of receptive field features R2, the third group of features G3 is processed by the branch module 3 to obtain the third group of receptive field features R3, the fourth group of features G4 is processed by the branch module 4 to obtain the fourth group of receptive field features R4, and the fifth group of features G5 is processed by the branch module 5 to obtain the fifth group of receptive field features R5; the five groups of receptive field features are processed by the feature splicing module and then processed by the convolution module Convs to obtain the output features; (4-c) Construct a decoder, which consists of four distributed fusion modules PQ and one convolution module Convs; the processing result f1 obtained in step (4-b) rfb Together with the label distribution Dis obtained in step (2), it is input into the distribution fusion module PQ1. After upsampling, its output result is combined with the processing result f2 obtained in step (4-b) rfb The fusion result fusion1 is obtained by adding pixel by pixel; fusion1 and the label distribution Dis obtained in step (2) are input into the distribution fusion module PQ2, and its output result is processed by upsampling and combined with the processing result f3 obtained in step (4-b) rfb The fusion result fusion2 is obtained by adding pixel by pixel; fusion2 and the label distribution Dis obtained in step (2) are input into the distribution fusion module PQ3, and its output result is processed by upsampling and combined with the processing result f4 obtained in step (4-b) rfb The fusion result fsuoin3 is obtained by adding pixel by pixel; fsuoin3 and the label distribution Dis obtained in step (2) are input into the distribution fusion module PQ4, and the result is processed by upsampling and a convolution module Convs in turn to obtain the decoding result; The distribution fusion module PQ in this step is constructed as follows: The input of the distribution fusion module includes the deep features and the label distribution Dis obtained in step (2). The label distribution is processed by the shape change layer 1 to obtain Dis r , the deep features are processed by the shape change layer 2 to obtain Deep r , Dis r and Deep r Input the cross attention module together to obtain feature T1, where Dis r Query, Deep as a Cross-Attention Module r As the key and value of the cross attention module; feature T1 is processed by forgetting layer 1 to obtain feature T2, and feature T2 is combined with Deep r They are input into the pointwise addition layer 1 together to obtain feature T3. Feature T3 is processed by the normalization layer 1 to obtain feature T4. Feature T4 is processed by the linear layer to obtain feature T5. Feature T5 is processed by the forgetting layer 2 to obtain feature T6. Feature T6 and feature T4 are input into the pointwise addition layer 2 together to obtain feature T7. Feature T7 is processed by the normalization layer 2 and the shape change layer 3 in turn to obtain the output feature. The distributed fusion module PQ1 uses the processing result f1 obtained in step (4-b) rfb As deep features, the distribution fusion modules PQ2, PQ3, and PQ4 use fusion1, fusion2, and fusion3 as deep features respectively; (4-d) Construct a detail extraction module, which consists of a convolution layer. After the input image is processed by the convolution layer, detail features are obtained; (4-e) constructing an edge enhancement module, which is composed of an edge auxiliary module EA. The detail feature detail obtained in step (4-d) and the decoding result obtained in step (4-c) are input into the edge auxiliary module to obtain edge estimation results and detection results; The edge auxiliary module EA in this step is constructed as follows: The edge auxiliary module is composed of four convolutional layers Conv1, Conv2, Conv3 and Conv4. The input includes the decoding result obtained in step (4-c) and the detail feature detail obtained in step (4-d); the detail feature and the decoding result are concatenated in the channel dimension, and then processed by Conv1 and Conv2 in turn to obtain the edge estimation result; the edge estimation result and the decoding result are added pixel by pixel, and then processed by Conv3 and Conv4 in turn to obtain the detection result; (5) Construct loss function: Construct the following hybrid loss function L mix : L mix =L BCE (SOD GT ,SOD Pre )+L BCE (Edge GT ,Edge Pre ) Among them, SOD GT The label representing the saliency detection, SOD Pre Represents the saliency detection result, Edge GT Edge represents the edge probability label of the salient target. Pre Represents the edge estimation result of the salient target, L BCE represents the binary cross entropy loss function; (6) Training saliency detection model: The saliency detection model constructed in step (4) is trained using the data set obtained in step (1); the hybrid loss function L constructed in step (5) is used. mix Calculate the error between the detection result and the label output by the model, and between the edge estimation result and the edge probability label; use the Adam algorithm to update the model parameters during the training process, and use L-2 regularization as a constraint until the loss no longer decreases, and obtain a trained saliency detection model; (7) Significance detection: After the test image is normalized, it is input into the trained saliency detection model. The detection result output by the edge enhancement module in the model is the final saliency detection result.

2. The saliency detection method based on mask prior distribution fusion and edge probability estimation as claimed in claim 1, characterized in that: The distribution Dis of the detection labels in step (2) is calculated by the following formula: Where N is the number of labels in the dataset, H is the height of the normalized label, H is a positive integer and H∈[2,1000], W is the width of the normalized label, W is a positive integer and W∈[2,1000], Represents the label value of the point (i, j) in the kth label, is an integer and Dis_o means Dis_o i,j The array is composed of i∈[1,H],j∈[1,W], min(·) means calculating the minimum value, and max(·) means calculating the maximum value.

3. The saliency detection method based on mask prior distribution fusion and edge probability estimation as claimed in claim 1, characterized in that: The feature grouping module in the step (4-b) evenly divides the input features in the channel dimension to obtain five groups of features. When the number of channels of the input features cannot be divided by five, the features of N channels are discarded so that the number of channels of the remaining features is an integer multiple of five, where N is a positive integer and N∈[1,4].

4. The saliency detection method based on mask prior distribution fusion and edge probability estimation as claimed in claim 1, characterized in that: The feature concatenation module in step (4-b) concatenates the five input receptive field features in the channel dimension to obtain output features.

5. The saliency detection method based on mask prior distribution fusion and edge probability estimation as claimed in claim 1, characterized in that: The convolution module Convs in the step (4-b) is composed of a convolution layer and a Relu activation function.

6. The saliency detection method based on mask prior distribution fusion and edge probability estimation as claimed in claim 1, characterized in that: The five branches in step (4-b) are as follows: branch module 1 is composed of two convolutional layers, branch modules 2, 3 and 4 are each composed of four convolutional layers, and branch module 5 is composed of one convolutional layer.

7. The saliency detection method based on mask prior distribution fusion and edge probability estimation as claimed in claim 1, characterized in that: The convolution module Convs in the step (4-c) is composed of a convolution layer and a Relu activation function.

Citation Information

Cited By

  • Prostate cancer radical operation score upgrading prediction method with puncture Gleason scores of 3 +3 and 3 +4, equipment and program product

    CN120319402A