A method for detecting camouflaged objects based on boundary alternation guidance
By introducing an alternating boundary guidance method into the target object detection model and using the ResNet-34 network for camouflaged object detection, the problem of insufficient boundary refinement is solved, and higher accuracy in camouflaged object detection is achieved.
Patent Information
- Application Number
- CN202111549243.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2041-12-17
AI Technical Summary
Existing target object detection models lack further refinement of the boundaries of regions, resulting in blurred or missing boundaries, and even leading the model to learn the wrong target regions.
A method for detecting camouflaged objects based on boundary alternation guidance is constructed. By adding an initial localization module, a multi-scale receptive field module, and a boundary alternation guidance module to the backbone network, region maps and boundary maps are extracted layer by layer and constraints are refined. The ResNet-34 network is used for model training and detection.
It effectively improves the accuracy of camouflaged object detection, enhances feature channel selectivity, expands the network's receptive field, obtains more contextual information, and clearly and continuously identifies the boundaries and regions of camouflaged objects.
Smart Images

Figure CN114220013B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and digital image processing, specifically a method for detecting camouflaged objects based on boundary alternation guidance. Background Technology
[0002] In nature, camouflage is a crucial skill that allows organisms to blend into their surroundings and avoid attacks from predators. Camouflage object detection aims to identify objects that are highly similar to their environment. The low contrast between camouflaged objects and the background can greatly deceive the human visual system; therefore, camouflage object detection is more challenging than traditional saliency detection.
[0003] In recent years, many algorithms based on color and texture features have been proposed for detecting disguised objects. When the color of the disguised object is similar to the background color, texture features are used to distinguish the disguised object from the background; when the texture of the disguised object is similar to the background texture, color features are used to distinguish the disguised object from the background. However, this method is limited in that it is not suitable for all disguised object detection tasks, such as tasks where both texture and color are similar.
[0004] Inspired by human visual characteristics, using features learned from a wide range of training images by neural networks to extract camouflaged objects has broad applicability. Among these methods, boundary fusion is one of the more effective ones. However, most existing object detection models use boundary fusion for object extraction (such as EGNet and SCRN), but this approach still has the following drawbacks: the lack of further refinement of the boundaries by regions may lead to blurred or missing boundaries, guiding the model to learn incorrect target regions. Summary of the Invention
[0005] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0006] In view of the problems existing in the current text detection process, the present invention is proposed.
[0007] Therefore, the technical problem solved by this invention is that current target object detection models lack further refinement of the boundaries of regions, which leads to blurred or missing boundaries, and even guides the model to learn the wrong target regions.
[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for detecting camouflaged objects based on boundary alternation guidance, comprising:
[0009] A camouflage detection model based on boundary alternation guidance is constructed. On the basis of the backbone network, an initial localization module is added and used to extract multi-scale deep features of the backbone network to obtain a coarse localization map of the camouflaged object.
[0010] Adding and using a multi-scale receptive field module expands the receptive field of the coarse localization map and enhances the ability to extract semantic information;
[0011] By adding and using the boundary alternation guidance module, region maps and boundary maps are extracted layer by layer and refined by mutual constraints to obtain accurate camouflage object prediction maps.
[0012] To train the model, the image to be detected is input into the spoofing detection model, sampled to the original image size, a loss function is constructed to calculate the error between each predicted image and the real labeled image, and the spoofing detection model is updated by backpropagation.
[0013] The model detection is performed by inputting the image to be detected into the updated camouflage detection model, predicting the corresponding camouflage object prediction map, and outputting the final camouflage object prediction map.
[0014] As a preferred embodiment of the camouflaged object detection method based on boundary alternation guidance described in this invention, the backbone network adopts a ResNet-34 network.
[0015] As a preferred embodiment of the camouflaged object detection method based on boundary alternation guidance described in this invention, the initial positioning module includes:
[0016] Remove the last fully connected layer in the ResNet-34 network;
[0017] The initial positioning module inputs the fifth layer measurement output S5 into the average pooling branch and the max pooling branch respectively;
[0018] In the average pooling branch, S5 passes through a global average pooling layer and two convolutional layers. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer to obtain the average pooling feature. The specific formula is as follows:
[0019]
[0020] Where GlobalAvg represents global average pooling, Conv 1×1 This indicates a convolutional layer with a kernel size of 1.
[0021] In the max pooling branch, S5 passes through a global max pooling layer and two convolutional layers. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer to obtain the max pooling feature. The specific formula is as follows:
[0022]
[0023] Where GlobalMax represents global max pooling, and Conv1x1 represents a convolutional layer with a kernel of 1;
[0024] Two average pooling features and average pooling characteristics After channel stitching, convolution is performed to obtain the fifth coarse localization map R5. The specific formula is as follows:
[0025]
[0026] Where Cat(·,·) represents splicing along the channel dimension; Conv 3×3 The convolution parameters are {1024, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size. Each convolutional layer is followed by a BN normalization layer and a PReLU non-linear activation layer.
[0027] The same operation is performed on the other side outputs S2-S4 to finally obtain the remaining four coarse positioning maps R2-R4.
[0028] As a preferred embodiment of the camouflage object detection method based on boundary alternation guidance described in this invention, the multi-scale receptive field module includes:
[0029] The fifth-layer coarse positioning map R5 is divided into four equal parts according to the number of channels, and four parallel branches are input simultaneously, including the first branch, the second branch, the third branch, and the fourth branch, as follows:
[0030] [x1,x2,x3,x4] = split(R5)
[0031] Where split(·) means to split along the channel dimension;
[0032] In the first branch, the input x1 is directly convolved, and each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed by the formula:
[0033]
[0034] In the second branch, the input x2 of the second branch and the output of the first branch are combined. Element-wise addition is performed followed by convolution. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed in the formula:
[0035]
[0036] In the third branch, the input x3 of the third branch and the output of the second branch are combined. Element-wise addition is performed followed by convolution. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed in the formula:
[0037]
[0038] In the fourth branch, the input x4 of the fourth branch and the output of the third branch are combined. Element-wise addition is performed followed by convolution. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed in the formula:
[0039]
[0040] Then, the outputs of the four branches are concatenated and output to obtain the localization map R5′ after expanding the receptive field, which is expressed by the formula:
[0041]
[0042] Cat(·,·) indicates splicing along the channel dimension.
[0043] As a preferred embodiment of the camouflage object detection method based on boundary alternation guidance described in this invention, the boundary alternation guidance module includes:
[0044] In the fifth layer, the boundary alternation guidance module performs a 1×1 convolution on the positioning map R5′ to unify the number of channels to 32 before inputting it into the region branch and boundary branch. The operation of first concatenating channels and then inputting them into the convolutional layer is set as the Catmod formula, which is expressed as:
[0045] Catmod(·,·) = Conv 3×3 (Cat(·,·))
[0046] Where Cat(·,·) represents splicing along the channel dimension; Conv 3×3 The convolution parameters are {64, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size.
[0047] In the boundary branch, the region input Guided boundary input Catmod refinement yields The formula is expressed as:
[0048]
[0049] In the said regional branches, boundary features Guided area input Catmod feature extraction obtained The formula is expressed as:
[0050]
[0051] In the boundary branch, the region input Guided boundary input Catmod refinement yields The formula is expressed as:
[0052]
[0053] In the said regional branches, boundary features Guided area input Catmod feature extraction obtained The formula is expressed as:
[0054]
[0055] Finally, the regional branch is output. and the boundary branch output Perform convolution to output the predicted region map P5 and the predicted boundary map. The formula is expressed as:
[0056]
[0057]
[0058] Among them, Conv 3×3 The convolution parameters are {32, 3×3}, where n represents the number of convolution channels and k represents the kernel size.
[0059] As a preferred embodiment of the camouflage object detection method based on boundary alternation guidance described in this invention, the boundary alternation guidance module further includes:
[0060] In the fourth layer, the localization map R4 is convolved with a 1×1 method to unify the number of channels to 32 before being input into the region branch and boundary branch. The predicted region map P5 and the predicted boundary map are then used. With the fourth layer region branch input and the fourth layer boundary input The Catmod formula is expressed as:
[0061]
[0062]
[0063] Repeat the remaining steps of the fifth layer to obtain the region features after each Catmod operation. and boundary features The formula is expressed as:
[0064]
[0065]
[0066] Where k represents the number of Catmod operations;
[0067] Output the region branch and boundary branch output Perform convolution to output the predicted region map P4 and the predicted boundary map. The formula is expressed as:
[0068]
[0069]
[0070] Among them, Conv 3×3 The convolution parameters are {32, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size.
[0071] As a preferred embodiment of the camouflaged object detection method based on boundary alternation guidance described in this invention, the boundary alternation guidance module further includes: in the second and third layers, repeating the fourth layer steps to obtain updated prediction region maps P2 and P3 and prediction boundary maps.
[0072] As a preferred embodiment of the camouflage object detection method based on boundary alternation guidance described in this invention, the sampling involves sampling the camouflage object prediction images P2-P5 to the original image size, i.e.
[0073] As a preferred embodiment of the camouflaged object detection method based on boundary alternation guidance described in this invention, the loss function is:
[0074] L bce+iou =l bce +l iou
[0075] In the formula, l bce Let l be a binary cross-entropy function. iou This is a cross-joint function.
[0076] As a preferred embodiment of the camouflage object detection method based on boundary alternation guidance described in this invention, the final camouflage object prediction map needs to be obtained by modifying the camouflage object prediction map P2. ×4 Output after activation through the Sigmoid layer.
[0077] The beneficial effects of this invention are as follows: This invention can selectively enhance useful feature channels and suppress useless feature channels, effectively filtering background information and thus improving the accuracy of disguised object detection; it can expand the receptive field of the network, obtain more contextual information and high-level semantic information, thereby enabling the network to detect complete disguised object regions; it can first extract the boundaries of disguised objects based on a coarse localization map, then use the boundaries to constrain the disguised region, and then refine the boundaries of disguised objects based on the optimized disguised region. This process is repeated, gradually and alternately refining the boundaries and regions of disguised objects, ultimately obtaining accurate disguised object regions and clear and continuous disguised object boundaries, effectively improving the accuracy of disguised object detection. Attached Figure Description
[0078] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0079] Figure 1 A schematic diagram of the overall process of the camouflaged object detection method based on boundary alternation guidance provided in the first embodiment of the present invention;
[0080] Figure 2 A schematic diagram of the initial localization module in the camouflaged object detection method based on boundary alternation guidance provided in the first embodiment of the present invention;
[0081] Figure 3 This is a schematic diagram of the multi-scale receptive field module in the camouflage object detection method based on boundary alternation guidance provided in the first embodiment of the present invention;
[0082] Figure 4 A schematic diagram of the boundary alternation guidance module in the camouflage object detection method based on boundary alternation guidance provided in the first embodiment of the present invention;
[0083] Figure 5 Example diagrams of the output results of the camouflaged object detection method based on boundary alternation guidance provided by the present invention are shown below: a-input image, b-ground value annotation, c-prediction map of side output 2, d-salience map of side output 3, e-salience map of side output 4, f-salience map of side output 5, g-predicted boundary map. Detailed Implementation
[0084] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0085] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0086] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0087] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0088] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0089] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0090] Example 1
[0091] Reference Figures 1-5As an embodiment of the present invention, a method for detecting camouflaged objects based on boundary alternation guidance is provided, comprising:
[0092] S1: Construct a camouflage detection model based on boundary alternation guidance. On the basis of the backbone network, add and use the initial localization module to extract multi-scale deep features of the backbone network to obtain a rough localization map of the camouflaged object.
[0093] Furthermore, the backbone network adopts the ResNet-34 network.
[0094] Furthermore, the initial positioning module includes:
[0095] like Figure 1 Remove the last fully connected layer in the ResNet-34 network and output S2-S5 at a deeper level;
[0096] like Figure 2 The initial positioning module inputs the fifth layer measurement output S5 into the average pooling branch and the max pooling branch respectively;
[0097] In the average pooling branch, S5 passes through a global average pooling layer and two convolutional layers with convolutional parameters of {512, 1×1} and {512, 1×1}, respectively. Here, in {n, k×k}, n represents the number of convolutional channels, and k represents the kernel size. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer to obtain the average pooling features. The specific formula is as follows:
[0098]
[0099] Where GlobalAvg represents global average pooling, Conv 1×1 This indicates a convolutional layer with a kernel size of 1.
[0100] In the max pooling branch, S5 passes through a global max pooling layer and two convolutional layers with convolution parameters of {512, 1×1} and {512, 1×1}, respectively. Here, in {n, k×k}, n represents the number of convolutional channels, and k represents the kernel size. Each convolutional layer is followed by a BN normalization layer and a PReLU non-linear activation layer to obtain the max pooling feature. The specific formula is as follows:
[0101]
[0102] Where GlobalMax represents global max pooling, and Conv1x1 represents a convolutional layer with a kernel of 1;
[0103] Two average pooling features and average pooling characteristics After channel stitching, convolution is performed to obtain the fifth coarse localization map R5. The specific formula is as follows:
[0104]
[0105] Where Cat(·,·) represents splicing along the channel dimension; Conv 3×3 The convolution parameters are {1024, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size. Each convolutional layer is followed by a BN normalization layer and a PReLU non-linear activation layer.
[0106] The same operation is performed on the other side outputs S2-S4 to finally obtain the remaining four coarse positioning maps R2-R4.
[0107] Specifically, the initial positioning module works as follows:
[0108] After the camouflaged object image is input into the backbone network, the side outputs S2-S5 are obtained in the deep layers. The number of convolution channels corresponding to S2-S5 are 64, 128, 256 and 512 respectively.
[0109] In the U-shaped network structure, through multi-scale receptive field modules and boundary alternating guidance modules, the layers are reduced by a factor of 2 from deep to shallow, finally obtaining a rough localization map.
[0110] S2: Add and use a multi-scale receptive field module to expand the receptive field of the coarse localization map and improve the ability to extract semantic information;
[0111] Furthermore, the multi-scale receptive field module includes:
[0112] like Figure 3 The fifth-layer coarse positioning map R5 is divided into four equal parts according to the number of channels, and four parallel branches are input simultaneously, including the first branch, the second branch, the third branch, and the fourth branch, as follows:
[0113] [x1,x2,x3,x4] = split(R5)
[0114] Where split(·) means to split along the channel dimension;
[0115] In the first branch, the input x1 is directly convolved with parameters {512, 3×3, 1}, where n represents the number of convolution channels, k represents the kernel size, and d represents the dilatation rate. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as shown in the formula:
[0116]
[0117] In the second branch, the input x2 of the second branch and the output of the first branch are combined. Element-wise addition is performed followed by convolution. The convolution parameters are {512, 3×3, 2}, where n represents the number of convolution channels, k represents the kernel size, and d represents the dilation rate. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as shown in the formula:
[0118]
[0119] In the third branch, the input of the third branch is x3 and the output of the second branch is... Element-wise addition is performed followed by convolution. The convolution parameters are {512, 3×3, 4}, where n represents the number of convolution channels, k represents the kernel size, and d represents the dilation rate. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as shown in the formula:
[0120]
[0121] In the fourth branch, the input of the fourth branch is x4 and the output of the third branch is x4. Element-wise addition is performed followed by convolution. The convolution parameters are {512, 3×3, 6}, where n represents the number of convolution channels, k represents the kernel size, and d represents the dilation rate. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as shown in the formula:
[0122]
[0123] Then, the outputs of the four branches are concatenated and output to obtain the localization map R5′ after expanding the receptive field, which is expressed by the formula:
[0124]
[0125] Cat(·,·) indicates splicing along the channel dimension.
[0126] S3: Add and use the boundary alternation guidance module to extract the region map and boundary map layer by layer and refine them by constraining each other to obtain an accurate camouflage object prediction map;
[0127] Furthermore, such as Figure 4 In the fifth layer, the boundary alternation guidance module performs a 1×1 convolution on the localization map R5′, unifying the number of channels to 32 before inputting it into the region branch and boundary branch. The operation of first concatenating channels before inputting them into the convolutional layer is set as the Catmod formula, expressed as:
[0128] Catmod(·,·) = Conv 3×3(Cat(·,·))
[0129] Where Cat(·,·) represents splicing along the channel dimension; Conv 3×3 The convolution parameters are {64, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size.
[0130] In the boundary branch, the region input Guided boundary input Catmod refinement yields The formula is expressed as:
[0131]
[0132] Boundary features in regional branches Guided area input Catmod feature extraction obtained The formula is expressed as:
[0133]
[0134] In the boundary branch, the region input Guided boundary input Catmod refinement yields The formula is expressed as:
[0135]
[0136] Boundary features in regional branches Guided area input Catmod feature extraction obtained The formula is expressed as:
[0137]
[0138] Finally, output the region branch. and boundary branch output Perform convolution to output the predicted region map P5 and the predicted boundary map. The formula is expressed as:
[0139]
[0140]
[0141] Among them, Conv 3×3 The convolution parameters are {32, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size.
[0142] In the fourth layer, the localization map R4 is convolved with a 1×1 method to unify the number of channels to 32 before being input into the region branch and boundary branch. The predicted region map P5 and the predicted boundary map are then used. With the fourth layer region branch input and the fourth layer boundary input The Catmod formula is expressed as:
[0143]
[0144]
[0145] It should be noted that Catmod is performed for region feature extraction and boundary refinement.
[0146] Repeat the remaining steps of the fifth layer to obtain the region features after each Catmod operation. and boundary features The formula is expressed as:
[0147]
[0148]
[0149] Where k represents the number of Catmod operations;
[0150] Output the region branch and boundary branch output Perform convolution to output the predicted region map P4 and the predicted boundary map. The formula is expressed as:
[0151]
[0152]
[0153] Among them, Conv 3×3 The convolution parameters are {32, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size.
[0154] In the second and third layers, the steps of the fourth layer are repeated to obtain the updated prediction region maps P2 and P3 and the prediction boundary map.
[0155] S4: Train the model by inputting the image to be detected into the spoofing detection model, sampling it to the original image size, constructing a loss function to calculate the error between each predicted image and the real labeled image, and backpropagating to update the spoofing detection model.
[0156] It should be noted that the training set used in model training is the image set to be tested.
[0157] Furthermore, sampling involves sampling the camouflaged object prediction images P2-P5 to the original image size, i.e.
[0158] The loss function is:
[0159] L bce+iou =l bce +l iou
[0160] In the formula, l bce Let l be a binary cross-entropy function. iou For cross-joint functions;
[0161] Specifically, the binary cross-entropy loss function is:
[0162] l bce =-∑ (r,c) [G(r,c)log(P(r,c))+(1-G(r,c))log(1-P(r,c))+(1-G(r,c))log(1-P(r,c))]
[0163] G(r,c)∈{0,1} represents the pixel value of the true value, and P(r,c) represents the probability map of the predicted camouflaged object.
[0164] Definition of cross-joint loss function:
[0165]
[0166] S5: Perform model detection. Input the image to be detected into the updated camouflage detection model, predict its corresponding camouflage object prediction map, and output the final camouflage object prediction map.
[0167] It should be noted that the test set of images to be tested was used in the model training.
[0168] Furthermore, the final camouflage object prediction map needs to be obtained by passing the camouflage object prediction map P2. ×4 Output after activation through the Sigmoid layer.
[0169] Example 2
[0170] Referring to Table 1, another embodiment of the present invention is presented. To verify and illustrate the technical effects of the method, this embodiment compares the traditional technical solution with the method of the present invention, and compares the test results using scientific demonstration methods to verify the real effect of the method.
[0171] In Table 1, the first column lists the proposed methods and models from recent years, with subscripts indicating the year of proposal, such as NLDF17 representing a method proposed in 2017. The second column represents the backbone network of the model, with complexity in the order of ResNet-50 > ResNet-34 > VGG-16. The first row represents the dataset names, such as CAMO, CHAMELEON, COD10K, and NC4K. CAMO and CHAMELEON are small datasets with only 250 and 76 images respectively, while COD10K and NC4K are large datasets with 2026 and 4121 images respectively. The second row represents the performance metrics, where upward arrows indicate that a higher performance metric is better, such as Sα. Fβ. A downward arrow indicates that a smaller value for this performance metric is better, such as M. A "-" indicates that the method did not provide results for this dataset.
[0172] It should be noted that precision and recall can be obtained by comparing the final prediction graph with the ground truth graph of the dataset itself.
[0173] Fβ is a comprehensive measurement metric, defined as the weighted harmonic mean of precision and recall:
[0174]
[0175] β is usually taken as 0.3.
[0176] Sα is the structural similarity, representing the structural similarity between the predicted graph and the ground truth (GT) graph of the dataset itself.
[0177] S α =α×S o +(1-α)×S r ,
[0178] α is usually set to 0.5, Sr is the similarity of regions, and So is the similarity of objects.
[0179] The average value of the pixels:
[0180]
[0181] W represents the width of the image, H represents the height of the image, and x and y represent the position of the current pixel in the image. Represents the deviation matrix. The ground truth graph representing the dataset. This represents a binary foreground plot.
[0182] The MAE metric is used to evaluate the average pixel difference between unmasked regions in a predicted image.
[0183]
[0184] H represents the height of the prediction map, W represents the width of the prediction map, x, y represent the position of the current pixel, P(x,y) represents the prediction map, and G(x,y) represents the ground truth map.
[0185] Generally speaking, higher Fβ and lower MAE indicate better performance.
[0186] Table 1 Comparison of experimental results
[0187]
[0188] In Table 1, solid boxes represent the best performance metrics, dashed boxes represent the second best, and gray boxes represent the third best. Based on the results in Table 1, it is clear that the best performance across the four datasets was almost entirely achieved using the ResNet-34 network model based on our technical solution. In the more convincing large datasets, the ResNet-34 model performed best. This network, with its lower-complexity backbone (ResNet-34), achieved better results than a more complex backbone network (ResNet-50). This also verifies that our technical solution can accurately locate camouflaged objects in similar backgrounds. Furthermore, the boundary-alternating guided structure can utilize boundary constraints to obtain smoother camouflaged object prediction maps and can also use the prediction maps to constrain boundaries to obtain continuous and clear boundary maps, effectively improving the accuracy of camouflaged object detection.
[0189] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for detecting camouflaged objects based on boundary alternation guidance, characterized in that it includes: A camouflage detection model based on boundary alternation guidance is constructed. On the basis of the backbone network, an initial localization module is added and used to extract multi-scale deep features of the backbone network to obtain a coarse localization map of the camouflaged object. Adding and using a multi-scale receptive field module expands the receptive field of the coarse localization map and enhances the ability to extract semantic information; By adding and using the boundary alternation guidance module, region maps and boundary maps are extracted layer by layer and refined by mutual constraints to obtain accurate camouflage object prediction maps. The boundary alternation guidance module includes: In the fifth layer of the initial localization module, the boundary alternation guidance module performs a 1×1 convolution on the localization map R5′ to unify the number of channels to 32 before inputting it into the region branch and boundary branch. The operation of first performing channel stitching and then inputting it into the convolutional layer is set as the Catmod formula, which is expressed as: Catmod(·,·)=Conv 3×3 (Cat(·,·)) Where Cat(·,·) represents splicing along the channel dimension; Conv 3×3 The convolution parameters are {64, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size. In the boundary branch, the region input Guided boundary input Catmod refinement yields The formula is expressed as: In the said regional branches, boundary features Guided area input Catmod feature extraction obtained The formula is expressed as: In the boundary branch, the region input Guided boundary input Catmod refinement yields The formula is expressed as: In the said regional branches, boundary features Guided area input Catmod feature extraction obtained The formula is expressed as: Finally, the regional branch is output. and the boundary branch output Perform convolution to output the predicted region map P5 and the predicted boundary map. The formula is expressed as: Among them, Conv 3×3 The convolution parameters are {32, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size. In the fourth layer, the localization map R4 is convolved with a 1×1 method to unify the number of channels to 32 before being input into the region branch and boundary branch. The predicted region map P5 and the predicted boundary map are then used. With the fourth layer region branch input and the fourth layer boundary input The Catmod formula is expressed as: Repeat the remaining steps of the fifth layer to obtain the region features after each Catmod operation. and boundary features The formula is expressed as: Where k represents the number of Catmod operations; Output the region branch and boundary branch output Perform convolution to output the predicted region map P4 and the predicted boundary map. The formula is expressed as: Among them, Conv 3×3 The convolution parameters are {32, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size. In the second and third layers, the steps of the fourth layer are repeated to obtain the updated prediction region maps P2 and P3 and the prediction boundary map. To train the model, the image to be detected is input into the spoofing detection model, sampled to the original image size, a loss function is constructed to calculate the error between each predicted image and the real labeled image, and the spoofing detection model is updated by backpropagation. The model detection is performed by inputting the image to be detected into the updated camouflage detection model, predicting the corresponding camouflage object prediction map, and outputting the final camouflage object prediction map.
2. The camouflaged object detection method based on boundary alternation guidance as described in claim 1, characterized in that: The backbone network uses the ResNet-34 network.
3. The camouflaged object detection method based on boundary alternation guidance as described in claim 2, characterized in that: The initial positioning module includes: Remove the last fully connected layer in the ResNet-34 network; The initial positioning module inputs the fifth layer measurement output S5 into the average pooling branch and the max pooling branch respectively; In the average pooling branch, S5 passes through a global average pooling layer and two convolutional layers. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer to obtain the average pooling feature. The specific formula is as follows: Where GlobalAvg represents global average pooling, Conv 1×1 This indicates a convolutional layer with a kernel size of 1. In the max pooling branch, S5 passes through a global max pooling layer and two convolutional layers. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer to obtain the max pooling feature. The specific formula is as follows: Where GlobalMax represents global max pooling, and Conv1x1 represents a convolutional layer with a kernel of 1; Two average pooling features and average pooling characteristics After channel stitching, convolution is performed to obtain the fifth coarse localization map R5. The specific formula is as follows: Where Cat(·,·) represents splicing along the channel dimension; Conv 3×3 The convolution parameters are {1024, 3×3}, and the convolution parameters are {n, k×k}, where n represents the number of convolution channels and k represents the kernel size. Each convolutional layer is followed by a BN normalization layer and a PReLU non-linear activation layer. The same operation is performed on the other side outputs S2-S4 to finally obtain the remaining four coarse positioning maps R2-R4.
4. The camouflaged object detection method based on boundary alternation guidance as described in claim 3, characterized in that: The multi-scale receptive field module includes: The fifth-layer coarse positioning map R5 is divided into four equal parts according to the number of channels, and four parallel branches are input simultaneously, including the first branch, the second branch, the third branch, and the fourth branch, as follows: [x1,x2,x3,x4] = split(R5) Where split(·) represents splitting along the channel dimension; In the first branch, the input x1 is directly convolved, and each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed by the formula: In the second branch, the input x2 of the second branch and the output of the first branch are combined. Element-wise addition is performed followed by convolution. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed in the formula: In the third branch, the input x3 of the third branch and the output of the second branch are combined. Element-wise addition is performed followed by convolution. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed in the formula: In the fourth branch, the input x4 of the fourth branch and the output of the third branch are combined. Element-wise addition is performed followed by convolution. Each convolutional layer is followed by a BN normalization layer and a PReLU nonlinear activation layer, as expressed in the formula: Then, the outputs of the four branches are concatenated and output to obtain the localization map R5′ after expanding the receptive field, which is expressed by the formula: Cat(·,·) indicates splicing along the channel dimension.
5. The camouflaged object detection method based on boundary alternation guidance as described in claim 4, characterized in that: The sampling process involves sampling the camouflaged object prediction images P2-P5 to the original image size, i.e.
6. The camouflaged object detection method based on boundary alternation guidance as described in claim 5, characterized in that: The loss function is: L bce+iou =l bce +l iou In the formula, l bce Let l be a binary cross-entropy function. iou This is a cross-joint function.
7. The camouflaged object detection method based on boundary alternation guidance as described in claim 6, characterized in that: The final camouflage object prediction map needs to be obtained by passing the camouflage object prediction map P2. ×4 Output after activation through the Sigmoid layer.