Local and global feature fusion-based camouflage target detection method
By designing a multi-scale fusion module and a local global feature fusion module in camouflage object detection, the problems of blurred boundaries and insufficient feature fusion caused by the similarity between targets and backgrounds are successfully solved, and the detection accuracy is significantly improved.
Patent Information
- Application Number
- CN202411787080.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-06
AI Technical Summary
When the existing camouflage object detection method deals with the highly similar target to the background, 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, and insufficient integration of global and local features, making it difficult to capture the overall shape and local details of the target at the same time.
A camouflage object detection method based on local and global features fusion is designed. Through the multi-scale fusion module (MSFM), the multi-level feature map is fused layer by layer, high-level semantic information is combined with low-level edge features to generate accurate edge feature maps, and local edge features and global semantic information are further integrated through the local global feature fusion module (LGFFM).
It significantly improves the accuracy of camouflage target detection, solves the problems of blurred target boundaries and insufficient feature fusion, and can accurately capture the details and global forms of camouflage targets in complex backgrounds.
Smart Images

Figure CN119741472A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of camouflaged target detection, and in particular relates to a camouflaged target detection method based on the fusion of local and global features. Background Art
[0002] Camouflaged object detection is an important task in the field of computer vision. Its core goal is to accurately identify and segment camouflaged objects that are highly similar to the environment from a complex background. Camouflaged objects often confuse visual perception through clever design of color, texture and shape, which makes them almost invisible in the natural environment. Camouflaged object detection has a wide range of application potentials in multiple fields. For example, in wildlife conservation, researchers hope to assess ecological health by monitoring the activities of camouflaged animals, or promote the discovery of new species by identifying the presence of camouflaged species; in the military field, timely identification of enemy camouflaged targets is crucial to the formulation of combat strategies; in medical image analysis, it is also crucial to identify lesion areas that are similar to surrounding tissues; for example, in tasks such as polyp segmentation and lung infection segmentation. Therefore, camouflaged object detection is a very valuable research task. Due to the high similarity between camouflaged objects and the background, it is difficult for both the naked eye and machines to effectively identify these targets. This visual confusion makes camouflaged object detection (COD) a very challenging task.
[0003] The primary challenge of camouflaged object detection (COD) is 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 deeply it interferes with the visual perception mechanism, making it difficult for the model to extract meaningful distinguishing features. Camouflaged objects are usually cleverly integrated visually by highly overlapping with the background features, resulting in extremely weak or 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 and 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, the boundaries of the target are often blurred.
[0004] Secondly, the effective fusion of global and local features is also a key challenge in camouflaged target detection. Global features can usually provide information about the overall shape and structure of the target, which is very helpful for understanding the approximate position of the target in a complex background. However, global features often ignore the details of the target, especially the lack of edge and texture information. Local features, on the contrary, can capture the subtle edges and local texture information of the target, but lack a global understanding of the overall morphology of the target.
[0005] From the above, we can see that there are several problems in the existing methods. First, when the model is dealing with a target that is highly similar to the background, 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. Second, many network architectures are 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.
[0006] Based on this, the present invention proposes a camouflaged target detection method based on the fusion of local and global features. The present invention designs a camouflaged target detection network (FLGNet), which fuses multi-level feature maps layer by layer by designing a multi-scale fusion module (MSFM), combines high-level semantic information with low-level edge features, and generates accurate edge feature maps to distinguish camouflaged targets and backgrounds. At the same time, the local-global feature fusion module (LGFFM) is used to further integrate local edge features and global semantic information, thereby significantly improving detection accuracy and solving key problems in camouflaged target detection. Summary of the invention
[0007] The purpose of the present invention is to provide a camouflaged target detection method based on the fusion of local and global features, so as to solve the problems that the existing methods proposed in the above background technology are difficult to effectively identify the subtle edges and complex structures of the target when the target and the background are highly similar, resulting in unclear boundaries of the target in the detection results; on the other hand, there are deficiencies 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 object, the present invention adopts the following technical solutions:
[0009] On the one hand, the present invention proposes a camouflaged target detection method based on local and global feature fusion, comprising the following steps:
[0010] S1, extract preliminary features of different levels of the detection image;
[0011] S2. For the preliminary features at each level, convolution operation is used to perform channel compression in 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 an edge feature map.
[0012] S3, merging the preliminary features of each level with the edge feature map to obtain local features of different levels;
[0013] S4, using the deep-level fusion features as the shallow-level global features, the local features, intermediate features and global features of each level are fused through the local and global dual-channel mechanism to obtain context-enhanced feature maps at different levels;
[0014] S5. Perform simple convolution operations on the context-enhanced feature maps at different levels to generate camouflaged target feature maps.
[0015] Preferably, in S1, a Backbone network is used to extract preliminary features of different levels of the detection image.
[0016] Preferably, S2 is specifically as follows:
[0017] For the preliminary features F_4, F_3, F_2, and F_1 at different levels, first, use 1×1 convolution to perform channel compression on the deep feature map F_4 to obtain P_4; then use bilinear interpolation to upsample P_4 to the same size as the shallow feature map F_3, and perform a splicing operation to form a feature map F_{43}, and then use 3×3 convolution to generate the optimized feature P_3; it is expressed as follows:
[0018] P_3=T_{conv3}(C(U(T_{conv1}(F_4)),F_3))
[0019] Among them, T_{conv3} represents 3×3 convolution, T_{conv1} represents 1×1 convolution, C represents concatenation operation, and U represents upsampling;
[0020] Subsequently, this operation is repeated, and the optimized P_3 is upsampled and concatenated with F_2 to obtain F_{32}, and then optimized through a 3×3 convolutional layer to generate P_2. Finally, P_2 is upsampled and fused and optimized with F_1 in the same way to generate the bottom-level optimized feature P_1; it is expressed 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 a 1×1 convolution is used to output the edge feature map O_e.
[0023] The S2 is implemented using a multi-scale fusion module (MSFM). In order to solve the problem that the camouflaged target and the background are highly similar, the MSFM module of the present invention achieves a balance between global understanding and local detail capture by fusing high-level global semantic information with 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 1×1 convolution to reduce its channel size from 512 to 256. This step not only reduces the computational complexity, but also retains key global semantic information, allowing high-level features to participate in subsequent fusion more efficiently. Next, the compressed feature P4 is upsampled to the same resolution as the next-level feature map F3 through bilinear interpolation to ensure that high-level semantic information is aligned with low-level detail features, laying the foundation for subsequent fusion. Subsequently, P4 and F3 are concatenated to form a richer feature map F43. Concatenation combines high-level global structural understanding and low-level edge detail capture, giving the feature map a more comprehensive ability to express information. Afterwards, F43 is optimized through 3×3 convolution to further integrate the concatenated multi-layer information, remove redundant features, and extract more accurate edge information.
[0025] This process is repeated layer by layer, and the generated feature map P3 is upsampled in turn, and fused with the shallower feature map F2 to generate F32, and then optimized by convolution to generate P2. Finally, P2 is upsampled, fused with the bottom-level feature map F1, and optimized to generate P1. This layer-by-layer progressive design can fully integrate high-level semantic information with shallow edge details, so that the model has 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 to output the final edge feature map Oe. This feature map accurately aggregates multi-scale information, retains low-level edge details, and combines high-level global semantics. It can accurately distinguish camouflaged targets from backgrounds, and significantly improves detection performance in complex scenes.
[0026] Preferably, S3 is specifically as follows: using the EFM module in BGNet, combining the preliminary features with the edge feature map to obtain local features.
[0027] Preferably, the S4 is specifically as follows:
[0028] For features at different levels, including local features L_i (i=1,2,3,4), global features G_i (i=1,2,3) and intermediate features P_i (i=1,2,3,4);
[0029] First, a richer input feature is formed by combining the concatenated operations, and then a 1×1 convolution is used to compress the channels of the concatenated feature maps. The formula is as follows:
[0030]
[0031] Among them, C represents the concatenation operation of the feature, T_{conv1} represents the 1×1 convolution operation; T_m represents the input feature;
[0032] Secondly, dilated convolution operations with different dilation rates are used to extract local features and global features respectively; the dilation rate when extracting local features is smaller than the dilation rate when extracting global features;
[0033] Finally, after the local features and global features are extracted, the final local feature map and the global feature map are combined together through a series operation. The fused features are compressed through a 1×1 convolution, and the fused features are added to the original input features through a residual connection; the added features are further processed through a 3×3 convolution layer; the final context-enhanced feature map H_i (i=1,2,3,4) is output as follows:
[0034]
[0035] Among them, 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 fusion features as the shallow 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] Among them, Conv_{3×3,d=1} represents the dilated convolution 3×3, d=1, d represents the dilation rate, represents element-by-element addition; 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 through larger dilation rates. These larger receptive fields help capture the global context information of the input features. The details are as follows:
[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] Among them, L_{fi}(i=1,2,3) is the local feature map obtained by the local operation.
[0046] Preferably, the S5 is specifically as follows:
[0047] The three levels of context-enhanced feature maps H_i (i=1, 2, 3) are subjected to 1×1 convolution operations to generate camouflaged target prediction features O_i (i=1, 2, 3), and O_1 is selected as the final prediction target.
[0048] On the other hand, the present invention proposes a camouflaged target detection model based on local and global feature fusion, comprising:
[0049] The feature extraction module uses the 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 of preliminary features at different levels, the global semantic information in the deep features and the local edge features in the shallow features are multi-level fused to obtain the edge feature map; and the intermediate features containing global semantic information at different levels are extracted;
[0051] The edge-guided feature module uses the EFM module in BGNet to combine the preliminary features with the edge feature map to obtain local features;
[0052] The local-global feature fusion module fuses the local features, intermediate features and global features of each level through a local and global dual-channel mechanism.
[0053] First, a multi-scale fusion module (MSFM) was designed. The MSFM module uses a top-down feature fusion strategy to combine the global semantic information in deep features with the local edge features in shallow features. Starting from the highest layer F4, each layer of features is gradually compressed and upsampled through convolution, and then connected in series with the next layer. This is processed continuously until the bottom layer F1, and finally the 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, thereby extracting accurate edge information of the camouflaged target.
[0054] Then, the edge-guided feature EFM module in BGNet is directly introduced, which further enhances the edge perception ability 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 module (LGFFM) was designed. This module effectively integrates the global semantic information of the camouflaged target and the local features of the edges of the camouflaged targets at all levels enhanced by EFM through a local and global dual-channel mechanism. Specifically, the global features help the model understand the overall shape and position information of the camouflaged target, while the local features enhance the ability to capture subtle visual differences in edge information. In order to further enhance the fusion of local and global information, the intermediate features extracted from the 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 detection of camouflaged targets in complex scenes.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] (1) The multi-scale fusion module and the local-global feature fusion module in the present invention are the key technologies of the present invention. By designing the multi-scale fusion module, the multi-level feature maps are fused layer by layer, the high-level semantic information is combined with the low-level edge features, and an accurate edge feature map is generated to distinguish the camouflaged target and the background. At the same time, the local-global feature fusion module is designed to further integrate the local edge features and the global semantic information, thereby significantly improving the detection accuracy and solving the key problem in the detection of camouflaged targets.
[0058] (2) The multi-scale fusion module designed in the camouflaged target detection method of the present invention adopts a top-down feature fusion strategy to fuse the global semantic information in the deep features with the local edge features in the shallow features, so as to achieve a balance between global understanding and local detail capture, thereby extracting the precise edge information of the camouflaged target.
[0059] (3) The local-global feature fusion module designed in the camouflaged target detection method of the present invention effectively integrates the global semantic information of the camouflaged target and the local features of the edges of the camouflaged targets at all levels through a local and global dual-channel mechanism, thereby ensuring that the model can better perform feature fusion and detection of camouflaged targets in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a structural block diagram of a camouflaged target detection network based on local and global feature fusion in the present invention;
[0061] Figure 2 It is a structural block diagram of the multi-scale fusion module in the present invention;
[0062] Figure 3 It is a structural block diagram of the local-global feature fusion module in the present invention;
[0063] Figure 4Schematic diagram of qualitative comparison between the method of the present invention and other methods. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Embodiment 1:
[0066] The camouflaged target detection method of the present invention proposes a camouflaged target detection network based on the fusion of local and full local features. The overall framework diagram of the camouflaged target detection network is as follows: Figure 1 The camouflaged target detection method of the present invention is specifically as follows:
[0067] Step 1: Obtain feature maps at each level;
[0068] The detection image is input into the Backbone network, and the feature maps of each level extracted by Backbone are used.
[0069] Step 2: construct a multi-scale fusion module (MSFM) to obtain an edge feature map;
[0070] In order to solve the problem of high similarity between the target and the background, the present invention designs a multi-scale fusion module (MSFM) module. The MSFM module uses a top-down feature fusion strategy to fuse the global semantic information in the deep features with the local edge features in the shallow features. Figure 2 As shown in the figure, starting from the highest layer F4, each layer of features is gradually compressed and upsampled through convolution, and then connected in series with the next layer, and processed continuously until the bottom layer F1, and finally the global semantics and local edge features are fused to generate a fine edge feature map, so as to distinguish the camouflaged target from the background. Through this multi-level feature fusion, the model achieves a balance between global understanding and local detail capture, thereby extracting the precise edge information of the camouflaged target.
[0071] The overall operation process of the multi-scale fusion module is as follows: Figure 2As shown in the figure, 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 1×1 convolution to perform channel compression on the high-level feature map F_4, reducing it from 512 to 256, reducing the computational complexity while retaining global semantic information to ensure that the model effectively processes high-level features. Next, the convolution P_4 is upsampled to the same size as the low-level feature map F_3 through bilinear interpolation, and a splicing operation is performed to form a richer feature map F_{43}, which is then processed by 3×3 convolution to generate the optimized feature P_3. This step helps the model fuse global semantic information and local edge details. It is expressed as follows:
[0072] P_3=T_{conv3}(C(U(T_{conv1}(F_4)),F_3))
[0073] Among them, T_{conv3} represents 3×3 convolution, T_{conv1} represents 1×1 convolution, C represents concatenation operation, and U represents upsampling. Then, repeat this operation, upsample the optimized P_3 and concatenate it with F_2 to obtain F_{32}, and then optimize it through 3×3 convolution layer to generate P_2. Finally, upsample P_2 and perform the same fusion and optimization operation with F_1 to generate the bottom-level optimized feature P_1. It is expressed 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 a 1×1 convolution is used to output the edge feature map O_e, which 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, enabling the MSFM module to remove non-target edges and accurately extract the edge information of the target in a complex background, thereby distinguishing the camouflaged target from the background.
[0077] Step 3: Obtain local edge features at each level;
[0078] The edge-guided feature EFM module in BGNet is directly introduced. This module further enhances the edge perception ability of the feature map by combining the edge feature map with the feature maps of each level output by Backbone.
[0079] Step 4: Construct a local-global feature fusion module (LGFFM) to fuse local features, intermediate features, and global features;
[0080] In order to solve the shortcomings in the fusion of local edge features and global semantic information, the present invention designs a local global feature fusion module (LGFFM). This module effectively integrates the global semantic information of the camouflaged target and the local features of the edges of the camouflaged target at each level enhanced by EFM through a local and global dual-channel mechanism. Specifically, the global features (such as Figure 1 As shown in Figure 2, G3 is a feature map processed by the LGFFM module after the local feature L4 is fused with the p4 output by the MSFM module) to help the model understand the overall shape and position information of the camouflaged target, while the local features (such as Figure 1 As shown in Figure 2, the local features after EFM processing (such as L3) enhance the ability to capture subtle visual differences in edge information. In order to further enhance the fusion of local and global information, the LGFFM module extracts intermediate features (such as Figure 1 As shown in Figure 1, P3) acts 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 camouflage target detection in complex scenes.
[0081] like Figure 3 As shown in Figure 1, the local global feature fusion module (LGFFM) aims to capture the details and global semantics of the camouflaged target by integrating local features, intermediate features (intermediate features extracted from MSFM) and global features. The LGFFM module first receives features from different levels of the network, including local features L_i (i = 1, 2, 3, 4) (containing rich details) and global features G_i (i = 1, 2, 3) (containing more global semantic information. It should be noted that, as Figure 1 G_3 is obtained by the LGFFM module by inputting L_4 and P_4, but the processing method is the same as that of the LGFFM module with three feature maps as input) and the intermediate feature P_i (i=1,2,3,4) (as a bridge between global features and local information). The resolution and number of channels between these features may be different, so they are first combined together through a series operation to form a richer input feature, and then a 1×1 convolution is used to compress the channels of the series feature maps to reduce the computational complexity. The formula is as follows:
[0082]
[0083] Among them, C represents the concatenation operation of the features, and T_{conv1} represents a 1×1 convolution, which is used to reduce the number of channels to facilitate subsequent convolution operations. It should be noted that the description of the above formula is Figure 1There are three LGFFMs on the left. The description of the formula below is the LGFFM on the far right. Compared with other LGFFMs, the only difference is that there is no Gi in the splicing operation. The remaining steps are the same as the other LGFFM operations below.
[0084] In order to capture both the 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 by a smaller dilation rate, while global features are extracted by a larger dilation rate. Figure 3 In the right half of the figure, 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] Among them, Conv_{3×3,d=1} represents the dilated convolution 3×3, and the expansion is 1 (d represents the expansion rate). represents element-by-element addition. G_{fi}(i=1,2) represents Figure 3 The feature map obtained globally on the left is: Figure 3 The left side represents global feature extraction.
[0088] Similar to the extraction of local features, global features are extracted through larger dilation rates (d=3, d=4, d=5). These larger receptive fields help capture the global context information of the input features.
[0089]
[0090] Among them, L_{fi}(i=1,2,3) is the local feature map obtained by the above local operation.
[0091] After the local features and global features are extracted, the local feature map L_{f3} and the global feature map G_{f3} are combined together through a series operation. The fused features are compressed through a 1×1 convolution, and the fused features are added to the original input features through a residual connection. Finally, the fused features are further processed through a 3×3 convolution layer, as shown in Figure 1 As shown, the LGFFM module repeats the above operation and finally outputs the final context enhanced feature map H_i (i=1,2,3,4), which is 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 should be noted that the three LGFFM outputs H_i (i=4, 3, 2) on the right will be used as the global feature map G_i (i=3, 2, 1) of the next LGFFM input from right to left.
[0094] The overall operation process of the local-global feature fusion module is as follows:
[0095] (1) Feature input and preprocessing;
[0096] like Figure 3 As shown in the figure, the LGFFM module receives three types of features: local features (L_i) (providing rich detail information), global features (G_i) (capturing the overall contextual information of the target), and intermediate features (P_i) (as a bridge for the fusion of local and global information). Since these features have different resolutions and number of channels, they are first combined together through a series operation to form richer input features. Subsequently, a 1×1 convolution is used to compress the channels of the series-connected feature maps to reduce the computational complexity and unify the feature dimensions. This step ensures the efficiency of subsequent operations and lays the foundation for feature fusion.
[0097] (2) Local feature extraction;
[0098] In order to capture the detailed information of the camouflaged target, the LGFFM module extracts local features layer by layer through dilated convolutions with different dilation rates ((d=1,2,3)). A smaller dilation rate can provide higher resolution, which helps the model focus on the edges and local details of the target. The local features extracted in each layer are added element by element to form a local feature map (L_{f3}). This process refines the edge information of the camouflaged target, allowing the model to more accurately distinguish subtle visual differences in complex scenes.
[0099] (3) Global feature extraction;
[0100] Global feature extraction is similar to local feature extraction, but uses a larger dilation rate ((d=3,4,5)) dilated convolution to expand the receptive field. A large receptive field can capture the global contextual information of the camouflaged target and the background, thereby enhancing the model's understanding of the overall shape and position of the target. After multiple layers of dilated convolution processing, a global feature map (G_{f3}) is generated. This step effectively supplements the limitations of local features by capturing a wider 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 series operation to combine the information advantages of the two. The fused features are then channel compressed through 1×1 convolution to reduce redundancy and enhance feature expression capabilities. Subsequently, the compressed fused features are added to the initial input features through residual connections to further optimize feature expression. The introduction of residual connections not only retains the original feature information, but also avoids the problem of feature degradation, providing a more robust feature output for the model.
[0103] (5) Output the final features;
[0104] The fused optimized features are further processed by 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: Detect and obtain the camouflaged target recognition result;
[0106] The multiple final context enhancement feature maps H_i (i=1, 2, 3) obtained by the LGFFM module are subjected to 1×1 convolution to generate the final camouflaged target feature map O_i (i=1, 2, 3). The present invention uses O_1 as the final prediction result.
[0107] like Figure 1 As shown in the figure, the process of the LGFFM module obtaining the camouflaged target prediction result and the process of the MSFM in step 2 obtaining the edge feature map are supervised by the true value map. The loss function L of the supervision of the true value map is total The specific expression is:
[0108]
[0109] In the formula, is the weighted binary cross entropy loss, is the weighted intersection-over-union loss, L dice (·) is the dice loss, O_1 is the first disguised target feature map (disguised target prediction), O_2 is the second disguised target feature map (disguised target prediction), O_3 is the third disguised target feature map (disguised target prediction), O e is the edge feature map (edge prediction), G O is the true value graph, G e is the edge truth map, is a trade-off parameter.
[0110] In this specific embodiment, the trade-off parameter is set to 10. The present invention has four output predictions, which are specifically the first, second, and third camouflaged target feature maps (camouflaged target predictions) and edge feature maps (edge predictions). The edge feature maps (edge predictions) are obtained according to the MSFM module, and the first, second, and third camouflaged target feature maps (camouflaged target predictions) are from the LGFFM module. The true value map and the edge true value map are both input from the outside.
[0111] Experimental verification:
[0112] (1) Experimental configuration:
[0113] In order to comprehensively evaluate the proposed algorithm, quantitative and qualitative evaluations are performed on three widely used datasets: CAMO, COD10K, and NC4K. Among them, the CAMO dataset contains 1,250 camouflaged target images, covering 8 different categories of camouflaged targets. As one of the earliest annotated datasets in the field of camouflaged target detection, CAMO focuses on studying highly fused objects and their backgrounds in nature. Due to the diversity and high challenge of the data, CAMO is widely used in the training and testing of deep learning models. The COD10K dataset contains 10,000 images, covering 78 different categories of camouflaged targets. The COD10K dataset not only provides high-quality annotations, but also covers a variety of fields such as aquatic, terrestrial, and flying animals, providing a basis for large-scale training and evaluation of camouflaged target detection tasks. The NC4K dataset contains 4,121 images and focuses on the localization and sorting tasks of camouflaged targets. This dataset adds more fine-grained annotation information, allowing the model to not only detect targets, but also sort them according to the saliency of the targets.
[0114] For quantitative evaluation, the present invention selects four widely used indicators to evaluate the method of the present invention, namely, mean absolute error (MAE, M), weighted F-measure Structural similarity measure S α and average E measurement Among them, MAE is used to evaluate the average prediction error of each pixel, reflecting the difference between the overall prediction and the true label; S α and Metrics are used to measure the balance of precision and recall, structural similarity, and global and local accuracy, respectively.
[0115] (2) Experimental details:
[0116] The present invention is implemented based on the PyTorch framework and uses the NVIDIA GeForce RTX5000 GPU for training and testing. During the training process, all input images are uniformly adjusted to a size of 521x521. The Adam optimizer is used for optimization, the training cycle is set to 30 epochs, and the batch size is 8. The initial learning rate is set to 0.0001, and the learning rate is dynamically adjusted through the poly strategy, and the exponential decay parameter is 0.9. In the test phase, the input image is also adjusted to 521x521, and then restored to the original size after the reasoning is completed for model evaluation.
[0117] Quantitative results: To demonstrate the effectiveness of the method in this invention, this invention uses four evaluation indicators to compare the model of this invention with the existing state-of-the-art methods on four benchmarks. These methods include SINet, C^2FNet, PFNet, R-MGL, BGNet, ZoomNet, EVP, FEDER, FSPNet, DCNet, and SARNet. For a fair comparison, this invention downloaded the results provided by the original papers of these models and evaluated the results using the same evaluation tool. The quantitative results are shown in Table 1
[0118] Table 1 Quantitative comparison results
[0119]
[0120] As can be seen from Table 1, in order to fully evaluate the algorithm of the present invention, the present invention has comprehensively compared and evaluated the proposed camouflaged target detection network based on local and global feature fusion and its algorithm on three widely used data sets: CAMO, COD10K and NC4K. The quantitative comparison results of the method in the present invention and other COD methods show that the four index values of the method in the present invention on the three data sets are basically greater than those of other COD methods.
[0121] Qualitative results: Figure 4 The figure shows a qualitative evaluation compared with other COD methods, and this figure also shows the superior performance of the method in the present invention in different scenes and object categories. Compared with other methods (such as SARNet, FSP, BGNet, C^2FNet and ZoomNet), the method in the present invention performs better in many aspects. First, in the boundary detection of objects, the method in the present invention can generate more accurate and clear masks, especially in complex backgrounds, and can accurately segment the complete outline of the target object. Other methods often have problems of blurring, breaking or inaccuracy at the edges of objects. Secondly, the method in the present invention performs better when dealing with smaller and detailed targets, and can capture the details of the object well, while other models are prone to losing these details or confusing them with the background.
[0122] Overall, Figure 4 It is intuitively demonstrated 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 scenes, and is closest to the true label (GT).
[0123] The above description is only used to help understand the method of the present invention and its core essence, but the protection scope of the present invention is not limited thereto. For those skilled in the art in the art, equivalent replacement or change according to the technical solution and inventive concept of the present invention within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A camouflaged target detection method based on local and global feature fusion, characterized in that: The steps include: S1, extract preliminary features of different levels of the detection image; S2. For the preliminary features at each level, convolution operation is used to perform channel compression in 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 an edge feature map. S3, merging the preliminary features of each level with the edge feature map to obtain local features of different levels; S4, using the deep-level fusion features as the shallow-level global features, the local features, intermediate features and global features of each level are fused through the local and global dual-channel mechanism to obtain context-enhanced feature maps at different levels; S5. Convolution operations are performed on context-enhanced feature maps at different levels to obtain camouflaged target feature maps of the detection image.
2. The method for detecting camouflaged targets based on the fusion of local and global features according to claim 1, characterized in that: The S2 is specifically as follows: For the preliminary features F_4, F_3, F_2, and F_1 at different levels, first, use 1×1 convolution to perform channel compression on the deep feature map F_4 to obtain P_4; then use bilinear interpolation to upsample P_4 to the same size as the shallow feature map F_3, and perform a splicing operation to form a feature map F_{43}, and then use 3×3 convolution to generate the optimized feature P_3; it is expressed as follows: P_3=T_{conv3}(C(U(T_{conv1}(F_4)),F_3)) Among them, T_{conv3} represents 3×3 convolution, T_{conv1} represents 1×1 convolution, C represents concatenation operation, and U represents upsampling; Subsequently, this operation is repeated, and the optimized P_3 is upsampled and concatenated with F_2 to obtain F_{32}, and then optimized through a 3×3 convolutional layer to generate P_2. Finally, P_2 is upsampled and fused and optimized with F_1 in the same way to generate the bottom-level optimized feature P_1; it is expressed 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 a 1×1 convolution is used to output the edge feature map O_e.
3. The method for detecting camouflaged targets based on the fusion of local and global features according to claim 2, characterized in that: The S4 is specifically as follows: For features at different levels, including local features L_i (i=1,2,3,4), global features G_i (i=1,2,3) and intermediate features P_i (i=1,2,3,4); First, a richer input feature is formed by combining the concatenated operations, and then a 1×1 convolution is used to compress the channels of the concatenated feature maps. The formula is as follows: Among them, C represents the concatenation operation of the feature, T_{conv1} represents the 1×1 convolution operation; T_m represents the input feature; Secondly, dilated convolution operations with different dilation rates are used to extract local features and global features respectively; the dilation rate when extracting local features is smaller than the dilation rate when extracting global features; Finally, after the local features and global features are extracted, the final local feature map and the global feature map are combined together through a series operation. The fused features are compressed through a 1×1 convolution, and the fused features are added to the original input features through a residual connection; the added features are further processed through a 3×3 convolution layer; the final context-enhanced feature map H_i (i=1,2,3,4) is output, which is expressed as follows: H_i=T_{conv3}(T_{conv1}(C(G_{f3},L_{f3}))⊕T_m),i∈{1,2,3,4} Among them, 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 fusion features as the shallow global features, corresponding to the global feature map G_i (i=3,2,1).
4. The method for detecting camouflaged targets 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}) Among them, Conv_{3×3,d=1} represents the dilated convolution 3×3, d=1, d represents the dilation rate, ⊕ represents the element-by-element addition; 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.
5. The method for detecting camouflaged targets 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}) Among them, L_{fi}(i=1,2,3) is the local feature map obtained by the local operation.
6. The method for detecting camouflaged targets based on the fusion of local and global features according to claim 3, characterized in that: The S5 is specifically as follows: The three levels of context-enhanced feature maps H_i (i=1, 2, 3) are subjected to 1×1 convolution operations to generate camouflaged target prediction features O_i (i=1, 2, 3), and O_1 is selected as the final prediction target.
7. The method for detecting camouflaged targets based on the fusion of local and global features according to claim 1, characterized in that: In S1, a Backbone network is used to extract preliminary features of different levels of the detection image.
8. A camouflaged target detection model based on local and global feature fusion applied to the method described in any one of claims 1 to 7, characterized in that: include: The feature extraction module uses the 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 of preliminary features at different levels, the global semantic information in the deep features and the local edge features in the shallow features are multi-level fused to obtain the edge feature map; and the intermediate features containing global semantic information at different levels are extracted; The edge-guided feature module uses the EFM module in BGNet to combine the preliminary features with the edge feature map to obtain local features; The local-global feature fusion module fuses the local features, intermediate features and global features of each level through a local and global dual-channel mechanism.
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
Camouflage target segmentation method for multi-level edge enhancement fusion
CN117036389A
Cited By
Cross-scale multi-direction feature fusion enhanced mirror surface detection method and system
CN120451515A