A method and system for intelligent poppy recognition in drone aerial images
By adopting an adaptive spatial correlation pyramid attention mechanism model and combining it with deep learning algorithms, the problem of efficient identification of poppy targets in UAV aerial images under complex backgrounds was solved, and the detection accuracy and efficiency of poppy targets were significantly improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies struggle to efficiently identify poppy plants in drone aerial images against complex backgrounds, resulting in low detection efficiency, low accuracy, and the risk of missed or false detections due to fatigue among professionals.
An adaptive spatial correlation pyramid attention mechanism model is adopted, combined with deep learning algorithms. By constructing a spatial pyramid feature extraction module and a feature fusion module, multi-scale spatial feature information is extracted, and the feature matrix is recalibrated to generate a spatial location attention matrix, which is then embedded into the YOLOv5s object detection model to improve object detection accuracy.
It significantly improved the accuracy of poppy target detection, increasing the detection accuracy by 7.4%, reducing the workload of professionals and the false negative rate, and improving the efficiency and accuracy of drug control work.
Smart Images

Figure CN116246184B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology, specifically relating to a method and system for intelligent poppy recognition applied to drone aerial images. Background Technology
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art. The detection of poppy plants in drone aerial photography relies heavily on expert experience; that is, the image interpreters need professional poppy identification training to determine the location of poppies in the image based on their characteristic features. However, poppy plants at different growth stages exhibit varying morphological characteristics; furthermore, to evade drug enforcement personnel, the environments in which poppies are typically planted are often complex, such as in remote courtyards or fields, near walls, abandoned factory areas, around houses, or intercropped with other plants; and in easily concealed locations such as ravines, beaches, mountains, and woodlands. This increases the difficulty of manually visually detecting poppy plants in aerial images, and in practice, a skilled expert needs an average of at least 10 minutes to detect all poppy plant targets in a single drone image. Furthermore, drone images are all high-resolution images, and when drones conduct numerous missions, the number of images collected is often enormous. Prolonged, high-load operation increases the risk of subjective omissions and false positives by professionals, allowing some illegal opium poppy plants to slip through the net and reducing the effectiveness of anti-drug efforts. Therefore, there is an urgent need for new technologies and methods to assist anti-drug personnel in accurately detecting aerial images of opium poppies, effectively improving work efficiency and detection accuracy.
[0003] Deep learning, as a crucial method in artificial intelligence, abstracts shallow image features (texture) to high-level features (contours) to complete recognition tasks. It eliminates the need for manual feature extraction, employing an end-to-end learning approach, and has been successfully applied in areas such as image object detection, semantic segmentation, and scene segmentation. Currently, deep learning-based object detection and recognition algorithms can be broadly categorized into two types: region-proposal-based algorithms, such as R-CNN, Fast-R-CNN, and Faster-R-CNN; and regression-based algorithms, such as YOLO and SSD. However, existing object detection methods are designed for general datasets like Pascal VOC, COCO, and ImageNet, where targets are often large-scale and relatively easy to detect. In contrast, poppy plants in aerial images are small-scale and subject to significant background interference, increasing the difficulty of recognition. Summary of the Invention
[0004] To address the aforementioned problems, this invention proposes a method and system for intelligent poppy identification in drone aerial images. This invention utilizes deep learning algorithms to assist manual screening of poppy targets in aerial images, thus solving the problem of poppy target detection in complex background environments.
[0005] According to some embodiments, the first aspect of the present invention provides a method for intelligent poppy identification applied to drone aerial images, employing the following technical solution:
[0006] A method for intelligent poppy recognition applied to drone aerial images includes:
[0007] Aerial images of poppies were obtained using drones and then preprocessed.
[0008] Based on the pre-processed aerial images of poppies, a pre-trained poppy plant target detection model was used to identify them, and poppy identification results were obtained.
[0009] The poppy plant target detection model includes a backbone network, a neck network, and a detection head network; the backbone network includes five detection units and a spatial pyramid pooling network.
[0010] The first detection unit is a Focus module; the second and fifth detection units are both composed of CSPBottleneck and downsampling layers; the third and fourth detection units are adaptive spatial correlation pyramid attention mechanism models.
[0011] According to some embodiments, the second aspect of the present invention provides a poppy intelligent recognition system applied to drone aerial images, employing the following technical solution:
[0012] A poppy intelligent recognition system for use in drone aerial imagery includes:
[0013] The data acquisition and processing module is configured to acquire aerial images of poppies using a drone and perform preprocessing; the poppy identification module is configured to identify poppies based on the preprocessed aerial images using a pre-trained poppy plant target detection model, and obtain poppy identification results.
[0014] The poppy plant target detection model includes a backbone network, a neck network, and a detection head network; the backbone network includes five detection units and a spatial pyramid pooling network.
[0015] The first detection unit is a Focus module; the second and fifth detection units are both composed of CSPBottleneck and downsampling layers; the third and fourth detection units are adaptive spatial correlation pyramid attention mechanism models.
[0016] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.
[0017] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a poppy intelligent identification method applied to drone aerial images as described in the first aspect above.
[0018] According to some embodiments, a fourth aspect of the present invention provides a computer device.
[0019] A computer device 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 a poppy intelligent identification method applied to drone aerial images as described in the first aspect above.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0021] This invention designs an adaptive spatial correlation pyramid attention mechanism model. In this model, a spatial pyramid feature extraction module is constructed to extract multi-scale spatial feature information from aerial imagery; a spatial correlation feature fusion module is constructed to recalibrate the multi-scale spatial correlation feature matrix information, and then the calibrated multi-scale spatial feature matrix is fused to generate a spatial location attention matrix. Attached Figure Description
[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0023] Figure 1 This is a block diagram of the poppy plant target detection model described in an embodiment of the present invention;
[0024] Figure 2 This is a block diagram of the adaptive spatial correlation pyramid attention model described in an embodiment of the present invention;
[0025] Figure 3 This is a structural diagram of the spatial pyramid feature extraction module described in an embodiment of the present invention;
[0026] Figure 4 This is a structural diagram of the spatial correlation fusion module described in an embodiment of the present invention. Detailed Implementation
[0027] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0028] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0029] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0030] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0031] Example 1
[0032] like Figure 1 As shown, this embodiment provides a method for intelligent poppy identification applied to drone aerial images. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps:
[0033] Aerial images of poppies were obtained using drones and then preprocessed.
[0034] Based on the pre-processed aerial images of poppies, a pre-trained poppy plant target detection model was used to identify them, and poppy identification results were obtained.
[0035] The poppy plant target detection model includes a backbone network, a neck network, and a detection head network; the backbone network includes five detection units and a spatial pyramid pooling network.
[0036] The first detection unit is a Focus module; the second and fifth detection units are both composed of CSPBottleneck and downsampling layers; the third and fourth detection units are adaptive spatial correlation pyramid attention mechanism models.
[0037] The process of acquiring aerial images of poppies using drones and performing preprocessing includes:
[0038] The aerial images of poppies are stretched, flipped, rotated, and their brightness is adjusted to generate an expanded poppy image dataset.
[0039] Based on the expanded poppy image dataset, a target detection tool was used to label the poppies in the poppy images; and a 1024×1024 resolution image was generated with the coordinates of the poppies in the labeled image as the center point.
[0040] The adaptive spatial correlation pyramid attention mechanism model is specifically as follows:
[0041] The first layer consists of three independent 1x1 convolutional layers;
[0042] The second layer consists of two independent spatial pyramid feature extraction modules;
[0043] The third layer consists of three spatial correlation fusion modules;
[0044] The fourth layer is the softmax layer.
[0045] The spatial pyramid feature extraction module uses average pooling branches with kernels of 1x1, 3x3, and 5x5 sizes to obtain the contextual background information of the poppy target.
[0046] The spatial correlation fusion module includes a channel layer, a global average pooling layer, two fully connected neural networks, a softmax function layer, a channel multiplication layer, and a feature addition layer connected in sequence.
[0047] The adaptive spatial correlation pyramid attention mechanism model extracts the spatial correlation of poppy feature targets, specifically as follows:
[0048] The number of channels in the feature map X is reduced by using three independent convolutional layers, generating three new feature matrices Q, K, and V;
[0049] The Q-feature matrix and K-feature matrix are respectively sent to two independent spatial pyramid feature extraction modules. Using three-branch pooling operations, three pairs of spatial feature information matrices A1, A2, A3 and B1, B2, B3 at different scales are generated corresponding to the Q-feature matrix and K-feature matrix, respectively.
[0050]
[0051] Multiplying matrices A1, A2, A3 with their transposes B1, B2, B3 respectively yields three pairs of spatial correlation matrices. and in The three pairs of spatial correlation matrices are then transmitted to the spatial correlation fusion module, which recalibrates the spatial correlation feature matrices in an adaptive manner. The module uses a self-learning approach to autonomously select important feature information and compress useless feature information, thereby implicitly establishing multi-scale spatial features of the poppy image.
[0052] The matrix output by the spatial correlation fusion module is fed into the softmax layer to generate the spatial feature attention matrix. Multiplying the spatial feature attention matrix by the transposed feature matrix V yields matrix P, where Reset the obtained matrix P to Matrix P is fed into a convolution operation g to calculate matrix P. Then, the channel dimension of matrix E is increased to be the same as that of the original feature map X; finally, matrix E is added to the original feature map X to obtain the final matrix. The spatial correlation fusion module obtains multi-scale spatial features, specifically:
[0053] Three pairs of spatial correlation matrices are joined at the channel layer to generate a three-dimensional matrix. Subsequently, global average pooling is used to obtain the feature values for each channel, thereby generating a three-dimensional vector.
[0054] The first fully connected neural network was used to increase dimensionality, which was achieved through a linear transformation formula F. trs =W1F sq Implementation, where W1 is the weight vector,
[0055] The second fully connected neural network is used to reduce the matrix dimension to restore the original dimension, also employing the linear transformation formula F. r =W2F trs Where W2 is a dimension vector,
[0056] The fully connected matrix F r The data is passed to the softmax function to calculate the weights for the three channels. Obtain the weight matrix;
[0057] The recalibrated feature matrix for each channel is obtained by multiplying the weight matrix and the spatial correlation matrix pixel by pixel using a channel multiplication layer. This then generates the three-channel recalibration matrix for the output. Finally, the recalibrated feature matrices of the three channels are summed to obtain the multi-scale spatial features.
[0058] The spatial pyramid pooling network improves the feature extraction capability of the backbone network by fusing multi-scale feature maps.
[0059] The neck network uses a bidirectional feature pyramid network to extract low-level texture features and high-level semantic information; the detection head network is used to generate anchor box coordinates and classification confidence.
[0060] The method described in this embodiment includes the following steps:
[0061] Step 1: Take images of poppies using drones at different altitudes. Then, through expert screening, select aerial images containing poppy targets to initially establish a poppy image dataset.
[0062] Step 2: Preprocess the aerial images of the original poppy plant, including expanding the aerial image dataset of poppies, labeling the target images of poppies, segmenting the aerial images, and establishing the model training dataset and test set;
[0063] Step 3: Design an adaptive spatial correlation pyramid attention mechanism model. In this model, a spatial pyramid feature extraction module is constructed to extract multi-scale spatial feature information from aerial imagery; a spatial correlation feature fusion module is constructed to recalibrate the multi-scale spatial correlation feature matrix information, and then the calibrated multi-scale spatial feature matrix is fused to generate a spatial location attention matrix.
[0064] Step 4: Embed the designed adaptive spatial correlation pyramid attention mechanism model into the backbone network of the YOLOv5s object detection model, and train the neural network model designed in this invention using the training set. The model outputs the poppy target location and classification result through the detection head network.
[0065] Step 5: Evaluate the performance of the designed model using a test set, and then use the model to detect poppy targets in aerial images, thereby outputting poppy recognition results.
[0066] In the above scheme, step 2, which involves preprocessing the aerial images of the original poppy plant, includes the following steps: Step 21: To expand the number of samples in the aerial image dataset, this invention employs two methods. One method involves manually extracting the target image of the original poppy plant using Photoshop software under expert guidance, and then randomly placing the extracted poppies in appropriate locations in the real scene (such as plant clusters, flower pots, etc.) based on the poppy's growth environment. The other method involves using image algorithms to randomly perform operations such as stretching, flipping, rotating, and changing the brightness of the poppy target image, ultimately generating an expanded poppy image dataset.
[0067] Step 22: Based on Step 21, the target detection tool LabelImg is used to label the poppies in the aerial image. During labeling, experts use this tool to select the poppy target location, record the coordinates of the poppy target rectangle, and fill in the poppy category label. Then, according to the LabelImg tool's format protocol, the labeled information is stored in an XML format file, specifically including: target label category, the X and Y coordinates of the top-left corner of the target, and the X and Y coordinates of the bottom-right corner of the target.
[0068] Step 23: The aerial poppy image involved in this invention is a high-resolution image. Assuming its resolution is W×H and the poppy target scale is small, in order to improve the model training efficiency and accuracy, the aerial poppy image is divided into blocks. The division strategy is as follows: count the coordinate positions of all poppy target images in the training set, and then, take the poppy coordinate position in the labeled image as the center point to generate an image with a resolution of 1024×1024.
[0069] In the above scheme, step 3 specifically involves the following steps:
[0070] Step 31: As Figure 2 As shown, feature map The input to the adaptive spatial correlation pyramid attention model is given by H, W, and C, where H, W, and C represent the height, width, and number of channels of the feature map, respectively. Then, three independent 1×1×C convolution operations are used to reduce the dimensionality of the input feature map X to C′, generating three new feature matrices Q, K, and V. Furthermore, the Q and K matrices are reshaped to... Where N = H × W is the total number of pixels in the feature map.
[0071] Step 32: Based on Step 31, the Q and K matrices are respectively transmitted to two independent Spatial Pyramid Feature Extractor (SPFE) modules, the structure of which is shown in the figure below. Figure 3 As shown, its purpose is to obtain more contextual background information about the relevant poppy target. This module contains three branches, each employing a 1×1, 3×3, and 5×5 kernel to perform average pooling operations. Average pooling is used in this invention because it can calculate local region feature information in an indiscriminate (average) manner, thereby obtaining the background semantic information around the target. To maintain consistency with the scale of the input feature matrices Q and K, the pooling process has a step size of 1 and uses a padding operation. Furthermore, the 1×1 kernel branch is used to preserve the original scale feature matrix information. Through the three-branch pooling operations, three pairs of spatial feature information matrices A1, A2, A3 and B1, B2, B3 at different scales are generated corresponding to Q and K, respectively.
[0072]
[0073] Taking one of the SPFE modules as an example, its output calculation formula is as follows:
[0074]
[0075] In the formula, m is the index of the pooling kernel and the feature map generated after pooling, i and j represent the pixel value index on the feature map, h and w are the height and width of the m-th pooling kernel p, and Q is the input feature map of the SPFE module.
[0076] Step 33: Based on step 32, multiply matrices A1, A2, A3 and their transposes B1, B2, B3 respectively to obtain three pairs of spatial correlation matrices. and in The purpose is to calculate the spatial relationships between pairs of pixels on feature maps at three different scales. Subsequently, the three generated spatial correlation matrices are transmitted to the Spatial Correlation Fusion Module (SCFM), which aims to remove redundancy in poppy feature information caused by repeated extraction of spatial feature information. The SCFM module recalibrates the spatial correlation feature matrices adaptively, employing a self-learning approach to autonomously select important feature information and compress useless feature information, implicitly establishing multi-scale spatial features of the poppy image. This module further improves the representation ability of spatial correlation features in poppy images. The module structure diagram is shown below. Figure 4 As shown, first input and The feature map is fed into the SCFM module, and then a connection operation is performed at the channel level to generate a three-dimensional matrix. Subsequently, global average pooling is used to obtain the feature values for each channel, thereby generating a three-dimensional vector. The calculation formula is as follows:
[0077]
[0078] In the formula, R o (i,j) represents the value of the (i,j)th element in the o-th feature map.
[0079] To utilize the fused information, the dependencies of the three correlation matrices are obtained through two fully connected neural networks. The first neural network is used to increase the dimensionality, which is achieved through a linear transformation formula F. trs =W1F sq accomplish,
[0080] Where W1 is the weight vector. The second fully connected layer is used to reduce the matrix dimension and restore it to the original dimension, also employing the linear transformation formula F. r =W2F trs Where W2 is a dimension vector, The fully connected layer used in this module is for adaptively learning the relationships between channels. The computed fully connected matrix is then passed to the softmax function to calculate the weights for the three channels. Furthermore, the weight matrix and the spatial correlation matrix are multiplied pixel by pixel to obtain the recalibration feature matrix for each channel.
[0081] This then generates the three-channel recalibration matrix for the output. Finally, the feature matrices of the three channels are summed and then fed into the next operation to compute the attention mechanism feature map.
[0082] Step 34: Based on Step 33, the matrix output by the SCFM module is fed into the softmax layer to generate the spatial feature attention matrix. Then, the attention matrix is multiplied by the transposed feature matrix V, where Further reset the obtained matrix P to Subsequently, matrix P is fed into a convolution g operation to calculate matrix P. Then, the channel dimension is increased to be the same as the original feature matrix X; finally, matrix E is added to the original feature matrix X to obtain the final matrix.
[0083] In the above scheme, step 4 specifically involves the following steps:
[0084] Step 41: The basic network used in this invention is the YOLOv5s object detection model, the structure of which is as follows: Figure 1As shown, the system consists of a backbone network, a neck network, and a detection head network. The backbone network includes five detection stages and one SPP (Spatial Pyramid Pooling) network. The first detection stage is a focus module, while the other four stages consist of a CSPBottleneck and a downsampling layer. The SPP network aims to improve the feature extraction capability of the backbone network by fusing multi-scale feature maps. The neck network uses a bidirectional feature pyramid network to extract low-level texture features and high-level semantic information. The detection head network is used to generate anchor box coordinates and classification confidence. Then, the core module (adaptive spatial correlation pyramid attention mechanism model) designed in step 3 of this invention is embedded into the third detection stage (Stage 3) and the fourth detection stage (Stage 4) of the YOLOv5s backbone network to extract the spatial correlation of the feature target. After adding the module, YOLOv5s can better obtain the long-term dependency relationship between the target and the surrounding information, thereby improving the accuracy of target detection.
[0085] In the above scheme, step 5 specifically involves the following steps:
[0086] Table 1 shows the statistics of poppy aerial image preprocessing, data expansion of the training set, validation set, and test set involved in this example.
[0087] Table 1. Statistics of Poppy Aerial Image Dataset
[0088] Poppy image training set Validation set test set quantity 26,124 3,732 7,464
[0089] To evaluate the results of poppy target detection, this invention uses precision and recall metrics, calculated as follows:
[0090]
[0091] In the formula, TP (True Positive) represents the number of correctly detected poppy targets, FP (False Positive) represents the number of incorrectly detected poppy targets, and FN (False Negative) represents the number of undetected poppy targets. Based on precision and recall, a PR curve can be obtained, and the area under the curve is AP (Average Precision). Furthermore, the average precision (AP) for poppy target detection can be calculated. This metric measures the precision of the detection algorithm of this invention, where the Intersection over Union (IoU) is 0.5; a value greater than 0.5 indicates a correctly detected poppy target.
[0092] Finally, the method proposed in this invention is compared with the original YOLOv5s model. The two models use the same backbone network, and their detection results are shown in Table 2.
[0093] Table 2 Comparison of detection results between the method of the present invention and the YOLOv5s model.
[0094] method AP YOLOv5s 83.1% The method of the present invention 90.5%
[0095] As can be seen from the table, compared with the original YOLOv5s model, the model proposed in this invention improves the poppy target detection accuracy by 7.4%, and the method proposed in this invention has certain advantages.
[0096] The present invention has been described through the above examples; however, it should be understood that the above examples are for illustrative purposes only. Therefore, any technical method obtained in the technical field through logical analysis, reasoning, or limited experimentation should fall within the scope of protection of the described examples.
[0097] Example 2
[0098] This embodiment provides a poppy intelligent recognition system applied to drone aerial images, including:
[0099] The data acquisition and processing module is configured to acquire aerial images of poppies using a drone and perform preprocessing; the poppy identification module is configured to identify poppies based on the preprocessed aerial images using a pre-trained poppy plant target detection model, and obtain poppy identification results.
[0100] The poppy plant target detection model includes a backbone network, a neck network, and a detection head network; the backbone network includes five detection units and a spatial pyramid pooling network.
[0101] The first detection unit is a Focus module; the second and fifth detection units are both composed of CSPBottleneck and downsampling layers; the third and fourth detection units are adaptive spatial correlation pyramid attention mechanism models.
[0102] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.
[0103] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0104] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.
[0105] Example 3
[0106] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a poppy intelligent recognition method applied to drone aerial images as described in Embodiment 1 above.
[0107] Example 4
[0108] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the poppy intelligent recognition method applied to drone aerial images as described in Embodiment 1 above.
[0109] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention 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 and optical storage) containing computer-usable program code.
[0110] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0111] 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 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0112] 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.
[0113] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0114] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for intelligent poppy recognition applied to drone aerial images, characterized in that, include: Aerial images of poppies were obtained using drones and then preprocessed. Based on the pre-processed aerial images of poppies, a pre-trained poppy plant target detection model was used to identify them, and poppy identification results were obtained. The poppy plant target detection model includes a backbone network, a neck network, and a detection head network; the backbone network includes five detection units and a spatial pyramid pooling network. The first detection unit is a Focus module; the second and fifth detection units are both composed of a CSP Bottleneck and a downsampling layer; the third and fourth detection units are adaptive spatial correlation pyramid attention mechanism models; the adaptive spatial correlation pyramid attention mechanism model extracts the spatial correlation of poppy feature targets, specifically as follows: The feature map X is reduced in dimensionality by using three independent convolutional layers, generating three new feature matrices. , , ; Characteristic matrix and The feature matrices are sent to two independent spatial pyramid feature extraction modules, and three-branch pooling operations are used to extract them. Characteristic matrix and The feature matrix generates three pairs of spatial feature information matrices at different scales. , , and , , ,in C is the number of feature map channels. represents the total number of pixels in the feature map, and H and W are the height and width of the feature map, respectively. matrix , , and transpose , , The matrices are multiplied separately to obtain three pairs of spatial correlation matrices. , ,and ,in The three pairs of spatial correlation matrices are transmitted to the spatial correlation fusion module, which recalibrates the spatial correlation feature matrix in an adaptive manner. It uses a self-learning approach to autonomously select important feature information and compress useless feature information to implicitly establish the multi-scale spatial features of the poppy image. The matrix output by the spatial correlation fusion module is fed into the softmax layer to generate the spatial feature attention matrix. The spatial feature attention matrix and the transposed feature matrix are combined. Multiplying them yields matrix P, where Reset the obtained matrix P to Matrix P is fed into a convolutional layer. The operation calculates the matrix. And increase the channel dimension of matrix E to be the same as the original feature map X; finally, the matrix... Adding it to the original feature map X yields the final matrix. .
2. The poppy intelligent recognition method applied to UAV aerial images as described in claim 1, characterized in that, The process of acquiring aerial images of poppies using drones and performing preprocessing includes: The aerial images of poppies are stretched, flipped, rotated, and their brightness is adjusted to generate an expanded poppy image dataset. Based on the expanded poppy image dataset, object detection tools were used to label the poppies in the poppy images; Generate a 1024×1024 resolution image using the coordinates of the poppy in the labeled image as the center point.
3. The poppy intelligent recognition method applied to UAV aerial images as described in claim 1, characterized in that, The adaptive spatial correlation pyramid attention mechanism model is specifically as follows: The first layer consists of three independent 1x1 convolutional layers; The second layer consists of two independent spatial pyramid feature extraction modules; The third layer consists of three spatial correlation fusion modules; The fourth layer is the softmax layer.
4. The poppy intelligent recognition method applied to UAV aerial images as described in claim 3, characterized in that, The spatial pyramid feature extraction module uses average pooling branches with kernels of 1x1, 3x3, and 5x5 sizes to obtain the contextual background information of the poppy target. The spatial correlation fusion module includes a channel layer, a global average pooling layer, two fully connected neural networks, a softmax function layer, a channel multiplication layer, and a feature addition layer connected in sequence.
5. The poppy intelligent recognition method applied to UAV aerial images as described in claim 1, characterized in that, The spatial correlation fusion module obtains multi-scale spatial features, specifically: Three pairs of spatial correlation matrices are joined at the channel layer to generate a three-dimensional matrix. Subsequently, global average pooling is used to obtain the feature values for each channel, thereby generating a three-dimensional vector. ; The first fully connected neural network was used to increase dimensionality, which was achieved through a linear transformation formula. Implementation, in which It is a weight vector. The second fully connected neural network is used to reduce the matrix dimension and restore it to the original dimension, also employing a linear transformation formula. ,in It is a dimension vector. ; Fully connected matrix The data is passed to the softmax function to calculate the weights for the three channels. This yields the weight matrix; The recalibrated feature matrix for each channel is obtained by multiplying the weight matrix and the spatial correlation matrix pixel by pixel using a channel multiplication layer. This generates the three-channel recalibration matrices for the output. ; Finally, the recalibrated feature matrices of the three channels are summed to obtain the multi-scale spatial features.
6. The poppy intelligent recognition method applied to UAV aerial images as described in claim 1, characterized in that, The spatial pyramid pooling network improves the feature extraction capability of the backbone network by fusing multi-scale feature maps. The neck network uses a bidirectional feature pyramid network to extract low-level texture features and high-level semantic information; The detection head network is used to generate anchor frame coordinates and classification confidence scores.
7. A poppy intelligent recognition system applied to drone aerial images, characterized in that, include: The data acquisition and processing module is configured to use a drone to acquire aerial images of poppies and perform preprocessing. The poppy identification module is configured to identify poppies based on pre-processed aerial images of poppies using a pre-trained poppy plant target detection model, and obtain poppy identification results. The poppy plant target detection model includes a backbone network, a neck network, and a detection head network; the backbone network includes five detection units and a spatial pyramid pooling network. The first detection unit is a Focus module; the second and fifth detection units are both composed of a CSP Bottleneck and a downsampling layer; the third and fourth detection units are adaptive spatial correlation pyramid attention mechanism models; the adaptive spatial correlation pyramid attention mechanism model extracts the spatial correlation of poppy feature targets, specifically as follows: The feature map X is reduced in dimensionality by using three independent convolutional layers, generating three new feature matrices. , , ; Characteristic matrix and The feature matrices are sent to two independent spatial pyramid feature extraction modules, and three-branch pooling operations are used to extract them. Characteristic matrix and The feature matrix generates three pairs of spatial feature information matrices at different scales. , , and , , ,in C is the number of feature map channels. represents the total number of pixels in the feature map, and H and W are the height and width of the feature map, respectively. matrix , , and transpose , , The matrices are multiplied separately to obtain three pairs of spatial correlation matrices. , ,and ,in The three pairs of spatial correlation matrices are transmitted to the spatial correlation fusion module, which recalibrates the spatial correlation feature matrix in an adaptive manner. It uses a self-learning approach to autonomously select important feature information and compress useless feature information to implicitly establish the multi-scale spatial features of the poppy image. The matrix output by the spatial correlation fusion module is fed into the softmax layer to generate the spatial feature attention matrix. The spatial feature attention matrix and the transposed feature matrix are combined. Multiplying them yields matrix P, where Reset the obtained matrix P to Matrix P is fed into a convolutional layer. The operation calculates the matrix. And increase the channel dimension of matrix E to be the same as the original feature map X; finally, the matrix... Adding it to the original feature map X yields the final matrix. .
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the poppy intelligent recognition method applied to drone aerial images as described in any one of claims 1-6.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the poppy intelligent recognition method applied to drone aerial images as described in any one of claims 1-6.
Citation Information
Patent Citations
Unmanned aerial vehicle aerial image target detection method based on improved YOLO V5
CN113807464A