Unmanned aerial vehicle poppy detection method and system based on Gaussian dynamic annotation adjustment

By using Gaussian dynamic annotation adjustment and downsampling to enhance the feature extraction network in the UAV poppy detection system, the problem of insufficient feature recognition of small targets under the concealed planting method is solved, and higher recognition accuracy and anti-masking capabilities are achieved.

CN119360242AInactive Publication Date: 2025-01-24HARBIN INST OF TECH AT WEIHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411385362.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When identifying poppy plants, the prior art has weak identification capabilities for hidden planting methods such as cover planting, field interleaving, and mixed planting, making it difficult to effectively identify small target features and resist shading interference.

Method used

The drone poppy detection method based on the Gaussian dynamic labeling adjustment is adopted, and the loss function of the small target characteristics is used to establish a loss function of the Single -type distance measurement dynamic labeling by the establishment of a sampling enhancement feature extraction network and the introduction of the Gaussian -type distance measurement dynamic labeling.

Benefits of technology

Effectively improve the ability to extract and obscure interference with the characteristics of the small targets of the poppy, and improve the generalization and recognition accuracy of the model, especially in the complex background.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360242A_ABST
    Figure CN119360242A_ABST
Patent Text Reader

Abstract

The invention provides an unmanned aerial vehicle poppy detection method and system based on Gaussian dynamic annotation adjustment, and relates to the technical field of image recognition and processing, and the method comprises the following steps: collecting image data of a target region through an unmanned aerial vehicle, and carrying out the preprocessing of the image data; establishing a poppy detection model based on a down-sampling enhanced feature extraction network, loading the training set into the poppy detection model for feature extraction and feature fusion, and executing a classification task and a regression task; evaluating the poppy detection model based on a loss function which introduces Gaussian distance measurement dynamic labeling adjustment, and guiding the poppy detection model to learn and reduce errors through gradient return; and loading the verification set into the poppy detection model to evaluate the generalization ability of the poppy detection model. Aiming at the problems that a poppy planting method is hidden and features are difficult to extract, an improved down-sampling feature enhancement network is designed, a Gaussian dynamic annotation adjustment strategy is provided, sample annotation is dynamically adjusted, and the poppy feature extraction capability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition and processing technology, and more specifically, to a method and system for detecting poppies using a drone based on Gaussian dynamic annotation adjustment. Background Art

[0002] The inspection and law enforcement of drug raw materials is one of the important tasks of the public security organs. Compared with the traditional manual inspection method, drones can quickly cover a large area of ​​planting areas and complete the monitoring of the entire area in a shorter time. In order to better deal with the problems of remote and difficult investigation of poppy planting sites, single plant planting, and small-area planting, and to reduce the time and labor cost of poppy plant identification, the technical solutions used in the existing technology are: (1) The Chinese invention patent with publication number CN116246184A discloses a method and system for intelligent recognition of poppies applied to aerial images taken by unmanned aerial vehicles, including obtaining aerial images of poppies by using unmanned aerial vehicles and preprocessing them; based on the preprocessed aerial images of poppies, using a pre-trained poppy plant target detection model to perform recognition and obtain poppy recognition results; wherein 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 detection unit and the fifth detection unit are both composed of a CSP Bottleneck and a downsampling layer; the third detection unit and the fourth unit are adaptive spatial correlation pyramid attention mechanism models, which are suitable for processing the problem of original poppy plant target recognition in complex backgrounds and reducing the missed detection rate.

[0003] (2) The Chinese invention patent with publication number CN116563730A discloses a method for poppy detection in UAV remote sensing images based on relearning, including data set construction, annotation and preprocessing of poppy image data sets; model relearning, using the target detection model to improve the generalization ability of the model by relearning difficult samples. Relearning is to detect the validation set with the trained weights, obtain false detection and missed detection samples and put them into the training set to form new data set samples, and re-iterate learning through model fine-tuning; finally, the generalization performance of the model is judged by comparing the detection accuracy of the validation set and the test set. The model weights with the best performance are used for the poppy recognition and detection tasks of UAV remote sensing images, which is suitable for improving the poppy detection ability of UAV remote sensing images.

[0004] However, the solutions adopted by the existing technology mainly focus on improving the accuracy of the model and the recognition performance of poppies, and tend to recognize images of poppy plants with complete plants and clear boundaries, while the recognition ability for images collected by concealed planting methods such as cover planting, field planting, and mixed planting is relatively weak. Summary of the invention

[0005] To solve the above problems, the technical solution adopted in this application is a method for detecting poppy by drone based on Gaussian dynamic annotation adjustment, which includes the following steps: S1: Collect image data of the target area through drones, pre-process the image data, and establish training sets and validation sets; S2: establishing a poppy detection model based on a downsampling enhanced feature extraction network, loading the training set into the poppy detection model for feature extraction and feature fusion, and performing classification tasks and regression tasks; S3: Evaluate the current performance of the poppy detection model based on the loss function adjusted by introducing Gaussian distance metric dynamic annotation, and guide the poppy detection model to learn and reduce errors through gradient backpropagation; S4: Loading the validation set into the poppy detection model to evaluate the generalization ability of the poppy detection model.

[0006] Optionally, the preprocessing includes screening the image data, annotating the screened image data with a poppy target frame, overlapping and cropping the image data to generate an image in a predetermined format, performing secondary screening and annotation correction on the generated sub-images, and enhancing and expanding the image data that has completed the secondary screening and annotation correction.

[0007] Optionally, the downsampling enhancement feature extraction network includes using a two-dimensional discrete wavelet transform to perform frequency domain enhancement and reconstruction processing on the features, and obtaining a reconstructed feature by convolution processing channel dimensions of the global enhancement feature and the local enhancement feature.

[0008] Optionally, the global enhancement feature is obtained by the following steps: Low-frequency morphological feature components, high-frequency detail feature components and directional frequency components are generated from the feature map. The global adaptive learning of the correlation between features at different levels of the feature map is combined with the attention mechanism to obtain the weighted coefficients of each frequency component. The two-dimensional plane scale is kept unchanged and reorganized to obtain a global enhanced feature with stronger directionality to the target feature.

[0009] Optionally, the local enhancement feature is obtained by the following steps: using low-frequency morphological feature components and high-frequency detail feature components as guiding features to guide the learning of directional frequency components; in a shallow network, using low-frequency feature components as guiding features to guide the learning of high-frequency feature components; in a deep network, using high-frequency feature components as guiding features to guide the learning of low-frequency feature components; and recombining the guided and enhanced features to obtain the local enhancement feature.

[0010] Optionally, step S3 includes: modeling the prediction box and the annotation box by combining the probability density function of the inscribed ellipse in the target box and the two-dimensional Gaussian distribution, calculating the distribution distance between the prediction box and the annotation box and normalizing it, and performing weighted fusion with the original loss function to obtain a loss function that introduces Gaussian distance measurement and dynamic annotation adjustment.

[0011] Optionally, step S3 is performed according to the following formula: The prediction box and annotation box are modeled as follows: ; In the formula, cx and cy represent the coordinates of the center point of the box, w represents the height, h represents the width, μ and ∑ represent the mean vector and covariance matrix of the Gaussian distribution; The distance metric between the predicted box and the labeled box is calculated as follows: ; In the formula, Represents the distance metric between the predicted box and the labeled box, are the Gaussian distributions of the prediction box and the annotation box, respectively. The subscript A with the same symbols as above represents the parameters related to the prediction box, and the subscript B represents the parameters related to the annotation box. The loss function of the dynamic annotation adjustment by introducing Gaussian distance metric is as follows:

[0012] ; In the formula, C is a constant, is the weighting coefficient, Loss represents the loss function of the dynamic annotation adjustment by introducing Gaussian distance metric, ' represents the data loss involved in training, represents the average loss of the data involved in the training, k represents the hyperparameter, L0 is the adjustment coefficient, Indicates that the factor is separated from the computational graph, A represents the prediction box, and B represents the labeling box.

[0013] Optionally, a vegetation index mode is introduced as additional information before loading the training set into the poppy detection model, and an auxiliary detection head is introduced during the learning process of the poppy detection model to increase the level of information.

[0014] Optionally, collecting image data of the target area by using a drone includes: performing extended image collection on both sides of a preset drone flight track of the target area.

[0015] The present application also provides a drone poppy detection system based on Gaussian dynamic labeling adjustment, comprising: Input preprocessing module: used to collect image data of the target area through drones, preprocess the image data, and establish training sets and validation sets; Poppy detection module: used to establish a poppy detection model based on a downsampling enhanced feature extraction network, load the training set into the poppy detection model for feature extraction and feature fusion, and perform classification and regression tasks; Model optimization module: used to evaluate the current performance of the poppy detection model based on the loss function adjusted by introducing Gaussian distance metric dynamic annotation, and guide the poppy detection model to learn and reduce errors through gradient backpropagation; Model evaluation module: used to load the validation set into the poppy detection model to evaluate the generalization ability of the poppy detection model.

[0016] The beneficial effects of the UAV poppy detection method based on Gaussian dynamic annotation adjustment provided in this application are: 1. Aiming at the problem that it is difficult to extract features of concealed planting methods such as poppy cover planting, field intercropping, and mixed planting, an improved downsampling feature enhancement network is designed, and two-dimensional discrete wavelet transform is used to perform frequency domain enhancement and reconstruction processing on the features to reduce the loss of target features in the feature extraction network and improve the ability to extract small poppy targets.

[0017] 2. Aiming at the problem that concealed planting methods such as poppy cover planting, field intercropping, and mixed planting are prone to feature loss when the background is complex and occlusion and concealment cause interference, a Gaussian dynamic labeling adjustment strategy is proposed. By designing a Gaussian distance metric loss function, the sample labeling is dynamically adjusted to remove the occlusion interference characteristics, enhance the target characteristics, and effectively improve the anti-occlusion interference ability of the poppy small target features, thereby improving the generalization of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art.

[0019] Figure 1 It is a block diagram of a poppy detection model provided in an embodiment of the present application; Figure 2 It is a scale statistical graph of the poppy data set provided in the embodiment of the present application; Figure 3 It is a downsampling enhanced feature extraction network structure diagram provided in an embodiment of the present application; Figure 4 It is a structural diagram of a poppy detection algorithm-assisted detection head provided in an embodiment of the present application; Figure 5 This is a dual-modal input structure diagram provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0021] Figure 1 The poppy detection model block diagram provided in the embodiment of the present application is as follows: Figure 1 It can be seen that the method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment provided in this application comprises the following steps: S1: Collect image data of the target area through drones, pre-process the image data, and establish training sets and validation sets; S2: Establish a poppy detection model based on a downsampling enhanced feature extraction network, load the training set into the poppy detection model for feature extraction and feature fusion, and perform classification and regression tasks; S3: The current performance of the poppy detection model is evaluated based on the loss function adjusted by introducing Gaussian distance metric dynamic annotation, and the poppy detection model is guided to learn and reduce the error through gradient backpropagation; S4: Load the validation set into the poppy detection model to evaluate the generalization ability of the poppy detection model.

[0022] Figure 2 This is a scale statistical chart of the poppy dataset. The coordinate axis represents the proportion of poppy target size, and the target width and target height represent the width and height of the target box. It can be seen from the figure that the distribution of target width and target height are mainly concentrated in the range of 0-0.2 and 0-0.25, respectively. That is, from the perspective of size ratio, the main poppy targets are relatively small in size.

[0023] In view of the unique problems of the application background, a poppy detection model is built and improved based on YOLOv8n. In view of the problem that the features of concealed planting methods such as poppy cover planting, field intercropping, and mixed planting are difficult to extract, an improved downsampling feature enhancement network is designed to reduce the loss of target features in the feature extraction network and improve the ability to extract small target features. In view of the problem that concealed planting methods such as poppy cover planting, field intercropping, and mixed planting are prone to feature loss when the background is complex and occlusion and concealment cause interference, a Gaussian dynamic annotation adjustment strategy is proposed. By designing a Gaussian distance metric loss function, the sample annotation is dynamically adjusted, the occlusion interference characteristics are removed, the target characteristics are enhanced, and the anti-occlusion interference ability of small target features is effectively improved, and the generalization of the model is improved.

[0024] In another embodiment of the present application, preprocessing includes screening the image data, annotating the screened image data with a poppy target frame, overlapping and cropping the image data to generate an image in a predetermined format, performing secondary screening and annotation correction on the generated sub-images, and enhancing and expanding the image data that has completed the secondary screening and annotation correction.

[0025] Taking into account the actual flight needs of the UAV and the quality of the photographed images, a suitable reference height was set and the images of poppy targets were appropriately expanded to both sides. The original images containing poppy targets were manually determined by relevant experts as the original database, and further processing was performed based on this original database: First, the data is screened based on the quality of the targets in the data. The screening criteria include removing images whose quality has been greatly reduced due to the drone's flight speed, flight altitude, exposure compensation, etc.; images that hinder data annotation due to excessive overlap between the target and the background; images that do not match the actual application scenarios, such as drones that are too close or zoomed in, etc., to avoid using such unqualified data as training sets to prevent the model from learning incorrectly.

[0026] Secondly, the target detection and annotation tool LabelImg is used to annotate the horizontal target frame of the poppy target in the screened original image; since the original data is generally a high-resolution image, in order to avoid unnecessary information loss and to preserve the integrity of the target and the richness of the background information as much as possible, the image is further overlapped and cropped (that is, there is a certain ratio of overlap between each adjacent sub-image) to generate 1024 1024 images, and perform secondary screening and annotation correction on the sub-images.

[0027] Finally, considering some limitations of artificially collected data, the data samples are enhanced and expanded, using basic image processing algorithms, including vertical and horizontal flipping, scaling and rotation, brightness transformation, color gamut transformation, etc. of the target image. At the same time, the aforementioned sub-image generation process also achieves a certain degree of augmentation. Based on this preprocessed data, the training set and validation set are established.

[0028] In another embodiment of the present application, the downsampling enhanced feature extraction network includes using a two-dimensional discrete wavelet transform to perform frequency domain enhancement and reconstruction processing on the features, and obtaining a reconstructed feature by convolution processing the channel dimension of the global enhanced feature and the local enhanced feature.

[0029] Through the downsampling enhancement module, the loss of target features in the feature extraction network is reduced, such as Figure 3 As shown, the module input feature map , where H, W, and C represent the height, width, and channel dimensions of the feature map, respectively; perform a two-dimensional discrete wavelet transform on it to generate the low-frequency component of the feature map X , low frequency in the horizontal direction and high frequency in the vertical direction , high frequency components in the horizontal direction and low frequency components in the vertical direction And high frequency components The first line in the dotted line indicates global feature enhancement, learning weights of different frequency features, the second line in the dotted line indicates that low-frequency and high-frequency components guide each other in shallow and deep networks, and the third line in the dotted line indicates using low-frequency and high-frequency components to guide directional components for learning.

[0030] In another embodiment of the present application, the global enhancement feature is obtained by the following steps: Low-frequency morphological feature components, high-frequency detail feature components and directional frequency components are generated from the feature map. The global adaptive learning of the correlation between features at different levels of the feature map is combined with the attention mechanism to obtain the weighted coefficients of each frequency component. The two-dimensional plane scale is kept unchanged and reorganized to obtain a global enhanced feature with stronger directionality to the target feature.

[0031] Input feature map , where H, W, and C represent the height, width, and channel dimensions of the feature map, respectively; the feature map X is transformed into a low-frequency morphological feature component, a high-frequency detail feature component, and a directional frequency component X using a two-dimensional discrete wavelet transform to perform frequency domain enhancement and reconstruction. L , X H , X LH , X HL , combined with the attention mechanism X Global adaptive learning of the correlation between features at different levels, obtaining the weighted coefficients of each frequency component, and reorganizing them to obtain feature outputs that are more directional to the target features while keeping the two-dimensional plane scale unchanged. ; In another embodiment of the present application, the local enhancement feature is obtained by the following steps: using low-frequency morphological feature components and high-frequency detail feature components as guiding features to guide the learning of directional frequency components; in a shallow network, using low-frequency feature components as guiding features to guide the learning of high-frequency feature components; in a deep network, using high-frequency feature components as guiding features to guide the learning of low-frequency feature components; and recombining the guided and enhanced features to obtain the local enhancement feature.

[0032] Specifically, in order to further enhance the directivity of the characteristics of different frequency components, the low-frequency morphological characteristic component X L and high frequency detail feature component X H As a guiding feature, the guiding directional frequency component X LH , X HL Learning, while in the shallow network, with low-frequency feature components X LAs a guiding feature, guide the high-frequency feature component X H In the deep network, the high-frequency feature component X H As a guiding feature, guide the low-frequency feature component X L The learning of guided reinforcement is reorganized to obtain ; Low-frequency components usually contain the main structure and background information of the image, while high-frequency components contain details and edge information. By combining features of different frequencies, the model can capture both local details (high frequency) and global information (low frequency) of the image. This multi-scale feature fusion helps improve the model's ability to understand the content of the image. High-frequency features usually contain edge and texture information of the image, while low-frequency features contain smooth areas and overall structure of the image. In shallow networks, low-frequency features can provide contextual information for high-frequency features, helping the model to better understand the background and structure of the image. In deep networks, high-frequency features can enhance the model's ability to recognize details.

[0033] Integrate the global enhancement feature X1 and the local enhancement feature X2, and Convolution processes the channel dimension to generate the required reconstructed feature output Building a backbone network based on this downsampling enhancement module can reduce feature loss to a certain extent and is more suitable for the target application background than the original network.

[0034] In another embodiment of the present application, step S3 includes: modeling the prediction box and the annotation box by combining the probability density function of the inscribed ellipse in the target box and the two-dimensional Gaussian distribution, calculating the distribution distance between the prediction box and the annotation box and normalizing it, and weighted fusion with the original loss function to obtain a loss function that introduces Gaussian distance metric dynamic annotation adjustment.

[0035] In another embodiment of the present application, step S3 is performed according to the following formula: Since the proportion of poppy targets in the drone's perspective is small, the overlap possibility and degree between the predicted box and the labeled box are relatively low, and the basic IoU metric is sensitive to position deviation. For this reason, a Gaussian distribution modeling target box is designed. The position deviation between the two target boxes is measured by calculating the distance between the two distributions to weaken the adverse effect of the IoU metric on the position of small targets. First, the target box can be modeled by combining the probability density function of the inscribed ellipse of the target box and the two-dimensional Gaussian distribution as shown in the following formula, and the prediction box and the labeled box are modeled as follows: ; In the formula, cx and cy represent the coordinates of the center point of the box, w represents the height, h represents the width, μ and ∑ represent the mean vector and covariance matrix of the Gaussian distribution; The distance between the two target boxes A and B is calculated and normalized, and weighted with the original loss function to assist the model in learning features, as shown in the following formula: ; In the formula, Represents the distance metric between the predicted box and the labeled box, N A , N B are the Gaussian distributions of the prediction box and the annotation box, respectively. The subscript A with the same symbols as above represents the parameters related to the prediction box, and the subscript B represents the parameters related to the annotation box. The loss function of the Gaussian distance metric dynamic annotation adjustment is introduced, where C is a constant, is the weighting coefficient, A represents the predicted box, B represents the labeled box, and the distance measurement between the predicted box and the labeled box is calculated as follows: ; Because the poppy target accounts for a small proportion and is easily blocked from the perspective of the drone, the confidence level of the labeled boundary fluctuates to a certain extent. Therefore, in order to avoid the absolute confidence level of the labeled boundary during model training, a dynamic adjustment mechanism is designed based on the annotation, and the normalized ratio of the current loss to its sliding average is used as the basis for dynamic adjustment. The specific formula is as follows, where k represents the hyperparameter, L0 is the adjustment coefficient, This means separating the factor from the computation graph: ; In the formula, Loss represents the loss function of dynamic annotation adjustment by introducing Gaussian distance metric. ' represents the data loss involved in training, Represents the average loss of the data involved in training.

[0036] like Figure 4 and Figure 5 As shown, in another embodiment of the present application, a vegetation index modality is introduced as additional information before loading the training set into the poppy detection model, and an auxiliary detection head is introduced in the learning process of the poppy detection model to increase the level of information. The additional vegetation index modality is introduced to strengthen the target features, reorganize different vegetation indices and combine them with the original input data, and enhance the model's ability to capture poppy features. The vegetation index can be an ultra-green index ExR, an ultra-green index ExG, a vegetation color index CIVE, etc. In this embodiment, as Figure 4 As shown, the solid arrow connected to the "Input Data" process box points to the original RGB image collected by the drone, and the dotted arrow below it points to the image that is a composite of the vegetation color index and the comprehensive vegetation index.

[0037] like Figure 3As shown in the figure, auxiliary detection heads are introduced in the training stage in combination with YOLOv7. The dotted arrows indicate that features from earlier layers are taken out during the training process to assist the model in learning. The richer information flows at different layers are used to assist the model in learning more stable target features and improve the recall rate. Additional detection heads are introduced during the training process to utilize information from different layers of the network to assist the model in learning more stable target features. These auxiliary heads are located in the middle layer of the network and can provide higher-resolution feature maps, which help the model better identify small targets and detailed information.

[0038] The calculated vegetation index is used as a feature input into the machine learning or deep learning model. These features can help the model better understand the biological characteristics and growth cycle of vegetation. According to the unique plant properties of the target, a dual-modal input is designed, with the vegetation index as an additional modality, and auxiliary detection training is introduced to enhance the common features between targets and the difference features between targets and backgrounds, thus improving the model's ability to fit poppy targets.

[0039] In another embodiment of the present application, collecting image data of the target area by using a drone includes: performing extended image collection on both sides of a preset drone flight trajectory of the target area.

[0040] After determining the base altitude of the drone flight, in order to ensure that the poppy targets in the target area can be covered and sufficient surrounding environmental information can be obtained, the flight path of the drone will be extended to a certain width on both sides of the target area. The purpose of this is to ensure that the target area is completely covered within the shooting range when the target area is irregular or difficult to accurately locate during flight. Obtaining environmental information around the target area will help with subsequent image analysis and target identification, such as distinguishing poppies from other crops.

[0041] When monitoring a large area, you may need to stitch multiple images into a complete map. Appropriate expansion can provide overlapping areas for stitching, making the stitching more accurate. Drone flight and shooting may be affected by factors such as wind and operating errors. Expanding a certain width can reduce the impact of these factors on shooting quality.

[0042] In another embodiment of the present application, a drone poppy detection system based on Gaussian dynamic labeling adjustment is also provided, including: Input preprocessing module: used to collect image data of the target area through drones, preprocess the image data, and establish training sets and validation sets; Poppy detection module: used to establish a poppy detection model based on a downsampling enhanced feature extraction network, load the training set into the poppy detection model for feature extraction and feature fusion, and perform classification and regression tasks; Model optimization module: used to evaluate the current performance of the poppy detection model based on the loss function adjusted by introducing Gaussian distance metric dynamic annotation, and guide the poppy detection model to learn and reduce errors through gradient backpropagation; Model evaluation module: used to load the validation set into the poppy detection model to evaluate the generalization ability of the poppy detection model.

[0043] In this embodiment, the UAV poppy detection system based on Gaussian dynamic annotation adjustment also includes an output processing module: used to extract positioning information and shooting information of the original image and mark the detection results. The output processing module targets the problem of intelligent processing of high-resolution image input by the poppy detection model, and builds an end-to-end model through the reorganization of target detection algorithms, detection results and shooting information, so as to effectively realize the intelligent detection and output of poppy original plants.

[0044] It should be noted that the UAV poppy detection system based on Gaussian dynamic labeling adjustment in this embodiment is an embodiment of the detection system corresponding to the UAV poppy detection method based on Gaussian dynamic labeling adjustment, so the specific implementation of the software method in each module of the detection system can be referred to. Figure 1-Figure 5 The embodiments of the present invention will not be described in detail here.

[0045] The poppy detection algorithm and input and output processing modules are integrated to form a complete poppy detection process. Considering the inconsistency of the quality of pictures taken by different devices and their inconsistency with the preset input of the algorithm, the input preprocessing module is used to generate and group sub-images of preset sizes for the target pictures; considering the actual needs of the investigation work, the output processing module is used to extract the positioning information, shooting information, etc. of the original image, and mark the detection results to assist in the subsequent eradication of the original poppy plants.

[0046] Table 1 Poppy detection performance evaluation

[0047] mAP@0.5: The mean average precision calculated with a confidence threshold of 0.5.

[0048] As shown in Table 1, compared with the YOLOv8n algorithm, the method of the present invention has significantly improved the accuracy of poppy target detection and forms a complete end-to-end processing system.

[0049] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting poppy using drone based on Gaussian dynamic annotation adjustment, characterized in that: The following steps are involved: S1: Collect image data of the target area through a drone, pre-process the image data, and establish a training set and a validation set; S2: establishing a poppy detection model based on a downsampling enhanced feature extraction network, loading the training set into the poppy detection model for feature extraction and feature fusion, and performing classification tasks and regression tasks; S3: Evaluate the current performance of the poppy detection model based on the loss function adjusted by introducing Gaussian distance metric dynamic annotation, and guide the poppy detection model to learn and reduce errors through gradient backpropagation; S4: Loading the validation set into the poppy detection model to evaluate the generalization ability of the poppy detection model.

2. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 1, characterized in that: The preprocessing includes screening the image data, marking the screened image data with a poppy target frame, overlapping and cropping the image data to generate an image in a predetermined format, performing secondary screening and labeling correction on the generated sub-images, and enhancing and expanding the image data that has completed the secondary screening and labeling correction.

3. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 2, characterized in that: The down-sampling enhanced feature extraction network includes using two-dimensional discrete wavelet transform to perform frequency domain enhanced reconstruction processing on features, obtaining global enhanced features and local enhanced features through convolution processing channel dimensions to generate reconstructed features.

4. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 3, characterized in that: The global enhancement feature is obtained by the following steps: Low-frequency morphological feature components, high-frequency detail feature components and directional frequency components are generated from the feature map. The global adaptive learning of the correlation between features at different levels of the feature map is combined with the attention mechanism to obtain the weighted coefficients of each frequency component, and the two-dimensional plane scale is kept unchanged to obtain the globally enhanced features.

5. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 3, characterized in that: The local enhancement feature is obtained by the following steps: using low-frequency morphological feature components and high-frequency detail feature components as guiding features to guide the learning of directional frequency components; in a shallow network, using low-frequency feature components as guiding features to guide the learning of high-frequency feature components; in a deep network, using high-frequency feature components as guiding features to guide the learning of low-frequency feature components; and recombining the guided and enhanced features to obtain the local enhancement feature.

6. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 5, characterized in that: Step S3 includes: modeling the prediction box and the annotation box by combining the probability density function of the inscribed ellipse of the target box and the two-dimensional Gaussian distribution, calculating the distribution distance between the prediction box and the annotation box and normalizing it, and performing weighted fusion with the original loss function to obtain a loss function that introduces Gaussian distance measurement and dynamic annotation adjustment.

7. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 6, characterized in that: Step S3 is performed according to the following formula: The prediction box and annotation box are modeled as follows: ; In the formula, cx and cy represent the coordinates of the center point of the box, w represents the height, h represents the width, μ and ∑ represent the mean vector and covariance matrix of the Gaussian distribution; The distance metric between the predicted box and the labeled box is calculated as follows: ; In the formula, Represents the distance metric between the predicted box and the labeled box, are the Gaussian distributions of the prediction box and the annotation box, respectively. The subscript A with the same symbols as above represents the parameters related to the prediction box, and the subscript B represents the parameters related to the annotation box. The loss function of the dynamic annotation adjustment by introducing Gaussian distance metric is as follows: ; In the formula, C is a constant, is the weighting coefficient, Loss represents the loss function of the dynamic annotation adjustment by introducing Gaussian distance metric, ' represents the data loss involved in training, represents the average loss of data involved in training, L0 is the adjustment coefficient, Indicates that the factor is separated from the computational graph, A represents the prediction box, and B represents the labeling box.

8. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 7, characterized in that: The vegetation index mode is introduced as additional information before the training set is loaded into the poppy detection model, and an auxiliary detection head is introduced in the learning process of the poppy detection model to increase the level of information.

9. The method for detecting poppy by unmanned aerial vehicle based on Gaussian dynamic annotation adjustment as claimed in claim 8, characterized in that: The collecting of target area image data by using a drone includes: performing extended image collection on both sides of a preset drone flight track in the target area.

10. A UAV poppy detection system based on Gaussian dynamic annotation adjustment, characterized in that: include: Input preprocessing module: used to collect image data of the target area through the UAV, preprocess the image data, and establish a training set and a verification set; Poppy detection module: used to establish a poppy detection model based on a downsampling enhanced feature extraction network, load the training set into the poppy detection model to perform feature extraction and feature fusion, and perform classification tasks and regression tasks; Model optimization module: used to evaluate the current performance of the poppy detection model based on the loss function adjusted by introducing Gaussian distance metric dynamic annotation, and guide the poppy detection model to learn and reduce errors through gradient backpropagation; Model evaluation module: used for loading the verification set into the poppy detection model to evaluate the generalization ability of the poppy detection model.

Citation Information

Patent Citations

  • Intelligent opium poppy identification method and system applied to aerial image of unmanned aerial vehicle

    CN116246184A

  • Unmanned aerial vehicle remote sensing image poppy detection method based on re-learning

    CN116563730A