A method for detecting camouflaged targets based on the fusion of local and global features
By using the MSFM and LGFFM modules in the FLGNet network, the fusion of high-level semantic information and low-level edge features is achieved, which solves the problems of blurred target boundaries and insufficient feature fusion in camouflaged target detection and improves detection accuracy.
Patent Information
- Application Number
- CN202411787080.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Existing camouflaged target detection methods struggle to effectively identify subtle edges and complex structures of targets when they are highly similar to the background. This results in blurred target boundaries in the detection results. Furthermore, the fusion of global and local features is insufficient, making it difficult to capture both the overall shape and local details of the target simultaneously.
Design a camouflage target detection network (FLGNet) that fuses multi-level feature maps layer by layer through a multi-scale fusion module (MSFM) to combine high-level semantic information with low-level edge features, and uses a local-global feature fusion module (LGFFM) to integrate local edge features and global semantic information to generate accurate edge feature maps.
It significantly improves the accuracy of camouflaged target detection, accurately capturing the subtle edges and overall shape of targets against complex backgrounds, and solves key challenges in camouflaged target detection.
Smart Images

Figure CN119741472B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of camouflage target detection technology, and in particular relates to a camouflage target detection method based on the fusion of local and global features. Background Technology
[0002] Camouflage target detection is a crucial task in computer vision, with its core objective being the accurate identification and segmentation of camouflaged objects that closely resemble their environment from complex backgrounds. Camouflaged targets often use clever design in color, texture, and shape to confuse visual perception, making them virtually invisible in their natural environment. Camouflage target detection has broad application potential in multiple fields. For example, in wildlife conservation, researchers hope to assess ecological health by monitoring the activity of camouflaged animals, or facilitate the discovery of new species by identifying the presence of camouflaged species; in the military field, timely identification of enemy camouflaged targets is crucial for the formulation of combat strategies; in medical image analysis, identifying lesion areas similar to surrounding tissues is equally important, for example, in tasks such as polyp segmentation and lung infection segmentation. Therefore, camouflage target detection is a highly valuable research task. Due to the high similarity between camouflaged objects and the background, both the human eye and machines struggle to effectively identify these targets. This visual confusion makes camouflage target detection (COD) an extremely challenging task.
[0003] The primary challenge of camouflaged object detection (COD) lies in the high similarity between the target and the background. This similarity is not only reflected in the fusion of color, texture, and shape, but more profoundly, it interferes with visual perception mechanisms, making it difficult for models to extract meaningful distinguishing features. Camouflaged objects often blend seamlessly into the background visually by highly overlapping features, resulting in extremely weak, even imperceptible, visual differences between the target and the background. In such scenarios, traditional detection methods often fail because they rely on significant differences to distinguish foreground from background. This high similarity makes it difficult for traditional detection methods to effectively distinguish between the target and the background, especially when dealing with complex backgrounds where the target's boundaries are often blurred.
[0004] Secondly, the effective fusion of global and local features is also a key challenge in camouflaged target detection. Global features typically provide information about the overall shape and structure of the target, which is very helpful in understanding the target's approximate location in a complex background. However, global features often overlook the details of the target, especially in terms of edge and texture information. Local features, on the other hand, can capture subtle edges and local texture information of the target, but lack a global understanding of the target's overall shape.
[0005] As can be seen from the above, there are several problems with existing methods. First, when dealing with targets that are highly similar to the background, the models struggle to effectively identify the subtle edges and complex structures of the targets, resulting in blurred target boundaries in the detection results. Second, many network architectures are insufficient in fusing global and local features, making it difficult to simultaneously capture the overall shape and local details of the target.
[0006] Based on this, this invention proposes a camouflage target detection method based on the fusion of local and global features. The invention designs a camouflage target detection network (FLGNet), which fuses multi-level feature maps layer by layer through a multi-scale fusion module (MSFM), combining high-level semantic information with low-level edge features to generate accurate edge feature maps that distinguish camouflage targets from the background. Simultaneously, a local-global feature fusion module (LGFFM) further integrates local edge features and global semantic information, thereby significantly improving detection accuracy and solving a key challenge in camouflage target detection. Summary of the Invention
[0007] The purpose of this invention is to provide a camouflaged target detection method based on the fusion of local and global features, in order to solve the problems of the existing methods proposed in the background art. On the one hand, when the target and the background are highly similar, it is difficult to effectively identify the subtle edges and complex structures of the target, resulting in unclear boundaries of the target in the detection results; on the other hand, it is insufficient in the fusion of global and local features, making it difficult to capture the overall shape and local details of the target at the same time.
[0008] To achieve the above objectives, the present invention employs the following technical solution:
[0009] This invention proposes a method for detecting camouflaged targets based on the fusion of local and global features, comprising the following steps:
[0010] S1. Extract preliminary features from different levels of the detected image;
[0011] S2. For the preliminary features at each level, convolution operation is used to compress the channels during the multi-level feature fusion process to obtain intermediate features containing global semantic information. The global semantic information in the deep features and the local edge features in the shallow features are fused using a top-down feature fusion strategy to obtain the edge feature map.
[0012] S3. The preliminary features at each level are fused with the edge feature map to obtain local features at different levels.
[0013] S4. Using deep-level fusion features as shallow-level global features, the local features, intermediate features and global features of each level are fused through a local and global dual-channel mechanism to obtain context-enhanced feature maps at different levels.
[0014] S5. Perform simple convolution operations on the context enhancement feature maps at different levels to generate camouflaged target feature maps.
[0015] Preferably, in step S1, a Backbone network is used to extract preliminary features at different levels of the detection image.
[0016] Preferably, step S2 is as follows:
[0017] For the initial features F_4, F_3, F_2, and F_1 at different levels; firstly, the deep feature map F_4 is compressed using a 1×1 convolution to obtain P_4; then, P_4 is upsampled to the same size as the shallow feature map F_3 using bilinear interpolation, and then concatenated to form the feature map F_{43}, which is then processed by a 3×3 convolution to generate the optimized feature P_3; represented as follows:
[0018] P_3=T_{conv3}(C(U(T_{conv1}(F_4)),F_3))
[0019] Where T_{conv3} represents a 3×3 convolution, T_{conv1} represents a 1×1 convolution, C represents concatenation, and U represents upsampling;
[0020] Subsequently, this operation is repeated, upsampling the optimized P_3 and concatenating it with F_2 to obtain F_{32}, which is then optimized through a 3×3 convolutional layer to generate P_2. Finally, P_2 is upsampled and fused with F_1 in the same way to generate the lowest-level optimized feature P_1; represented as follows:
[0021] P_1=T_{conv3}(C(U(T_{conv3}(C(U(P3),F_2))),F_1))
[0022] Finally, the optimized P_1 is input into two 3×3 convolutions to further extract and optimize edge features, and finally outputs the edge feature map O_e through a 1×1 convolution.
[0023] The S2 is implemented using a multi-scale fusion module (MSFM). In order to solve the problem of the high similarity between the camouflaged target and the background, the MSFM module achieves a balance between global understanding and local detail capture by fusing high-level global semantic information and low-level local edge details layer by layer, thereby extracting accurate edge features and distinguishing the camouflaged target from the background.
[0024] First, the highest-level feature map F4 is compressed using a 1×1 convolution, reducing its channel count from 512 to 256. This step reduces computational complexity while preserving crucial global semantic information, enabling higher-level features to participate more efficiently in subsequent fusion. Next, the compressed feature P4 is upsampled using bilinear interpolation to the same resolution as the next-layer feature map F3, ensuring alignment between high-level semantic information and low-level detail features, laying the foundation for subsequent fusion. Then, P4 and F3 are concatenated to form a richer feature map F43. This concatenation combines high-level global structural understanding with low-level edge detail capture, giving the feature map a more comprehensive information representation capability. Finally, F43 is optimized using a 3×3 convolution to further integrate the concatenated multi-layer information, remove redundant features, and extract more precise edge information.
[0025] This process is repeated layer by layer, upsampling the generated feature map P3 sequentially and fusing it with the shallower feature map F2 to generate F32, which is then optimized through convolution to generate P2. Finally, P2 is upsampled and fused with the lowest-level feature map F1 to generate P1. This progressive design fully integrates high-level semantic information with shallow edge details, enabling the model to possess both global understanding and detail capture capabilities in complex backgrounds. Finally, P1 is further extracted and optimized through additional 3×3 and 1×1 convolutions, outputting the final edge feature map Oe. This feature map accurately aggregates multi-scale information, preserving both low-level edge details and high-level global semantics, enabling precise differentiation between camouflaged targets and the background, significantly improving detection performance in complex scenes.
[0026] Preferably, step S3 is as follows: using the EFM module in BGNet, the preliminary features are combined with the edge feature map to obtain local features.
[0027] Preferably, step S4 is as follows:
[0028] For features at different levels, including local features Li (i = 1, 2, 3, 4), global features G (i = 1, 2, 3), and intermediate features P (i = 1, 2, 3, 4);
[0029] First, the input features are combined through concatenation to form richer features. Then, a 1×1 convolution is used to compress the channels of the concatenated feature maps, as shown in the following formula:
[0030]
[0031] Where C represents the feature concatenation operation, T_{conv1} represents the 1×1 convolution operation, and T_m represents the input features;
[0032] Secondly, dilated convolution operations with different dilation rates are used to extract local and global features respectively; the dilation rate for local feature extraction is less than that for global feature extraction.
[0033] Finally, after the local and global features are extracted, the final local and global feature maps are combined through a concatenation operation. The fused features are then compressed using a 1×1 convolution, and added to the original input features via residual connections. The added features are further processed through a 3×3 convolutional layer. The final context-enhanced feature map H_i (i = 1, 2, 3, 4) is expressed as follows:
[0034]
[0035] Where L_{f3} and G_{f3} are the final local feature map and global feature map, respectively;
[0036] The fused context-enhanced feature map H_i (i = 4, 3, 2) uses the deep-level fused features as the shallow-level global features, corresponding to the global feature map G_i (i = 3, 2, 1).
[0037] Furthermore, the local features are extracted layer by layer through convolution operations with different dilation rates (d=1, d=2, d=3), as follows:
[0038] L_{f1}=Conv_{3×3,d=1}(T_m)
[0039]
[0040] Where Conv_{3×3,d=1} represents a dilated convolution of 3×3 with d=1, and d represents the dilation rate. G_{fi}(i=1,2) represents the global feature map obtained by the global operation; L_{fi}(i=1,2,3) represents the local feature map obtained by the local operation.
[0041] Furthermore, the global features are extracted layer by layer through convolution operations with different dilation rates (d=3, d=4, d=5). The global features are extracted using a larger dilation rate, and these larger receptive fields help capture the global contextual information of the input features. Specifically:
[0042] G_{f1}=Conv_{3×3,d=3}(T_m⊕L_{f1})
[0043] G_{f2}=Conv_{3×3,d=4}(G_{f1}⊕L_{f2})
[0044] G_{f3}=Conv_{3×3,d=5}(G_{f2}⊕L_{f3})
[0045] Where L_{fi}(i=1,2,3) is the local feature map obtained by the local operation.
[0046] Preferably, step S5 is as follows:
[0047] Perform a 1×1 convolution operation on the three layers of context-enhanced feature maps H_i (i=1,2,3) to generate camouflage target prediction features O_i (i=1,2,3), and select O_1 as the final prediction target.
[0048] Another aspect of this invention proposes a camouflaged target detection model based on the fusion of local and global features, comprising:
[0049] The feature extraction module uses a Backbone network to extract preliminary features at different levels of the detection image;
[0050] The multi-scale fusion module adopts a top-down feature fusion strategy. For the input preliminary features at different levels, it performs multi-level feature fusion of global semantic information in deep features and local edge features in shallow features to obtain an edge feature map; and extracts intermediate features containing global semantic information at different levels.
[0051] The edge-guided feature module adopts the EFM module in BGNet to combine the preliminary features with the edge feature map to obtain local features.
[0052] The local-to-global feature fusion module fuses local, intermediate, and global features at each level through a dual-channel mechanism of local and global features.
[0053] First, a multi-scale fusion module (MSFM) was designed. The MSFM module employs a top-down feature fusion strategy, fusing global semantic information from deep features with local edge features from shallow features. Starting from the highest layer F4, each layer's features are progressively compressed and upsampled through convolution, and then concatenated with the next layer. This continuous processing continues until the lowest layer F1, ultimately fusing global semantics and local edge features to generate a refined edge feature map, thereby distinguishing the camouflaged target from the background. Through this multi-level feature fusion, the model achieves a balance between global understanding and local detail capture, thus extracting accurate edge information of the camouflaged target.
[0054] Then, the Edge Guided Feature (EFM) module from BGNet is directly introduced. This module further enhances the edge perception capability of the feature map by combining the edge feature map with the feature maps of each level output by the backbone.
[0055] Secondly, a Local-Global Feature Fusion (LGFFM) module was designed. This module effectively integrates the global semantic information of the camouflaged target with the local edge features of the camouflaged target at various levels enhanced by EFM through a dual-channel mechanism of local and global features. Specifically, global features help the model understand the overall shape and position information of the camouflaged target, while local features enhance the ability to capture subtle visual differences in edge information. To further improve the fusion of local and global information, the intermediate features extracted from MSFM by the LGFFM module serve as a bridge between local and global information, enabling the model to accurately capture details and grasp global information in complex backgrounds. In this way, the LGFFM module ensures that the model can better perform feature fusion and detect camouflaged targets in complex scenes.
[0056] Compared with the prior art, the beneficial effects of the present invention are:
[0057] (1) The multi-scale fusion module and the local-global feature fusion module are the key technologies of this invention. By designing the multi-scale fusion module, multi-level feature maps are fused layer by layer, combining high-level semantic information with low-level edge features to generate accurate edge feature maps that distinguish camouflaged targets from the background. At the same time, the local-global feature fusion module is designed to further integrate local edge features and global semantic information, thereby significantly improving detection accuracy and solving key problems in camouflaged target detection.
[0058] (2) The multi-scale fusion module designed in the camouflage target detection method of the present invention uses a top-down feature fusion strategy to combine global semantic information in deep features with local edge features in shallow features, thereby achieving a balance between global understanding and local detail capture, and thus extracting the accurate edge information of the camouflage target.
[0059] (3) The local and global feature fusion module designed in the camouflage target detection method of the present invention effectively integrates the global semantic information of the camouflage target with the local edge features of the camouflage target at each level through the local and global dual-channel mechanism, ensuring that the model can better perform feature fusion and detect camouflage targets in complex scenarios. Attached Figure Description
[0060] Figure 1 This is a structural block diagram of the camouflage target detection network based on the fusion of local and global features in this invention;
[0061] Figure 2 This is a structural block diagram of the multi-scale fusion module in this invention;
[0062] Figure 3 This is a structural block diagram of the local-to-global feature fusion module in this invention;
[0063] Figure 4This is a schematic diagram illustrating a qualitative comparison between the method of this invention and other methods. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] Example 1:
[0066] This invention proposes a camouflage target detection method based on the fusion of local and whole-local features. The overall framework diagram of this camouflage target detection network is shown below. Figure 1 As shown. The camouflage target detection method in this invention is as follows:
[0067] Step 1: Obtain feature maps at each level;
[0068] The detected image is input into the Backbone network, which uses feature maps extracted from various levels by Backbone.
[0069] Step 2: Construct a multi-scale fusion module (MSFM) to obtain edge feature maps;
[0070] To address the issue of high similarity between the target and background, this invention designs a multi-scale fusion module (MSFM). The MSFM module employs a top-down feature fusion strategy to combine global semantic information from deep features with local edge features from shallow features. Figure 2 As shown, starting from the highest layer F4, the features of each layer are progressively compressed and upsampled through convolution, and then concatenated with the next layer. This continuous processing continues until the lowest layer F1. Finally, global semantics and local edge features are fused to generate a fine edge feature map, thereby distinguishing the camouflaged target from the background. Through this multi-level feature fusion, the model achieves a balance between global understanding and local detail capture, thus extracting accurate edge information of the camouflaged target.
[0071] The overall operation process of the multi-scale fusion module is as follows: Figure 2As shown, the MSFM module extracts precise edge features related to the camouflaged target by combining low-level local edge information and high-level global semantic information. First, the MSFM module uses a 1×1 convolution to compress the high-level feature map F_4 from 512 to 256 channels, reducing computational complexity while preserving global semantic information to ensure the model effectively processes high-level features. Next, bilinear interpolation is used to upsample the convolutional result P_4 to the same size as the low-level feature map F_3, and then they are concatenated to form a richer feature map F_{43}. This is then processed by a 3×3 convolution to generate the optimized feature P_3. This step helps the model fuse global semantic information and local edge details. The representation is as follows:
[0072] P_3=T_{conv3}(C(U(T_{conv1}(F_4)),F_3))
[0073] Where T_{conv3} represents a 3×3 convolution, T_{conv1} represents a 1×1 convolution, C represents concatenation, and U represents upsampling. This process is repeated, upsampling the optimized P_3 and concatenating it with F_2 to obtain F_{32}, which is then optimized through a 3×3 convolutional layer to generate P_2. Finally, P_2 is upsampled and fused with F_1 using the same fusion and optimization operations to generate the lowest-level optimized feature P_1. This is represented as follows:
[0074] P_1=T_{conv3}(C(U(T_{conv3}(C(U(P3),F_2))),F_1))
[0075] Finally, the optimized P_1 is input into two 3×3 convolutions to further extract and optimize edge features, and finally outputs an edge feature map O_e through a 1×1 convolution. This result contains the precise edge and contour information of the camouflaged target.
[0076] This layer-by-layer fusion design effectively combines multi-scale information, so that the final generated features retain both low-level edge details and high-level semantic information. This enables the MSFM module to remove non-target edges and accurately extract the edge information of the target in complex backgrounds, thereby distinguishing camouflaged targets from the background.
[0077] Step 3: Obtain local edge features at each level;
[0078] We directly introduce the Edge Guided Feature (EFM) module from BGNet, which further enhances the edge perception capability of the feature map by combining the edge feature map with the feature maps of various levels output by Backbone.
[0079] Step 4: Construct a Local-Global Feature Fusion Module (LGFFM) to fuse local features, intermediate features, and global features;
[0080] To address the shortcomings in fusing local edge features and global semantic information, this invention designs a Local Global Feature Fusion (LGFFM) module. This module effectively integrates the global semantic information of the camouflaged target with the local edge features of the camouflaged target at various levels enhanced by EFM through a dual-channel mechanism of local and global features. Specifically, global features (such as...) Figure 1 As shown, G3 is a feature map processed by the LGFFM module after fusing local features L4 and p4 output from the MSFM module. This helps the model understand the overall shape and position information of the camouflaged target, while local features (such as...) Figure 1 As shown, local features (such as L3, after EFM processing) enhance the ability to capture subtle visual differences in edge information. To further improve the fusion of local and global information, the LGFFM module extracts intermediate features from MSFM (such as... Figure 1 As shown, P3) acts as a bridge between local and global information, enabling the model to accurately capture details while also grasping global information in complex contexts. In this way, the LGFFM module ensures that the model can better perform feature fusion and detect camouflaged targets in complex scenes.
[0081] like Figure 3 As shown, the Local-Global Feature Fusion (LGFFM) module aims to capture detailed information and global semantics of camouflaged targets by simultaneously integrating local features, intermediate features (intermediate features extracted from MSFM), and global features. The LGFFM module first receives features from different layers of the network, including local features Li (i = 1, 2, 3, 4) (containing rich detailed information) and global features G_i (i = 1, 2, 3) (containing more global semantic information). It should be noted that... Figure 1 The input features are G_3 (obtained by the LFFM module through inputs L_4 and P_4, but processed in the same way as the LFFM module with three input feature maps) and intermediate features P_i (i = 1, 2, 3, 4) (serving as a bridge between global features and local information). These features may have different resolutions and channel numbers, so they are first combined through concatenation to form richer input features. Then, 1×1 convolutions are used to compress the channels of the concatenated feature maps, reducing computational complexity. The formula is as follows:
[0082]
[0083] Where C represents the feature concatenation operation, and T_{conv1} represents a 1×1 convolution, used to reduce the number of channels for easier subsequent convolution operations. It's important to note that the above formula describes... Figure 1The three LGFFMs on the left are described in the formula below. The rightmost LGFFM is different from the others except that it does not have G_i in the concatenation operation. The remaining steps are the same as the other LGFFM operations below.
[0084] To simultaneously capture both local edge details and global information of the camouflaged target, the LGFFM module uses dilated convolution operations with different dilation rates to extract local and global features respectively. Local features are extracted using a smaller dilation rate, while global features are extracted using a larger dilation rate. According to... Figure 3 In the right half of the image, local features are extracted layer by layer through convolution operations with different dilation rates (d=1, d=2, d=3).
[0085] L_{f1}=Conv_{3×3,d=1}(T_m)
[0086]
[0087] Where Conv_{3×3,d=1} represents a dilated convolution of 3×3 with an inflation rate of 1 (d represents the inflation rate). This represents element-wise addition. G_{fi}(i=1,2) represents... Figure 3 The feature map obtained globally on the left. Figure 3 The left side represents global feature extraction.
[0088] Similar to the extraction of local features, global features are extracted using larger dilation rates (d=3, d=4, d=5). These larger receptive fields help capture the global contextual information of the input features.
[0089]
[0090] Where L_{fi}(i=1,2,3) is the local feature map obtained by the above local operation.
[0091] After local and global features are extracted, the local feature map L_{f3} and the global feature map G_{f3} are combined through a concatenation operation. The fused features are then compressed using a 1×1 convolution, and added to the original input features via residual connections. Finally, the fused features are further processed through a 3×3 convolutional layer, such as... Figure 1 As shown, the LGFFM module repeats the above operations and finally outputs the final context-enhanced feature map H_i (i = 1, 2, 3, 4), expressed as follows:
[0092] H_i=T_{conv3}(T_{conv1}(C(G_{f3},L_{f3}))⊕T_m),i∈{1,2,3,4}
[0093] like Figure 1 As shown, it is important to note that the three LGFFM outputs H_i (i = 4, 3, 2) on the right will be used as the global feature maps G_i (i = 3, 2, 1) of the next LGFFM input from right to left.
[0094] The overall operation flow of the local-to-global feature fusion module is as follows:
[0095] (1) Feature input and preprocessing;
[0096] like Figure 3 As shown, the LGFFM module receives three types of features: local features (L_i) (providing rich detailed information), global features (G_i) (capturing the overall contextual information of the target), and intermediate features (P_i) (acting as a bridge for fusing local and global information). Since these features have different resolutions and channel numbers, they are first combined through a concatenation operation to form richer input features. Subsequently, 1×1 concatenation is used to compress the channels of the concatenated feature map, reducing computational complexity and unifying feature dimensions. This step ensures the efficiency of subsequent operations and lays the foundation for feature fusion.
[0097] (2) Local feature extraction;
[0098] To capture detailed information about camouflaged targets, the LGFFM module extracts local features layer by layer through dilated convolutions with different dilation rates (d = 1, 2, 3). A smaller dilation rate provides higher resolution, helping the model focus on the edges and local details of the target. The local features extracted from each layer are summed element-wise to form a local feature map (L_{f3}). This process refines the edge information of the camouflaged target, enabling the model to more accurately distinguish subtle visual differences in complex scenes.
[0099] (3) Global feature extraction;
[0100] Global feature extraction employs a similar approach to local feature extraction, but uses dilated convolutions with a larger dilation rate (d = 3, 4, 5) to expand the receptive field. A larger receptive field captures global contextual information about the camouflaged target and background, thereby enhancing the model's understanding of the target's overall shape and location. After multiple layers of dilated convolutions, a global feature map (G_{f3}) is generated. This step effectively compensates for the limitations of local features by capturing a broader range of semantic information.
[0101] (4) Fusion of local and global features;
[0102] The extracted local feature map (L_{f3}) and global feature map (G_{f3}) are fused through a concatenation operation, combining the information advantages of both. The fused features are then compressed using a 1×1 convolution to reduce redundancy and enhance feature representation. Subsequently, the compressed fused features are added to the initial input features through residual connections, thereby further optimizing the feature representation. The introduction of residual connections not only preserves the original feature information but also avoids feature degradation, providing the model with a more robust feature output.
[0103] (5) Output the final features;
[0104] The fused and optimized features are further processed through a 3×3 convolution, such as... Figure 1 As shown, the final context-enhanced feature map (H_i (i=1,2,3,4)) is generated.
[0105] Step 5: Obtain the camouflaged target identification results;
[0106] The multiple final context-enhanced feature maps H_i (i = 1, 2, 3) obtained from the LGFFM module are subjected to 1×1 convolution to generate the final camouflaged target feature map O_i (i = 1, 2, 3). In this invention, O_1 is used as the final prediction result.
[0107] like Figure 1 As shown, the process of the LGFFM module obtaining the camouflage target prediction result and the process of MSFM obtaining the edge feature map in step two are supervised by the ground truth map. The loss function L under the supervision of the ground truth map is... total The specific expression is:
[0108]
[0109] In the formula, For weighted binary cross-entropy loss, For weighted intersection and combination loss, L dice (·) represents the Dice loss, O_1 is the first camouflaged target feature map (camouflaged target prediction), O_2 is the second camouflaged target feature map (camouflaged target prediction), O_3 is the third camouflaged target feature map (camouflaged target prediction), and O e For edge feature maps (edge prediction), G O For the truth graph, G e For edge truth maps, To weigh the parameters.
[0110] In this specific embodiment, the tradeoff parameter is set to 10. The present invention has four output predictions, specifically the first, second, and third camouflage target feature maps (camouflage target predictions) and the edge feature map (edge prediction). The edge feature map (edge prediction) is obtained from the MSFM module, while the first, second, and third camouflage target feature maps (camouflage target predictions) come from the LGFFM module. The ground truth map and the edge ground truth map are both input from external sources.
[0111] Experimental verification:
[0112] (1) Experimental setup:
[0113] To comprehensively evaluate the proposed algorithm, this invention underwent quantitative and qualitative evaluation on three widely used datasets: CAMO, COD10K, and NC4K. The CAMO dataset contains 1,250 camouflage target images, covering eight different categories of camouflage targets. As one of the earliest annotated datasets in the field of camouflage target detection, CAMO focuses on studying highly integrated objects and their backgrounds in nature. Due to the diversity and high challenge of the data, CAMO is widely used for training and testing deep learning models. The COD10K dataset contains 10,000 images, covering 78 different categories of camouflage targets. The COD10K dataset not only provides high-quality annotations but also covers multiple domains such as aquatic, terrestrial, and flying animals, providing a foundation for large-scale training and evaluation of camouflage target detection tasks. The NC4K dataset contains 4,121 images, focusing on the task of camouflage target localization and ranking. This dataset includes finer-grained annotation information, enabling the model not only to perform target detection but also to rank targets based on their salience.
[0114] For quantitative evaluation, this invention selects four widely used indicators to assess the method in this invention: mean absolute error (MAE, M), weighted F-measurement, and weighted average error. Structural similarity measure S α and average E measurement MAE is used to evaluate the average prediction error for each pixel, reflecting the difference between the overall prediction and the true label; while S α and The metrics are used to measure the balance between precision and recall, structural similarity, and global and local accuracy, respectively.
[0115] (2) Experimental details:
[0116] This invention is implemented based on the PyTorch framework and trained and tested using an NVIDIA GeForce RTX 5000 GPU. During training, all input images are uniformly resized to 521x521. The Adam optimizer is used for optimization, with a training cycle of 30 epochs and a batch size of 8. The initial learning rate is set to 0.0001, and the learning rate is dynamically adjusted using a poly strategy with an exponential decay parameter of 0.9. During the testing phase, the input images are also resized to 521x521, and then restored to their original size after inference for model evaluation.
[0117] Quantitative Results: To demonstrate the effectiveness of the method in this invention, the model was compared with state-of-the-art methods on four benchmarks using four evaluation metrics. These methods include SINet, C^2FNet, PFNet, R-MGL, BGNet, ZoomNet, EVP, FEDER, FSPNet, DCNet, and SARNet. For a fair comparison, the results from the original papers of these models were downloaded and evaluated using the same evaluation tool. The quantitative results are shown in Table 1.
[0118] Table 1 Quantitative Comparison Results
[0119]
[0120] As shown in Table 1, to fully evaluate the algorithm of this invention, a comprehensive comparison and evaluation of the proposed camouflage target detection network and its algorithm based on local and global feature fusion was conducted on three widely used datasets—CAMO, COD10K, and NC4K. The quantitative comparison results of the method in this invention with other COD methods show that the method in this invention generally outperforms other COD methods in all four metrics across the three datasets.
[0121] Qualitative results: Figure 4 This figure shows a qualitative evaluation compared to other COD methods, and also demonstrates the superior performance of the method in this invention across different scenes and object categories. Compared to other methods (such as SARNet, FSP, BGNet, C^2FNet, and ZoomNet), the method in this invention performs better in several aspects. First, in object boundary detection, the method in this invention generates more accurate and clearer masks, especially accurately segmenting the complete outline of the target object even against complex backgrounds. Other methods often suffer from blurring, breakage, or inaccuracy at object edges. Second, the method in this invention performs better when handling small and detailed targets, capturing object details well, while other models tend to lose these details or blur them with the background.
[0122] Overall, Figure 4 This demonstrates that the method in this invention not only significantly outperforms other models in segmentation accuracy, but also maintains stable and reliable performance in different types of scenarios, and is closest to the ground truth (GT).
[0123] The above description is only for the purpose of helping to understand the method and core essence of the present invention, but the scope of protection of the present invention is not limited thereto. For those skilled in the art, any equivalent substitutions or modifications made within the technical scope disclosed in the present invention, based on the technical solution and inventive concept, should be covered within the scope of protection of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for detecting camouflaged targets based on the fusion of local and global features, characterized in that, Includes the following steps: S1. Extract preliminary features from different levels of the detected image; S2. For the preliminary features at each level, convolution operation is used to compress the channels during the multi-level feature fusion process to obtain intermediate features containing global semantic information. The global semantic information in the deep features and the local edge features in the shallow features are fused using a top-down feature fusion strategy to obtain the edge feature map. S3. The preliminary features at each level are fused with the edge feature map to obtain local features at different levels. S4. Using deep-level fusion features as shallow-level global features, the local features, intermediate features and global features of each level are fused through a local and global dual-channel mechanism to obtain context-enhanced feature maps at different levels. S5. Convolve the context-enhanced feature maps at different levels to obtain the camouflaged target feature map of the detected image.
2. The camouflaged target detection method based on the fusion of local and global features according to claim 1, characterized in that, S2 is specifically as follows: For the initial features F_4, F_3, F_2, and F_1 at different levels; firstly, the deep feature map F_4 is compressed using a 1×1 convolution to obtain P_4; then, P_4 is upsampled to the same size as the shallow feature map F_3 using bilinear interpolation, and then concatenated to form the feature map F_{43}, which is then processed by a 3×3 convolution to generate the optimized feature P_3; represented as follows: P_3=T_{conv3}(C(U(T_{conv1}(F_4)),F_3)) Where T_{conv3} represents a 3×3 convolution, T_{conv1} represents a 1×1 convolution, C represents concatenation, and U represents upsampling; Subsequently, this operation is repeated, upsampling the optimized P_3 and concatenating it with F_2 to obtain F_{32}, which is then optimized through a 3×3 convolutional layer to generate P_2. Finally, P_2 is upsampled and fused with F_1 in the same way to generate the lowest-level optimized feature P_1; represented as follows: P_1=T_{conv3}(C(U(T_{conv3}(C(U(P3),F_2))),F_1)) Finally, the optimized P_1 is input into two 3×3 convolutions to further extract and optimize edge features, and finally outputs the edge feature map O_e through a 1×1 convolution.
3. The camouflaged target detection method based on the fusion of local and global features according to claim 2, characterized in that, S4 is specifically as follows: For features at different levels, including local features Li (i = 1, 2, 3, 4), global features G (i = 1, 2, 3), and intermediate features P (i = 1, 2, 3, 4); First, the input features are combined through concatenation to form richer features. Then, a 1×1 convolution is used to compress the channels of the concatenated feature maps, as shown in the following formula: Where C represents the feature concatenation operation, T_{conv1} represents the 1×1 convolution operation, and T_m represents the input features; Secondly, dilated convolution operations with different dilation rates are used to extract local and global features respectively; the dilation rate for local feature extraction is less than that for global feature extraction. Finally, after the local and global features are extracted, the final local and global feature maps are combined through a concatenation operation. The fused features are then compressed using a 1×1 convolution, and added to the original input features via residual connections. The added features are further processed through a 3×3 convolutional layer. The final context-enhanced feature map H_i (i = 1, 2, 3, 4) is output as follows: H_i=T_{conv3}(T_{conv1}(C(G_{f3},L_{f3}))⊕T_m),i∈{1,2,3,4} Where L_{f3} and G_{f3} are the final local feature map and global feature map, respectively; The fused context-enhanced feature map H_i (i = 4, 3, 2) uses the deep-level fused features as the shallow-level global features, corresponding to the global feature map G_i (i = 3, 2, 1).
4. The camouflaged target detection method based on the fusion of local and global features according to claim 3, characterized in that, The local features are extracted layer by layer through convolution operations with different dilation rates, as follows: L_{f1}=Conv_{3×3,d=1}(T_m) L_{f2}=Conv_{3×3,d=2}(L_{f1}⊕G_{f1}) L_{f3}=Conv_{3×3,d=3}(L_{f2}⊕G_{f2}) Where Conv_{3×3,d=1} represents dilated convolution 3×3, d=1, d represents the dilation rate, and ⊕ represents element-wise addition; G_{fi}(i=1,2) represents the global feature map obtained by global operations; L_{fi}(i=1,2,3) represents the local feature map obtained by local operations.
5. The camouflaged target detection method based on the fusion of local and global features according to claim 4, characterized in that, The global features are extracted layer by layer through convolution operations with different dilation rates, as follows: G_{f1}=Conv_{3×3,d=3}(T_m⊕L_{f1}) G_{f2}=Conv_{3×3,d=4}(G_{f1}⊕L_{f2}) G_{f3}=Conv_{3×3,d=5}(G_{f2}⊕L_{f3}) Where L_{fi}(i=1,2,3) is the local feature map obtained by the local operation.
6. The camouflaged target detection method based on the fusion of local and global features according to claim 3, characterized in that, S5 is specifically as follows: Perform a 1×1 convolution operation on the three layers of context-enhanced feature maps H_i (i=1,2,3) to generate camouflage target prediction features O_i (i=1,2,3), and select O_1 as the final prediction target.
7. The camouflaged target detection method based on local and global feature fusion according to claim 1, characterized in that, In S1, a Backbone network is used to extract preliminary features at different levels of the detection image.
8. A camouflaged target detection model based on local and global feature fusion applied in any one of the methods described in claims 1-7, characterized in that, include: The feature extraction module uses a Backbone network to extract preliminary features at different levels of the detection image; The multi-scale fusion module adopts a top-down feature fusion strategy. For the input preliminary features at different levels, it performs multi-level feature fusion of global semantic information in deep features and local edge features in shallow features to obtain an edge feature map; and extracts intermediate features containing global semantic information at different levels. The edge-guided feature module adopts the EFM module in BGNet to combine the preliminary features with the edge feature map to obtain local features. The local-to-global feature fusion module fuses local, intermediate, and global features at each level through a dual-channel mechanism of local and global features.
Citation Information
Patent Citations
Camouflage target detection method based on attention mechanism and convolutional neural network
CN116228702A
Camouflage target detection method based on edge information guidance
CN116363383A