Anti-UAV system image recognition method based on coordinate attention mechanism fusion
By adopting a dense convolutional network based on coordinate attention mechanism in drone recognition, combined with transfer learning and dense convolutional network, the problem of low accuracy in small sample recognition is solved, and higher recognition accuracy and feature extraction capabilities are achieved.
Patent Information
- Application Number
- CN202210467035.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-04-29
AI Technical Summary
The existing convolutional neural networks are not accurate in drone small sample recognition, making it difficult to effectively extract features.
A dense convolutional network fusion based on coordinate attention mechanism is adopted to save training time through transfer learning, a dense convolutional network is used to increase feature extraction channels, and an invalid channel is suppressed through coordinate attention mechanism to pay attention to position features.
It improves the accuracy of drone image recognition, enhances feature extraction capabilities, reduces the impact of invalid channels, and significantly improves the recognition effect.
Smart Images

Figure CN114842417B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of drone identification technology, and in particular to an anti-drone system image recognition method, system, electronic device and readable storage medium based on coordinate attention mechanism fusion. Background Art
[0002] With the popularity and development of drones, the "illegal flying" of drones has become an increasing threat to public safety, especially in public places such as large parks and amusement parks. The development of anti-drone systems to resist "illegal flying" is urgent. Identifying drones is one of the primary and key issues of anti-drone systems, and using images to identify drones is one of the important identification methods. The key to image recognition lies in the extraction of image features, using salient objects as representations of image content. According to different feature extraction methods, there are two image recognition methods: traditional image feature manual extraction method and neural network automatic feature extraction method.
[0003] With the development of technology, manual feature extraction has been replaced by automatic feature extraction by neural networks. The neural network model for image recognition has developed rapidly. The AlexNet model proposed by Krizhevshy et al. in 2012 significantly improved the classification accuracy of the ImageNet dataset; the GoogLeNet model proposed by the Google team in 2014 increased the network width by introducing the Inception module, thereby improving the model's expressiveness; the VGG model proposed by Simonyan et al. in the same year replaced the convolution kernel with a large receptive field by stacking multiple convolution kernels with small receptive fields, thereby reducing network parameters; the ResNet model proposed by He et al. in 2015 solved the gradient vanishing and gradient exploding phenomena caused by the increase in the number of layers of the network by introducing the residual block structure.
[0004] At present, most convolutional neural networks have good recognition effects and high accuracy for large samples; the more sufficient the sample, the better the effect. However, they are not effective for small samples and the accuracy is not high. So how to design a network that can extract more features and improve recognition accuracy for small samples of drones has become an urgent problem to be solved. Summary of the invention
[0005] In view of the above problems, the present invention proposes an anti-UAV system image recognition method based on the fusion of coordinate attention mechanism, which uses transfer learning to save training time and improve accuracy; uses a dense convolutional network to identify small samples, increases the sample extraction channels, and increases the feature extraction; uses the coordinate attention mechanism to highlight the valid channels, suppress the invalid channels, highlight the valid positions, and suppress the invalid positions, thereby improving the accuracy.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] An anti-UAV system image recognition method based on coordinate attention mechanism fusion, characterized by comprising the following steps:
[0008] S1: Obtain the drone image to be identified and perform preprocessing;
[0009] S2: Construct a dense convolutional network with a fused coordinate attention module:
[0010] S21: Constructing a dense convolutional network TL-DenseNet-121 based on transfer learning;
[0011] S22: Based on TL-DenseNet-121, the coordinate attention module is integrated to establish the dense convolutional network TL-CA4-DenseNet-121 with the coordinate attention module;
[0012] S3: Input the preprocessed image into TL-CA4-DenseNet-121 for training;
[0013] S4: Recognize the image through TL-CA4-DenseNet-121 and output the recognition result.
[0014] Furthermore, the image preprocessing operations in S1 include:
[0015] S11: Detect and crop the drone outline in the original image through grayscale processing, edge detection, image filtering, image enhancement and image morphological processing;
[0016] S12: cropping the pixel size of the image to 224×224 pixels through a size normalization operation;
[0017] S13: Expand the drone image dataset by rotating, flipping, and adding noisy images to prevent the network from overfitting.
[0018] Furthermore, the structure of the TL-DenseNet-121 includes a convolutional layer, a maximum pooling layer, a first dense block, a first transition layer, a second dense block, a second transition layer, a third dense block, a third transition layer, a fourth dense block, a global average pooling layer and a fully connected layer, which are arranged in sequence. The fully connected layer outputs the processing results to the output layer, and the output layer uses a Softmax classifier for classification.
[0019] Furthermore, the TL-CA4-DenseNet-121 integrates four coordinate attention modules CABlock on the basis of TL-DenseNet-121, and its structure includes a convolutional layer, a maximum pooling layer, a first dense block, a first coordinate attention module, a first transition layer, a second dense block, a second coordinate attention module, a second transition layer, a third dense block, a third coordinate attention module, a third transition layer, a fourth dense block, a fourth coordinate attention module, a global average pooling layer, and a fully connected layer.
[0020] Furthermore, it is characterized in that the coordinate attention module includes an average pooling layer in the x-direction and the y-direction, a two-dimensional convolution layer, a batchnorm layer and a sigmoid layer.
[0021] Furthermore, it is characterized in that the specific operation steps of S4 are:
[0022] S401: The pre-processed drone image is input in the form of an image matrix, and features are extracted from the image matrix after convolution operation in the convolution layer;
[0023] S402: The feature map obtained after feature extraction is passed through a maximum pooling layer to reduce the pixel size of the feature map and reduce the number of network parameters;
[0024] S403: The feature map after the size reduction is subjected to feature extraction again through the first dense block;
[0025] S404: The extracted feature map is passed through a first coordinate attention module to suppress redundant channel features, enhance channel features that are helpful for classification, and pay attention to the position information of the image;
[0026] S405: The channel features processed by the first coordinate attention module are output to the second dense block through the first transition layer;
[0027] S406: The second dense block extracts feature information again, and sequentially inputs the feature information into the second coordinate attention module, the second transition layer, the third dense block, the third coordinate attention module, the third transition layer, the fourth dense block, and the fourth coordinate attention module for corresponding processing;
[0028] S407: The feature map processed by the fourth coordinate attention module is further reduced in length and width by a global average pooling layer, and the feature map is sent to a fully connected layer;
[0029] S408: Classify the feature map using the Softmax classifier in the fully connected layer, and output the classification recognition result. An anti-UAV system image recognition system based on coordinate attention mechanism fusion, characterized in that it includes a UAV image input module, a preprocessing module, an image recognition module, and a result output module;
[0030] The drone image input module is used to obtain drone images to be classified and identified;
[0031] A preprocessing module is used to perform preprocessing operations on the obtained initial UAV image;
[0032] The image recognition module is used to identify and classify the pre-processed drone images through a dense convolutional network fused with the coordinate attention module, and send the classification results to the result output module.
[0033] Furthermore, the preprocessing module includes a grayscale processing unit, an edge detection unit, an image filtering unit, an image enhancement unit and an image morphology processing unit, which are used to detect the outline of the drone in the original picture and cut it out through grayscale processing, edge detection, image filtering, image enhancement and image morphology processing; the preprocessing module also includes a drone image data set expansion unit, which is used to expand the drone image data set by rotating, flipping and adding noise image amplification;
[0034] The image recognition module includes a dense convolutional network unit integrated with a coordinate attention module, which is used to identify and detect the pre-processed drone image and output the result by integrating the dense convolutional network of the coordinate attention module.
[0035] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, an anti-UAV system image recognition method based on coordinate attention mechanism fusion as described in any one of claims 1 to 6 is implemented.
[0036] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, an anti-UAV system image recognition method based on coordinate attention mechanism fusion as described in any one of claims 1-6 is implemented.
[0037] The beneficial effects of the present invention are:
[0038] The present invention proposes an anti-UAV system image recognition method based on the fusion of coordinate attention mechanism, which integrates transfer learning, dense convolutional network and coordinate attention mechanism, adopts dense convolutional network to increase the feature extraction of the image; adopts transfer learning method to improve the recognition accuracy of the network; adopts coordinate attention mechanism to suppress invalid channels, pay attention to position features, and improve the recognition accuracy of the network, and proves the superiority and feasibility of dense convolutional network based on transfer learning and coordinate attention mechanism through recognition comparison experiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is the image preprocessing effect diagram;
[0040] Figure 2 This is a picture (part) of the drone image dataset;
[0041] Figure 3 It is a schematic diagram of dense block structure;
[0042] Figure 4 This is the structure diagram of TL-DenseNet-121;
[0043] Figure 5 (a)-(b) are different attention mechanism modules, where Figure 5 (a) is SE Block, Figure 5 (b)CABlock;
[0044] Figure 6 (a)-(b) are dense convolutional networks that integrate different numbers and positions of channel attention modules, where Figure 6 (a) is TL-SE1-DenseNet-121, Figure 6 (b) is TL-SE4-DenseNet-121;
[0045] Figure 7 (a)-(b) are dense convolutional networks that integrate attention modules of different numbers and positions. Figure 7 (a) is TL-CA1-DenseNet-121, Figure 7 (b) is TL-CA4-DenseNet-121;
[0046] Figure 8 It is the experimental scene picture in the embodiment;
[0047] Fig. 9 This is the initial training result diagram of TL-DenseNet-121;
[0048] Fig.10 This is the full training result diagram of TL-DenseNet-121;
[0049] Fig.11 This is the training result diagram of DenseNet-121;
[0050] Fig.12 Full training result diagram of TL-CA4-DenseNet-121;
[0051] Fig.13 (a)-(b) are comparison curves of various networks. Fig.13 (a) is the comparison curve of the network with SE Block added. Fig.13 (b) is the comparison curve of the network with CABlock added;
[0052] Fig.14 It is the comparison curve of multiple models. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0054] 1. Dense convolutional network based on transfer learning
[0055] The present invention is aimed at drone image recognition, and drone images belong to small sample recognition, which has the problem of low accuracy of small sample recognition. The dense convolutional network (DenseNet) has a dense block (Dense Block), and its structure is as follows Figure 3 As shown in the figure, this structure makes each convolutional layer in the dense block directly connected to the previous layer, so that the input of each layer receives the output of all previous layers as additional input, and all input feature maps are spliced along the channel direction by channel cascading, so that each layer inputs more feature maps with more image features, realizes feature reuse, improves the computational efficiency of the network, and relatively increases feature extraction. The specific implementation of the dense block is shown in formula (1):
[0056] x l =H([x0,x1,...,x l-1 ]) (1)
[0057] Among them, x l Represents the feature map of the l-th layer output in the dense block; x0,x1,…,x l-1 denote the feature maps of the original input, the output of the first layer, and the output of the l-1 layer respectively; H(·) denotes a series of nonlinear transformations performed in the lth layer. In the dense block, H(·) consists of BN+ReLU+1×1Conv+BN+ReLU+3×3Conv;
[0058] Transfer learning can apply the image classification knowledge learned on the large dataset ImageNet to different but related image classification tasks. Compared with training a new network with random initialization, the network of transfer learning is faster and easier to build, saving training time; and the network of transfer learning has learned enough rich image features, and has higher recognition accuracy than training a new network with random initialization; at the same time, the network of transfer learning does not require a large amount of data for training, and can solve the learning problem of only a small number of samples in the target field.
[0059] To this end, the present invention proposes a dense convolutional network TL-DenseNet-121 based on transfer learning, whose structure and output results of each layer are as follows Figure 4 As shown in the figure. The size of each feature map is marked below the feature map, that is, the number of channels C×height H×width W, and the number of feature map channels C is marked in red. The number of channels of the input drone image in the RGB color space is 3. After a series of convolutional layers, pooling layers, and feature extraction and feature splicing of 4 Dense Blocks in the TL-DenseNet-121 network, the feature map input into the global average pooling layer (Global Average Pooling) changes from 3 channels to 1024 channels. The increase in the number of channels proves that TL-DenseNet-121 can increase the extracted image features when the number of samples in the drone image dataset is small, making the subsequent recognition and classification results more accurate.
[0060] 2. Dense convolutional network based on attention mechanism fusion
[0061] The present invention further improves the dense convolutional network TL-DenseNet-121 based on transfer learning, and adds different attention mechanism modules to the network, so that the network can recognize drone image data sets with higher accuracy. It includes a dense convolutional network based on channel attention mechanism fusion and a dense convolutional network based on coordinate attention mechanism fusion.
[0062] (1) Dense convolutional network based on channel attention mechanism fusion
[0063] Since the dense convolutional network uses channel cascading to increase the number of channels of the feature map along the depth direction, it increases feature extraction and extracts more features, but it also increases invalid channels that must be removed. Figure 3 It can be seen that continuous channel cascading will make the number of input feature map channels of the transition layer after the dense block reach the maximum number of all feature map channels in the current dense block. The number of feature map channels of each transition layer input is 256, 512, 1024 and 1024 respectively. Therefore, dense convolutional networks TL-SE1-DenseNet-12 and TL-SE4-DenseNet-121 based on channel attention mechanism fusion are proposed. They add channel attention mechanism SE Block to the TL-DenseNet-121 network to reduce the negative impact of redundant channels on feature extraction and network recognition, making the extracted features more accurate.
[0064] The structure of the channel attention module SE Block is as follows Figure 5As shown in (a), this module mainly consists of two parts: Squeeze and Excitation. The Squeeze operation compresses the input feature map C×H×W to C×1×1 through a global average pooling; the Excitation operation generates channel weights through a fully connected layer and an activation function; and finally, the Scale operation multiplies the channel weights with the two-dimensional matrix of the channel corresponding to the feature map to achieve channel weighting.
[0065] In order to compare the recognition effect of the network with different numbers and positions of channel attention modules, we designed dense convolutional networks with different numbers and positions of channel attention modules. They are TL-SE1-DenseNet-121, a network with one SE Block, and TL-SE4-DenseNet-121, a network with four SE Blocks. The structure diagram is shown in the figure below. Figure 6 As shown in the figure, SE Block is marked in blue, and its position and number are clearly visible. Fusion of SEBlocks of different numbers and positions will have different effects on the recognition effect of the network, which is reflected in the experiments in the embodiment.
[0066] (2) Dense convolutional network based on coordinate attention mechanism fusion
[0067] In order to reduce the problem of invalid channels caused by using dense convolutional networks and to improve the recognition accuracy, dense convolutional networks TL-CA1-DenseNet-121 and TL-CA4-DenseNet-121 with integrated coordinate attention modules are designed. They can not only reduce the negative impact of redundant channels on feature extraction and network recognition, but also pay attention to spatial information and improve recognition accuracy. The TL-CA4-DenseNet-121 network used in the present invention has a structure of the coordinate attention module CABlock as shown in the figure. Figure 5As shown in (b), it not only considers the relationship between feature channels, but also the spatial location information of the features, and the feature information of attention is more comprehensive. This module includes two steps: Coordinate information embedding and CoordinateAttention generation. The Coordinate information embedding operation encodes the feature map along the horizontal coordinate and vertical coordinate respectively by using pooling kernels of size (H, 1) and (1, W). This method can avoid the problem that the Squeeze operation in SEBlock compresses the global spatial information into the channel descriptor, making it difficult to save the location information; the CoordinateAttention generation operation fuses the feature maps perceived in different directions through the Concatenate operation, uses the convolution transformation to change the number of feature map channels, and then decomposes the feature map into two separate tensors along the spatial dimension. Finally, two weights are generated through the convolution transformation and activation function, and the two weights are multiplied with the original feature map to realize the weighted operation.
[0068] In order to compare the recognition effect of networks integrating different numbers and position coordinate attention modules, dense convolutional networks integrating different numbers and position coordinate attention modules are designed. They are TL-CA1-DenseNet-121, a network integrating one CABlock, and TL-CA4-DenseNet-121, a network integrating four CABlocks. The structure diagram is shown in the figure. Figure 7 As shown in the figure, CABlock is marked in blue, and its position and number are clearly visible. Different recognition effects are reflected in the experimental part of the embodiment.
[0069] Example
[0070] In order to verify the effectiveness of the method proposed in this invention, a recognition experiment is carried out to prove it.
[0071] (1) Construction of UAV image dataset
[0072] The "DJI Mavic 2", "DJI Mavic Air" drones and a self-made quad-rotor drone were selected as research objects. The original drone images were collected through an experimental device that integrates a visible light camera and a turntable. At the same time, considering the actual situation of drone flight airspace, some bird images were selected from the California Institute of Technology Bird Database-2011 (Caltech-UCSD-Birds-200-2011) as negative samples of the image dataset. Since the pixel size of the original drone images is irregular, in order to make them input into the convolutional neural network, these original images are preprocessed. The image preprocessing effect is as follows Figure 1As shown in the figure, it detects the outline of the drone in the original image and crops it out through a series of image processing methods such as grayscale processing, edge detection, image filtering, image enhancement, and image morphological processing; then the pixel size of the cropped image is unified through the size normalization operation, and the pixel size of the cropped image is modified to 224×224 pixels, so that the pixel size of the drone image is consistent with the pixel size of the input image of the pre-trained network; finally, the drone image dataset is expanded through image amplification methods such as rotation, flipping, and adding noise to prevent the network from overfitting. In order to be more in line with the actual situation, in addition to simple backgrounds such as blue sky and white clouds, drone images with complex backgrounds such as buildings, trees, and playgrounds are also obtained. Some pictures are shown as follows Figure 2 shown.
[0073] For public places such as squares and parks, drones are identified within a range of 1000m. Drone image collection is carried out in the school square, such as Figure 8 As shown in Figure 1, we collected images of various backgrounds within a range of 1000 meters, including pure sky background, background with buildings, and background with trees. The collected drone images were preprocessed to form the image dataset required for the experiment, as shown in Figure 1. Figure 2 The distribution of the drone image dataset is shown in Table 1. In the experiment, these images are divided into training set and validation set in a ratio of 7:3.
[0074] Table 1 Distribution of UAV image datasets
[0075]
[0076] (2) Experimental environment
[0077] The hardware environment is: Windows 10 system; Intel(R) Core(TM) i9-10900F CPU@2.80GHz2.81GHz, 32G RAM; NVIDIA GeForce RTX 2060GPU, 6G video memory;
[0078] The software environment is: Python 3.7, Sublime, PyCharm; the deep learning framework used is: Pytorch.
[0079] (3) Dense convolutional network recognition experiment based on transfer learning
[0080] The TL-DenseNet-121 network was used to perform a recognition experiment on a drone image dataset. The experiment first performed an initial training on the parameters of the custom fully connected layer in the network. During the experiment, the batch size of each training sample was set to 16 and the number of epochs was set to 50. After 50 epochs of initial training, the TL-DenseNet-121 recognition results were obtained as follows: Fig. 9 shown.
[0081] Select the model parameters corresponding to the epoch with the highest accuracy of the validation set in the initial training and save them. Fig. 9 It can be seen that the highest accuracy of TL-DenseNet-121 on the validation set is 96.77%.
[0082] The network model saved in the initial training is called, and all convolutional layer and fully connected layer parameters in the network are fully trained on this basis. The network hyperparameter settings are the same as those in the initial training. After 50 epochs of full training, the recognition results of TL-DenseNet-121 are as follows: Fig.10 The experiment selected the average accuracy of the validation set of 50 epochs in the full training and the network training time as evaluation indicators. Fig.10 It can be seen that the average accuracy of the validation set of TL-DenseNet-121 is 95.24% and the network training time is 4985s.
[0083] In order to fully illustrate the effect of the model in identifying the drone image dataset, the experiment also obtained the confusion matrix of the TL-DenseNet-121 network when the validation set accuracy was the highest in the whole training. The confusion matrix is shown in formula (2). At this time, the validation set accuracy was 96.33%. The larger the value on the diagonal of the confusion matrix, the better the classification effect of the model.
[0084]
[0085] The model's precision and recall can be calculated through the confusion matrix, and then the F1-Score can be calculated based on these two parameters. The F1-Score combines the results of precision and recall, and is an important indicator for evaluating classification models. Its value range is [0,1]. The larger the value, the better the network output result. The calculation formula is as follows:
[0086]
[0087]
[0088]
[0089] Among them, TP represents a positive sample predicted to be positive; FP represents a negative sample predicted to be positive; and FN represents a positive sample predicted to be negative.
[0090] Taking the DJI Mavic 2 as an example to calculate the F1-Score in this case, the four-class classification problem is merged into a two-class classification problem, and TP = 613, FP = 35, FN = 51 are obtained. Substituting the data into equations (3)-(5), the F1-Score is 0.9345. The results show that TL-DenseNet-121 can recognize the constructed drone image dataset.
[0091] In order to verify the impact of the transfer learning method on the network recognition effect and training speed, this paper also uses the DenseNet-121 network initialized by training without transfer learning to conduct recognition experiments on the drone image dataset. During the experiment, the batch size of each training sample is set to 16, and the number of epochs is set to 100 to correspond to the initial training and full training times of the TL-DenseNet-121 network. After 100 epochs of training, the recognition results of DenseNet-121 are as follows: Fig.11 The experiment selected the average accuracy of the validation set of 100 epochs in training and the network training time as evaluation indicators. Fig.11 It can be seen that the average accuracy of the validation set of DenseNet-121 is 87.64% and the network training time is 7258s.
[0092] According to the confusion matrix of the DenseNet-121 network when the validation set accuracy is the highest during training, the F1-Score of the DenseNet-121 network can be calculated to be 0.8793. By comparing the experimental results of DenseNet-121 and TL-DenseNet-121 networks in the recognition of drone image datasets, we can see that: (1) The difference in average recognition accuracy and F1-Score is because the TL-DenseNet-121 network has transferred the prior knowledge that has been learned on the large dataset ImageNet. Therefore, when recognizing different but related image classification tasks, the network recognition effect is better than the DenseNet-121 network initialized by training; (2) The difference in network training time is because the TL-DenseNet-121 network uses a training strategy that combines initial training and full training. In the initial training, only the customized fully connected layer parameters are trained. The DenseNet-121 network initialized by training needs to train all parameters in the network all the time. Therefore, the training time of the TL-DenseNet-121 network is shorter than that of the DenseNet-121 network. The above comparison results prove the speed and accuracy of the transfer learning network.
[0093] (4) Network experiments integrating different numbers, positions, and attention mechanism modules
[0094] Multiple networks with different numbers, positions, and attention mechanism modules were integrated to conduct recognition experiments on drone image datasets. The training strategy and hyperparameter settings were consistent with those of TL-DenseNet-121. After 50 epochs of initial training and 50 epochs of full training, the recognition results of TL-CA4-DenseNet-121 with the highest recognition accuracy were taken as follows: Fig.12 shown.
[0095] Take the accuracy curves of the validation set of multiple networks in the full training and compare them with TL-DenseNet-121, and draw the comparison curves as follows Fig.13 shown.
[0096] In order to intuitively reflect the recognition effect of each network, the experimental data are sorted using the average accuracy of the validation set, F1-Score and network training time as evaluation indicators. The comparison results of the experimental data are shown in Table 2.
[0097] Table 2 Comparison results of different networks
[0098]
[0099] By comparing the experimental data in Table 2, we can see that: (1) Whether it is the TL-SE1-DenseNet-121 and TL-SE4-DenseNet-121 networks with SE Block, or the TL-CA1-DenseNet-121 and TL-CA4-DenseNet-121 networks with CABlock, their average recognition accuracy and F1-Score are higher than those of the TL-DenseNet-121 network without the attention mechanism. However, since the addition of the attention mechanism will increase the number of network parameters, these additional randomly initialized network parameters need to be trained from scratch, so the training time of the network with the attention mechanism is longer than that of the TL-DenseNet-121 network without the attention mechanism. At the same time, the more attention mechanism modules are introduced, the longer the network training time is; (2) The recognition effect of the network with the attention mechanism added after each Dense Block is higher than that of the network with the attention mechanism added only after Dense Block4, among which the TL-CA4-DenseNet-121 network with CABlock has the highest average recognition accuracy and F1-Score.
[0100] After comprehensive comparison of all experimental data, the TL-CA4-DenseNet-121 network with the best recognition effect was selected as the anti-UAV system image recognition algorithm. The average accuracy of the network in identifying the validation set of the UAV image dataset was 97.93%, the F1-Score was 0.9826, and the network training time was 6832s.
[0101] (5) Multi-model comparison experiment
[0102] In order to verify the superiority and feasibility of the TL-CA4-DenseNet-121 network designed in this paper to identify drone image datasets, this section uses classic convolutional neural network models AlexNet, VGG-16, ResNet-152 and EfficientNet-B0 to conduct recognition experiments on drone image datasets. The training strategy and hyperparameter settings are consistent with TL-CA4-DenseNet-121. After 50 epochs of initial training and 50 epochs of full training, the accuracy curves of the validation set of multiple networks in full training are compared with TL-CA4-DenseNet-121, and the comparison curves are drawn as shown in the figure. Fig.14 shown.
[0103] In order to intuitively reflect the recognition effect of each model, the experimental data are sorted using the average accuracy of the validation set, F1-Score and network training time as evaluation indicators. The comparison results of the experimental data are shown in Table 3.
[0104] Table 3 Comparison results of multiple models
[0105]
[0106] By comparing the experimental data in Table 3, we can see that: (1) Compared with other classic convolutional neural network models, the TL-CA4-DenseNet-121 network has more parameters, so the training time of the TL-CA4-DenseNet-121 network is longer than that of other compared network models; (2) Since the TL-CA4-DenseNet-121 network adds multiple coordinate attention modules, the channel information and position information in the feature map are more prominent, so the average accuracy and F1-Score of the TL-CA4-DenseNet-121 network are higher than those of other compared network models.
[0107] The above comparison results demonstrate the superiority and feasibility of the TL-CA4-DenseNet-121 network in identifying drone image datasets.
[0108] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. An anti-UAV system image recognition method based on coordinate attention mechanism fusion, characterized in that: The following steps are involved: S1: Obtain the drone image to be identified and perform preprocessing; S2: Construct a dense convolutional network with a fused coordinate attention module: S21: Constructing a dense convolutional network TL-DenseNet-121 based on transfer learning; S22: Based on TL-DenseNet-121, the coordinate attention module is integrated to establish the dense convolutional network TL-CA4-DenseNet-121 with the coordinate attention module; S3: Input the preprocessed image into TL-CA4-DenseNet-121 for training; S4: Recognize the image through TL-CA4-DenseNet-121 and output the recognition result; The structure of TL-DenseNet-121 includes a convolutional layer, a maximum pooling layer, a first dense block, a first transition layer, a second dense block, a second transition layer, a third dense block, a third transition layer, a fourth dense block, a global average pooling layer and a fully connected layer, which are arranged in sequence. The fully connected layer outputs the processing result to the output layer, and the output layer uses a Softmax classifier for classification; The TL-CA4-DenseNet-121 integrates four coordinate attention modules CABlock on the basis of TL-DenseNet-121, and its structure includes a sequentially connected convolution layer, a maximum pooling layer, a first dense block, a first coordinate attention module, a first transition layer, a second dense block, a second coordinate attention module, a second transition layer, a third dense block, a third coordinate attention module, a third transition layer, a fourth dense block, a fourth coordinate attention module, a global average pooling layer, and a fully connected layer; The coordinate attention module includes average pooling layers in the x-direction and y-direction, a two-dimensional convolutional layer, a batchnorm layer, and a sigmoid layer.
2. The anti-UAV system image recognition method based on coordinate attention mechanism fusion according to claim 1 is characterized in that: The preprocessing operations of the images in S1 include: S11: Detect and crop the drone outline in the original image through grayscale processing, edge detection, image filtering, image enhancement and image morphological processing; S12: cropping the pixel size of the image to 224×224 pixels through a size normalization operation; S13: Expand the drone image dataset by rotating, flipping, and adding noisy images to prevent the network from overfitting.
3. The anti-UAV system image recognition method based on coordinate attention mechanism fusion according to claim 2 is characterized in that: The specific operation steps of S4 are: S401: The pre-processed drone image is input in the form of an image matrix, and features are extracted from the image matrix after convolution operation in the convolution layer; S402: The feature map obtained after feature extraction is passed through a maximum pooling layer to reduce the pixel size of the feature map and reduce the number of network parameters; S403: The feature map after the size reduction is subjected to feature extraction again through the first dense block; S404: The extracted feature map is passed through a first coordinate attention module to suppress redundant channel features, enhance channel features that are helpful for classification, and pay attention to the position information of the image; S405: The channel features processed by the first coordinate attention module are output to the second dense block through the first transition layer; S406: The second dense block extracts feature information again, and sequentially inputs the feature information into the second coordinate attention module, the second transition layer, the third dense block, the third coordinate attention module, the third transition layer, the fourth dense block, and the fourth coordinate attention module for corresponding processing; S407: The feature map processed by the fourth coordinate attention module is further reduced in length and width by a global average pooling layer, and the feature map is sent to a fully connected layer; S408: Classify the feature map using the Softmax classifier in the fully connected layer and output the classification recognition result.
4. An anti-UAV system image recognition system based on coordinate attention mechanism fusion, characterized in that: It includes UAV image input module, preprocessing module, image recognition module and result output module; The drone image input module is used to obtain drone images to be classified and identified; A preprocessing module is used to perform preprocessing operations on the obtained initial UAV image; The image recognition module is used to identify and classify the pre-processed drone images through the dense convolutional network TL-CA4-DenseNet-121 fused with the coordinate attention module, and send the classification results to the result output module; where: The TL-CA4-DenseNet-121 integrates four coordinate attention modules CABlock on the basis of TL-DenseNet-121, and its structure includes a sequentially connected convolution layer, a maximum pooling layer, a first dense block, a first coordinate attention module, a first transition layer, a second dense block, a second coordinate attention module, a second transition layer, a third dense block, a third coordinate attention module, a third transition layer, a fourth dense block, a fourth coordinate attention module, a global average pooling layer, and a fully connected layer; The coordinate attention module includes average pooling layers in the x-direction and y-direction, a two-dimensional convolutional layer, a batchnorm layer, and a sigmoid layer.
5. The anti-UAV system image recognition system based on coordinate attention mechanism fusion as claimed in claim 4, characterized in that: The preprocessing module includes a grayscale processing unit, an edge detection unit, an image filtering unit, an image enhancement unit and an image morphology processing unit, which are used to detect the outline of the drone in the original picture and cut it out through grayscale processing, edge detection, image filtering, image enhancement and image morphology processing; the preprocessing module also includes a drone image data set expansion unit, which is used to expand the drone image data set by rotating, flipping and adding noise image amplification; The image recognition module includes a dense convolutional network unit integrated with a coordinate attention module, which is used to identify and detect the pre-processed drone image and output the result by integrating the dense convolutional network of the coordinate attention module.
6. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that; When the processor executes the computer program, the anti-UAV system image recognition method based on coordinate attention mechanism fusion as described in any one of claims 1-3 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the anti-UAV system image recognition method based on coordinate attention mechanism fusion as described in any one of claims 1-3 is implemented.
Citation Information
Patent Citations
Medical image segmentation method based on deep learning
CN111145170A
Action recognition method based on human skeleton and image fusion
CN111160164A