A camouflage target detection method based on a cross-stage feature interaction network
By using a cross-stage feature interaction network to fuse features with information from adjacent stages, the problems of high model complexity and low detection accuracy in existing technologies are solved, and efficient detection of camouflaged targets is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2024-09-26
- Publication Date
- 2026-04-14
AI Technical Summary
Existing deep learning methods neglect the importance of feature transformation in camouflaged target detection, resulting in high model parameters and computational complexity, which limits detection accuracy and practical applications.
A cross-stage feature interaction network is adopted. Through the cross-stage perception neck module and the bidirectional feature interaction module, feature fusion is performed using spatial and semantic information of adjacent stages. Combined with the multi-scale cross-attention modulation module, the exploration of multi-scale long-distance dependencies of features is realized.
It improves the accuracy of target detection, reduces the model's parameters and computational complexity, enhances the ability to perceive targets at different scales, and improves the model's detection performance.
Smart Images

Figure CN119251617B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision, specifically relating to a method for detecting camouflaged targets based on a cross-stage feature interaction network. Background Technology
[0002] Camouflage target detection aims to identify targets hidden in the environment and is widely used in military target detection, industrial defect detection, medical polyp detection, and agricultural locust detection. Over the past decade, the rapid development of deep learning technology has made deep learning-based camouflage target detection mainstream. These methods typically involve three steps: backbone feature extraction, feature transformation, and feature decoding. Camouflage targets are highly similar to their surrounding environment, significantly increasing the difficulty of detection. Therefore, most deep learning methods tend to employ large-scale backbone networks and complex decoders to improve detection accuracy. However, these methods often neglect the impact of feature transformation on model performance. In camouflage target detection, feature transformation is a crucial step, determining how much information extracted from the backbone features can be used for feature decoding. Since most current methods typically process the backbone features of each stage independently using simple convolutional layers without considering the correlation between backbone features at different stages, this limits the model's feature representation capabilities to some extent. Furthermore, the use of large-scale backbone networks and complex decoders introduces a large number of parameters and high computational burden, thus limiting their deployment in practical applications. Summary of the Invention
[0003] This invention fully considers the shortcomings of existing technologies and aims to provide a camouflaged target detection method based on a cross-stage feature interaction network, which can achieve a high target detection accuracy with fewer parameters and lower computational complexity.
[0004] I. Technical Principles
[0005] Currently, most camouflaged target detection methods employ simple... or Convolutional layers are used to adjust the channel dimensions of backbone features. However, because these methods only process features at each stage individually, they cannot effectively detect targets at different scales. To better improve the network's feature representation capabilities while adjusting feature channel dimensions, this invention develops a cross-stage perception neck module. This module effectively refines the information of each backbone feature by utilizing the rich spatial or semantic information provided by adjacent stages as guidance. As the core of the cross-stage perception neck module, a bidirectional feature interaction module is inserted between every two adjacent stages to achieve bidirectional information exchange. In the bidirectional feature interaction module, this invention designs a multi-scale cross-attention modulation module to fully explore the multi-scale long-distance dependencies between two input features, thereby accurately learning the scaling and offset parameters of the affine transformation and achieving effective feature fusion.
[0006] II. Based on the above principles, the present invention is implemented through the following scheme:
[0007] A method for detecting camouflaged targets based on a cross-stage feature interaction network includes the following steps:
[0008] (1) Obtain the training dataset for camouflaged target detection: Obtain camouflaged target images and corresponding detection labels from public databases.
[0009] (2) Constructing a camouflaged target detection model: This model consists of a backbone module, a cross-stage feature perception neck module, and a prediction head module; input image After passing through the backbone module, the intermediate feature map is obtained. , , and ;Will , , and After being input into the cross-stage feature-aware neck module, an intermediate feature map is obtained. , , and ;Will , , and After being input into the prediction head module, the final detection result is obtained. The camouflage target detection model was completed.
[0010] The backbone module mentioned in this step uses SMT, namely Scale-Aware Modulation Transformer.
[0011] The cross-stage feature-aware neck module described in this step consists of convolutional layers 1, 2, 3, 4, 5, 6, 7, and 8; feature slicing layers 1, 2, 3, and 4; bidirectional feature interaction modules (BFIM1, BFIM2, and BFIM3); and stitching layers 1, 2, 3, and 4. It integrates intermediate feature maps. After the input is adjusted for dimensions in convolutional layer 1, the result is input into feature segmentation layer 1 for segmentation, resulting in two sub-feature maps. and ; intermediate feature map After dimension adjustment by the input convolutional layer 2, the result is input into the feature segmentation layer 2 for segmentation, resulting in two sub-feature maps. and ; intermediate feature map After being adjusted for dimensions by the input to convolutional layer 3, the result is input to feature segmentation layer 3 for segmentation, resulting in two sub-feature maps. and ; intermediate feature map After the input is adjusted for dimensions in convolutional layer 4, the result is input into feature segmentation layer 4 for segmentation, resulting in two sub-feature maps. and . Obtaining intermediate feature maps without any transformation ,Right now and Equal; will and The input is fed into the bidirectional feature interaction module BFIM1 to obtain two intermediate feature maps. and ;Will and The input is fed into the bidirectional feature interaction module BFIM2 to obtain two intermediate feature maps. and ;Will and The input is fed into the bidirectional feature interaction module BFIM3 to obtain two intermediate feature maps. and ; Obtaining intermediate feature maps without any transformation ,Right now and Equal. The resulting intermediate feature maps and After being concatenated in concatenation layer 1, the input is then fed into convolutional layer 5 to obtain intermediate feature maps. The obtained intermediate feature map and After being concatenated in concatenation layer 2, the input is then fed into convolutional layer 6 to obtain intermediate feature maps. The obtained intermediate feature map and After being concatenated in concatenation layer 3, the input is then fed into convolutional layer 7 to obtain intermediate feature maps. The obtained intermediate feature map and After being concatenated in concatenation layer 4, the data is then fed into convolutional layer 8 to obtain intermediate feature maps. .
[0012] The bidirectional feature interaction module (BFIM) mentioned in this step i , They have the same structure, consisting of convolutional layers 9, 10, 11, and 12; multi-scale cross-attention modulation modules (MCMB1 and MCMB2); gated depthwise convolutional feedforward modules (GDFN1 and GDFN2); pixel-wise addition, downsampling, and upsampling operations. The intermediate feature maps... The input is fed into convolutional layer 9 to obtain intermediate feature maps. , ; intermediate feature map The input is fed into convolutional layer 10 to obtain intermediate feature maps. ; After downsampling, an intermediate feature map is obtained. ; After upsampling, an intermediate feature map is obtained. ; and The inputs are fed into the multi-scale cross-attention modulation module MCMB1 to obtain intermediate feature maps. ; The input is fed into the gated depthwise convolutional feedforward module GDFN1 to obtain intermediate feature maps. ; After inputting into convolutional layer 11, the result obtained is the same as... Perform pixel-by-pixel addition to obtain the intermediate feature map. ; and The inputs are fed into the multi-scale cross-attention modulation module MCMB2 to obtain intermediate feature maps. ; The input is fed into the gated depthwise convolutional feedforward module GDFN2 to obtain intermediate feature maps. ; After inputting into convolutional layer 12, the result is the same as... By adding pixels one by one, an intermediate feature map is obtained. ; and This is the Bidirectional Feature Interaction Module (BFIM). i The output.
[0013] The multi-scale transattention modulation module (MCMB) mentioned in this step n , They have the same structure, consisting of layer normalization layer 1, layer normalization layer 2, convolutional layer 13, convolutional layer 14, convolutional layer 15, convolutional layer 16, convolutional layer 17, convolutional layer 18, multi-scale feature generation module 1, multi-scale feature generation module 2, multi-scale feature generation module 3, stitching layer 5, stitching layer 6, stitching layer 7, softmax layer, deep convolutional layer 1, deep convolutional layer 2, pixel-wise addition operation, matrix multiplication operation, matrix reshaping operation, and pixel-wise multiplication operation. After passing through layer normalization layer 1, convolutional layer 13, multi-scale feature generation module 1, concatenation layer 5, and convolutional layer 16 in sequence, the feature map is obtained through matrix reshaping operation. , ; The input is fed into the normalization layer 2 to obtain the feature map. ; After passing through convolutional layer 14, multi-scale feature generation module 2, concatenation layer 6, and convolutional layer 17 in sequence, the feature map is obtained through matrix reshaping operation. ; After passing through convolutional layer 15 and multi-scale feature generation module 3 in sequence, three feature maps are obtained. , , The three feature maps are then subjected to matrix reshaping operations to obtain the feature maps. , , ;Will and Perform matrix multiplication, and then pass the results through a Softmax layer before multiplying them by... , , Perform matrix multiplication to obtain three intermediate feature maps. , , ; , , After performing matrix reshaping operations separately, the results are fed into concatenation layer 7 for concatenation, then into convolutional layer 18. The results are then fed into deep convolutional layer 1 and deep convolutional layer 2 to obtain intermediate feature maps. and ;Will and Perform pixel-by-pixel multiplication to obtain the result and and By adding pixels one by one, an intermediate feature map is obtained. ; This refers to the Multiscale Cross-Attention Modulation Module (MCMB). n The output.
[0014] The gated depthwise convolutional feedforward module (GDFN) mentioned in this step n , They have the same structure, consisting of layer normalization layer 3, convolutional layer 19, convolutional layer 20, convolutional layer 21, depthwise convolutional layer 3, depthwise convolutional layer 4, GELU layer, pixel-wise multiplication operation, and pixel-wise addition operation. The input is fed into the normalization layer 3 to obtain the intermediate feature map. ; The intermediate feature map is obtained by sequentially passing through convolutional layer 19 and deep convolutional layer 3. ; The intermediate feature map is obtained by sequentially passing through convolutional layer 20, deep convolutional layer 4, and GELU layer. ; and After performing pixel-by-pixel multiplication, the result is passed through convolutional layer 21 and then... By adding pixels one by one, an intermediate feature map is obtained. ; This is the gated depthwise feedforward module (GDFN). n The output.
[0015] The multi-scale feature generation module 1, multi-scale feature generation module 2, and multi-scale feature generation module 3 mentioned in this step have the same structure, all consisting of a deep-dilated convolutional layer 1, a deep-dilated convolutional layer 2, and a deep-dilated convolutional layer 3. The input feature map of the multi-scale feature generation module is input into the deep-dilated convolutional layer 1, deep-dilated convolutional layer 2, and deep-dilated convolutional layer 3 respectively, and then the three outputs of the multi-scale feature generation module are obtained.
[0016] The prediction head module described in this step consists of a convolutional layer 22, upsampling operations, and pixel-by-pixel addition operations; this module uses intermediate feature maps , , and As input; After upsampling, the intermediate feature map is obtained. ; After upsampling, the intermediate feature map is obtained. ; After upsampling, the intermediate feature map is obtained. ;Will , , , Pixel-by-pixel summation is performed, and the results are sequentially passed through convolutional layer 22 and upsampling operation to obtain the final detection result. .
[0017] (3) Construct the loss function:
[0018] Construct the following joint loss function:
[0019]
[0020] in This represents the weighted binary cross-entropy loss function, which adopts the original weighted binary cross-entropy loss function of the SINet-V2 algorithm. This represents the weighted intersection-over-union (IoU) loss function, which adopts the original weighted IoU loss function of the SINet-V2 algorithm. The final detection result obtained in step (2); express The corresponding label image.
[0021] (4) Training the detection model: Use the camouflage target detection training dataset obtained in step (1) to train the camouflage target detection model constructed in step (2), obtain the loss value according to the loss function constructed in step (3), and use the Adam optimizer to update the model parameters until the loss no longer decreases, and obtain the trained model.
[0022] (5) Camouflage target detection: Use the camouflage target detection model trained in step (4) to perform camouflage target detection on the images in the test set to obtain the final detection result.
[0023] The present invention has the following advantages:
[0024] First, this invention constructs an efficient cross-stage feature interaction network that can achieve high target detection accuracy with fewer parameters and lower computational complexity.
[0025] Second, the cross-stage feature perception neck module constructed in this invention refines each backbone feature by utilizing the correlation between adjacent backbone features, thereby improving the model's ability to perceive targets at different scales and enhancing the model's detection performance.
[0026] Third, the bidirectional feature interaction module constructed in this invention, by adopting a bidirectional connection structure, enables adjacent features of two stages to complement each other, thereby improving the expressive power of each stage feature.
[0027] Fourth, this invention introduces a multi-scale cross-attention modulation module, which mainly explores the multi-scale long-range dependencies between input features and external guidance features to achieve full interaction of features. Attached Figure Description
[0028] Figure 1 A flowchart of a camouflaged target detection method based on a cross-stage feature interaction network according to an embodiment of the present invention;
[0029] Figure 2 Structure diagram of the camouflage target detection model according to an embodiment of the present invention;
[0030] Figure 3 Structural diagram of the cross-stage feature perception neck module according to an embodiment of the present invention;
[0031] Figure 4 Structure diagram of the bidirectional feature interaction module (BFIM) according to an embodiment of the present invention;
[0032] Figure 5 Structure diagram of the multi-scale cross-attention modulation module (MCMB) according to an embodiment of the present invention;
[0033] Figure 6 Structure diagram of the gated depthwise convolutional feedforward module (GDFN) according to an embodiment of the present invention;
[0034] Figure 7 Structure diagram of the multi-scale generation module in an embodiment of the present invention;
[0035] Figure 8 A structural diagram of the prediction head module according to an embodiment of the present invention;
[0036] Figure 9 Comparison of target detection results of the present invention implementation method and other algorithms. Detailed Implementation
[0037] The specific embodiments of the present invention are described below:
[0038] Example 1
[0039] Figure 1 The diagram shows a flowchart of a camouflaged target detection method based on a cross-stage feature interaction network according to an embodiment of the present invention. The specific steps are as follows:
[0040] Step 1: Obtain the training dataset for camouflage target detection.
[0041] Obtain camouflaged target images and corresponding detection labels from public databases.
[0042] Step 2, Construct a camouflaged target detection model
[0043] Figure 2 The diagram shown illustrates the structure of the camouflaged target detection model according to an embodiment of the present invention. This network consists of a backbone module, a cross-stage feature perception neck module, and a prediction head module; its size is... Input image After passing through the backbone module, the resulting size is... intermediate feature map Size is intermediate feature map Size is intermediate feature map and size are intermediate feature map ;Will , , and After being input into the cross-stage feature-aware neck module, a value of [size missing] is obtained. intermediate feature map Size is intermediate feature map Size is intermediate feature map and size are intermediate feature map ;Will , , and After being input into the prediction head module, the resulting value is [size missing]. The final test results The camouflage target detection model was completed.
[0044] In this embodiment, the backbone module is SMT, namely Scale-Aware Modulation Transformer.
[0045] Figure 3 The diagram shows the structure of the cross-stage feature-aware neck module according to an embodiment of the present invention. This module's function is to improve model performance by exploring the correlation between adjacent stages and refining the backbone features of each stage. The cross-stage feature-aware neck module consists of convolutional layers 1, 2, 3, 4, 5, 6, 7, and 8; feature slicing layers 1, 2, 3, and 4; bidirectional feature interaction modules (BFIM1, BFIM2, and BFIM3); and stitching layers 1, 2, 3, and 4. (The last sentence appears to be incomplete and possibly refers to a separate, unrelated concept: "...a size of...") intermediate feature map The input to the convolution kernel is After dimension adjustment of convolutional layer 1, the result is input into feature segmentation layer 1 for segmentation, resulting in segments of size 1. Two sub-feature maps and ; the size is intermediate feature map Input to After dimension adjustment of convolutional layer 2, the result is input into feature segmentation layer 2 for segmentation, resulting in segments of size 1. Two sub-feature maps and ; the size is intermediate feature map Input to After dimension adjustment of convolutional layer 3, the result is input into feature segmentation layer 3 for segmentation, resulting in segments of size 1. Two sub-feature maps and ; intermediate feature map Input to After dimension adjustment of convolutional layer 4, the result is input into feature segmentation layer 4 for segmentation, resulting in segments of size 4. Two sub-feature maps and . Without any transformation, the size is obtained as intermediate feature map ,Right now and Equal; will and The input is fed into the bidirectional feature interaction module BFIM1, resulting in a value of [size missing]. intermediate feature map and size are intermediate feature map ;Will and The input is fed into the bidirectional feature interaction module BFIM2, resulting in a value of [size missing]. intermediate feature map and size are intermediate feature map ;Will and The input is fed into the bidirectional feature interaction module BFIM3, resulting in a value of [size missing]. intermediate feature map and size are intermediate feature map ; Without any transformation, the size is obtained as intermediate feature map ,Right now and Equal. The resulting intermediate feature maps and After being concatenated in concatenation layer 1, the input is then fed into the convolutional kernel. Convolutional layer 5, resulting in a size of intermediate feature map The obtained intermediate feature map and After being concatenated in the second concatenation layer, the input is then fed into the convolutional kernel. Convolutional layer 6 yields a size of intermediate feature map The obtained intermediate feature map and After being concatenated in the concatenation layer 3, the input is then fed into the convolutional kernel. Convolutional layer 7 yields a size of intermediate feature map The obtained intermediate feature map and After being concatenated in concatenation layer 4, the input is then fed into the convolutional kernel. The convolutional layer 8 yields a size of intermediate feature map .
[0046] Figure 4 The diagram shows the structure of the Bidirectional Feature Interaction Module (BFIM) according to an embodiment of the present invention. This module's function is to effectively fuse features from two stages by constructing a bidirectional connection structure, thereby improving the network's expressive power. (BFIM) i , They have the same structure, consisting of convolutional layers 9, 10, 11, and 12; multi-scale cross-attention modulation modules (MCMB1 and MCMB2); gated depthwise convolutional feedforward modules (GDFN1 and GDFN2); pixel-wise addition operations; downsampling operations; and upsampling operations. The size is... intermediate feature map The input to the convolution kernel is Convolutional layer 9, resulting in a size of intermediate feature map , ; the size is intermediate feature map The input to the convolution kernel is Convolutional layer 10, resulting in a size of intermediate feature map ; After downsampling, the size is obtained as intermediate feature map ; After upsampling, the size is obtained as intermediate feature map ; and The input is fed into the multi-scale cross-attention modulation module MCMB1, resulting in a value of... intermediate feature map ; The input is fed into the gated depthwise convolutional feedforward module GDFN1, resulting in a value of... intermediate feature map ; The input to the convolution kernel is After convolutional layer 11, the result is the same as... Perform pixel-by-pixel addition to obtain a value of intermediate feature map ; and The input is fed into the multi-scale cross-attention modulation module MCMB2, resulting in a value of intermediate feature map ; The input is fed into the gated depthwise convolutional feedforward module GDFN2, resulting in a value of... intermediate feature map ; The input to the convolution kernel is After convolutional layer 12, the result is the same as... By adding pixels one by one, we get a size of intermediate feature map ; and This is the Bidirectional Feature Interaction Module (BFIM). i The output.
[0047] Figure 5 The diagram shown illustrates the structure of the Multi-Scale Cross-Attention Modulation (MCMB) module according to an embodiment of the present invention. This module effectively modulates features by utilizing the multi-scale long-distance dependency between two inputs, thereby significantly improving feature fusion capabilities. n , They all have the same structure, consisting of layer normalization layer 1, layer normalization layer 2, convolutional layer 13, convolutional layer 14, convolutional layer 15, convolutional layer 16, convolutional layer 17, convolutional layer 18, multi-scale feature generation module 1, multi-scale feature generation module 2, multi-scale feature generation module 3, stitching layer 5, stitching layer 6, stitching layer 7, softmax layer, depthwise convolutional layer 1, depthwise convolutional layer 2, pixel-wise addition operation, matrix multiplication operation, matrix reshaping operation, and pixel-wise multiplication operation. The size is... of The convolutional kernel passes through layer 1 (normalized) in sequence. The convolutional layer consists of 13 layers, a multi-scale feature generation module 1, a concatenation layer 5, and a convolutional kernel of type 1. After 16 convolutional layers, a matrix reshaping operation is performed to obtain a size of... Feature map , Size is of The input is fed into layer 2 of the normalization layer, resulting in a size of Feature map ; After passing through the convolution kernel in sequence The convolutional layer consists of 14 layers, a multi-scale feature generation module 2, a concatenation layer 6, and a convolutional kernel of type 14. After convolutional layer 17, a matrix reshaping operation is performed to obtain a size of Feature map ; After passing through the convolution kernel in sequence After convolutional layer 15 and multi-scale feature generation module 3, the resulting array has a size of [missing information]. Three feature maps , , Perform matrix reshaping operations on these three feature maps respectively to obtain the following results, each with a size of [missing value]. Three feature maps , , ,;Will and Perform matrix multiplication, and then pass the results through a Softmax layer before multiplying them by... , , Performing matrix multiplication yields results of size 1. Three intermediate feature maps , , ; , , After performing matrix reshaping operations separately, the results are fed together into the concatenation layer 7 for concatenation, and then fed into the convolution kernel. The results of the 18 convolutional layers are input into the convolutional kernels respectively. The depthwise convolutional layer 1 and the convolutional kernel are The second deep convolutional layer yields layers of size 2. intermediate feature map and ;Will and Perform pixel-by-pixel multiplication to obtain the result and and By adding pixels one by one, we get a size of intermediate feature map ; This refers to the Multiscale Cross-Attention Modulation Module (MCMB). n The output.
[0048] Figure 6 The diagram shows the structure of the Gated Depthwise Convolutional Feedforward (GDFN) module according to an embodiment of the present invention. This module's function is to suppress useless features and enhance useful features through a gating mechanism. Gated Depthwise Convolutional Feedforward (GDFN) module n , They have the same structure, consisting of layer normalization layer 3, convolutional layer 19, convolutional layer 20, convolutional layer 21, depthwise convolutional layer 3, depthwise convolutional layer 4, GELU layer, pixel-wise multiplication operation, and pixel-wise addition operation; their size is... intermediate feature map The input is fed into layer 3 of the normalization layer, resulting in a size of intermediate feature map ; After passing through the convolution kernel in sequence Convolutional layer 19, convolutional kernel is A deep convolutional layer 3 is used to obtain a size of intermediate feature map ; After passing through the convolution kernel in sequence The convolutional layer 20 has a convolutional kernel of... The depthwise convolutional layer 4 and GELU layer result in a size of intermediate feature map ; and Perform pixel-by-pixel multiplication, and the result is then processed by a convolution kernel. After convolutional layer 21, and Adding each pixel together, we get a size of intermediate feature map ; This is the gated depthwise feedforward module (GDFN). n The output.
[0049] Figure 7 The diagram shown illustrates the structure of the multi-scale feature generation module according to an embodiment of the present invention. This module's function is to extract multi-scale features. Multi-scale feature generation modules 1, 2, and 3 have the same structure, all consisting of a deep-dilated convolutional layer 1, a deep-dilated convolutional layer 2, and a deep-dilated convolutional layer 3. The input feature maps of the multi-scale feature generation modules are respectively input into convolutional kernels... And a depthwise dilated convolutional layer with a dilation rate of 1, and a convolutional kernel of... And a depthwise dilated convolutional layer with a porosity of 3, and a convolutional kernel of... After adding a deep dilated convolutional layer 3 with a dilation rate of 5, three outputs of the multi-scale feature generation module are obtained.
[0050] Figure 8The diagram shown illustrates the structure of the prediction head module according to an embodiment of the present invention. This module generates prediction results. The prediction head module consists of a convolutional layer 22, upsampling operations, and pixel-by-pixel summation operations; this module uses intermediate feature maps... , , and As input; After a doubling upsampling operation, the resulting size is intermediate feature map ; After a fourfold upsampling operation, the resulting size is intermediate feature map ; After an eight-fold upsampling operation, the resulting size is intermediate feature map ;Will , , , The pixels are added one by one, and the results are sequentially passed to the convolution kernel. The final detection result is obtained by performing a convolutional layer 22 and a 4x upsampling operation. .
[0051] Step 3, construct the loss function
[0052] Construct the following joint loss function:
[0053]
[0054] in This represents the weighted binary cross-entropy loss function. In this embodiment, the original weighted binary cross-entropy loss function of the SINet-V2 algorithm is used. This represents the weighted intersection-over-union (IoU) loss function. In this embodiment, the original weighted IoU loss function of the SINet-V2 algorithm is used. The final detection result obtained in step (2); express The corresponding label image; the loss function in this embodiment. and These are the original weighted cross-union loss function and weighted binary cross-entropy loss function of the SINet-V2 algorithm, respectively.
[0055] Step 4, train the detection model
[0056] The camouflage target detection training dataset obtained in step (1) is used to train the camouflage target detection model constructed in step (2). The loss value is obtained according to the loss function constructed in step (3), and the Adam optimizer is used to update the model parameters until the loss no longer decreases, thus obtaining the trained model.
[0057] Step 5, Detection of camouflaged targets
[0058] The camouflage target detection model trained in step (4) is used to detect camouflage targets in the images in the test set, and the final detection results are obtained.
[0059] Example 2
[0060] The method described in Example 1 was used to conduct camouflage target detection experiments on images from the public datasets CAMO, COD10K, and NC4K. The computer environment for this experiment was as follows: Linux Ubuntu 18.04 operating system, one NVIDIA 2080Ti 11G GPU, and PyTorch software platform.
[0061] In this embodiment, mean absolute error (MAE) and weighted F-measure are used. Structural Similarity Measure ) and Mean Enhanced Alignment Measure Four metrics were used to compare the proposed invention with seven detection networks—SINet, FAPNet, PreyNet, C2FNet-V2, SARNet, MSCAF-Net, and UEDG—on three datasets: CAMO, COD10K, and NC4K. The comparison results are shown in Table 1. , , A higher MAE value indicates better model performance, while a higher MAE value indicates worse model performance. Table 1 shows that, compared to other methods, this invention achieves optimal performance in 10 out of 12 evaluation metrics.
[0062] Table 1
[0063]
[0064] Figure 9 The image shows a comparison of camouflaged target detection results between the embodiments of the present invention and other algorithms. Figure 9 In the image, from left to right, are the input image, the ground truth image, the present invention, UEDG, MSCAF-Net, SARNet, C2FNet-V2, PreyNet, FAPNet, and SINet, respectively, representing the target detection results. Figure 9As can be seen, the model designed in this invention can not only effectively locate the camouflaged target region, but also suppress background noise and handle various challenging scenarios, including the detection of slender structures, high similarity between the target and the background, target obstruction, and multi-target detection. Overall, compared to other algorithms, the detection images generated by this invention are clearer and more accurate.
[0065] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention.
[0066] Therefore, all changes made in accordance with the structure and principles of this invention should be covered within the scope of protection of this invention.
Claims
1. A method for detecting camouflaged targets based on a cross-stage feature interaction network, characterized in that... Includes the following steps: (1) Obtain the training dataset for camouflage target detection: Obtain camouflage target images and corresponding detection labels from public databases; (2) Constructing a camouflaged target detection model: This model consists of a backbone module, a cross-stage feature perception neck module, and a prediction head module; input image After passing through the backbone module, the intermediate feature map is obtained. , , and ;Will , , and After being input into the cross-stage feature-aware neck module, an intermediate feature map is obtained. , , and ;Will , , and After being input into the prediction head module, the final detection image is obtained. Complete the construction of the camouflage target detection model; The cross-stage feature-aware neck module described in this step consists of convolutional layers 1, 2, 3, 4, 5, 6, 7, and 8; feature slicing layers 1, 2, 3, and 4; bidirectional feature interaction modules (BFIM1, BFIM2, and BFIM3); and stitching layers 1, 2, 3, and 4; [the module then] integrates the intermediate feature maps. After the input is adjusted for dimensions in convolutional layer 1, the result is input into feature segmentation layer 1 for segmentation, resulting in two sub-feature maps. and ; intermediate feature map After dimension adjustment by the input convolutional layer 2, the result is input into the feature segmentation layer 2 for segmentation, resulting in two sub-feature maps. and ; intermediate feature map After being adjusted for dimensions by the input to convolutional layer 3, the result is input to feature segmentation layer 3 for segmentation, resulting in two sub-feature maps. and ; intermediate feature map After the input is adjusted for dimensions in convolutional layer 4, the result is input into feature segmentation layer 4 for segmentation, resulting in two sub-feature maps. and ; Obtaining intermediate feature maps without any transformation ,Right now and Equal; will and The input is fed into the bidirectional feature interaction module BFIM1 to obtain two intermediate feature maps. and ;Will and The input is fed into the bidirectional feature interaction module BFIM2 to obtain two intermediate feature maps. and ;Will and The input is fed into the bidirectional feature interaction module BFIM3 to obtain two intermediate feature maps. and ; Obtaining intermediate feature maps without any transformation ,Right now and Equal; the resulting intermediate feature map and After being concatenated in concatenation layer 1, the input is then fed into convolutional layer 5 to obtain intermediate feature maps. The obtained intermediate feature map and After being concatenated in concatenation layer 2, the input is then fed into convolutional layer 6 to obtain intermediate feature maps. The obtained intermediate feature map and After being concatenated in concatenation layer 3, the input is then fed into convolutional layer 7 to obtain intermediate feature maps. The obtained intermediate feature map and After being concatenated in concatenation layer 4, the data is then fed into convolutional layer 8 to obtain intermediate feature maps. ; (3) Construct the loss function: Construct the following joint loss function: in This represents the weighted binary cross-entropy loss function; This represents the weighted intersection-union loss function; The final detection result obtained in step (2); express The corresponding label image; (4) Training the detection model: Use the camouflage target detection training dataset obtained in step (1) to train the camouflage target detection model constructed in step (2), obtain the loss value according to the loss function constructed in step (3), and use the Adam optimizer to update the model parameters until the loss no longer decreases, and obtain the trained model; (5) Camouflage target detection: Use the camouflage target detection model trained in step (4) to perform camouflage target detection on the images in the test set to obtain the final detection result.
2. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 1, characterized in that, The backbone module in step (2) uses SMT, namely Scale-Aware Modulation Transformer.
3. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 1, characterized in that, The bidirectional feature interaction module BFIM in step (2) i , They have the same structure, consisting of convolutional layer 9, convolutional layer 10, convolutional layer 11, convolutional layer 12, multi-scale cross-attention modulation module MCMB1, multi-scale cross-attention modulation module MCMB2, gated depthwise convolutional feedforward module GDFN1, gated depthwise convolutional feedforward module GDFN2, pixel-wise addition operation, downsampling operation and upsampling operation. intermediate feature map The input is fed into convolutional layer 9 to obtain intermediate feature maps. , ; intermediate feature map The input is fed into convolutional layer 10 to obtain intermediate feature maps. ; After downsampling, an intermediate feature map is obtained. ; After upsampling, an intermediate feature map is obtained. ; and The inputs are fed into the multi-scale cross-attention modulation module MCMB1 to obtain intermediate feature maps. ; The input is fed into the gated depthwise convolutional feedforward module GDFN1 to obtain intermediate feature maps. ; After inputting into convolutional layer 11, the result obtained is the same as... Perform pixel-by-pixel addition to obtain the intermediate feature map. ; and The inputs are fed into the multi-scale cross-attention modulation module MCMB2 to obtain intermediate feature maps. ; The input is fed into the gated depthwise convolutional feedforward module GDFN2 to obtain intermediate feature maps. ; After inputting into convolutional layer 12, the result is the same as... By adding pixels one by one, an intermediate feature map is obtained. ; and This is the Bidirectional Feature Interaction Module (BFIM). i The output.
4. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 3, characterized in that, The Multiscale Transattention Modulation Module (MCMB) n , They have the same structure, consisting of layer normalization layer 1, layer normalization layer 2, convolutional layer 13, convolutional layer 14, convolutional layer 15, convolutional layer 16, convolutional layer 17, convolutional layer 18, multi-scale feature generation module 1, multi-scale feature generation module 2, multi-scale feature generation module 3, stitching layer 5, stitching layer 6, stitching layer 7, softmax layer, depthwise convolutional layer 1, depthwise convolutional layer 2, pixel-wise addition operation, matrix multiplication operation, matrix reshaping operation, and pixel-wise multiplication operation; After passing through layer normalization layer 1, convolutional layer 13, multi-scale feature generation module 1, concatenation layer 5, and convolutional layer 16 in sequence, the feature map is obtained through matrix reshaping operation. , ; The input is fed into the normalization layer 2 to obtain the feature map. ; After passing through convolutional layer 14, multi-scale feature generation module 2, concatenation layer 6, and convolutional layer 17 in sequence, the feature map is obtained through matrix reshaping operation. ; After passing through convolutional layer 15 and multi-scale feature generation module 3 in sequence, three feature maps are obtained. , , The three feature maps are then subjected to matrix reshaping operations to obtain the feature maps. , , ;Will and Perform matrix multiplication, and then pass the results through a Softmax layer before multiplying them by... , , Perform matrix multiplication to obtain three intermediate feature maps. , , ; , , After performing matrix reshaping operations separately, the results are fed into concatenation layer 7 for concatenation, then into convolutional layer 18. The results are then fed into deep convolutional layer 1 and deep convolutional layer 2 to obtain intermediate feature maps. and ;Will and Perform pixel-by-pixel multiplication to obtain the result and and By adding pixels one by one, an intermediate feature map is obtained. ; This refers to the Multiscale Cross-Attention Modulation Module (MCMB). n The output.
5. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 3, characterized in that, The gated depthwise convolutional feedforward module GDFN n , They have the same structure, consisting of layer normalization layer 3, convolutional layer 19, convolutional layer 20, convolutional layer 21, depthwise convolutional layer 3, depthwise convolutional layer 4, GELU layer, pixel-wise multiplication operation, and pixel-wise addition operation. The input is fed into the normalization layer 3 to obtain the intermediate feature map. ; The intermediate feature map is obtained by sequentially passing through convolutional layer 19 and deep convolutional layer 3. ; The intermediate feature map is obtained by sequentially passing through convolutional layer 20, deep convolutional layer 4, and GELU layer. ; and After performing pixel-by-pixel multiplication, the result is passed through convolutional layer 21 and then... By adding pixels one by one, an intermediate feature map is obtained. ; This is the gated depthwise feedforward module (GDFN). n The output.
6. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 4, characterized in that, The multi-scale feature generation module 1, multi-scale feature generation module 2, and multi-scale feature generation module 3 have the same structure, all consisting of a deep-dilated convolutional layer 1, a deep-dilated convolutional layer 2, and a deep-dilated convolutional layer 3. The input feature map of the multi-scale feature generation module is input into the deep-dilated convolutional layer 1, deep-dilated convolutional layer 2, and deep-dilated convolutional layer 3 respectively, and then the three outputs of the multi-scale feature generation module are obtained.
7. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 1, characterized in that, The prediction head module in step (2) consists of a convolutional layer 22, an upsampling operation, and a pixel-by-pixel addition operation; this module uses intermediate feature maps , , and As input; After upsampling, the intermediate feature map is obtained. ; After upsampling, the intermediate feature map is obtained. ; After upsampling, the intermediate feature map is obtained. ;Will , , , Pixel-by-pixel summation is performed, and the results are sequentially passed through convolutional layer 22 and upsampling operation to obtain the final detection result. .
8. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 1, characterized in that, The loss function in step (3) The original weighted cross-union ratio loss function of the SINet-V2 algorithm is adopted.
9. The camouflaged target detection method based on a cross-stage feature interaction network as described in claim 1, characterized in that, The loss function in step (3) The original weighted binary cross-entropy loss function of the SINet-V2 algorithm is adopted.
Citation Information
Patent Citations
Camouflage target detection method based on edge feature fusion and high-order space interaction
CN116310693A
Novel camouflage target detection method and device, equipment and storage medium
CN117975504A