A camouflage target detection method based on space-frequency domain positioning and edge diffusion enhancement
By employing spatial frequency domain localization and edge diffusion enhancement techniques, and utilizing the combination of void pyramid pooling and Laplacian pyramid frequency sensing modules with gradient domain guided filtering and target-guided self-attention, the challenges of localization and segmentation in camouflaged target detection are solved, achieving higher accuracy in camouflaged target detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2023-12-29
- Publication Date
- 2026-07-21
AI Technical Summary
Existing methods for detecting camouflaged targets exhibit poor detection and migration performance when faced with low foreground-background contrast, making it difficult to achieve accurate segmentation of camouflaged objects. In particular, traditional methods are ineffective in locating and segmenting camouflaged targets when faced with challenges such as edge disruption and inherent similarity.
A spatial frequency domain localization network combined with edge diffusion enhancement technology is adopted. The initial localization of the camouflaged target is achieved through the hollow pyramid pooling and Laplacian pyramid frequency sensing module. The edge refinement of the camouflaged target segmentation map is improved layer by layer through gradient domain guided filtering and target guided self-attention module.
It significantly improves the accuracy of camouflaged target localization and segmentation, achieves more refined segmentation of camouflaged target edges, and enhances the model's attention to and segmentation effect on camouflaged target regions.
Smart Images

Figure CN117809338B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of target detection, specifically a method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement. Background Technology
[0002] In nature, many animals are adept at camouflage, such as chameleons, dead leaf butterflies, and stick insects. They blend into the natural world to better avoid predators. Animal camouflage typically involves changing its color and shape to blend into the background, making it difficult for predators to spot; or using special patterns to create false edges, making its true outline less visible. Artificial camouflage shares similarities with animals, such as using body paint and camouflage clothing to conceal oneself.
[0003] Unlike salient object detection, camouflaged object detection aims to detect and segment objects that blend seamlessly with their surroundings. Related research can facilitate many potential applications, such as subtle difference discrimination in visual perception, and various valuable real-world applications, such as hidden defect detection in industry, pest monitoring in agriculture, and polyp segmentation in medicine. This is a challenging task because it requires overcoming sophisticated camouflage strategies, including background matching and destructive coloring. This task typically faces two main challenges. The first is the intrinsic similarity challenge, where coarse localization of camouflaged objects becomes difficult when they share similar colors and patterns with their background. The second is the edge destruction challenge, stemming from the blurred boundaries of camouflaged targets, making accurate segmentation nearly impossible even with coarse localization.
[0004] To address these two challenges, traditional camouflaged object detection methods typically use color, texture, and optical flow to describe camouflaged targets. However, these methods suffer from poor detection and transfer performance when faced with low foreground-background contrast. In 2020, Fan et al., in their paper "Camouflaged object detection. In CVPR, 2020," constructed COD10K, the largest public dataset in the field of camouflaged object detection, and proposed a deep learning network, SINet. This method utilizes receptive field components (RF) to improve the network's receptive field, achieving better localization and segmentation. In 2021, Ji et al., in their paper "FastCamouflaged Object Detection via Edge-based Reversible Re-calibration Network. In PR. 2021," employed the hollow pyramid pooling module (ASPP) to achieve initial localization of camouflaged targets. In 2022, Sun et al. proposed a deep learning model, BGNet, in their paper "Boundary-Guided Camouflaged Object Detection in IJCAI.2022." This method explicitly extracts the edges of camouflaged targets through an Edge Attention Module (EAM) and enhances the model's attention to edges through edge guidance in the upsampling network. Although recent research has achieved good results and improvements, there is still significant room for improvement. For example, the feature information extracted by the backbone network often utilizes features from a spatial domain perspective, with less attention paid to the frequency domain. Regarding edge utilization, a loss-guided module is typically used to obtain edge segmentation maps, and then the edge segmentation maps are fused with features to encourage the model to focus on edges. This guides the model to focus on edges from the perspective of backpropagation of the loss; research on guiding the model to focus on edges from the perspective of forward propagation is relatively limited. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a camouflaged target detection method based on spatial frequency domain localization and edge diffusion enhancement. Initial localization of the camouflaged target is achieved by introducing hollow pyramid pooling and a Laplacian pyramid frequency sensing module into the spatial frequency domain localization network. In the context information fusion network, a receptive field module extracts more information from features and achieves channel alignment; a combination of convolution and sampling is used to fuse contextual semantic information, increasing the semantic information in shallow features. The edge diffusion enhancement module introduces gradient domain guided filtering and target-guided self-attention to enhance the model's attention to the edges of the camouflaged object, progressively improving the edge refinement of the camouflaged target segmentation map.
[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0007] A method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement specifically includes the following steps:
[0008] S1, Disguise the target image I∈R H×W×3 Input is fed into the backbone network to extract multi-scale features t i,i=1,2,3,4 , t i,i=1,2,3,4 The number of channels is {256i, i = 1, 2, 4, 8}, and the resolution is...
[0009] S2. Input the feature t4 of the backbone network stage4 into the spatial frequency domain localization network to achieve global localization of the camouflaged target in the image, and obtain the initial localization map O5 of the camouflaged target;
[0010] S3. Extract the multi-scale features t from the backbone network stage1, stage2, stage3, and stage4. i,i=1,2,3,4 The input is fed into a context information fusion network to obtain multi-scale fusion features f. k,k=1,2,3,4 ;
[0011] S4. Combine the initial localization map O5 of the camouflaged target with the multi-scale fusion feature f. k,k=1,2,3,4 The input is fed into an edge diffusion enhancement network to obtain a more refined camouflaged target segmentation map layer by layer. k,k=1,2,3,4 ;
[0012] S5. Initial positioning map O5, camouflaged target segmentation map O k,k=1,2,3,4 The loss is calculated using the ground truth graph of the training set, and the entire model is trained.
[0013] Furthermore, the backbone network described in step S1 uses a ResNet-50 network for the input camouflaged target image I∈R. H×W×3 Image augmentation preprocessing includes operations such as rotation, flipping, adding Gaussian noise, color enhancement, and data normalization.
[0014] Further, the spatial frequency domain localization network described in step S2 comprises two branches: 1) a hollow pyramid pooling branch, used to extract spatial information of high-level features; and 2) a Laplacian pyramid frequency sensing module, used to extract frequency information of high-level features. The output features of the two branches are fused and dimensionality reduced to obtain the initial localization map O5 of the camouflaged target.
[0015] Furthermore, the Laplace pyramid frequency sensing module first generates the Laplace pyramid LP using the difference of Gaussians technique. l Each layer of the pyramid's features is passed through a channel attention module (CA) to obtain a Laplacian feature pyramid (LP) with different channel attention levels. l,CA , for LPl,CA Perform fusion and dimensionality reduction to obtain high-order frequency features.
[0016] Furthermore, the context information fusion network described in step S3 includes a receptive field module (RFB).
[0017] Furthermore, the edge diffusion network described in step S4 includes a four-layer edge diffusion module (EDM). The input to the deepest edge diffusion module is the multi-scale fusion feature f4 and the initial localization map O5. The input to each subsequent layer is the fusion feature f4. k,k=1,2,3 and the output O of the previous layer edge diffusion module k,k=2,3,4 .
[0018] Furthermore, each edge diffusion enhancement module (EDM) contains two sub-modules: 1) a target-guided self-attention module (OGSA); and 2) a gradient-domain guided filtering module (GDGIF). Both sub-modules utilize the target segmentation map O. k,k=2,3,4,5 and multi-scale fusion features f k,k=1,2,3,4 The target-guided self-attention module generates the features f of the target of interest. k ′ ,k=1,2,3,4 The gradient domain guided filtering module generates segmentation map features O that are supplemented with more detailed information. k ′ ,k=1,2,3,4 The target feature f is of interest. k ′ ,k=1,2,3,4 and the segmentation map features O with added details k ′ ,k=1,2,3,4 By fusing and reducing dimensionality, a more refined segmentation map of the camouflaged target is obtained. k,k=1,2,3,4 .
[0019] Furthermore, the Target-Guided Self-Attention Module (OGSA) will generate the initial localization map O k,k=2,3,4,5 As prior knowledge, self-attention is used to improve the model's handling of multi-scale fused features f. k,k=1,2,3,4 By focusing on the camouflaged target, the characteristics f of the target of interest are obtained. k ′ ,k=1,2,3,4 .
[0020] Furthermore, the gradient domain guided filtering module GDGIF fuses multi-scale features f k,k=1,2,3,4 As a supplementary detail, a gradient domain guided filtering algorithm is used to improve the edge details of the initial localization map O5, resulting in a segmentation map feature O′ with enhanced details. k,k=1,2,3,4 The window radius of the gradient-guided filtering module GDGIF at different levels is r∈{4,8,12,16}. By setting different window radii, the model can pay attention to more edge features layer by layer, thus achieving edge diffusion.
[0021] Furthermore, in step S5, the initial positioning map O5 and the camouflaged target segmentation map O5 are...k,k=1,2,3,4 The structured loss function selected for calculating the loss using the ground truth graph of the training set is the weighted binary cross-entropy loss. Weighted intersection and combination loss and uncertainty perception loss L UAL To handle multi-scale outputs, all outputs O are processed during training. k=1,2,3,4,5 Upsampling is performed to match the resolution of the ground truth (GT) segmentation map. The model's dependence on the output map of different edge diffusion modules varies, and the loss weights for the output maps of different layers are as follows:
[0022] Furthermore, the formula for the total loss function L of the camouflaged target detection model is as follows:
[0023]
[0024] Where k represents different network layers; O k This represents the segmentation map of camouflaged targets at different layers; GT represents the ground truth label of the camouflaged target. For weighted binary cross-entropy loss, For weighted average loss; L UAL The uncertainty perception loss is for the final segmentation map O1.
[0025] The beneficial effects of this invention are as follows: In the spatial-frequency domain localization network, this invention achieves initial localization of camouflaged targets in the spatial and frequency domains through the dilated convolutional pyramid and Laplacian pyramid frequency perception modules, significantly improving the accuracy of camouflaged target localization and providing an initial localization map for subsequent edge detail enhancement; in the edge diffusion enhancement module, gradient domain guided filtering enables the model to obtain more perception of the edges of camouflaged targets, supplementing the edge details of the previous level segmentation map; through the target-guided self-attention module, the model focuses on the camouflaged target region from the perspective of the global receptive field, making the segmentation result more accurate in localization, more complete in structure, and more refined in edges. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the overall implementation of a camouflaged target detection method based on spatial frequency domain localization and edge diffusion enhancement according to the present invention.
[0027] Figure 2 This is a flowchart illustrating the implementation of the Aperture Pooled Pyramid (ASPP) according to an embodiment of the present invention.
[0028] Figure 3 This is a flowchart illustrating the implementation of the Laplace Pyramid Frequency Sensing Module (LPFAM) according to an embodiment of the present invention.
[0029] Figure 4 This is a flowchart illustrating the implementation of the receptive field module RFB according to an embodiment of the present invention.
[0030] Figure 5 This is a flowchart illustrating the implementation of the Edge Diffusion Enhancement Module (EDM) according to an embodiment of the present invention.
[0031] Figure 6 This is a pseudocode diagram of the gradient domain guided filtering (GDGIF) algorithm described in an embodiment of the present invention;
[0032] Figure 7 This is a flowchart illustrating the implementation of Target-Guided Self-Attention (OGSA) according to an embodiment of the present invention.
[0033] Figure 8 This is a schematic diagram illustrating a qualitative comparison between six mainstream camouflage target segmentation models and the method of this invention in a comparative experiment of embodiments of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present application and corresponding drawings; obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0035] Example: Figure 1 As shown, a camouflaged target detection method based on spatial frequency domain localization and edge diffusion enhancement is presented in this invention. The camouflaged target detection network model includes a backbone network, a spatial frequency domain localization network, a context information fusion network, and an edge diffusion enhancement network. The backbone network uses the RestNet-50 model from the ResNet series to extract multi-scale features t from images containing camouflaged targets. i,i=1,2,3,4 Since most camouflage target detection algorithms in recent years have adopted ResNet-50, it was also chosen as the backbone network here to verify the effectiveness of the module through comparative experiments. The spatial frequency domain localization network is used to achieve the initial localization of the camouflage target. It contains two branches: the hollow pyramid pooling (ASPP) branch is used to extract the spatial information of high-level features, and the Laplacian pyramid frequency awareness (LPFAM) module is used to extract the frequency information of high-level features. The two are fused to achieve the initial localization of the camouflage target. The context information fusion network introduces the receptive field module RFB to obtain more feature information. Through convolution and sampling, deep abstract information is combined with shallow detail information to generate the fused multi-scale feature f. k,k=1,2,3,4 The edge diffusion enhancement network generates segmentation maps in a multi-level, progressively enhanced manner, incorporating gradient domain guided filtering (GDGIF) and target-guided self-attention (OGSA). The target-guided self-attention module generates the features f of the target of interest. k ′ ,k=1,2,3,4 The gradient domain guided filtering module generates segmentation map features O that are supplemented with more detailed information. k ′,k=1,2,3,4 The target feature f is of interest. k ′ ,k=1,2,3,4 and the segmentation map features O with added details k ′ ,k=1,2,3,4 By fusing and reducing dimensionality, a more refined segmentation map of the camouflaged target is obtained. k,k=1,2,3,4 .
[0036] The camouflaged target detection method based on spatial frequency domain localization and edge diffusion enhancement described in this invention includes the following:
[0037] Step 1: Disguise the target image I∈R H×W×3 Input is fed into the backbone network to extract multi-scale features t i,i=1,2,3,4 . t i,i=1,2,3,4 The number of channels is {256i, i = 1, 2, 4, 8}, and the resolution is...
[0038] In this embodiment, the backbone network uses a ResNet-50 network, and the input camouflaged target image I∈R is used. H×W×3 Image augmentation preprocessing includes operations such as rotation, flipping, adding Gaussian noise, color enhancement, and data normalization.
[0039] Step 2: Input the feature t4 of the backbone network stage4 into the spatial frequency domain localization network to achieve global localization of the camouflaged target in the image, and obtain the initial localization map O5 of the camouflaged target;
[0040] In this embodiment, the spatial frequency domain localization network comprises two branches: 1) Hollow Pyramid Pooling (ASPP) for extracting spatial information of high-level features; and 2) Laplacian Pyramid Frequency Awareness (LPFAM) for extracting frequency information of high-level features. The output features of the two branches are fused and dimensionality reduced to obtain the initial localization map O5 of the camouflaged target.
[0041] Figure 2 The flowchart below shows the implementation of the dilated pyramid pooling ASPP according to an embodiment of the present invention. The dilated pyramid pooling ASPP captures contextual information at different scales by using different dilate rates ∈ {6, 12, 18}. Smaller convolution rates can capture detailed information at smaller scales, while larger convolution rates can capture global information at larger scales. By concatenating features at different scales and then performing convolution operations, a feature that integrates multi-scale spatial information is finally obtained.
[0042] Figure 3 This is a flowchart illustrating the implementation of the Laplace Pyramid Frequency Awareness Module (LPFAM) according to an embodiment of the present invention. For the input high-level feature t4∈R... H×W×CFirst, Gaussian pyramids are generated using different Gaussian kernel functions. The formula for generating a Gaussian pyramid is as follows:
[0043]
[0044] Where, σ l σ represents the variance of the l-th Gaussian kernel function, i and j represent the coordinates of the center point of the encoded feature space, and * represents the convolution operation. To extract frequency information at different scales, σ... l The size gradually increases, becoming σ. l ∈{3, 5, 7, 9}, the Laplace pyramid of level l LP l It can be generated using the following formula:
[0045]
[0046] Among them, G l is the output of the Gaussian function of the l-th level, and L is the pyramid energy level number;
[0047] The obtained Laplace Pyramid LP l The importance of each channel is adjusted through a channel attention module, focusing more on channels useful for the current task and reducing attention to irrelevant or redundant information. First, the feature map of each channel is reduced to a scalar value using average pooling and max pooling. Then, multiple fully connected layers are used to learn the channel importance weights. These weights are normalized using the sigmoid activation function to ensure that each weight is between 0 and 1. After calculating the channel weights, they are multiplied with the corresponding channel's feature map, enabling the model to acquire channel attention. The l-th level Laplacian pyramid (LP) is then used. l The output LP after passing through the channel attention module l,CA It can be generated using the following formula:
[0048]
[0049] MLP stands for multiple fully connected layers. This represents element-wise multiplication. In obtaining LP... l,CA Then, channel dimensions are reduced by channel concatenation and convolution operations to reduce redundant information and obtain output features.
[0050] Step 3: Extract the multi-scale features t from the backbone network stages 1, 2, 3, and 4. i,i=1,2,3,4 The input is fed into a context information fusion network to obtain multi-scale fusion features f. k,k=1,2,3,4 ;
[0051] In this embodiment, a receptive field module (RFB) is introduced into the context information fusion network to obtain more feature information, such as... Figure 4 As shown, convolution and sampling are used to combine deep abstract information with shallow detailed information to generate a fused multi-scale feature f. k,k=1,2,3,4 .
[0052] Step four: Combine the initial localization map O5 of the camouflaged target with the multi-scale fusion feature f. k,k=1,2,3,4 The input is fed into an edge diffusion enhancement network to obtain a more refined camouflaged target segmentation map layer by layer. k,k=1,2,3,4 ;
[0053] In this embodiment, the edge diffusion network contains four layers of edge diffusion modules (EDM). The input of the deepest edge diffusion module is the multi-scale fusion feature f4 and the initial localization map O5. The input of each subsequent layer is the fusion feature f. k,k=1,2,3 and the output O of the previous layer edge diffusion module k,k=2,3,4 ;
[0054] Figure 5 This is a flowchart illustrating the implementation of the Edge Diffusion Enhancement Module (EDM) according to an embodiment of the present invention. The Edge Diffusion Enhancement Module (EDM) contains two sub-modules: 1) Target Guided Self-Attention Module (OGSA); 2) Gradient Domain Guided Filtering Module (GDGIF). Both sub-modules utilize the target segmentation map from the previous stage. k,k=2,3,4,5 and multi-scale fusion features f k,k=1,2,3,4 First, the target segmentation map O of the previous level needs to be segmented. k,k=2,3,4,5 Perform upsampling and channel stacking, and dimension alignment to obtain... The target-guided self-attention module generates the feature f′ of the target of interest. k,k=1,2,3,4 The gradient domain guided filtering module generates segmentation map features O′ that are supplemented with more detailed information. k,k=1,2,3,4 The target feature f′ of interest k,k=1,2,3,4 and the segmentation map features O′ with added details k,k=1,2,3,4 By fusing and reducing dimensionality, a more refined segmentation map of the camouflaged target is obtained. k,k=1,2,3,4 ;
[0055] Figure 6 The pseudocode for the gradient-domain guided filtering (GDGIF) algorithm is as follows: Figure 6 As shown, gradient-domain guided filtering is a traditional algorithm, which is introduced here to fuse multi-scale features f. k,k=1,2,3,4 As a supplement to the details, the edge details of the initial localization map O5 are improved to obtain the segmentation map feature O′ with added details. k,k=1,2,3,4 ;
[0056] Multiscale features f k,k=1,2,3,4 Each channel serves as a guide diagram I, Each channel serves as the input image x, and the output image after gradient domain guided filtering is Z. The relationship between Z and I is as follows:
[0057]
[0058] Where Z(p) represents the filtered output of pixel p, Ω ζ(p′) This represents a window centered at p′ with radius ζ. and The first and second average filtering parameters for pixel p are represented in window Ω. ζ(p′) The inner is a constant, for and It can be obtained through the following formula:
[0059]
[0060]
[0061] Among them, Ω ζ(p) Represents a window centered at pixel p with radius ζ, |Ω ζ(p) | indicates the number of windows, for Ω ζ(p) The first and second optimal filtering parameters a for each window p pixel. p′ and b p′ This can be achieved by minimizing the cost function E(a) p′ ,b p′ ) obtain, E(a p′ ,b p′ The formula is as follows:
[0062]
[0063] Where λ is the regularization parameter, and γ p' As an edge-sensing factor, a can be obtained by linear regression of the above equation. p′ and b p′ :
[0064]
[0065] b p' =μ x,ζ (p')-a p' μ I,ζ (p')
[0066] Where, μ I⊙x,ζ (p') represents the average value of the dot product of the guide graph I and the input graph x within a window centered at p' and with a radius of ζ, μ I,ζ (p') represents the average value of guide map I within a window centered at p' with radius ζ, μ x,ζ (p') represents the average value of the input graph x within a window centered at p' and with a radius of ζ. This represents the variance of the guide graph I within a window centered at p' and with radius ζ, expressed by the relationship between variance and expectation: D(X) = E(X). 2 )-[E(X)] 2 It can be known that:
[0067]
[0068] In addition, edge perception factors and γ p' They are respectively:
[0069]
[0070]
[0071] Where, χ(p')=σ I,1 (p')σ I,ζ (p'), μ χ,∞ Let χ(p) represent the mean.
[0072] The window radius of the gradient-guided filtering module GDGIF at different levels is r∈{4,8,12,16}. By setting different window radii, the model can pay attention to more edge features layer by layer, thus achieving edge diffusion.
[0073] Figure 7 The flowchart for the implementation of the target-guided sub-attention OGSA is as follows: Figure 7 As shown, the Target-Guided Self-Attention Module (OGSA) will generate the initial localization map O. k,k=2,3,4,5 As prior knowledge, self-attention is used to improve the model's handling of multi-scale fused features f. k,k=1,2,3,4 By focusing on the camouflaged target, the characteristics f′ of the target of interest are obtained. k,k=1,2,3,4 The formula is as follows:
[0074]
[0075] in, d represents matrix multiplication, * represents dot product, and d represents matrix multiplication. m This indicates the dimension of V, to avoid the product of Q and K being too large.
[0076] Step 5: Combine the initial positioning map O5 and the camouflaged target segmentation map O k,k=1,2,3,4 The loss is calculated using the ground truth graph of the training set, and the entire model is trained.
[0077] In this embodiment, the loss function used to train the model is the weighted binary cross-entropy loss. Weighted intersection and combination loss and uncertainty perception loss L UALTo handle multi-scale outputs, all outputs O are processed during training. k=1,2,3,4,5 Upsampling is performed to match the resolution of the ground truth (GT) segmentation map. The model has different dependencies on the output maps of different edge diffusion modules, and the loss weights for the output maps of different layers are as follows:
[0078] The formula for the total loss function L of the camouflage target detection model is as follows:
[0079]
[0080] Where k represents different network layers; O k This represents the segmentation map of camouflaged targets at different layers; GT represents the ground truth label of the camouflaged target. For weighted binary cross-entropy loss, For weighted average loss; L UAL The uncertainty perception loss is for the final segmentation map O1.
[0081] To verify the effectiveness of this invention, the segmentation results of six mainstream camouflage target segmentation models—DGNet, BGNet, LSR, R-MGL, S-MGL, and SINet—were tested on parts of the camouflage target datasets CAMO, CHAMELEON, COD10K, and NC4K, and compared with the camouflage target prediction results of this invention.
[0082] The experimental simulation results of the camouflaged target detection method based on attention mechanism and convolutional neural network of the present invention are as follows:
[0083] The experimental platform used a 64-bit Ubuntu system, version 20.04.4, with a GeForce RTX 3090 GPU. Python 3.8 was used as the programming language, and VSCode was used as the software development platform. The model was implemented using the deep learning framework PyTorch 1.8. The input image was a 3-channel RGB image with a size of 384×384. During the training phase, the batch size was 16, the number of epochs was 300, and the Adam optimizer was used to optimize the parameters. The initial learning rate was set to 1e-4, and the cosine annealing learning rate was selected as the learning rate descent strategy. Each cycle was 40 epochs, and the minimum learning rate was 1e-6. With the acceleration of two GeForce RTX 3090 GPUs, the entire network training time was approximately 10 hours. Figure 8This paper compares the image segmentation results of six mainstream camouflage target segmentation models with the method of this invention on different camouflage target datasets in a comparative experiment of embodiments of this invention. GT represents the salience label of the camouflage target, and Our represents the camouflage target prediction result of this invention. The comparison shows that this invention can effectively detect camouflage targets and refine the edge contours of camouflage targets, thereby improving the accuracy of camouflage target detection.
[0084] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the scope of protection of the present invention.
Claims
1. A method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement, characterized in that, Includes the following steps: S1. Disguise the target image Input is fed into the backbone network to extract multi-scale features. , The number of channels is The resolution is ; S2, Features of the backbone network stage 4 The image is input into a spatial frequency domain localization network to achieve global localization of the camouflaged target, resulting in an initial localization map of the camouflaged target. ; S3. Extract the multi-scale features from the backbone network stages 1, 2, 3, and 4. Input is fed into a context information fusion network to obtain multi-scale fused features. ; S4. Initial positioning map of the camouflaged target. and multi-scale fusion features The input is fed into an edge diffusion enhancement network to obtain a more refined camouflaged target segmentation map layer by layer. ; S5. Initial positioning map Target segmentation map The loss is calculated using the ground truth graph of the training set, and the entire model is trained. In step S1, the backbone network uses a ResNet50 network. The input camouflaged target image undergoes image augmentation preprocessing, including rotation, flipping, adding Gaussian noise, color enhancement, and data normalization. The spatial frequency domain localization network in step S2 includes two branches: a hollow pyramid pooling branch, which is used to extract spatial information of high-level features. The Laplacian frequency sensing module is used to extract frequency information from high-level features, fuse the output features of the two branches, and reduce their dimensionality to obtain the initial localization map of the camouflaged target. ; The Laplacian frequency sensing module first generates a Laplacian pyramid using the difference of Gaussian technique. Then, it passes each layer of the pyramid through a channel attention module to obtain Laplacian feature pyramids with different channel attention. Finally, it fuses and reduces the dimensionality of the Laplacian feature pyramids to obtain higher-order frequency features. The context information fusion network in step S3 includes a receptive field module; The edge diffusion enhancement network in step S4 contains four edge diffusion modules, with the input of the deepest edge diffusion module being multi-scale fusion features. and initial positioning map The input for each subsequent layer is the fused feature. and the output of the previous layer edge diffusion module .
2. The method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement according to claim 1, characterized in that, Each edge diffusion enhancement module contains two sub-modules: a target-guided self-attention module and a gradient-domain guided filtering module; both sub-modules utilize the camouflaged target segmentation map. and multi-scale fusion features The target-guided self-attention module generates features of the target of interest. The gradient domain guided filtering module generates segmentation map features with added details. ; Features of the target of interest and segmentation map features with added details By fusing and reducing dimensionality, a more refined segmentation map of the camouflaged target is obtained. .
3. The method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement according to claim 2, characterized in that, The target-guided self-attention module will initialize the localization map. As prior knowledge, self-attention is used to improve the model's handling of multi-scale fused features. By focusing on camouflaged targets, the characteristics of the targets of interest can be obtained. .
4. The method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement according to claim 3, characterized in that, The gradient domain guided filtering module fuses features at multiple scales. As a supplementary detail, gradient domain guided filtering algorithm is used to improve the initial localization map. Edge details are obtained to acquire segmentation map features with added details. The window radius of gradient-guided filtering modules at different levels is By setting different window radii, the model can focus on more edge features layer by layer, thus achieving edge diffusion.
5. The method for detecting camouflaged targets based on spatial frequency domain localization and edge diffusion enhancement according to claim 1, characterized in that, In step S5, the initial positioning map is... Target segmentation map The structured loss function selected for calculating the loss using the ground truth graph of the training set is the weighted binary cross-entropy loss. Weighted average loss and uncertainty perception loss During training, all outputs Upsampling is performed to match the resolution of the ground truth map (GT) for segmentation. The loss weights for the output maps of different layers are as follows: ; Total loss function of camouflaged target detection model The specific formula is as follows: , in, Indicates different network layers. This represents a segmentation map of camouflaged targets at different layers. Indicates the truth label of the masquerading target. For weighted binary cross-entropy loss, For weighted average loss, For the final segmentation image Uncertainty perception loss.