Salient target detection method based on feature optimization
By adding CA attention module and feature optimization module to the U2-Net model and improving the decoder structure, the problem of easily neglecting image features when expanding the receptive field in the prior art is solved, high-precision significance object detection is achieved, and high-quality significant maps are generated.
Patent Information
- Application Number
- CN202510075099.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
AI Technical Summary
The existing significance target detection technology is prone to ignore certain features in the image when expanding the receptive field, resulting in incomplete detection of targets, incomplete or completely ignoring the target. Especially when the image edges are blurred, it is difficult to achieve high-precision detection results.
A significant object detection method based on feature optimization is proposed. By adding CA attention module and feature optimization module to the U2-Net model, and improving the decoder structure, the model's ability to extract the highest dimensional features with high accuracy is improved, and the difficulty of segmentation of the network in the edge blur situation is alleviated.
It effectively improves the performance and accuracy of the model, alleviates the problem that the network cannot accurately segment the foreground and background in extreme cases, and generates high-quality predictive significant maps, suitable for many types of pictures.
Smart Images

Figure CN119888193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of salient object detection, and in particular to a salient object detection method based on feature optimization. Background Art
[0002] Salient Object Detection (SOD) is an important task in the field of computer vision, which aims to identify and segment the most eye-catching parts of an image, namely salient objects. Salient objects are usually the main objects or the most eye-catching areas in an image, which are usually more prominent in human visual perception. Salient object detection has always been a challenging problem and can now be applied to various fields, such as image and video retrieval, image effect segmentation and enhancement, autonomous driving and robot vision, etc.
[0003] The Chinese patent "CN117994497A Image salient target detection method, system, device and medium" adopts the traditional model of preprocessing the target image, training the salient network, and obtaining the prediction result. It realizes better saliency detection of the input image by using the multi-receptive field fusion module method and the context learning module method.
[0004] The Chinese patent "CN118072090A Skin disease image detection method based on U2-Net and ResNeXt-50 models" constructs a segmentation network based on U2-Net and a classification network based on ResNeXt-50. The segmentation network is connected to the classification network to form a recognition network model. The recognition network model is used to segment and then classify the image, and finally realizes a detection method for skin disease images in the field of medical images.
[0005] The traditional solution adopted by the Chinese patent "CN117994497A Image Salient Object Detection Method, System, Device and Medium" will inevitably ignore certain features in the image when expanding the receptive field, resulting in incomplete and incomplete target detection when the final detection map is formed, or even completely ignoring the target. In some specific images, it will not be possible to present a high-precision detection result.
[0006] The Chinese patent "CN118072090A Skin disease image detection method based on U2-Net and ResNeXt-50 model" uses U2-Net as its segmentation network, but the improvement part does not fully consider the edge blur problem of the image, especially as a medical image, the edge lesion texture cannot be fully reflected under its model, which ultimately affects the detection results. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention aims to propose a salient object detection method based on feature optimization, comprising:
[0008] Step 1: Get the DUTS-TR and DUTS-TE datasets. The DUTS-TR and DUTS-TE datasets include multiple images and binary images of images, where 0 corresponds to the background part of the image and 1 corresponds to the subject in the image.
[0009] Step 2: Preprocess the datasets DUTS-TR and DUTS-TE to obtain preprocessed images, use the preprocessed images as input samples, and use the labels corresponding to the preprocessed images as output samples. The input samples and the output samples constitute a sample, and multiple samples constitute a sample set. According to a preset ratio, the sample set is divided into a training set and a validation set;
[0010] Step 3: Input the input sample, i.e. the preprocessed image, into the initial MO-U2-Net network model to obtain a saliency map, which is a binary image, with the subject corresponding to 1 and the background corresponding to 0;
[0011] The MO-U2-Net network model includes a first encoder EN-1, a second encoder EN-2, a third encoder EN-3, a fourth encoder EN-4, a fifth encoder EN-5, a sixth encoder EN-6, a first decoder DE-1, a second decoder DE-2, a third decoder DE-3, an improved fourth decoder DE-4, an improved fifth decoder DE-5, a CA attention module, an MO feature optimization module and an image fusion module;
[0012] Step 4: According to the saliency map and output samples, the parameters in the MO-U2-Net network model are updated, and the MO-U2-Net network model is trained based on the training set and the preset number of iterations to obtain the trained MO-U2-Net network model, and the trained MO-U2-Net network model is verified according to the verification set.
[0013] Optionally, step 3 specifically includes:
[0014] Step 3.1: The input sample, i.e., the preprocessed image, is passed through the first encoder EN-1, down-sampling, the second encoder EN-2, down-sampling, the third encoder EN-3, down-sampling, and the fourth encoder EN-4 to obtain a first encoding feature map output by the first encoder EN-1, a second encoding feature map output by the second encoder EN-2, a third encoding feature map output by the third encoder EN-3, and a fourth encoding feature map output by the fourth encoder EN-4;
[0015] Step 3.2: The fourth encoded feature map is passed through a CA attention module, downsampling, a fifth encoder EN-5, a CA attention module, downsampling, and a sixth encoder EN-6 to obtain a fifth encoded feature map output by the fifth encoder EN-5 and a sixth encoded feature map output by the sixth encoder EN-6;
[0016] Step 3.3: Input the sixth encoding feature map into the MO feature optimization module to obtain a target optimized feature map;
[0017] Step 3.4: upsampling the sixth encoding feature map to obtain a processed sixth encoding feature map, upsampling the target optimization feature map to obtain a processed target optimization feature map; inputting the processed sixth encoding feature map, the processed target optimization feature map and the fifth encoding feature map output by the fifth encoder EN-5 into the improved fifth decoder DE-5 to obtain a first decoding feature map;
[0018] Step 3.5: upsample the first decoding feature map to obtain a processed first decoding feature map, upsample the target optimization feature map twice to obtain a first target feature map, and input the fourth encoding feature map output by the fourth encoder EN-4, the processed first decoding feature map and the first target feature map into the improved fourth decoder DE-4 to obtain a second decoding feature map;
[0019] Step 3.6: The second decoding feature graph, the first encoding feature graph, the second encoding feature graph, and the third encoding feature graph are processed by the third decoder DE-3, the second decoder DE-2, and the first decoder DE-1 to obtain a third decoding feature graph output by the third decoder DE-3, a fourth decoding feature graph output by the second decoder DE-2, and a fifth decoding feature graph output by the first decoder DE-1;
[0020] Step 3.7: Fuse the first decoding feature map, the second decoding feature map, the third decoding feature map, the fourth decoding feature map and the fifth decoding feature map to obtain a saliency map.
[0021] Optionally, step 3.1 specifically includes:
[0022] The preprocessed image is input into the first encoder EN-1 for processing to obtain a first coding feature map, the first coding feature map is downsampled to obtain a processed first coding feature map, the processed first coding feature map is input into the second encoder EN-2 to obtain a second coding feature map, the second coding feature map is downsampled to obtain a processed second coding feature map, the processed second coding feature map is input into the third encoder EN-3 to obtain a third coding feature map, the third coding feature map is downsampled to obtain a processed third coding feature map, and the processed third coding feature map is input into the fourth encoder EN-4 to obtain a fourth coding feature map.
[0023] Optionally, step 3.2 specifically includes:
[0024] The fourth encoded feature map is input into the CA attention module to obtain the first attention feature map, the first attention feature map is downsampled to obtain the processed first attention feature map, the processed first attention feature map is input into the fifth encoder EN-5 to obtain the fifth encoded feature map, the fifth encoded feature map is input into the CA attention module to obtain the second attention feature map, the second attention feature map is downsampled to obtain the processed second attention feature map, and the processed second attention feature map is input into the sixth encoder EN-6 to obtain the sixth encoded feature map.
[0025] Optionally, step 3.3 specifically includes:
[0026] The sixth encoded feature map is passed through a 3*3 convolution layer and a BN layer to obtain the first optimized feature map, and the first optimized feature map is channel expanded and divided to obtain W for multiplication. fom and b for residual connection fom , the first optimized feature map and W fom Perform pixel-level multiplication to obtain the second optimized feature map, and convert b fom After 3*3 convolutional layers and BN layers, the processed b is obtained fom , the processed b fom The third optimized feature map is added to the second optimized feature map to obtain the third optimized feature map, and the third optimized feature map is passed through the RELU layer to obtain the target optimized feature map.
[0027] Optionally, step 3.4 specifically includes:
[0028] The fifth encoded feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a first feature map. The processed sixth encoded feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a second feature map. The processed target optimized feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a third feature map. The first feature map and the second feature map are pixel-level multiplied to obtain a first multiplication feature map. The first feature map and the third feature map are pixel-level multiplied to obtain a second multiplication feature map. The second feature map and the third feature map are pixel-level multiplied to obtain a third multiplication feature map. The first multiplication feature map, the second multiplication feature map, and the third multiplication feature map are connected to obtain a first connection feature map. The first connection feature map is passed through a 3*3 convolution layer and a BN layer to obtain a processed first connection feature map. After adding the processed first connection feature map to the fifth encoded feature map, it passes through a RELU layer to obtain a first decoding feature map.
[0029] Optionally, step 3.5 specifically includes:
[0030] The fourth encoding feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a fourth feature map. The processed first decoding feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a fifth feature map. The first target feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a sixth feature map. The fourth feature map and the fifth feature map are pixel-level multiplied to obtain a fourth multiplication feature map. The fourth feature map and the sixth feature map are pixel-level multiplied to obtain a fifth multiplication feature map. The fifth feature map and the sixth feature map are pixel-level multiplied to obtain a sixth multiplication feature map. The fourth multiplication feature map, the fifth multiplication feature map, and the sixth multiplication feature map are connected to obtain a second connection feature map. The second connection feature map is passed through a 3*3 convolution layer and a BN layer to obtain a processed second connection feature map. The processed second connection feature map is added to the fourth encoding feature map and then passed through a RELU layer to obtain a second decoding feature map.
[0031] Optionally, step 3.6 specifically includes:
[0032] The second decoding feature map is upsampled to obtain a processed second decoding feature map, the processed second decoding feature map and the third encoding feature map are input into the third decoder DE-3 to obtain a third decoding feature map, the third decoding feature map is upsampled to obtain a processed third decoding feature map, the processed third decoding feature map and the second encoding feature map are input into the second decoder DE-2 to obtain a fourth decoding feature map, the fourth decoding feature map is upsampled to obtain a processed fourth decoding feature map, the processed fourth decoding feature map and the first encoding feature map are input into the first decoder DE-1 to obtain a fifth decoding feature map.
[0033] Optionally, in step 2, the DUTS-TR and DUTS-TE datasets are preprocessed, including:
[0034] According to the preset resolution size, each image is horizontally flipped and forcibly stretched to obtain the preprocessed image.
[0035] The beneficial effects of adopting the above technical solution are:
[0036] Compared with the prior art, the solution proposed in the present invention adds an attention mechanism and a feature optimization module on the basis of the original U2-Net model, and improves the decoder, thereby effectively improving the performance and accuracy of the model, extracting high-accuracy highest-dimensional features in the deepest level module, and effectively alleviating the problem that the network cannot accurately segment the foreground and background in extreme cases. Compared with traditional U2-Net and other salient object detection models, it can generate high-quality predicted salient maps when dealing with various types of images.
[0037] The method provided by the present invention can provide high-quality services in the fields of image retrieval, autonomous driving, robot intelligent vision, and specimen texture comparison. It can also provide high-quality saliency maps in the fields of image editing and beautification, thereby improving the aesthetics and creativity of images in these fields. It can also provide support for pre-work in the fields of medical image segmentation and industrial detection, thereby increasing the reliability of detection and diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Schematic diagram of a flow chart of a salient object detection method based on feature optimization in an embodiment of the present invention;
[0039] Figure 2 is a schematic diagram of an image in an embodiment of the present invention;
[0040] Figure 3 is a schematic diagram of a final image of an image in an embodiment of the present invention;
[0041] Figure 4 It is a flowchart of the MO feature optimization module processing in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0043] In view of the problems existing in the prior art, the purpose of the present invention is to propose a high-precision salient object detection network solution, which can effectively reduce the impact of edge blur in the detection image. The method can effectively perform feature fusion and feature optimization, and finally present a high-quality salient map.
[0044] Specifically, the present invention provides a salient target detection method based on feature optimization, combining Figure 1 , which may include the following steps:
[0045] Step 1: Get the datasets DUTS-TR and DUTS-TE. The datasets DUTS-TR and DUTS-TE include multiple images and binary images of images, where 0 corresponds to the background part of the image, 1 corresponds to the subject in the image, and Figure 2 For example, the subject in the image can also be understood as the salient subject in the image, such as Figure 2 The car in
[0046] Step 2: Preprocess the datasets DUTS-TR and DUTS-TE to obtain preprocessed images. Specifically, according to the preset resolution size, each image is horizontally flipped and forced to stretch to obtain the preprocessed image. For example, the images are uniformly changed to 320*320 resolution by horizontal flipping and forced stretching; the preprocessed image is used as an input sample, and the label corresponding to the preprocessed image is used as an output sample. The input sample and the output sample constitute a sample, and multiple samples constitute a sample set. According to a preset ratio, for example, the ratio of the training set to the validation set is 7:1, the sample set is divided into a training set and a validation set;
[0047] Among them, the training set and validation set are used to train the MO-U2-Net network model. In the specific implementation process, when training the model, it is also necessary to configure the relevant training environment. The specific configuration required is: based on the deep learning framework PyTorch1.11.0, using CUDA11.3, ubuntu20.04 environment, using RTX3090 graphics card, the experimental parameters are input image size of 320*320, epochs of 100 rounds, and Adam is selected as the optimizer.
[0048] Step 3: Input the input sample, i.e. the preprocessed image, into the initial MO-U2-Net network model to obtain a saliency map, which is a binary image, with the subject corresponding to 1 and the background corresponding to 0;
[0049] After the trained MO-U2-Net network model outputs the feature map, the image to be detected can be input into the MO-U2-Net network model to obtain the saliency map in the image to be detected. Furthermore, the subject in the image to be detected can be cut according to the saliency map, and the cut subject image can be pasted to the main part of the saliency map to obtain the final image, as shown in FIG. Figure 3 ;
[0050] The MO-U2-Net network model includes a first encoder EN-1, a second encoder EN-2, a third encoder EN-3, a fourth encoder EN-4, a fifth encoder EN-5, a sixth encoder EN-6, a first decoder DE-1, a second decoder DE-2, a third decoder DE-3, an improved fourth decoder DE-4, an improved fifth decoder DE-5, a CA attention module, an MO feature optimization module and an image fusion module;
[0051] Step 3.1: The input sample, i.e., the preprocessed image, is passed through the first encoder EN-1, down-sampling, the second encoder EN-2, down-sampling, the third encoder EN-3, down-sampling, and the fourth encoder EN-4 to obtain a first encoding feature map output by the first encoder EN-1, a second encoding feature map output by the second encoder EN-2, a third encoding feature map output by the third encoder EN-3, and a fourth encoding feature map output by the fourth encoder EN-4;
[0052] Among them, step 3.1 specifically includes:
[0053] The preprocessed image is input into the first encoder EN-1 for processing to obtain a first coding feature map, the first coding feature map is downsampled to obtain a processed first coding feature map, the processed first coding feature map is input into the second encoder EN-2 to obtain a second coding feature map, the second coding feature map is downsampled to obtain a processed second coding feature map, the processed second coding feature map is input into the third encoder EN-3 to obtain a third coding feature map, the third coding feature map is downsampled to obtain a processed third coding feature map, and the processed third coding feature map is input into the fourth encoder EN-4 to obtain a fourth coding feature map.
[0054] Step 3.2: The fourth encoded feature map is passed through a CA attention module, downsampling, a fifth encoder EN-5, a CA attention module, downsampling, and a sixth encoder EN-6 to obtain a fifth encoded feature map output by the fifth encoder EN-5 and a sixth encoded feature map output by the sixth encoder EN-6;
[0055] Among them, step 3.2 specifically includes:
[0056] The fourth encoded feature map is input into the CA attention module to obtain the first attention feature map, the first attention feature map is downsampled to obtain the processed first attention feature map, the processed first attention feature map is input into the fifth encoder EN-5 to obtain the fifth encoded feature map, the fifth encoded feature map is input into the CA attention module to obtain the second attention feature map, the second attention feature map is downsampled to obtain the processed second attention feature map, and the processed second attention feature map is input into the sixth encoder EN-6 to obtain the sixth encoded feature map.
[0057] Among them, the feature map is input into the CA attention module, and the feature map is fused through dual-channel hierarchical feature extraction to obtain a feature map containing rich edge information. The processing process of the CA attention module specifically includes: the input feature map (H*W*C) is divided into two parts in the width direction and the height direction for parallel feature concentration, and two feature layers (H*1*C) and (1*W*C) are obtained. The height and width are transposed and stacked to obtain a new feature layer (1*(H+W)*C), and then the convolution normalization is used to obtain the feature (1*(H+W)*C / r), where r is the scaling factor, which is used to reduce the number of network parameters. Then the height and width are separated and transposed, and then the number of channels is adjusted back to C, and then the sigmod function is passed respectively, and then the two feature layers are expanded at the wide level and the high level respectively, and then multiplied together to form the final feature map (H*W*C).
[0058] Step 3.3: Input the sixth encoding feature map into the MO feature optimization module to obtain a target optimized feature map;
[0059] Among them, combined Figure 4 , step 3.3 specifically includes:
[0060] The sixth encoded feature map is passed through a 3*3 convolution layer and a BN layer to obtain the first optimized feature map, and the first optimized feature map is channel expanded and divided to obtain W for multiplication. fom and b for residual connection fom , the first optimized feature map and W fom Perform pixel-level multiplication to obtain the second optimized feature map, and convert b fom After 3*3 convolutional layers and BN layers, the processed b is obtained fom , the processed b fom The third optimized feature map is added to the second optimized feature map to obtain the third optimized feature map, and the third optimized feature map is passed through the RELU layer to obtain the target optimized feature map.
[0061] In the original U2-Net network, the input feature map received by each layer of the decoder is the feature map of the encoder at the same level and the feature map of the previous layer of the decoder after upsampling, which is a double input. The present invention adds the feature map obtained by the feature optimization module as the third part of the input to the decoder network architecture to form a new network architecture, and then improves the fifth decoder DE-5 and the fourth decoder DE-4. The improved processing of the feature map refers to step 3.4 and step 3.5.
[0062] Step 3.4: upsampling the sixth encoding feature map to obtain a processed sixth encoding feature map, upsampling the target optimization feature map to obtain a processed target optimization feature map; inputting the processed sixth encoding feature map, the processed target optimization feature map and the fifth encoding feature map output by the fifth encoder EN-5 into the improved fifth decoder DE-5 to obtain a first decoding feature map;
[0063] Among them, step 3.4 specifically includes:
[0064] The fifth encoded feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a first feature map. The processed sixth encoded feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a second feature map. The processed target optimized feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a third feature map. The first feature map and the second feature map are pixel-level multiplied to obtain a first multiplication feature map. The first feature map and the third feature map are pixel-level multiplied to obtain a second multiplication feature map. The second feature map and the third feature map are pixel-level multiplied to obtain a third multiplication feature map. The first multiplication feature map, the second multiplication feature map, and the third multiplication feature map are connected to obtain a first connection feature map. The first connection feature map is passed through a 3*3 convolution layer and a BN layer to obtain a processed first connection feature map. After adding the processed first connection feature map to the fifth encoded feature map, it passes through a RELU layer to obtain a first decoding feature map.
[0065] Step 3.5: upsample the first decoding feature map to obtain a processed first decoding feature map, upsample the target optimization feature map twice to obtain a first target feature map, and input the fourth encoding feature map output by the fourth encoder EN-4, the processed first decoding feature map and the first target feature map into the improved fourth decoder DE-4 to obtain a second decoding feature map;
[0066] Among them, step 3.5 specifically includes:
[0067] The fourth encoding feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a fourth feature map. The processed first decoding feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a fifth feature map. The first target feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a sixth feature map. The fourth feature map and the fifth feature map are pixel-level multiplied to obtain a fourth multiplication feature map. The fourth feature map and the sixth feature map are pixel-level multiplied to obtain a fifth multiplication feature map. The fifth feature map and the sixth feature map are pixel-level multiplied to obtain a sixth multiplication feature map. The fourth multiplication feature map, the fifth multiplication feature map, and the sixth multiplication feature map are connected to obtain a second connection feature map. The second connection feature map is passed through a 3*3 convolution layer and a BN layer to obtain a processed second connection feature map. The processed second connection feature map is added to the fourth encoding feature map and then passed through a RELU layer to obtain a second decoding feature map.
[0068] The decoder after application changes can obtain more accurate boundary information, thereby helping the network locate the boundary between foreground and background, and finally forming a high-quality saliency map.
[0069] Step 3.6: The second decoding feature graph, the first encoding feature graph, the second encoding feature graph, and the third encoding feature graph are processed by the third decoder DE-3, the second decoder DE-2, and the first decoder DE-1 to obtain a third decoding feature graph output by the third decoder DE-3, a fourth decoding feature graph output by the second decoder DE-2, and a fifth decoding feature graph output by the first decoder DE-1;
[0070] Among them, step 3.6 specifically includes:
[0071] The second decoding feature map is upsampled to obtain a processed second decoding feature map, the processed second decoding feature map and the third encoding feature map are input into the third decoder DE-3 to obtain a third decoding feature map, the third decoding feature map is upsampled to obtain a processed third decoding feature map, the processed third decoding feature map and the second encoding feature map are input into the second decoder DE-2 to obtain a fourth decoding feature map, the fourth decoding feature map is upsampled to obtain a processed fourth decoding feature map, the processed fourth decoding feature map and the first encoding feature map are input into the first decoder DE-1 to obtain a fifth decoding feature map.
[0072] Step 3.7: Fuse the first decoding feature map, the second decoding feature map, the third decoding feature map, the fourth decoding feature map and the fifth decoding feature map to obtain a saliency map.
[0073] Step 4: Update the parameters in the MO-U2-Net network model based on the saliency map and output samples, train the MO-U2-Net network model based on the training set and the preset number of iterations, obtain the trained MO-U2-Net network model, and verify the trained MO-U2-Net network model based on the validation set. After the training, the trained weights are saved for subsequent predictions and the training data is compared with the previous training data to retain the best training weights.
[0074] The present invention has the following characteristics and advantages:
[0075] (1) The present invention adds the CA attention mechanism to the backbone network, successfully extracting richer features and avoiding feature loss in some cases.
[0076] (2) The present invention designs a feature optimization module, which successfully alleviates the common problem of edge blur in salient target detection, strengthens the distinction between foreground and background, and thus improves the accuracy of the network in distinguishing the main target.
[0077] (3) The present invention improves the decoder structure so that the decoder part can obtain optimized feature information when working, and strengthen the network's ability to distinguish foreground and background, thereby alleviating the situation where part of the target subject is predicted as the background due to excessively strong discrimination ability.
[0078] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A salient object detection method based on feature optimization, characterized in that: include: Step 1: Get the DUTS-TR and DUTS-TE datasets. The DUTS-TR and DUTS-TE datasets include multiple images and binary images of images, where 0 corresponds to the background part of the image and 1 corresponds to the subject in the image. Step 2: Preprocess the datasets DUTS-TR and DUTS-TE to obtain preprocessed images, use the preprocessed images as input samples, and use the labels corresponding to the preprocessed images as output samples. The input samples and the output samples constitute a sample, and multiple samples constitute a sample set. According to a preset ratio, the sample set is divided into a training set and a validation set; Step 3: Input the input sample, i.e. the preprocessed image, into the initial MO-U2-Net network model to obtain a saliency map, which is a binary image, with the subject corresponding to 1 and the background corresponding to 0; The MO-U2-Net network model includes a first encoder EN-1, a second encoder EN-2, a third encoder EN-3, a fourth encoder EN-4, a fifth encoder EN-5, a sixth encoder EN-6, a first decoder DE-1, a second decoder DE-2, a third decoder DE-3, an improved fourth decoder DE-4, an improved fifth decoder DE-5, a CA attention module, an MO feature optimization module and an image fusion module; Step 4: According to the saliency map and output samples, the parameters in the MO-U2-Net network model are updated, and the MO-U2-Net network model is trained based on the training set and the preset number of iterations to obtain the trained MO-U2-Net network model, and the trained MO-U2-Net network model is verified according to the verification set.
2. The method for detecting a salient object based on feature optimization according to claim 1, characterized in that: Step 3 specifically includes: Step 3.1: The input sample, i.e., the preprocessed image, is passed through the first encoder EN-1, down-sampling, the second encoder EN-2, down-sampling, the third encoder EN-3, down-sampling, and the fourth encoder EN-4 to obtain a first encoding feature map output by the first encoder EN-1, a second encoding feature map output by the second encoder EN-2, a third encoding feature map output by the third encoder EN-3, and a fourth encoding feature map output by the fourth encoder EN-4; Step 3.2: The fourth encoded feature map is passed through a CA attention module, downsampling, a fifth encoder EN-5, a CA attention module, downsampling, and a sixth encoder EN-6 to obtain a fifth encoded feature map output by the fifth encoder EN-5 and a sixth encoded feature map output by the sixth encoder EN-6; Step 3.3: Input the sixth encoding feature map into the MO feature optimization module to obtain a target optimized feature map; Step 3.4: upsampling the sixth encoding feature map to obtain a processed sixth encoding feature map, upsampling the target optimization feature map to obtain a processed target optimization feature map; inputting the processed sixth encoding feature map, the processed target optimization feature map and the fifth encoding feature map output by the fifth encoder EN-5 into the improved fifth decoder DE-5 to obtain a first decoding feature map; Step 3.5: upsample the first decoding feature map to obtain a processed first decoding feature map, upsample the target optimization feature map twice to obtain a first target feature map, and input the fourth encoding feature map output by the fourth encoder EN-4, the processed first decoding feature map and the first target feature map into the improved fourth decoder DE-4 to obtain a second decoding feature map; Step 3.6: The second decoding feature graph, the first encoding feature graph, the second encoding feature graph, and the third encoding feature graph are processed by the third decoder DE-3, the second decoder DE-2, and the first decoder DE-1 to obtain a third decoding feature graph output by the third decoder DE-3, a fourth decoding feature graph output by the second decoder DE-2, and a fifth decoding feature graph output by the first decoder DE-1; Step 3.7: Fuse the first decoding feature map, the second decoding feature map, the third decoding feature map, the fourth decoding feature map and the fifth decoding feature map to obtain a saliency map.
3. The method for detecting salient objects based on feature optimization according to claim 2, characterized in that: Step 3.1 specifically includes: The preprocessed image is input into the first encoder EN-1 for processing to obtain a first coding feature map, the first coding feature map is downsampled to obtain a processed first coding feature map, the processed first coding feature map is input into the second encoder EN-2 to obtain a second coding feature map, the second coding feature map is downsampled to obtain a processed second coding feature map, the processed second coding feature map is input into the third encoder EN-3 to obtain a third coding feature map, the third coding feature map is downsampled to obtain a processed third coding feature map, and the processed third coding feature map is input into the fourth encoder EN-4 to obtain a fourth coding feature map.
4. The method for detecting salient objects based on feature optimization according to claim 2, characterized in that: Step 3.2 specifically includes: The fourth encoded feature map is input into the CA attention module to obtain the first attention feature map, the first attention feature map is downsampled to obtain the processed first attention feature map, the processed first attention feature map is input into the fifth encoder EN-5 to obtain the fifth encoded feature map, the fifth encoded feature map is input into the CA attention module to obtain the second attention feature map, the second attention feature map is downsampled to obtain the processed second attention feature map, and the processed second attention feature map is input into the sixth encoder EN-6 to obtain the sixth encoded feature map.
5. The method for detecting salient objects based on feature optimization according to claim 2, characterized in that: Step 3.3 specifically includes: The sixth encoded feature map is passed through a 3*3 convolution layer and a BN layer to obtain the first optimized feature map, and the first optimized feature map is channel expanded and divided to obtain W for multiplication. fom and b for residual connection fom , the first optimized feature map and W fom Perform pixel-level multiplication to obtain the second optimized feature map, and convert b fom After 3*3 convolutional layers and BN layers, the processed b is obtained fom , the processed b fom The third optimized feature map is added to the second optimized feature map to obtain the third optimized feature map, and the third optimized feature map is passed through the RELU layer to obtain the target optimized feature map.
6. The method for detecting salient objects based on feature optimization according to claim 2, characterized in that: Step 3.4 specifically includes: The fifth encoded feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a first feature map. The processed sixth encoded feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a second feature map. The processed target optimized feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a third feature map. The first feature map and the second feature map are pixel-level multiplied to obtain a first multiplication feature map. The first feature map and the third feature map are pixel-level multiplied to obtain a second multiplication feature map. The second feature map and the third feature map are pixel-level multiplied to obtain a third multiplication feature map. The first multiplication feature map, the second multiplication feature map, and the third multiplication feature map are connected to obtain a first connection feature map. The first connection feature map is passed through a 3*3 convolution layer and a BN layer to obtain a processed first connection feature map. After adding the processed first connection feature map to the fifth encoded feature map, it passes through a RELU layer to obtain a first decoding feature map.
7. The method for detecting salient objects based on feature optimization according to claim 2, characterized in that: Step 3.5 specifically includes: The fourth encoding feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a fourth feature map. The processed first decoding feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a fifth feature map. The first target feature map is passed through a 3*3 convolution layer, a BN layer, and a RELU layer to obtain a sixth feature map. The fourth feature map and the fifth feature map are pixel-level multiplied to obtain a fourth multiplication feature map. The fourth feature map and the sixth feature map are pixel-level multiplied to obtain a fifth multiplication feature map. The fifth feature map and the sixth feature map are pixel-level multiplied to obtain a sixth multiplication feature map. The fourth multiplication feature map, the fifth multiplication feature map, and the sixth multiplication feature map are connected to obtain a second connection feature map. The second connection feature map is passed through a 3*3 convolution layer and a BN layer to obtain a processed second connection feature map. The processed second connection feature map is added to the fourth encoding feature map and then passed through a RELU layer to obtain a second decoding feature map.
8. The method for detecting salient objects based on feature optimization according to claim 2, characterized in that: Step 3.6 specifically includes: The second decoding feature map is upsampled to obtain a processed second decoding feature map, the processed second decoding feature map and the third encoding feature map are input into the third decoder DE-3 to obtain a third decoding feature map, the third decoding feature map is upsampled to obtain a processed third decoding feature map, the processed third decoding feature map and the second encoding feature map are input into the second decoder DE-2 to obtain a fourth decoding feature map, the fourth decoding feature map is upsampled to obtain a processed fourth decoding feature map, the processed fourth decoding feature map and the first encoding feature map are input into the first decoder DE-1 to obtain a fifth decoding feature map.
9. The method for detecting salient objects based on feature optimization according to claim 1, characterized in that: In step 2, the DUTS-TR and DUTS-TE datasets are preprocessed, including: According to the preset resolution size, each image is horizontally flipped and forcibly stretched to obtain the preprocessed image.
Citation Information
Patent Citations
Image saliency target detection method, system, device and medium
CN117994497A
Skin disease image detection method based on U2-Net and ResNeXt-50 models
CN118072090A
Improved U2-Net saliency Mongolian pattern detection algorithm
CN116452498A