A method and system for detecting camouflaged targets based on the YOLOv5 algorithm

By replacing the C3 module with the DC3 module and introducing a dynamic attention mechanism in the YOLOv5 algorithm, the feature extraction capability and detection accuracy of camouflage target detection are improved, the weakness of single-stage algorithms in camouflage target detection is solved, and real-time and accurate battlefield situational awareness is achieved.

CN115953668BActive Publication Date: 2026-04-03ARMY ENG UNIV OF PLA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing single-stage target detection algorithms have weak feature extraction capabilities in camouflage target detection tasks, resulting in unsatisfactory detection results. Furthermore, two-stage algorithms have slow detection speeds, making it difficult to meet the requirements of real-time battlefield situation awareness in military operations.

Method used

A camouflage target detection method based on the YOLOv5 algorithm is adopted. By replacing the C3 module with the DC3 module, combining depthwise separable convolution and residual structure design to design an extraction network, and introducing a dynamic attention mechanism aggregation network, the feature extraction capability and detection accuracy are improved.

Benefits of technology

It significantly improves the detection accuracy of camouflaged targets, reduces network size, and meets the needs of real-time and accurate battlefield situation perception in military operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115953668B_ABST
    Figure CN115953668B_ABST
Patent Text Reader

Abstract

This invention discloses a camouflage target detection method and system based on the YOLOv5 algorithm, comprising: acquiring real-time battlefield image data containing camouflage targets; inputting the real-time battlefield image data into a pre-trained camouflage target detection model to obtain detection results of the camouflage targets; the training process of the camouflage target detection model includes: acquiring historical war image data and constructing a training dataset; constructing a camouflage target detection model by combining an extraction network, an aggregation network, and a detection module based on the YOLOv5 algorithm; training the camouflage target detection model using the training dataset, and repeating the training process until the detection accuracy of the camouflage target detection model tends to stabilize; this invention can significantly improve detection accuracy, reduce network size, and meet the requirements of real-time and accurate battlefield situation perception in military operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision technology, specifically relating to a method and system for detecting camouflaged targets. Background Technology

[0002] As warfare shifts from information-based to intelligent, emerging fields such as unmanned combat place higher demands on battlefield situational awareness. Camouflage is a commonly used disguise technique in military operations. It simulates the color characteristics of the natural environment, disrupting the outline of camouflaged targets and allowing them to blend into the surrounding background, thus achieving the desired camouflage effect. However, camouflage significantly interferes with battlefield situational awareness; therefore, efficiently and accurately detecting camouflaged targets is crucial for enhancing battlefield situational awareness capabilities.

[0003] In recent years, deep neural networks have been widely applied to object detection tasks with excellent results. Based on the different methods of generating region proposals, deep object detection algorithms can be divided into two-stage algorithms and single-stage algorithms. Two-stage detection algorithms generate candidate regions that may contain targets in the first stage, and adjust the positions of these candidate regions in the second stage, outputting the category of the contained targets. Typical algorithms include R-CNN, Fast R-CNN, Faster R-CNN, and Cascade R-CNN. Two-stage algorithms significantly improve detection accuracy compared to traditional algorithms, but they suffer from slower detection speeds and difficulties in training and optimization.

[0004] Single-stage detection algorithms directly generate candidate regions on the feature maps extracted from the backbone network and complete subsequent detection. Typical methods include the YOLO series and SSD. Single-stage algorithms have a significantly faster detection speed than two-stage algorithms, which can meet the requirements of real-time battlefield situational awareness. However, single-stage algorithms have a weak ability to extract features of camouflaged targets, resulting in less than outstanding performance in camouflage target detection tasks. Summary of the Invention

[0005] The purpose of this invention is to provide a camouflage target detection method and system based on the YOLOv5 algorithm, which can significantly improve detection accuracy, reduce network size, and meet the requirements of real-time and accurate battlefield situation perception in military operations.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] The first aspect of this invention provides a camouflage target detection method based on the YOLOv5 algorithm, comprising:

[0008] Collect real-time battlefield image data containing camouflaged targets, and input the real-time battlefield image data into a pre-trained camouflaged target detection model to obtain the detection results of the camouflaged targets;

[0009] The training process of the camouflage target detection model includes:

[0010] Acquire historical war image data and construct a training dataset;

[0011] The backbone network based on the YOLOv5 algorithm replaces the C3 module with the DC3 module to obtain the extraction network. The head network based on the YOLOv5 algorithm, the DC3 module, and the dynamic attention mechanism module are used to construct the aggregation network. The extraction network, the aggregation network, and the detection module based on the YOLOv5 algorithm are used to construct a camouflage target detection model.

[0012] The camouflage target detection model is trained using the training dataset, and the training process is repeated until the detection accuracy of the camouflage target detection model tends to stabilize.

[0013] Preferably, the method for inputting real-time battlefield image data into a pre-trained camouflage target detection model to obtain detection results for camouflaged targets includes:

[0014] The real-time battlefield image data is input into a preset extraction network to extract feature maps of camouflaged targets in the real-time battlefield image data.

[0015] The extracted feature maps are fused using an aggregation network to obtain an enhanced feature map of the camouflaged target.

[0016] The enhanced feature map is used to detect the category of the camouflaged target and its location information in the original image.

[0017] Preferably, the extraction network is divided into a first extraction unit, a second extraction unit, a third extraction unit, a fourth extraction unit, and a fifth extraction unit in sequence; the first extraction unit includes a convolutional module; the second, third, and fourth extraction units include convolutional modules and DC3 modules stacked in sequence; the fifth extraction unit includes convolutional modules, pyramid pooling layers, and DC3 modules stacked in sequence; the convolutional module includes convolutional layers, normalization layers, and activation functions.

[0018] Preferably, the method for extracting feature maps of camouflaged targets from real-time battlefield image data by inputting real-time battlefield image data into a preset extraction network includes:

[0019] Real-time battlefield image data is input into the first extraction unit to obtain a first feature map, the scale of which is 1 / 2 of the feature map scale of the real-time battlefield image;

[0020] The first feature map is input into the second extraction unit. After the first feature map is processed by the convolution module and DC3 module in the second extraction unit, the second feature map is output. The scale of the second feature map is 1 / 4 of the scale of the real-time battlefield image.

[0021] The second feature map is input into the third extraction unit. After the second feature map is processed by the convolution module and DC3 module in the third extraction unit, the third feature map is output. The scale of the third feature map is 1 / 8 of the scale of the real-time battlefield image.

[0022] The third feature map is input to the fourth extraction unit. After the third feature map is processed by the convolution module and DC3 module in the fourth extraction unit, the fourth feature map is output. The scale of the fourth feature map is 1 / 16 of the scale of the real-time battlefield image.

[0023] The fourth feature map is input to the fifth extraction unit. After the fourth feature map is processed by the convolution module, pyramid pooling layer and DC3 module in the fifth extraction unit, the fifth feature map is output. The scale of the fifth feature map is 1 / 32 of the scale of the real-time battlefield image.

[0024] Preferably, the aggregation network includes a first aggregation unit, a second aggregation unit, a third aggregation unit, a fourth aggregation unit, and a fifth aggregation unit arranged in sequence.

[0025] The first aggregation unit includes a convolution module, an upsampling module, and a stitching module stacked sequentially; the input features of the convolution module in the first aggregation unit are the output features of the DC3 module in the fifth extraction unit; the stitching module of the first aggregation unit stitches together the output features of the upsampling module in the first aggregation unit and the output features of the DC3 module in the fourth extraction unit.

[0026] The second aggregation unit includes a DC3 module, a convolution module, an upsampling module, and a stitching module stacked sequentially; the input features of the DC3 module in the second aggregation unit are the output features of the stitching module in the first aggregation unit; the stitching module of the second aggregation unit stitches together the output features of the convolution module in the third extraction unit and the output features of the upsampling module in the second aggregation unit.

[0027] The third aggregation unit includes a dynamic attention mechanism module; the fourth and fifth aggregation units include a convolution module, a splicing module, and a dynamic attention mechanism module stacked sequentially; the splicing module in the fourth aggregation unit splices the output features of the convolution module in the second aggregation unit and the output features of the convolution module in the fourth aggregation unit; the splicing module in the fifth aggregation unit splices the output features of the upsampling module in the first aggregation unit and the output features of the convolution module in the fifth aggregation unit; the output features of the dynamic attention mechanism module are sent to the detection module.

[0028] Preferably, the method of fusing the extracted feature maps using an aggregation network to obtain an enhanced feature map of the camouflage target includes:

[0029] The output features of the DC3 module in the fifth extraction unit, the DC3 module in the fourth extraction unit, and the convolution module in the third extraction unit are respectively denoted as extracted feature map P1, extracted feature map P2, and extracted feature map P3;

[0030] The extracted feature maps P1 and P2 are input into the first aggregation unit for fusion to obtain the fused feature map S1.

[0031] The fused feature map S1 and the extracted feature map P3 are input into the second aggregation unit to be fused to obtain the fused feature map S2;

[0032] The fused feature map S2 is input into the third aggregation unit for processing to obtain the first detection feature map C1;

[0033] The first detection feature map C1 is input into the convolution module of the fourth aggregation unit for processing and then fused with the output features of the convolution module of the second aggregation unit. The second detection feature map C2 is then obtained by the dynamic attention mechanism module in the fourth aggregation unit.

[0034] The second detection feature map C2 is input into the convolution module of the fifth aggregation unit for processing and then fused with the output features of the upsampling module in the first aggregation unit. The third detection feature map C3 is then obtained by the dynamic attention mechanism module in the fifth aggregation unit.

[0035] The first detection feature map C1, the second detection feature map C2, and the third detection feature map C3 are used as enhanced feature maps for camouflage targets.

[0036] Preferably, the DC3 module includes a first branch, a second branch, and a splicing module; the input features of the DC3 module are respectively input to the first branch and the second branch; the output features of the first branch and the second branch are spliced ​​by the splicing module and then input to the convolution module to obtain the output features of the DC3 module;

[0037] The first branch includes sequentially stacked convolutional modules and N S-Bottleneck modules; the second branch includes sequentially stacked depthwise convolutional layers and pointwise convolutional layers.

[0038] Preferably, the S-Bottleneck module includes a first normalization unit, a second normalization unit, a third normalization unit, and a fourth normalization unit stacked sequentially; the first normalization unit contains a deep convolutional layer, a normalization layer, and an activation function sequentially; the second normalization unit contains a pointwise convolutional layer and a normalization layer sequentially; the third normalization unit contains a pointwise convolutional layer, a normalization layer, and an activation function sequentially; the fourth normalization unit contains a deep convolutional layer and a normalization layer sequentially; the output feature of the fourth normalization unit is element-wise added to the input feature of the S-Bottleneck module to form the output feature of the S-Bottleneck module.

[0039] Preferably, the dynamic attention mechanism module includes a DC3 module, a Dynamic ReLU module, and a spatial attention module; the input features of the dynamic attention mechanism module are respectively input to the DC3 module; the output features of the DC3 module are respectively input to the Dynamic ReLU module and the spatial attention module.

[0040] The Dynamic ReLU module includes an average pooling layer, a fully connected layer, and an activation function. The Dynamic ReLU module learns global information from the input feature map to adaptively obtain two ReLU functions. The output features of the DC3 module are processed by the two obtained ReLU functions and the maximum value is taken to obtain the output feature A.

[0041] The spatial attention module sequentially includes convolution, normalization layer, normalization processing and activation function processing; the output feature of the spatial attention module is element-wise multiplied with the output feature A to obtain the output feature B; the output feature B is concatenated with the output feature A to obtain the output feature of the dynamic attention mechanism module.

[0042] A second aspect of this invention provides a camouflage target detection system based on the YOLOv5 algorithm, comprising:

[0043] The detection module collects real-time battlefield image data containing camouflaged targets and inputs the real-time battlefield image data into a pre-trained camouflaged target detection model to obtain the detection results of the camouflaged targets.

[0044] The acquisition module is used to acquire historical war image data and construct a training dataset;

[0045] The model building module is used to replace the C3 module with the DC3 module in the backbone network based on the YOLOv5 algorithm to obtain the extraction network. The head network based on the YOLOv5 algorithm, the DC3 module, and the dynamic attention mechanism module are used to build the aggregation network. The extraction network, the aggregation network, and the detection module based on the YOLOv5 algorithm are used to build a camouflage target detection model.

[0046] The training module is used to train the camouflage target detection model using the training dataset, and the training process is repeated until the detection accuracy of the camouflage target detection model tends to stabilize.

[0047] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the camouflage target detection method.

[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0049] This invention replaces the C3 module with the DC3 module in the backbone network based on the YOLOv5 algorithm to obtain an extraction network; real-time battlefield image data is input into the preset extraction network to extract feature maps of camouflaged targets in the real-time battlefield image data; a new extraction module is designed by combining depthwise separable convolution and residual structure, which not only improves the model's feature extraction capability for camouflaged targets, but also reduces the network size and the number of parameters.

[0050] This invention constructs an aggregation network based on the YOLOv5 algorithm's head network, DC3 module, and dynamic attention mechanism module; the aggregation network is used to fuse the extracted feature maps to obtain an enhanced feature map of the camouflaged target; a dynamic attention mechanism is introduced into the aggregation network to enhance the model's ability to perceive the semantic features and location information of the camouflaged target, effectively improving the detection accuracy. Attached Figure Description

[0051] Figure 1 This is the network structure of a camouflage target detection method based on the YOLOv5 algorithm provided in Embodiment 1 of the present invention;

[0052] Figure 2 This is a schematic diagram of a depthwise separable convolution in a camouflage target detection method based on the YOLOv5 algorithm provided by the present invention;

[0053] Figure 3 This is a structural diagram of the DC3 module provided by the present invention;

[0054] Figure 4 This is a structural diagram of the S-Bottleneck module provided by the present invention;

[0055] Figure 5 This is a structural diagram of the DAM module provided by the present invention. Detailed Implementation

[0056] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0057] Example 1

[0058] like Figures 1 to 5 As shown, the first aspect of this invention provides a camouflage target detection method based on the YOLOv5 algorithm, comprising:

[0059] Methods for acquiring real-time battlefield image data containing camouflaged targets and inputting this data into a pre-trained camouflage target detection model to obtain detection results for the camouflaged targets include:

[0060] (1) The method of inputting real-time battlefield image data into a preset extraction network to extract feature maps of camouflaged targets in real-time battlefield image data includes:

[0061] The real-time battlefield image data is input into the first extraction unit to obtain the first feature map. The scale of the first feature map is 1 / 2 of the scale of the feature map of the real-time battlefield image; the number of channels is increased to 32.

[0062] The first feature map is input to the second extraction unit. After the first feature map is processed by the convolution module and DC3 module in the second extraction unit, the second feature map is output. The scale of the second feature map is 1 / 4 of the real-time battlefield image; the number of channels is 64.

[0063] The second feature map is input to the third extraction unit. After processing by the convolution module and DC3 module in the third extraction unit, the third feature map is output. The scale of the third feature map is 1 / 8 of the real-time battlefield image; the number of channels is 128.

[0064] The third feature map is input to the fourth extraction unit. After the third feature map is processed by the convolution module and DC3 module in the fourth extraction unit, the fourth feature map is output. The scale of the fourth feature map is 1 / 16 of the real-time battlefield image; the number of channels is 256.

[0065] The fourth feature map is input to the fifth extraction unit. After the fourth feature map is processed by the convolution module, pyramid pooling layer and DC3 module in the fifth extraction unit, the fifth feature map is output. The scale of the fifth feature map is 1 / 32 of the real-time battlefield image; the number of channels is 512.

[0066] (2) Methods for fusing the extracted feature maps using an aggregation network to obtain enhanced feature maps of camouflage targets include:

[0067] The output features of the DC3 module in the fifth extraction unit, the DC3 module in the fourth extraction unit, and the convolution module in the third extraction unit are respectively denoted as extracted feature map P1, extracted feature map P2, and extracted feature map P3;

[0068] The extracted feature maps P1 and P2 are input into the first aggregation unit for fusion to obtain the fused feature map S1.

[0069] The fused feature map S1 and the extracted feature map P3 are input into the second aggregation unit to be fused to obtain the fused feature map S2;

[0070] The fused feature map S2 is input into the third aggregation unit for processing to obtain the first detection feature map C1;

[0071] The first detection feature map C1 is input into the convolution module of the fourth aggregation unit for processing and then fused with the output features of the convolution module of the second aggregation unit. The second detection feature map C2 is then obtained by the dynamic attention mechanism module in the fourth aggregation unit.

[0072] The second detection feature map C2 is input into the convolution module of the fifth aggregation unit for processing and then fused with the output features of the upsampling module in the first aggregation unit. The third detection feature map C3 is then obtained by the dynamic attention mechanism module in the fifth aggregation unit.

[0073] The first detection feature map C1, the second detection feature map C2, and the third detection feature map C3 are used as enhanced feature maps for camouflage targets.

[0074] (3) Detect the enhanced feature map to obtain the category of the camouflaged target and its location information in the original image.

[0075] The training process of the camouflage target detection model includes:

[0076] Historical war image data was acquired to construct a training dataset; the historical war images were resized to 640×640×3 pixels. The batch size was set to 32, the training iterations to 300 epochs, the image size to 512×288 pixels, the initial learning rate to 0.02, and SGD (Stochastic Gradient Descent) optimization was used with a momentum value of 0.9. Mosic data augmentation was also employed.

[0077] The backbone network based on the YOLOv5 algorithm replaces the C3 module with the DC3 module to obtain the extraction network. The extraction network is sequentially divided into a first extraction unit, a second extraction unit, a third extraction unit, a fourth extraction unit, and a fifth extraction unit. The first extraction unit includes a convolutional module. The second, third, and fourth extraction units include convolutional modules and DC3 modules stacked sequentially. The fifth extraction unit includes convolutional modules, pyramid pooling layers, and DC3 modules stacked sequentially. The convolutional module includes convolutional layers, normalization layers, and activation functions.

[0078] An aggregation network is constructed based on the YOLOv5 algorithm head network, DC3 module, and dynamic attention mechanism module; the aggregation network includes a first aggregation unit, a second aggregation unit, a third aggregation unit, a fourth aggregation unit, and a fifth aggregation unit stacked sequentially.

[0079] The first aggregation unit includes a convolution module, an upsampling module, and a stitching module stacked sequentially; the input features of the convolution module in the first aggregation unit are the output features of the DC3 module in the fifth extraction unit; the stitching module of the first aggregation unit stitches together the output features of the upsampling module in the first aggregation unit and the output features of the DC3 module in the fourth extraction unit.

[0080] The second aggregation unit includes a DC3 module, a convolution module, an upsampling module, and a stitching module stacked sequentially; the input features of the DC3 module in the second aggregation unit are the output features of the stitching module in the first aggregation unit; the stitching module of the second aggregation unit stitches together the output features of the convolution module in the third extraction unit and the output features of the upsampling module in the second aggregation unit.

[0081] The third aggregation unit includes a dynamic attention mechanism module; the fourth and fifth aggregation units include a convolution module, a splicing module, and a dynamic attention mechanism module stacked sequentially; the splicing module in the fourth aggregation unit splices the output features of the convolution module in the second aggregation unit and the output features of the convolution module in the fourth aggregation unit; the splicing module in the fifth aggregation unit splices the output features of the upsampling module in the first aggregation unit and the output features of the convolution module in the fifth aggregation unit; the output features of the dynamic attention mechanism module are sent to the detection module.

[0082] The DC3 module includes a first branch, a second branch, and a splicing module; the input features of the DC3 module are respectively input to the first branch and the second branch; the output features of the first branch and the second branch are spliced ​​by the splicing module and then input to the convolution module to obtain the output features of the DC3 module;

[0083] The first branch includes sequentially stacked convolutional modules and N S-Bottleneck modules; the second branch includes sequentially stacked depthwise convolutional layers and pointwise convolutional layers.

[0084] The S-Bottleneck module comprises a first normalization unit, a second normalization unit, a third normalization unit, and a fourth normalization unit stacked sequentially. The first normalization unit contains a deep convolutional layer, a normalization layer, and an activation function in sequence. The second normalization unit contains a pointwise convolutional layer and a normalization layer in sequence. The third normalization unit contains a pointwise convolutional layer, a normalization layer, and an activation function in sequence. The fourth normalization unit contains a deep convolutional layer and a normalization layer in sequence. The output feature of the fourth normalization unit is element-wise added to the input feature of the S-Bottleneck module to form the output feature of the S-Bottleneck module.

[0085] The normalization layer needs to perform standard convolutions on all channels of the input, such as... Figure 2 As shown in (a), assuming the input size is M×W×H, the output size is N×W×H, and the convolution kernel size is M×K×K, since there are N output channels, N of the above convolution kernels are needed for the convolution operation. Therefore, the computational cost of standard convolution is K. 2 ×M×N×H×W; such as Figure 2 As shown in (b), depthwise convolution applies a K×K convolution to each channel of the input, resulting in a total of M channels. Therefore, the computational cost of depthwise convolution is K. 2 ×M×H×W; such as Figure 2 As shown in (c), the output of the pointwise convolution is then combined with N convolutions of size M×1×1, so the computational cost of the pointwise convolution is M×N×H×W.

[0086] Depthwise convolution stacked with pointwise convolution reduces the model size compared to standard convolution, resulting in a reduction in computational cost:

[0087]

[0088] The dynamic attention mechanism module includes a DC3 module, a Dynamic ReLU module, and a spatial attention module; the input features of the dynamic attention mechanism module are respectively input to the DC3 module; the output features of the DC3 module are respectively input to the Dynamic ReLU module and the spatial attention module.

[0089] The Dynamic ReLU module includes an average pooling layer, a fully connected layer, and an activation function. The Dynamic ReLU module learns global information from the input feature map to adaptively obtain two ReLU functions. The output features of the DC3 module are processed by the two obtained ReLU functions and the maximum value is taken to obtain the output feature A.

[0090] The spatial attention module sequentially includes convolution, normalization layer, normalization processing and activation function processing; the output feature of the spatial attention module is element-wise multiplied with the output feature A to obtain the output feature B; the output feature B is concatenated with the output feature A to obtain the output feature of the dynamic attention mechanism module.

[0091] A camouflage target detection model is constructed by extracting a network, an aggregation network, and a detection module based on the YOLOv5 algorithm; the camouflage target detection model is trained using a training dataset; the training process is repeated until the detection accuracy of the camouflage target detection model tends to stabilize.

[0092] The camouflage target detection model divides the enhanced feature map into S×S grids, with the grid containing the center of the camouflage target responsible for predicting the target. The model places B anchors on the grid, outputting (5+N) predicted values ​​for each anchor: confidence, the offset of the anchor box center from the top-left corner of the grid, and so on. x , t y ), the scaling ratio of the anchor frame's length and width (t) w , t h The probability of each of the N categories is calculated. To increase the number of positive samples, YOLO v5 also employs a cross-grid matching rule. In addition to the grids in the region where the target center is located, the two grids closest to the target center are identified, and the target is predicted using these three grids simultaneously, thus alleviating the problem of imbalanced positive and negative samples.

[0093] The model loss function includes class loss. cls Confidence loss obj and location regression loss l box It consists of three parts, and the specific formula is as follows:

[0094]

[0095]

[0096] l box =l-CIoU

[0097] Both category loss and confidence loss used BCE (cross-entropy loss function); the location regression loss was calculated using CIoU, an improvement on DIoU. DIoU considers the impact of the overlap area between the bounding box and the predicted box and the distance between their centers on the target location regression, but ignores the aspect ratio of the two boxes. CIoU adds an aspect ratio penalty term to make the target box regression more stable. When the j-th predicted box in the i-th cell contains the target, When the j-th prediction box in the i-th cell does not contain the target, This represents the predicted probability for that category. C is the predicted value. i c n λ represents the category label value (either 0 or 1). noobj The loss coefficient for cases where the target is not included in the prediction box.

[0098] The detection method and algorithm provided in this embodiment for detecting camouflaged targets are compared with those using Faster RCNN, Cascade RCNN, SSD300, FCOS, ATSS, YOLOX, and Deformable DETR algorithms on the same dataset to verify the effectiveness of this embodiment in detecting camouflaged targets.

[0099] This implementation uses multiple metrics to comprehensively evaluate the detection performance of different models. There are four prediction results for object detection: correctly identified positive samples as positive samples (True positives, TP), correctly identified negative samples as negative samples (True negatives, TN), falsely identified negative samples as positive samples (False positives, FP), and falsely identified positive samples as negative samples (False negatives, FN). The formulas for calculating precision (P) and recall (R) are as follows:

[0100]

[0101]

[0102] The commonly used performance evaluation metric for object detection is the mean average precision (mAP), which is the average precision (AP) of all categories. The value of AP is the area under the PR curve.

[0103] To better reflect the algorithm's detection performance, an evaluation metric consistent with the COCO dataset was adopted. This metric provides a more stringent evaluation of the algorithm's detection performance, calculating mAP using 10 IoU thresholds (each value between 0.5 and 0.95 in increments of 0.05), and then averaging the results to obtain the final outcome. Furthermore, this evaluation metric also considers values ​​smaller than 32. 2 greater than 32 2 And less than 96 2 Greater than 96 2 The pixels were categorized into small, medium, and large targets, and the mean average recall (mAP) and mean average recall (mAR) of these three target categories were calculated to evaluate the algorithm's detection performance from multiple perspectives. The experimental results are shown in Table 1. Furthermore, the number of images processed per second (FPS) was added to measure the algorithm's detection speed.

[0104] Table 1 Comparison of various mAP values ​​for different algorithms

[0105]

[0106]

[0107] The detection method provided by this implementation significantly improves detection accuracy, reduces network size, and meets the requirements for real-time and accurate battlefield situation awareness in military operations.

[0108] Example 2

[0109] A camouflage target detection system based on the YOLOv5 algorithm is proposed. This system is applied to the camouflage target detection method described in Embodiment 1. The system includes:

[0110] The signal transmission module is used to transmit the position signals of the two outgoing circuit breakers of the main station to the bus tie protection devices of each substation that supply power to the main station using the GOOSE automated testing framework; the circuit breaker position signal is either the circuit breaker closed signal or the circuit breaker open signal.

[0111] The coding module is used to number each substation sequentially according to the power supply order, starting from the first substation powered by the master station; the aforementioned master station includes non-backup master stations and backup master stations.

[0112] The data acquisition module is used to acquire the voltage transformer voltage and undervoltage time of the substation through the bus tie protection device of the substation;

[0113] The judgment module is used to determine whether the automatic transfer start conditions of the substation are met based on the circuit breaker position signal of the non-standby master station, the circuit breaker position signal of the standby master station, the voltage transformer voltage of the substation, and the voltage loss time of the substation.

[0114] The startup module is used to pre-set the total operating time limit of the backup automatic transfer for each substation, which increases sequentially according to the power supply sequence. When the backup automatic transfer of a substation meets the startup conditions, the backup automatic transfer is started sequentially according to the total operating time limit set for each substation.

[0115] Example 3

[0116] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps of the camouflage target detection method described in Embodiment 1.

[0117] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0119] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0120] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0121] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A camouflage target detection method based on the YOLOv5 algorithm, characterized in that, include: Collect real-time battlefield image data containing camouflaged targets, and input the real-time battlefield image data into a pre-trained camouflaged target detection model to obtain the detection results of the camouflaged targets; The training process of the camouflage target detection model includes: Acquire historical war image data and construct a training dataset; The backbone network based on the YOLOv5 algorithm replaces the C3 module with the DC3 module to obtain the extraction network. The head network based on the YOLOv5 algorithm, the DC3 module, and the dynamic attention mechanism module are used to construct the aggregation network. The extraction network, the aggregation network, and the detection module based on the YOLOv5 algorithm are used to construct a camouflage target detection model. The camouflage target detection model is trained using the training dataset, and the training process is repeated until the detection accuracy of the camouflage target detection model tends to stabilize. The DC3 module includes a first branch, a second branch, and a splicing module; the input features of the DC3 module are respectively input to the first branch and the second branch; the output features of the first branch and the second branch are spliced ​​by the splicing module and then input to the convolution module to obtain the output features of the DC3 module; The first branch includes sequentially stacked convolutional modules and N S-Bottleneck modules; the second branch includes sequentially stacked depthwise convolutional layers and pointwise convolutional layers. The S-Bottleneck module comprises a first normalization unit, a second normalization unit, a third normalization unit, and a fourth normalization unit stacked sequentially. The first normalization unit contains a deep convolutional layer, a normalization layer, and an activation function in sequence. The second normalization unit contains a pointwise convolutional layer and a normalization layer in sequence. The third normalization unit contains a pointwise convolutional layer, a normalization layer, and an activation function in sequence. The fourth normalization unit contains a deep convolutional layer and a normalization layer in sequence. The output feature of the fourth normalization unit is element-wise added to the input feature of the S-Bottleneck module to form the output feature of the S-Bottleneck module.

2. The camouflage target detection method based on the YOLOv5 algorithm according to claim 1, characterized in that, Methods for inputting real-time battlefield image data into a pre-trained camouflage target detection model to obtain detection results for camouflaged targets include: The real-time battlefield image data is input into a preset extraction network to extract feature maps of camouflaged targets in the real-time battlefield image data. The extracted feature maps are fused using an aggregation network to obtain an enhanced feature map of the camouflage target; The enhanced feature map is used to detect the category of the camouflaged target and its location information in the original image.

3. The camouflage target detection method based on the YOLOv5 algorithm according to claim 2, characterized in that, The extraction network is sequentially divided into a first extraction unit, a second extraction unit, a third extraction unit, a fourth extraction unit, and a fifth extraction unit; the first extraction unit includes a convolutional module; the second, third, and fourth extraction units include convolutional modules and DC3 modules stacked sequentially; the fifth extraction unit includes convolutional modules, pyramid pooling layers, and DC3 modules stacked sequentially; the convolutional module includes convolutional layers, normalization layers, and activation functions.

4. The camouflage target detection method based on the YOLOv5 algorithm according to claim 3, characterized in that, The aggregation network includes a first aggregation unit, a second aggregation unit, a third aggregation unit, a fourth aggregation unit, and a fifth aggregation unit arranged in sequence. The first aggregation unit includes a convolution module, an upsampling module, and a stitching module stacked sequentially; the input features of the convolution module in the first aggregation unit are the output features of the DC3 module in the fifth extraction unit; the stitching module of the first aggregation unit stitches together the output features of the upsampling module in the first aggregation unit and the output features of the DC3 module in the fourth extraction unit. The second aggregation unit includes a DC3 module, a convolution module, an upsampling module, and a stitching module stacked sequentially; the input features of the DC3 module in the second aggregation unit are the output features of the stitching module in the first aggregation unit; the stitching module of the second aggregation unit stitches together the output features of the convolution module in the third extraction unit and the output features of the upsampling module in the second aggregation unit. The third aggregation unit includes a dynamic attention mechanism module; the fourth and fifth aggregation units include a convolution module, a splicing module, and a dynamic attention mechanism module stacked sequentially; the splicing module in the fourth aggregation unit splices the output features of the convolution module in the second aggregation unit and the output features of the convolution module in the fourth aggregation unit; the splicing module in the fifth aggregation unit splices the output features of the upsampling module in the first aggregation unit and the output features of the convolution module in the fifth aggregation unit; the output features of the dynamic attention mechanism module are sent to the detection module.

5. The camouflage target detection method based on the YOLOv5 algorithm according to claim 4, characterized in that, Methods for fusing extracted feature maps using aggregation networks to obtain enhanced feature maps of camouflage targets include: The output features of the DC3 module in the fifth extraction unit, the DC3 module in the fourth extraction unit, and the convolution module in the third extraction unit are respectively denoted as extracted feature map P1, extracted feature map P2, and extracted feature map P3; The extracted feature maps P1 and P2 are input into the first aggregation unit for fusion to obtain the fused feature map S1. The fused feature map S1 and the extracted feature map P3 are input into the second aggregation unit to be fused to obtain the fused feature map S2; The fused feature map S2 is input into the third aggregation unit for processing to obtain the first detection feature map C1; The first detection feature map C1 is input into the convolution module of the fourth aggregation unit for processing and then fused with the output features of the convolution module of the second aggregation unit. The second detection feature map C2 is then obtained by the dynamic attention mechanism module in the fourth aggregation unit. The second detection feature map C2 is input into the convolution module of the fifth aggregation unit for processing and then fused with the output features of the upsampling module in the first aggregation unit. The third detection feature map C3 is then obtained by the dynamic attention mechanism module in the fifth aggregation unit. The first detection feature map C1, the second detection feature map C2, and the third detection feature map C3 are used as enhanced feature maps for camouflage targets.

6. The camouflage target detection method based on the YOLOv5 algorithm according to claim 5, characterized in that, The dynamic attention mechanism module includes a DC3 module, a Dynamic ReLU module, and a spatial attention module; the input features of the dynamic attention mechanism module are respectively input to the DC3 module; the output features of the DC3 module are respectively input to the Dynamic ReLU module and the spatial attention module. The Dynamic ReLU module includes an average pooling layer, a fully connected layer, and an activation function. The Dynamic ReLU module learns global information from the input feature map to adaptively obtain two ReLU functions. The output features of the DC3 module are processed by the two obtained ReLU functions and the maximum value is taken to obtain the output feature A. The spatial attention module sequentially includes convolution, normalization layer, normalization processing and activation function processing; the output feature of the spatial attention module is element-wise multiplied with the output feature A to obtain output feature B; the output feature B is concatenated with the output feature A to obtain the output feature of the dynamic attention mechanism module.

7. A camouflage target detection system based on the YOLOv5 algorithm, characterized in that, include: The detection module collects real-time battlefield image data containing camouflaged targets and inputs the real-time battlefield image data into a pre-trained camouflaged target detection model to obtain the detection results of the camouflaged targets. The acquisition module is used to acquire historical war image data and construct a training dataset; The model building module is used to replace the C3 module with the DC3 module in the backbone network based on the YOLOv5 algorithm to obtain the extraction network. The head network based on the YOLOv5 algorithm, the DC3 module, and the dynamic attention mechanism module are used to build the aggregation network. The extraction network, the aggregation network, and the detection module based on the YOLOv5 algorithm are used to build a camouflage target detection model. The training module is used to train the camouflage target detection model using the training dataset, and the training process is repeated until the detection accuracy of the camouflage target detection model tends to stabilize. The DC3 module includes a first branch, a second branch, and a splicing module; the input features of the DC3 module are respectively input to the first branch and the second branch; the output features of the first branch and the second branch are spliced ​​by the splicing module and then input to the convolution module to obtain the output features of the DC3 module; The first branch includes sequentially stacked convolutional modules and N S-Bottleneck modules; the second branch includes sequentially stacked depthwise convolutional layers and pointwise convolutional layers. The S-Bottleneck module comprises a first normalization unit, a second normalization unit, a third normalization unit, and a fourth normalization unit stacked sequentially. The first normalization unit contains a deep convolutional layer, a normalization layer, and an activation function in sequence. The second normalization unit contains a pointwise convolutional layer and a normalization layer in sequence. The third normalization unit contains a pointwise convolutional layer, a normalization layer, and an activation function in sequence. The fourth normalization unit contains a deep convolutional layer and a normalization layer in sequence. The output feature of the fourth normalization unit is element-wise added to the input feature of the S-Bottleneck module to form the output feature of the S-Bottleneck module.

8. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the camouflage target detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Improved Scaled-YOLOv4-based camouflage personnel target detection method

    CN114694042A

  • Athlete style recognition system and method

    US20200394413A1