Multistage refined camouflage target detection method based on wavelet enhancement recognition
By adopting wavelet enhancement recognition and multi-level refinement processing methods in camouflage object detection technology, the problems of omissions in detail identification and feature redundancy in the prior art are solved, and more efficient camouflage object detection is achieved with low computational volume.
Patent Information
- Application Number
- CN202411338460.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing camouflage object detection technology has shortcomings in the details identification omissions and feature redundancy, especially in the case of low computational volume, which leads to poor detection results.
A multi-level refined camouflage object detection method based on wavelet enhancement recognition is adopted. By constructing and training a camouflage object detection model, the wavelet discrimination enhancement module and asymmetric convolution Mamba module are used for feature processing, and decoding is combined with a feature inversion decoder to reduce feature redundancy and improve detection accuracy.
On the premise of ensuring low computational volume, the detailed identification ability and feature utilization efficiency of camouflage object detection are improved, feature redundancy and noise are reduced, and detection accuracy is improved.
Smart Images

Figure CN119540520A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to a multi-level refinement camouflage target detection method based on wavelet enhanced recognition. Background Art
[0002] The concept of camouflaged object detection was born to improve the ability to recognize subtle visual differences. Compared with general object detection and salient object detection, camouflaged object detection faces greater challenges due to the seamless integration of camouflaged objects with their backgrounds. In recent years, researchers have improved from traditional algorithmic methods to deep learning methods.
[0003] The existing camouflaged target detection technology is dominated by multi-task methods based on convolutional neural networks. This type of method will add different modules or tasks during the training phase to improve the ability to detect camouflaged targets. Usually, a large number of features are introduced and transmitted when searching for detail information from coarse to fine. The ability to extract actual useful feature information needs to be strengthened, and the differences between multiple tasks may have a negative impact on prediction and cause feature redundancy problems. At the same time, in order to cope with camouflaged target detection in complex environments, there are also methods that adopt transformer architectures, but they also introduce a large increase in network parameters, and the low computational efficiency makes it difficult to deploy in existing devices. However, existing methods cannot guarantee the suppression of detail recognition omissions when the amount of computation is low.
[0004] In the face of the problem of missing details and redundant features in existing technologies, the existing ideas for solving this problem can be roughly divided into three categories: obtaining a high receptive field through the self-attention mechanism of the transformer. This method is simple and effective, but the computational cost is too high and it is difficult to deploy in real applications. Providing features for camouflaged target detection through additional information, such as boundary information, requires support from the data itself and also has a large space and time cost. Taking a multi-stage approach to process features multiple times and relying on the data itself to generate discriminant information, this method requires the improvement of the utilization of useful features, but it has a lower training cost and does not require additional support from the data set. At present, it mainly mines image detail feature information for identification.
[0005] However, in order to ensure computational efficiency, existing methods usually collect useless redundant feature information, have weak global attention to the image, ignore the role of global information, and the detection effect needs to be improved. Summary of the invention
[0006] The technical problem to be solved by the present invention is to propose a multi-level refinement camouflaged target detection method based on wavelet enhanced recognition, which makes up for the defect that the existing method fails to effectively utilize image information to extract effective identification features, and at the same time ensures low computational complexity to complete the camouflaged target detection task while paying attention to global information.
[0007] The technical solution adopted by the present invention to solve the above technical problems is:
[0008] 1. A multi-level refinement camouflage target detection method based on wavelet enhanced recognition, comprising the following steps:
[0009] A: Build and train a camouflaged target detection model;
[0010] A1: Obtain sample images and preprocess them, and use the Res2Net model to build a K-layer pyramid. Then use the pre-trained Res2Net model to extract features as the first layer of features in the pyramid, and generate K groups of features in sequence through the pyramid processing features.
[0011] A2: Feature processing is performed through the wavelet discrimination enhancement module and the asymmetric convolutional Mamba module respectively; specifically, the Haar wavelet decomposition is used to obtain the detail discrimination feature F based on the obtained pyramid feature wk Based on the last layer of pyramid features, the Mamba block and asymmetric convolution are used to process them respectively, and then the processed features are aggregated and input into the sub-path excitation module to obtain the global feature prediction map
[0012] A3: The neighborhood aggregation module is used to reduce the redundant parts of the features extracted by the wavelet discrimination enhancement module to obtain a rough prediction, and the rough prediction is inverted as a reverse mask; a feature inversion decoder is formed by setting a number of cascaded guide units; the detail discrimination feature F wk And the global feature prediction map The feature inversion decoder is used to decode and obtain the final prediction image;
[0013] A4: Calculate the weighted binary cross entropy loss of the last three layers of the pyramid and the weighted intersection-over-union loss of the overall prediction respectively, add the two losses to get the final loss function of the entire model, and train the disguised target detection model based on the loss function;
[0014] B: Perform detection tasks based on the disguised target detection model: Use the trained disguised target detection model for actual disguised target detection tasks.
[0015] Furthermore, the step A1 is specifically as follows:
[0016] Step 11: Preprocessing; obtain the visible light image i to be learned, uniformly set each image in the image set I by changing the width and height, uniformly transform the tensor of RGB images and binary images by normalization; group them according to the batch size BS;
[0017] Step 12: The preprocessed image i, whose corresponding four-dimensional vector is (BS, C, H, W), where the batch size is BS, the height is H, the width is W, and the number of channels is C; is processed by the pre-trained Res2Net model to obtain the features as the first layer features f1 of the pyramid;
[0018] Step 13: Generate pyramid features f based on the first layer features f1 k ; K groups of features are generated sequentially by processing the features at the pyramid level established by the Res2Net model, and each group of f k All by f k-1 Generate, f k ,k∈{1,2,…,K}, taking f1 as the benchmark, the resolution of each layer is The number of channels is C×2 k , f1 remains unchanged.
[0019] Furthermore, the step A2 is specifically as follows:
[0020] Step 21: The wavelet discrimination enhancement module processes the features as follows: First, the feature enhancement module is used to transform the features f of the last three layers of the pyramid. k The number of channels C is converted to 32, and the components of the four dilated convolutions are aggregated and reactivated to obtain the following The enhanced feature f k ′ ; Send the feature into the Haar wavelet decomposition and transform it into a size of The four components are a (row odd and column odd), b (row odd and column even), c (row even and column odd), and d (row even and column even); then the features are decomposed into high-frequency information using the following formula With low frequency information W k LL :
[0021]
[0022] High frequency information Send it to the high frequency processing with residual block to obtain high frequency processing information HW k :
[0023]
[0024] Low frequency information Also processed to obtain low frequency processing information LW k :
[0025]
[0026] Among them, Res is the batch normalized residual block, AM is the joint attention block that combines channel attention and spatial attention, σ and μ represent the mean and standard deviation of the statistics calculated by the channel respectively; σ ′ and μ' are affine parameters learned from the data, IN is instance normalization; then the high-frequency and low-frequency information of the sum are mixed by transposing convolution, and then the channel information is adjusted by convolution and bilinear interpolation to obtain the detail discriminative feature F with discriminative information wk , which is expressed as follows:
[0027] F wk =FB(TC(HW k +LW k ))
[0028] Among them, TC represents transposed convolution, and Fb represents a module that performs convolution and adjusts channel information through bilinear interpolation.
[0029] Step 22: The asymmetric convolutional Mamba module processes features in the following steps:
[0030] The last layer of the pyramid feature f K First, transform it into and The number of channels is halved and sent to a Mamba block and an asymmetric convolution decomposed by a 3×3 convolution, and then combined with the last layer feature f through a 1×1 convolution. K Aggregate to obtain coarse global features Then the rough global features Obtaining prior features through upsampling operations Then the prior features are pooled by global average pooling. Mapping to the same dimension as the latent feature will turn the resolution into 1; then the activation gets the coarse prediction map F prior , which is expressed as follows:
[0031]
[0032] Where C1 and C2 are both 1×1 convolutions and contain a normalization function, and δ is the sigmoid gating function used for normalization; σ represents the ReLU activation function;
[0033] The rough prediction map F prior and coarse global features Slice and send to the subpath excitation module to output the global feature prediction map The subpath excitation module includes a spatial attention module and a channel attention module. The specific process is as follows:
[0034]
[0035] Among them, SA represents the spatial attention module, CA represents the channel attention module, and C3 is a 1×1 convolution and contains a normalization function.
[0036] Furthermore, in step A3, the feature inversion decoder of each layer is composed of three guide units connected in series, and its specific feature updating method includes the following steps:
[0037] Step 31: Neighborhood aggregation: First, the neighborhood aggregation module is used to process the high and low frequency information of each layer to generate a reverse mask:
[0038]
[0039] in, represents the k-th pyramid feature, the reverse mask of the i-th guide unit, i∈{1,2,3}; k is specifically the last three layers of the pyramid; NCD represents neighborhood aggregation, Sampling represents sampling, and E represents the all-one matrix. represents the inverse operation used to subtract the matrix E;
[0040] Step 32: Set the number of groups g i , g i ∈{32,8,1}, each group uses a guide unit, set the group g i Then split the feature F wk , where j∈{1,……,g i}, thus obtaining the slice feature When i∈{1,3}, the boot unit processing is summarized as follows:
[0041]
[0042]
[0043] Where Split means grouping, and Cat means aggregation. When i=2, the attention module and random inactivation dropout are introduced to suppress redundant features. The slicing operation is expressed as follows:
[0044]
[0045] Among them, conv represents the convolution operation, PA and CA represent the position attention module and channel attention module respectively. Drop represents the dropout operation with a coefficient of 0.1;
[0046] Through the aggregation formula Cat aggregation, three refined guidance groups are obtained
[0047] The reverse conversion process is then performed to obtain a finer layer of prediction masks The specific process is as follows:
[0048]
[0049] Among them C s Refers to the operation of performing 3×3 kernel convolution on the slice and performing batch normalization. Score means converting data into learnable weight parameters through convolution;
[0050] A more precise forecast is then obtained using:
[0051]
[0052] Where sampling represents the sampling operation opposite to the neighborhood aggregation sampling operation, k∈{K-2,K-1,K}, K represents the last pyramid layer; when k is the last layer, Pred k+1 The input is According to the above formula sequence, we can get the accurate prediction graph Pred k , the precise prediction graph Pred when k = K-2 k Prediction map of disguised object detection as the final prediction.
[0053] Furthermore, the weighted binary cross entropy loss is expressed as follows:
[0054]
[0055] Among them, y is the true label, 0 or 1, which is represented by our actual prediction graph. is the probability of the positive class predicted by the model; w y and w 1-y are the weights for positive and negative classes respectively;
[0056] The weighted intersection-over-union loss is expressed as follows:
[0057]
[0058] For which and B represent the real target bounding box and predicted box of the disguised target respectively, and w is the weight of the bounding box.
[0059] Furthermore, the final loss function of the model is expressed as follows:
[0060]
[0061] Among them, α is the weight parameter and GT represents the true value of the image.
[0062] Furthermore, the weight parameter α is obtained based on tanh(x+1) according to the number of training steps x. Specifically, when k is the last layer, When k is the last 2 or 3 layers,
[0063] Furthermore, the number of pyramid levels K=5.
[0064] Furthermore, the sampling operation of the neighborhood aggregation is specifically to perform ×4 upsampling when k=5, and to perform ×2 downsampling when k is in the set {3,4}.
[0065] Furthermore, the enhanced feature f k ′ Specifically obtained through the following methods:
[0066] For the feature set f k ,k∈{3,4,5}, introducing a residual layer component b with 4 different dilation rates i ∈{1,2,3,4} feature enhancement module, the expansion rate of 4 parallel residual layer components is d∈{1,3,5,7}, the first layer of each component is a 1×1 convolution to reduce the number of channels to 32, and the residual layer includes a (2i-1)×(2i-1) convolution layer and a 3×3 convolution layer with expansion rate d, which controls the number of channels to 32. The component results are summed and sent to the ReLU function for activation to finally obtain the enhanced feature f k ′ ,k∈{3,4,5}.
[0067] The beneficial effects of the present invention are:
[0068] 1) Considering the advantages and disadvantages of convolutional neural networks and transfomer methods, by combining Mamba and convolutional networks, multi-level feature information is refined to obtain useful discrimination information. Under the premise of ensuring low computational complexity, the long-range dependence of information is strengthened and the receptive field is improved. This improves the effect of camouflaged target detection when detail recognition is omitted.
[0069] 2) The time-frequency positioning characteristics of wavelets are considered to enhance images and reduce noise. At the same time, in the face of multi-layer information features, a feature inversion decoder is used for decoding operations, which reduces feature redundancy and noise in the form of masks, thereby reducing the situation of mistaking non-targets for camouflaged targets during detection, and further improving the accuracy of camouflaged target detection under the problems of detail recognition omissions and feature redundancy. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is an overall flow chart of the camouflaged target detection method in the present invention;
[0071] Figure 2 The schematic diagram of wavelet discrimination enhancement of the present invention;
[0072] Figure 3The schematic diagram of the asymmetric convolution Mamba of the present invention;
[0073] Figure 4 The schematic diagram of the guide unit in the feature inversion decoder of the present invention;
[0074] Figure 5 A schematic diagram of the process of camouflaged target detection according to the present invention. DETAILED DESCRIPTION
[0075] The present invention aims to propose a multi-level refinement camouflaged target detection method based on wavelet enhanced recognition, which makes up for the defects of the existing methods that fail to effectively utilize global information to detect complex images and miss details, and fail to handle the redundant features generated by multi-layer information, so that it can better complete the camouflaged target detection task under the challenges of the two defects. The overall implementation process is as follows Figure 1 As shown:
[0076] S1. The pre-trained model is used to process the visible light image to be studied, and the image is converted into multi-layer initial features through a pyramid structure;
[0077] S2.1, the initial features of the last three layers are sent to the feature enhancement module for processing, and then after being transformed by wavelet decomposition, the features are updated using the wavelet discrimination enhancement module;
[0078] S2.2, the initial features of the last layer are updated by retaining global information through the asymmetric convolutional Mamba module;
[0079] S3, the features are processed by the feature inversion decoder to obtain the prediction graph. Each decoder contains 3 sequentially connected guide units. The wavelet discrimination enhancement module of each layer updates the features and uses the prediction of the previous layer as a mask. The first time, the features updated by the asymmetric convolutional Mamba are used as a mask.
[0080] S4. Calculate the weighted intersection-over-union loss and weighted binary cross entropy loss respectively, combine the two losses and train the disguised target detection model through the Adam optimizer.
[0081] S5. Execute a specific camouflaged target detection task. When detecting an unlearned image, use the trained model to obtain the final prediction image.
[0082] Example:
[0083] The following is an example of a visible light image i to be learned with a height of H, a width of W, and a number of channels of 3, and the scheme of the present invention is described in detail. The specific implementation process is as follows:
[0084] Step 1: First, preprocess the sample image. The data preprocessing operation specifically includes three sub-steps: data preprocessing, pre-training model feature extraction, and pyramid model feature processing:
[0085] Step 11: Take the tensor approach and uniformly set each image in the image set I to 384*384 by changing the width and height. For RGB images and binary images, uniformly transform the tensors by normalization; group them according to the batch size BS.
[0086] Step 12: Extract features from the pre-trained image obtained in step 11 using Res2Net pre-trained on the large visualization database imagenet:
[0087] For a specific image i(3,H,W), its corresponding four-dimensional vector is (BS,C,H,W). Set H and W to 384, C to 32, and first process it through the pre-trained Res2Net model. Use the activation function and the maximum pooling layer in the pre-trained model to obtain the features of parameters such as (BS,64,96,96), and use this feature as the first layer f1 of the pyramid.
[0088] Step 13: Generate pyramid feature f based on existing feature f1 k :
[0089] Five groups of features are generated sequentially by processing the features at the pyramid level established by the Res2Net model. Each group of features is k All by f k-1 Generate, f k ,k∈{1,2,3,4,5}, taking f1 as the benchmark, the resolution of each layer is The number of channels is C×2 k , f1 remains unchanged.
[0090] Step 2: Perform feature processing through wavelet discrimination enhancement module and asymmetric convolution Mamba module respectively:
[0091] Among them, different layers k determine the size of the four-dimensional vector resolution. Considering that too large a resolution in the lower layers will increase the computational cost, k is usually 3, 4, or 5 in the wavelet discrimination enhancement module. The asymmetric convolutional mamba module that considers global information only takes the last layer k=5;
[0092] Step 21: Figure 2 As shown in Figure 2, the wavelet discrimination enhancement module processes features as follows: First, the number of channels C is converted to 32 through the feature enhancement module, and the components with 4 hole convolutions are aggregated and reactivated to obtain the following The enhanced feature f k ′ Specifically, for the feature set fk ,k∈{3,4,5}, introducing a residual layer component b with 4 different dilation rates i ∈{1,2,3,4} feature enhancement module, the expansion rate of 4 parallel residual layer components is d∈{1,3,5,7}, the first layer of each component is a 1×1 convolution to reduce the number of channels to 32, and the residual layer includes a (2i-1)×(2i-1) convolution layer and a 3×3 convolution layer with expansion rate d, which controls the number of channels to 32. The component results are summed and sent to the ReLU function for activation to finally obtain the enhanced feature f k ′ ,k∈{3,4,5}.
[0093] The feature is sent to the Haar wavelet decomposition. The Haar wavelet decomposition contains two filters, namely the row filter and the column filter. After passing through the row filter, the image is decomposed into odd and even values according to the height dimension and divided by two, and the result is as follows The odd and even parts of the row are then decomposed by column through the column filter to convert them into The four components are a (row odd and column odd), b (row odd and column even), c (row even and column odd), and d (row even and column even). The features are then decomposed into high-frequency information using the following formula With low frequency information
[0094]
[0095] LL, LH, HL, and HH represent low-frequency information and horizontal, vertical, and diagonal high-frequency information, respectively. Send it to the high frequency processing with residual block to obtain high frequency processing information HW k , for example, when k = 5:
[0096]
[0097] Similarly, low-frequency information Also process to obtain low frequency processing information LW5:
[0098]
[0099] Among them, Res is the batch normalized residual block (BN), AM is the joint attention block that combines channel attention and spatial attention, and σ and μ represent the mean and standard deviation of the statistics calculated by the channel, respectively. ′and μ' are affine parameters learned from the data, and IN is instance normalization. The high-frequency and low-frequency information of the sum is mixed by transposed convolution (TC), two convolution layers and one upsampling are performed through the Fb module, a skip connection is added to the last feature, and bilinear interpolation is used to adjust the feature channel information:
[0100] F wk =Fb(TC(HW k +LW k ))
[0101] Here, we obtain the detail discrimination feature F with discrimination information. wk ; For example, when k = 5, F w5 Its four-dimensional information is adjusted to
[0102] Step 22: Figure 3 As shown in the figure, the asymmetric convolutional Mamba module processes features in the following steps:
[0103] The feature f5 obtained in step 13 is first transformed into and The number of channels is halved and sent to a Mamba block and an asymmetric convolution decomposed by a 3×3 convolution. The Mamba block is the base layer from the visual state space model. Then, the coarse global features are obtained by aggregation with f5 through a 1×1 convolution. Its four-dimensional vector is (BS, 2048, 12, 12), followed by the coarse global feature The prior features are obtained by channel mapping and upsampling with a scale of 32 Its resolution is converted to 384, and then the vector is mapped to the same dimension as the potential feature through global average pooling, and the resolution becomes 1. Specifically, the process can be expressed as follows:
[0104]
[0105] GAP(X) is the formula for global average pooling, where X is a variable. Here we will use the prior features to process;
[0106]
[0107] C1, C2, and C3 are all 1×1 convolutions and contain a normalization function, and δ is the sigmoid gating function used for normalization; σ represents the ReLU activation function, and after activation, the coarse prediction graph F of (BS, 1, 12, 12) is obtained. prior , the rough prediction graph F prior and coarse global features Slice and send to the subpath excitation (SDE) module to accurately output the global feature information of the image, namely the global feature prediction map The SDE module includes the spatial attention SA module and the channel attention CA module, which are specifically expressed as follows:
[0108]
[0109] Step 3: Obtain detail identification feature F through step 2 wk And the global feature prediction map After that, the feature inversion decoder is used to decode and obtain the final prediction map. The feature inversion decoder of each layer consists of three series-connected guide units. The specific update method includes the following steps:
[0110] Step 31: Neighborhood aggregation. The three-layer detail discrimination feature F obtained in step 21 w3 ,F w4 ,F w5 With the same source as the initial feature f1 in step 12, in order to reduce feature redundancy, convolution and upsampling methods are used to obtain feature information that can be connected across layers. Figure 4 As shown in the figure, after we use the neighborhood aggregation NCD module, we can get the high and low frequency information of each layer that has not been processed by the Fb module, namely TC (HW k +LW k ), the first reverse mask is generated by the following formula Where k=5 represents the fifth set of features, and i=1 represents the mask in the first guide unit of the sequence:
[0111]
[0112] Among them, TC refers to transposed convolution, σ is the sigmoid function, and Sampling refers to ×4 upsampling when k=5 and ×2 downsampling when k is in the set {3,4}. The matrix E is an all-one matrix, represents the inverse operation used to subtract the matrix E.
[0113] Step 32: Set the number of groups g i ,i∈{1,2,3},g i ∈{32,8,1}, each group uses one guide unit, j is the total number of feature channels divided by g i OK. For example When k=5 and i=1, set group g i Then split the feature F wk , where j∈{1,……,g i}, thus obtaining the slice features, the conventional guide unit processing is summarized as follows:
[0114]
[0115]
[0116] In the above operation, i∈{1,3}, where Split means grouping and Cat means aggregation. When processing the middle group, that is, i=2, we added an attention module and introduced random inactivation dropout to suppress redundant features. Correspondingly, the slicing operation is as follows, taking g2=8 as an example:
[0117]
[0118] Where j∈{1,…,8}, conv represents the convolution operation, PA and CA represent the position attention module and channel attention module respectively. drop represents the dropout operation with a coefficient of 0.1. Then, the aggregation formula Cat is used to obtain three refined guidance groups with different degrees of detail. Each of these features is then subjected to a back-conversion process to obtain a finer layer of prediction masks, starting with the first back-conversion mask For example, the input is This is obtained by aggregating Cat and grouping Split Get through the middle guide Substitute it into the following formula:
[0119]
[0120] Among them C s Refers to the operation of performing 3×3 kernel convolution on the slice and performing batch normalization. The "Score" operation converts the data into learnable weight parameters through convolution. Then we get Then getting a more precise forecast takes the form:
[0121]
[0122] Here, “sampling” refers to the sampling operation opposite to the sampling operation in the neighborhood aggregation NCD, k∈{3,4,5}. Specifically, when k=5, Pred k+1 The input is You can get
[0123]
[0124] Similarly, we obtain Pred4 and Pred3 in sequence according to the above formula, and use Pred3 as the final predicted camouflaged target detection prediction map.
[0125] Step 4: In step 3, the final predicted camouflage target detection prediction map is obtained through decoding. In this step, the weighted binary cross entropy and weighted intersection-over-union loss values are calculated respectively, and the Adam optimizer is used for training to update the parameter matrix in the model. The specific steps include:
[0126] Step 41, the weighted binary cross entropy loss function is calculated by the following formula:
[0127]
[0128] Among them, y is the true label (0 or 1) obtained by our actual prediction graph. is the probability of the positive class predicted by the model, that is, the probability representation of the binary true value image taking 1 part in the camouflage target detection, where w y and w 1-y are the weights for positive and negative classes respectively. Written as
[0129] Step 42 calculates the weighted intersection-over-union loss function:
[0130]
[0131] For which and B represent the disguised target real target bounding box and the predicted box respectively, and their intersection area and union area are calculated. The intersection area is the area of the overlapping part of the predicted box and the real box, and the union area is the total area of the predicted box and the real box. The IoU (intersection over union) is obtained by dividing the intersection area by the union area. For each bounding box, a weight w is assigned according to its category, and then the weighted IoU loss is calculated;
[0132] A53. Combined weighted binary cross entropy loss function And the weighted intersection-over-union loss function L wIoU Get the final loss L of the model t , and minimize the final loss L through the Adam optimizer t To train the camouflaged target detection model;
[0133]
[0134] Where GT represents the true value of the image; the weight parameter α we add here is based on tanh(x+1), x is increased by 1 every 100 steps according to the number of training steps. When k=3,4, When k = 5,
[0135] Step 5: After completing the model training in step 4, the model can be used for the actual camouflaged target detection task. For example, for the image G to be detected, the camouflaged target hidden in it needs to be predicted. Figure 5 As shown, the trained model is selected, and through steps 1, 2, and 3, the final Pred3 is obtained to obtain the prediction graph as the result output.
[0136] Although the present invention is described herein with reference to the embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and implementations, which will fall within the scope and spirit of the principles disclosed in this application.
Claims
1. A multi-level refinement camouflage target detection method based on wavelet enhanced recognition, characterized in that: The following steps are involved: A: Build and train a camouflaged target detection model; A1: Obtain sample images and preprocess them, and use the Res2Net model to build a K-layer pyramid. Then use the pre-trained Res2Net model to extract features as the first layer of features in the pyramid, and generate K groups of features in sequence through the pyramid processing features. A2: Feature processing is performed through the wavelet discrimination enhancement module and the asymmetric convolutional Mamba module respectively; specifically, the Haar wavelet decomposition is used to obtain the detail discrimination feature F based on the obtained pyramid feature wk Based on the last layer of pyramid features, the Mamba block and asymmetric convolution are used to process them respectively, and then the processed features are aggregated and input into the sub-path excitation module to obtain the global feature prediction map A3: The neighborhood aggregation module is used to reduce the redundant parts of the features extracted by the wavelet discrimination enhancement module to obtain a rough prediction, and the rough prediction is inverted as a reverse mask; a feature inversion decoder is formed by setting a number of cascaded guide units; The detail identification feature F wk And the global feature prediction map The feature inversion decoder is used to decode and obtain the final prediction image; A4: Calculate the weighted binary cross entropy loss of the last three layers of the pyramid and the weighted intersection-over-union loss of the overall prediction respectively, add the two losses to get the final loss function of the entire model, and train the disguised target detection model based on the loss function; B: Perform detection tasks based on the disguised target detection model: Use the trained disguised target detection model for actual disguised target detection tasks.
2. According to the multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 1, it is characterized in that: The step A1 is specifically as follows: Step 11: Preprocessing; obtain the visible light image i to be learned, uniformly set each image i in the image set I by changing the width and height, uniformly transform the tensor of RGB images and binary images by normalization; group them according to the batch size BS; Step 12: The preprocessed image i, whose corresponding four-dimensional vector is (BS, C, H, W), where the batch size is BS, the height is H, the width is W, and the number of channels is C; is processed by the pre-trained Res2Net model to obtain the features as the first layer features f1 of the pyramid; Step 13: Generate pyramid features f based on the first layer features f1 k ; K groups of features are generated sequentially by processing the features of the pyramid layer established by the Res2Net model, f k ,k∈{1,2,…,K}, taking f1 as the benchmark, the resolution of each layer is The number of channels is C×2 k , f1 remains unchanged.
3. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 2 is characterized in that: The step A2 is specifically as follows: Step 21: The wavelet discrimination enhancement module processes the features as follows: First, the feature enhancement module is used to transform the features f of the last three layers of the pyramid. k The number of channels C is converted to 32, and the components of the four dilated convolutions are aggregated and reactivated to obtain the following The enhanced feature f k ′ ; Send the feature into the Haar wavelet decomposition and transform it into a size of The four components are a (row odd column odd), b (row odd column even), c (row even column odd), d (row even column even); then the feature is decomposed into high-frequency information by the following formula With low frequency information High frequency information Send it to the high frequency processing with residual block to obtain high frequency processing information HW k : Low frequency information Also processed to obtain low frequency processing information LW k : Among them, Res is the batch normalized residual block, AM is the joint attention block that combines channel attention and spatial attention, σ and μ represent the mean and standard deviation of the statistics calculated by the channel respectively; σ ′ and μ' are affine parameters learned from the data, IN is instance normalization; then the high-frequency and low-frequency information of the sum are mixed by transposing convolution, and then the channel information is adjusted by convolution and bilinear interpolation to obtain the detail discriminative feature F with discriminative information wk , which is expressed as follows: F wk =Fb(TC(HW k +LW k )) Among them, TC represents transposed convolution, and Fb represents a module that adjusts channel information by performing convolution and bilinear interpolation. Step 22: The asymmetric convolutional Mamba module processes features in the following steps: The last layer of the pyramid feature f K First, transform it into and The number of channels is halved and sent to a Mamba block and an asymmetric convolution decomposed by a 3×3 convolution, and then combined with the last layer feature f through a 1×1 convolution. K Aggregate to obtain coarse global features Then the rough global features Obtaining prior features through upsampling operations Then the prior features are pooled by global average pooling. Mapping to the same dimension as the latent feature will turn the resolution into 1; then the activation gets the coarse prediction map F prior , which is expressed as follows: Where C1 and C2 are both 1×1 convolutions and contain a normalization function, and δ is the sigmoid gating function used for normalization; σ represents the ReLU activation function; The rough prediction map F prior and coarse global features Slice and send to the subpath excitation module to output the global feature prediction map The subpath excitation module includes a spatial attention module and a channel attention module. The specific process is as follows: Among them, SA represents the spatial attention module, CA represents the channel attention module, C3 is a 1×1 convolution and contains a normalization function.
4. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 3 is characterized in that: In step A3, the feature inversion decoder of each layer is composed of three guide units connected in series, and its specific feature updating method includes the following steps: Step 31: Neighborhood aggregation: First, the neighborhood aggregation module is used to process the high and low frequency information of each layer to generate a reverse mask: in, represents the k-th pyramid feature, the reverse mask of the i-th guide unit, i∈{1,2,3}; k is specifically the last three layers of the pyramid; NCD represents neighborhood aggregation, Sampling represents sampling, and E represents the all-one matrix. The inverse operation used to subtract the matrix E; Step 32: Set the number of groups g i , g i ∈{32,8,1}, each group uses a guide unit, set the group g i Then split feature F wk , where j∈{1,……,g i }, thus obtaining the slice feature When i∈{1,3}, the boot unit processing is summarized as follows: Where Split means grouping, and Cat means aggregation. When i=2, the attention module and random inactivation dropout are introduced to suppress redundant features. The slicing operation is expressed as follows: Among them, conv represents convolution operation, PA and CA represent position attention module and channel attention module respectively; drop represents dropout operation; Through the aggregation formula Cat aggregation, three refined guidance groups are obtained The reverse conversion process is then performed to obtain a finer layer of prediction masks The specific process is as follows: Among them C s Refers to the operation of performing 3×3 kernel convolution on the slice and performing batch normalization. Score means converting data into learnable weight parameters through convolution; A more precise forecast is then obtained using: Where sampling represents the sampling operation opposite to the neighborhood aggregation sampling operation, k∈{K-2,K-1,K}, K represents the last pyramid layer; when k is the last layer, Pred k+1 The input is According to the above formula sequence, we can get the accurate prediction graph Pred k , the precise prediction graph Pred when k = K-2 k Prediction map of disguised object detection as the final prediction.
5. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 4 is characterized in that: The weighted binary cross entropy loss is expressed as follows: Among them, y is the true label, 0 or 1, which is represented by our actual prediction graph. is the probability of the positive class predicted by the model; w y and w 1-y are the weights for positive and negative classes respectively; The weighted intersection-over-union loss is expressed as follows: For which and B represent the real target bounding box and predicted box of the disguised target respectively, and w is the weight of the bounding box.
6. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 5 is characterized in that: The final loss function of the model is expressed as follows: Among them, α is the weight parameter and GT represents the true value of the image.
7. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 6 is characterized in that: The weight parameter α is obtained based on tanh(x+1) according to the number of training steps x. Specifically, when k is the last layer, When k is the last 2 or 3 layers, 8. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 7 is characterized in that: The number of pyramid levels K=5.
9. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 8 is characterized in that: The sampling operation of the neighborhood aggregation is specifically to perform ×4 upsampling when k=5, and to perform ×2 downsampling when k is in the set {3,4}.
10. The multi-level refinement camouflage target detection method based on wavelet enhanced recognition according to claim 9 is characterized in that: The enhanced feature f′ k Specifically obtained through the following methods: For the feature set f k ,k∈{3,4,5}, introducing a residual layer component b with 4 different dilation rates i ∈{1,2,3,4} feature enhancement module, the expansion rate of 4 parallel residual layer components is d∈{1,3,5,7}, the first layer of each component is a 1×1 convolution to reduce the number of channels to 32, and the residual layer includes a (2i-1)×(2i-1) convolution layer and a 3×3 convolution layer with expansion rate d, which controls the number of channels to 32. The component results are summed and sent to the ReLU function for activation to finally obtain the enhanced feature f′ k ,k∈{3,4,5}.
Citation Information
Patent Citations
Camouflage target detection method based on context awareness and boundary refinement
CN114581752A
Camouflage target detection method based on Gaussian attention
CN117541815A
Self-adaptive efficient image super-resolution method
CN118350995A
Infrared weak and small target detection method based on wavelet guidance
CN118587507A
Camouflaged object segmentation method with distraction mining
US20220230324A1
Cited By
Camouflage target detection method based on dynamic Top-k feature selection and cross tensor decomposition
CN119942090A
Classified detection method for uniformity of cement paste
CN120451682A