Agricultural spraying fog drop detection tracking method, device, equipment and medium

Through the improved YOLOv5s model and DeepSORT model, combining feature fusion network and Kalman filter, the complexity of fluorescent dyes and the limitations of traditional detection methods are solved, efficient detection and tracking of droplets is achieved, dynamically adjusting spray parameters, and improving the The accuracy and efficiency of agricultural spraying.

CN119274089AActive Publication Date: 2025-01-07SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411332210.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-07
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

In the prior art, the selection and addition ratio of fluorescent dyes is complex, the operation is complex, the cost is high, and the environment is greatly affected, making it difficult to widely promote in practical applications. The droplet detection and tracking methods based on traditional feature extractors cannot effectively deal with complex ones. Drop motion trajectory and distribution.

Method used

The improved YOLOv5s model and DeepSORT model are used for droplet detection and tracking. Through the GSConv and Kalman filters in the feature fusion network, combined with depth correlation metrics, the accurate detection and tracking of droplet targets is achieved, and the spray parameters are dynamically adjusted to ensure that Precise spray.

Benefits of technology

It significantly improves the accuracy and real-time performance of droplet detection, can efficiently handle occlusion and different perspective problems in complex environments, optimizes spraying efficiency and accuracy, provides real-time feature extraction and correlation, and ensures agricultural spraying. Accuracy and effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274089A_ABST
    Figure CN119274089A_ABST
Patent Text Reader

Abstract

The invention relates to an agricultural spraying fog drop detection and tracking method, device and equipment and a medium, and the method comprises the steps: obtaining a spraying fog drop image frame of an unmanned aerial vehicle in an agricultural spraying operation process in response to an instruction for detecting and tracking agricultural spraying fog drops; an improved YOLOv5s model trained to a convergence state is adopted to carry out target detection on the spraying fog drop image frame so as to determine a candidate frame corresponding to each fog drop target in the spraying fog drop image frame; a preset DeepSORT model is adopted to perform target tracking on the candidate frame corresponding to each fog drop target so as to determine a target tracking result corresponding to each fog drop target, and the target tracking result comprises a unique identifier, a position, a size and a movement track of each fog drop target; and determining droplet spraying parameters of the unmanned aerial vehicle according to the unique identifier, the position, the size and the movement track of each droplet target. The spraying performance of the unmanned aerial vehicle is remarkably optimized, and the accuracy and effectiveness of agricultural spraying are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of agricultural production, and in particular to a method for detecting and tracking agricultural spray droplets, a corresponding device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the development of agricultural modernization, aerial spraying technology of plant protection drones has been widely used in the prevention and control of crop diseases and insect pests. This technology has the advantages of high operating efficiency, uniform application, saving pesticides and water resources, and has gradually become the preferred method for agricultural plant protection operations. However, during the spraying process, parameters such as the number, size, distribution rate and speed of droplets have an important influence on the spraying effect, so it is necessary to detect and track the droplets to optimize the spraying parameters and control the spraying quality.

[0003] Water-sensitive paper is a commonly used method to detect the effect of droplet spraying. It can reflect the distribution, coverage and droplet size of spray deposition. However, the placement and angle of water-sensitive paper are difficult to control. Different placement methods may lead to differences in droplet deposition measurements, thereby affecting the reliability and consistency of the measurement results. In addition, the response of water-sensitive paper under different environmental conditions may also be different, increasing the uncertainty of the measurement. The fluorescent dye method can clearly show the distribution of droplets in the canopy and on the ground by adding fluorescent dyes to the liquid medicine. However, the selection and addition ratio of fluorescent dyes are relatively complicated. The composition and concentration of fluorescent dyes will affect the physical and chemical properties of the liquid medicine. Detection requires special equipment and conditions. Due to the particularity of fluorescent substances, the test results are easily affected by environmental factors. Although these traditional methods can provide information on droplet distribution to a certain extent, they are complex to operate, costly, and greatly affected by the environment, making them difficult to be widely promoted in practical applications.

[0004] In agricultural spraying scenarios, fog droplets are usually small and their clarity varies greatly under different lighting conditions, which increases the difficulty of detection. Fog droplets will block and collide with each other during flight, which makes detection and tracking more complicated. Traditional target detection methods are based on traditional feature extractors to extract image features and use sliding windows to generate a large number of target candidate regions, which cannot effectively deal with these difficulties.

[0005] In existing research, although there are some methods that can detect and track droplets, most methods lack detailed analysis and calculation schemes for the trajectory and distribution of droplets. Droplets are affected by many factors such as wind speed, wind direction, gravity, etc. during flight, and their trajectory and distribution are complex and uncertain. Existing detection and tracking algorithms often have difficulty in providing accurate and detailed trajectory and distribution information when dealing with these complexities.

[0006] To sum up, the selection and addition ratio of fluorescent dyes in the prior art are relatively complicated, the operation is complicated, the cost is high, and it is greatly affected by the environment, making it difficult to be widely promoted in practical applications. In addition, the traditional feature extractor is used to extract image features and a sliding window is used to generate a large number of target candidate areas, which cannot effectively handle the problems that droplet detection and tracking have become more complicated. The applicant has made corresponding explorations to solve this problem. Summary of the invention

[0007] The purpose of this application is to solve the above-mentioned problems and provide an agricultural spray droplet detection and tracking method, corresponding device, electronic device and computer-readable storage medium.

[0008] In order to meet the various objectives of this application, this application adopts the following technical solutions:

[0009] A method for detecting and tracking agricultural spray droplets proposed to meet one of the purposes of this application includes:

[0010] Responding to the command to detect and track agricultural spraying droplets, obtaining spraying droplet image frames of the UAV during the agricultural spraying operation;

[0011] Using an improved YOLOv5s model that has been trained to a convergent state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv;

[0012] Using a preset DeepSORT model to track the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target, wherein the target tracking result includes a unique identifier, position, size, and motion trajectory of each droplet target;

[0013] The droplet spraying parameters of the UAV are determined according to the unique identifier, position, size and motion trajectory of each droplet target, and the droplet spraying parameters are input into the UAV control system to control the UAV to spray crops accurately, so as to complete the detection and tracking of agricultural spraying droplets.

[0014] Optionally, the step of using a preset DeepSORT model to track the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target includes:

[0015] The Kalman filter in the DeepSORT model is used to model and predict the motion state of each droplet target, and a prediction box corresponding to each droplet target is generated;

[0016] In the current spray droplet image frame, the prediction box is matched with the candidate box by using a cascade matching strategy. First, the appearance feature vectors of the prediction box and the candidate box in the spray droplet image frame are extracted by using an OSNet network. The similarity between the prediction box and the candidate box is calculated and determined based on the appearance feature vectors of the prediction box and the candidate box by using a deep association measurement method to perform feature comparison.

[0017] If the appearance feature matches successfully, the motion state of the Kalman filter is updated; if the appearance feature matches fail, a secondary match is performed using the intersection-over-union ratio between the prediction box and the candidate box to determine whether the prediction box is associated with the candidate box;

[0018] For the successfully matched droplet targets, update their corresponding appearance features and motion states, and create new trackers for the unmatched candidate boxes to initialize their corresponding appearance features and motion states;

[0019] The Kalman filter is used to continuously track the droplet target that is blocked or lost in the spray droplet image frame, and when the droplet target is re-detected in a subsequent image frame, the correct unique identifier is re-identified and assigned to the droplet target based on the previous state prediction and deep association measurement;

[0020] The unique identifier, position, size and motion trajectory corresponding to each droplet target are output to complete the target tracking of the candidate box corresponding to each droplet target.

[0021] Optionally, the Kalman filter is used to continuously track a droplet target that is blocked or lost in a spray droplet image frame, and when the droplet target is re-detected in a subsequent image frame, the step of re-identifying and assigning a correct unique identifier to the droplet target based on a previous state prediction and a deep association metric includes:

[0022] The Kalman filter is used to estimate and correct the position and speed of the droplet target. According to the system model and the state estimation at the previous moment, the current state is predicted and the covariance matrix of the prediction error is calculated. The calculation formula includes:

[0023] x k+1 =Ax k +Bu k +w k ,

[0024]

[0025] in, and are the predicted values ​​of the state and error covariance matrix at the next moment, and P k-1 are the optimal estimates of the state and error covariance matrix at the current moment, Q k is the covariance matrix of the process noise;

[0026] According to the observed value and predicted value at the current moment, the state estimate is corrected and the covariance matrix is ​​updated. The calculation formula includes:

[0027]

[0028] Among them, K k is the Kalman gain, is the estimated value of the state vector, P k is the covariance matrix of the state vector, z k is the observation vector, H k is the observation matrix, R k is the covariance matrix of the observation noise and I is the identity matrix.

[0029] Optionally, after the step of using an OSNet network to extract the appearance feature vectors of the prediction box and the candidate box in the spray droplet image frame, and using a deep association measurement method to calculate and determine the similarity between the prediction box and the candidate box according to the appearance feature vectors of the prediction box and the candidate box to perform feature comparison, the method further comprises:

[0030] In response to the data association instruction, the Hungarian algorithm in the DeepSORT model is called to minimize the total matching cost between the prediction box corresponding to the droplet target and the candidate box.

[0031] Optionally, the step of using an improved YOLOv5s model that has been trained to a converged state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame includes:

[0032] The backbone feature extraction network of the improved YOLOv5s model is a CSPDarknet53 network, and the feature fusion network adopts a feature pyramid network and a path aggregation network, and the feature pyramid network and the path aggregation network include multiple GSConv.

[0033] Optionally, the step of using an improved YOLOv5s model that has been trained to a converged state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame includes:

[0034] Inputting the spray droplet image frame into the CSPDarknet53 backbone network of the improved YOLOv5s model to extract multi-level features;

[0035] In the feature fusion stage, GSConv is used to replace traditional convolution, and the input feature map is operated in two steps in parallel. One part is first subjected to ordinary convolution and then batch normalization, and the other part is first subjected to deep convolution and then batch normalization. The output results of the two parts are then connected through the connection operation, and then the connection results are shuffled to avoid overfitting caused by arranging features in a certain order.

[0036] In the feature pyramid network, feature maps from different layers are upsampled and fused to form rich high-level semantic information. Feature fusion is further enhanced in the path aggregation network, and low-level features are transferred through a bottom-up path to improve the detection capability of small droplet targets.

[0037] The fused feature map is input into the detection head of the improved YOLOv5s model to predict the bounding box coordinates, confidence and category probability of each candidate box;

[0038] The intersection-and-union ratio between the candidate frame and the real frame of each droplet target is calculated and determined, and the final candidate frame of the droplet target is determined according to the intersection-and-union ratio and a non-maximum suppression algorithm.

[0039] Optionally, the droplet spraying parameters include spraying amount, spraying time, spraying angle, spraying speed and droplet distribution; the droplet targets include pesticide droplets or fertilizer droplets.

[0040] An agricultural spray droplet detection and tracking device provided for another purpose of the present application includes:

[0041] An image frame acquisition module is configured to respond to instructions for detecting and tracking agricultural spray droplets, and acquire spray droplet image frames of the drone during the agricultural spraying operation;

[0042] A target detection module is configured to use an improved YOLOv5s model that has been trained to a convergence state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv;

[0043] A target tracking module is configured to use a preset DeepSORT model to perform target tracking on a candidate box corresponding to each droplet target to determine a target tracking result corresponding to each droplet target, wherein the target tracking result includes a unique identifier, position, size, and motion trajectory of each droplet target;

[0044] The spraying control module is configured to determine the droplet spraying parameters of the drone according to the unique identifier, position, size and motion trajectory of each droplet target, input the droplet spraying parameters into the drone control system, and control the drone to accurately spray crops to complete the detection and tracking of agricultural spray droplets.

[0045] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the agricultural spray droplet detection and tracking method described in the present application.

[0046] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the agricultural spray droplet detection and tracking method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

[0047] Compared with the prior art, the present application aims at the problems that the selection and addition ratio of fluorescent dyes in the prior art are relatively complicated, the operation is complicated, the cost is high, the environment is greatly affected, and it is difficult to be widely promoted in practical applications. In addition, the conventional feature extractor is used to extract image features, and a large number of target candidate areas are generated using a sliding window, which cannot effectively handle the problem that droplet detection and tracking become more complicated. The present application includes but is not limited to the following beneficial effects:

[0048] The agricultural spraying droplet detection and tracking method of the present application is implemented by the improved YOLOv5s model and DeepSORT model based on deep learning. The improved YOLOv5s model has a high detection accuracy in complex environments, and can significantly improve the detection speed and real-time performance of droplets to meet the demand for real-time detection in agricultural spraying scenarios. The DeepSORT multi-target tracking algorithm can better handle occlusion and different viewing angles by introducing deep correlation metrics, greatly improving the tracking performance of droplet targets. It also has real-time performance and can perform efficient feature extraction and association in near real-time conditions.

[0049] Furthermore, the agricultural spraying droplet detection and tracking method of the present application dynamically adjusts the droplet spraying parameters according to the motion state of the droplet target, ensuring that the droplet target can still be accurately sprayed on the corresponding crops when it moves; monitors the spraying effect through sensors, and provides real-time feedback to the control system of the drone, adjusts subsequent droplet spraying parameters according to the spraying effect, and optimizes the overall spraying efficiency; by recording the target tracking results of each droplet target during the spraying process, provides data support for subsequent agricultural management, regularly analyzes the spraying effect, and calls preset spraying strategies to improve crop yield and spraying efficiency; this implementation method can effectively combine the improved YOLOv5s model and the DeepSORT model, significantly optimize the spraying performance of the drone, and ensure the accuracy and effectiveness of agricultural spraying. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0051] Figure 1 This is a flow chart of the agricultural spray droplet detection and tracking method in the embodiment of the present application;

[0052] Figure 2 It is an exemplary network architecture of the improved YOLOv5s network model in the embodiments of the present application;

[0053] Figure 3 A schematic diagram of an OSNet network in an embodiment of the present application;

[0054] Figure 4 This is a diagram showing the effect of the tracking result of the droplet target output by the DeepSORT model in the embodiment of the present application;

[0055] Figure 5 This is a principle block diagram of the agricultural spray droplet detection and tracking device in the embodiment of the present application;

[0056] Figure 6 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0057] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0058] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0059] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0060] It will be understood by those skilled in the art that the terms "client", "terminal" and "terminal device" as used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capability, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Services) which may combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant) which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices which have and / or include a radio frequency receiver. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or adapted and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or may be a smart TV, a set-top box and other devices.

[0061] The hardware referred to by the names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.

[0062] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.

[0063] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for access.

[0064] The neural network models referenced or may be referenced in this application, unless expressly specified, can be deployed on a remote server and remotely called on the client, or can be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.

[0065] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as it is suitable for being called by the technical solution of this application.

[0066] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.

[0067] Unless the mutually exclusive relationship between the embodiments to be disclosed in this application is explicitly stated, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct a new embodiment, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.

[0068] See also Figure 1 In one embodiment, the agricultural spray droplet detection and tracking method of the present application includes:

[0069] Step S10, responding to the instruction to detect and track agricultural spraying droplets, obtaining spraying droplet image frames of the UAV during the agricultural spraying operation;

[0070] The agricultural spray droplet detection and tracking system can respond to instructions for detecting and tracking agricultural spray droplets, and obtain spray droplet image frames of the drone during the agricultural spraying operation; the spray droplet image frames refer to images or video streams containing droplets taken during the agricultural spraying operation, and these frames are used to analyze the distribution, size and movement trajectory of the droplets to optimize the spraying effect; the droplet targets include pesticide droplets or fertilizer droplets.

[0071] Specifically, the picture that needs to be used for droplet target detection through the technical solution of the present application can be regarded as the spray droplet image frame of the present application. The type and source of the spray droplet image frame depend on the actual application scenario. For example, in the application scenario of the drone in agricultural spraying operations, the spray droplet image frame can be a static picture specified by the user, or it can be a spray droplet image frame in the agricultural spraying video stream submitted by the camera equipment of the drone to the airborne terminal device during the agricultural spraying operation. The improved YOLOv5s model of the present application can be called in the airborne terminal device to detect the droplet target in the spray droplet image frame. Depending on the specific application scenario, the spray droplet image frame can be determined as needed.

[0072] In some embodiments, a high-speed camera is used to obtain the image information of droplets during the spraying process without contact, so as to ensure the efficiency and quality of data collection, reduce labor costs, and achieve real-time and accuracy. It will provide a reliable solution for the evaluation and optimization of agricultural spraying effects. The first is the preparation of the data set: the images of the droplet spraying process are obtained by a high-speed camera under different lighting conditions, and the droplets are manually annotated using the Label Img tool to construct a data set; and the droplet images in the data set are individually annotated. The droplet target is small and the clarity varies greatly under different lighting conditions. There are many targets and there are occlusions and collisions, which will lead to a decrease in the droplet detection rate. To solve these problems, the present application collects droplet images under different lighting conditions and spraying parameters, and constructs a data set of about 3575 images. By collecting a large number of images for training and verification, the accuracy of training can be improved. The images in the data set are input into the improved YOLOv5s model for training, and data enhancement and scaling are performed on all images to expand the training set and test set.

[0073] Step S20, using the improved YOLOv5s model that has been trained to a convergence state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv;

[0074] After obtaining the spraying droplet image frames of the drone during the agricultural spraying operation, the improved YOLOv5s model that has been trained to a convergent state is used to perform target detection on the spraying droplet image frames to determine the candidate frame corresponding to each droplet target in the spraying droplet image frames, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv; the backbone feature extraction network (Backbone) of the improved YOLOv5s model is a CSPDarknet53 network, and the feature fusion network adopts a feature pyramid network and a path aggregation network, and the feature pyramid network and the path aggregation network include multiple GSConv.

[0075] In some embodiments, target detection is a difficult downstream task in computer vision. For unmanned aerial vehicle edge computing platforms, large models are difficult to achieve real-time detection requirements. Moreover, lightweight models built with a large number of deeply separable convolutional layers cannot achieve sufficient accuracy. Therefore, this application introduces a new method GSConv to reduce the complexity of the model and maintain accuracy. GSConv can better balance the accuracy and speed of the model. In addition, a design paradigm S l im-Neck is provided to achieve higher computational cost-effectiveness of the detector.

[0076] In some embodiments, the droplets in agricultural spraying scenes are small and dense, and there is a problem of incomplete feature capture. At the same time, the algorithm complexity is high, and the number of droplets in the video is too large, which makes detection time-consuming and cannot be lightweight and moved to edge devices for use. To solve these problems, this application optimizes and improves the YOLOv5s network model.

[0077] like Figure 2As shown in the figure, the improved YOLOv5s network model replaces the Conv in the feature fusion (Neck) network with GSConv. GSConv can improve the receptive field size and semantic understanding ability of the model, and effectively improve the detection accuracy and speed of small targets. Then, the YOLOv5s network model parameters are initialized, the data set is preprocessed, and input into the CSPDarknet53 network to obtain the feature map, and then the feature map is input into the Detect layer of the detection head (Head) part, and the intersection over union (IoU) between the candidate box and the real box is calculated. Then, the loss function is used for back propagation to update the weight parameters in the adjustment network until the improved YOLOv5s detection model reaches a convergence state. The droplet image is detected based on the trained improved YOLOv5s detection model.

[0078] Furthermore, the step of using the improved YOLOv5s model that has been trained to a converged state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame includes:

[0079] Step S201, inputting the spray droplet image frame into the CSPDarknet53 backbone network of the improved YOLOv5s model to extract multi-level features;

[0080] Step S202: In the feature fusion stage, GSConv is used to replace the traditional convolution, and the input feature map is operated in two steps in parallel. One part is first subjected to ordinary convolution and then batch normalization, and the other part is first subjected to deep convolution and then batch normalization. Then, the output results of the two parts are connected through a connection operation, and then the connection results are shuffled to avoid overfitting caused by arranging features in a certain order.

[0081] Step S203: upsampling and fusing feature maps from different layers in the feature pyramid network to form rich high-level semantic information, further enhancing feature fusion in the path aggregation network, and transferring low-level features through bottom-up paths to improve the detection capability of small droplet targets;

[0082] Step S204: input the fused feature map into the detection head of the improved YOLOv5s model to predict the bounding box coordinates, confidence level and category probability of each candidate box;

[0083] Step S205: Calculate and determine the intersection-over-union ratio between the candidate frame and the real frame of each droplet target, and determine the final candidate frame of the droplet target according to the intersection-over-union ratio and a non-maximum suppression algorithm.

[0084] Specifically, the input image is fed into the CSPDarknet53 network to extract multi-level features. This process will generate feature maps of different scales and provide rich spatial information. In the Feature Pyramid Network (FPN), feature maps from different scales are upsampled and merged through top-down feature fusion to form high-level semantic information. On the basis of the Feature Pyramid Network (FPN), the flow of feature information is further enhanced in the Path Aggregation Network (PAN), and low-level features are combined with high-level features in a bottom-up manner to improve the model's detection ability for small targets. In the feature fusion process, GSConv is used instead of standard convolution to improve the model's receptive field and efficiency, especially in small target detection, to ensure that the features of each droplet can be effectively captured. The fused feature map is input into the detection head of the improved YOLOv5s model, and the model predicts the bounding box coordinates, confidence, and category probability of each candidate box.

[0085] The intersection over union (IoU) between the candidate box and the true box is calculated to determine the accuracy of the candidate box; the non-maximum suppression (NMS) algorithm is applied to remove duplicate candidate boxes, retain the box with the highest confidence, and finally determine the candidate box for each droplet target.

[0086] Through the above steps, using the improved YOLOv5s model that has been trained to convergence, the spray droplet image frame can be effectively detected and each droplet target and its corresponding candidate frame can be accurately identified.

[0087] Step S30: using a preset DeepSORT model to track the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target, wherein the target tracking result includes a unique identifier, position, size, and motion trajectory of each droplet target;

[0088] After determining the candidate frame corresponding to each droplet target in the spray droplet image frame, a preset DeepSORT model is used to perform target tracking on the candidate frame corresponding to each droplet target to determine a target tracking result corresponding to each droplet target, wherein the target tracking result includes a unique identifier, position, size, and motion trajectory of each droplet target;

[0089] In some embodiments, DeepSORT (Deep Learning-based SORT) is a deep learning-based target tracking algorithm that aims to efficiently track multiple targets in a video sequence in real time. It is an extension of the SORT (Simple Online and Rea ltime Tracking) algorithm and improves tracking accuracy by introducing deep features.

[0090] Further, the preset DeepSORT model is used to track the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target, including:

[0091] Step S301: Use the Kalman filter in the DeepSORT model to model and predict the motion state of each droplet target, and generate a prediction box corresponding to each droplet target;

[0092] Step S302: In the current spray droplet image frame, the prediction box is matched with the candidate box by using a cascade matching strategy. First, the appearance feature vectors of the prediction box and the candidate box in the spray droplet image frame are extracted by using an OSNet network. A deep association measurement method is used to calculate and determine the similarity between the prediction box and the candidate box according to the appearance feature vectors of the prediction box and the candidate box, so as to perform feature comparison.

[0093] In some embodiments, OSNet (Omni-Scale Network) is a deep learning network for image recognition and object re-identification, designed to process multi-scale features to improve the recognition of objects of different sizes. It performs well in object re-identification (Re-ID) tasks, especially in terms of accuracy and robustness in complex scenes.

[0094] Step S303: if the appearance feature matching is successful, the motion state of the Kalman filter is updated; if the appearance feature matching fails, a secondary match is performed using the intersection-over-union ratio between the predicted box and the candidate box to determine whether the predicted box is associated with the candidate box;

[0095] Step S304: for the successfully matched droplet target, update its corresponding appearance features and motion state, and create a new tracker for the unmatched candidate box to initialize its corresponding appearance features and motion state;

[0096] Step S305: using the Kalman filter to continuously track the droplet target that is blocked or lost in the spray droplet image frame, and when the droplet target is re-detected in a subsequent image frame, re-identify and assign a correct unique identifier to the droplet target based on the previous state prediction and depth association metric;

[0097] Step S306: output the unique identifier, position, size and motion trajectory corresponding to each droplet target to complete target tracking of the candidate box corresponding to each droplet target.

[0098] In some embodiments, the Kalman filter is used to continuously track droplet targets that are blocked or lost in the spray droplet image frame. When the droplet target is re-detected in a subsequent image frame, the steps of re-identifying and assigning a correct unique identifier to the droplet target based on the previous state prediction and deep association metric include:

[0099] The Kalman filter is used to estimate and correct the position and speed of the droplet target. According to the system model and the state estimation at the previous moment, the current state is predicted and the covariance matrix of the prediction error is calculated. The calculation formula includes:

[0100] x k+1 =Ax k +Bu k +w k ,

[0101]

[0102] in, and are the predicted values ​​of the state and error covariance matrix at the next moment, and P k-1 are the optimal estimates of the state and error covariance matrix at the current moment, Q k is the covariance matrix of the process noise;

[0103] According to the observed value and predicted value at the current moment, the state estimate is corrected and the covariance matrix is ​​updated. The calculation formula includes:

[0104]

[0105] Among them, K k is the Kalman gain, is the estimated value of the state vector, P k is the covariance matrix of the state vector, z k is the observation vector, H k is the observation matrix, R k is the covariance matrix of the observation noise and I is the identity matrix.

[0106] In some embodiments, after the step of extracting the appearance feature vectors of the prediction box and the candidate box in the spray droplet image frame using the OSNet network, and calculating and determining the similarity between the prediction box and the candidate box based on the appearance feature vectors of the prediction box and the candidate box using a deep association metric method to perform feature comparison, the method includes:

[0107] In response to the data association instruction, the Hungarian algorithm in the DeepSORT model is called to minimize the total matching cost between the prediction box corresponding to the droplet target and the candidate box.

[0108] Specifically, this application uses the DeepSORT model to achieve accurate tracking of droplets. The DeepSORT model is an advanced multi-target tracking technology that significantly improves the accuracy and stability of tracking by combining the appearance features and motion information of the target. In the agricultural spray droplet detection and tracking system, the implementation of the DeepSORT model includes the following key steps:

[0109] First, the DeepSORT model uses a Kalman filter to model and predict the motion state of each droplet target. The Kalman filter is a recursive estimation algorithm that can estimate the state of a dynamic system in an optimal way in the presence of measurement noise and process noise. In this application, the Kalman filter is used to predict the position and velocity of the droplet at the next moment, thereby generating a prediction box;

[0110] After the prediction phase is completed, the DeepSORT model enters the update phase, in which the algorithm matches the predicted box with the droplet candidate box detected by the improved YOLOv5s model in the current frame. This matching process uses Intersection over Union (IoU) as a similarity metric, and evaluates their matching degree by calculating the IoU value between the predicted box and the candidate box;

[0111] like Figure 3 As shown in the figure, in order to optimize the matching process, the DeepSORT model adopts a cascade matching strategy. This strategy first attempts to match the predicted box with the candidate box by appearance features. This step is achieved by extracting the appearance features of the droplet image and using the OSNet network for feature comparison. If the appearance feature match is successful, the Kalman filter is further used to update the motion state; if the appearance feature match fails, the IoU is used for secondary matching to determine whether to associate the predicted box with the candidate box.

[0112] In the data association process, the DeepSORT model also uses the Hungarian algorithm to solve the matching problem. The Hungarian algorithm is a combinatorial optimization algorithm that can find a perfect match in a bipartite graph, that is, pair all nodes without reusing any nodes. In this application, the Hungarian algorithm is used to minimize the total matching cost between the predicted box and the candidate box, thereby achieving optimal data association;

[0113] For successfully matched droplet targets, the DeepSORT model will update their appearance features and motion states for more accurate tracking in subsequent frames. If there are unmatched candidate boxes, the DeepSORT model will create new trackers for them and initialize their appearance features and motion states;

[0114] During the entire tracking process, the DeepSORT model also introduces deep correlation metrics to improve the accuracy of target matching. The deep correlation metrics calculate the similarity between targets by comparing the appearance feature vectors of the targets, and can maintain a high recognition rate even when the targets are occluded, deformed, or rotated.

[0115] In order to cope with the possible occlusion or loss of fog targets in the video, the DeepSORT model also uses the prediction ability of the Kalman filter to continuously track the lost targets. When the target is re-detected in subsequent frames, the algorithm can re-identify and assign the correct unique identifier (ID) to the target based on the previous state prediction and deep association measurement;

[0116] like Figure 4 As shown, in the end, the DeepSORT model can output the tracking results of all confirmed droplet targets, including each target’s unique identifier (ID), location, size, and motion trajectory;

[0117] Finally, the spraying effect is analyzed, and the spraying parameters are optimized according to the distribution, movement trajectory and statistical information of the droplets to improve the spraying efficiency and quality.

[0118] Step S40, determining the droplet spraying parameters of the drone according to the unique identifier, position, size and motion trajectory of each droplet target, inputting the droplet spraying parameters into the drone control system, and controlling the drone to accurately spray crops to complete the detection and tracking of agricultural spraying droplets.

[0119] After determining the target tracking result corresponding to each droplet target, the droplet spraying parameters of the UAV are determined according to the unique identifier, position, size and motion trajectory of each droplet target, and the droplet spraying parameters are input into the UAV control system to control the UAV to accurately spray the crops to complete the detection and tracking of agricultural spraying droplets; the droplet spraying parameters include spraying amount, spraying time, spraying angle, spraying speed and droplet distribution.

[0120] Specifically, the drone-mounted camera is used to collect spray droplet image frames in real time, and the characteristic information of each droplet target is collected, including the unique identifier, position, size and motion trajectory; the droplet spraying parameters, including spraying speed and droplet distribution, are calculated according to the motion trajectory and position of each droplet; the droplet spraying parameters are adjusted considering environmental factors (such as wind speed, temperature, etc.) to ensure that the droplets evenly cover the target area; the calculated droplet spraying parameters (such as spraying amount, spraying time, spraying angle) are input into the drone control system to control the drone to spray crops accurately, so as to complete the detection and tracking of agricultural spraying droplets;

[0121] Dynamically adjust the droplet spraying parameters according to the movement state of the droplet target to ensure that the droplet target can still be accurately sprayed on the corresponding crops when it moves; monitor the spraying effect through sensors, and provide real-time feedback to the control system of the drone, adjust the subsequent droplet spraying parameters according to the spraying effect, and optimize the overall spraying efficiency; by recording the target tracking results of each droplet target during the spraying process, provide data support for subsequent agricultural management, regularly analyze the spraying effect, and call the preset spraying strategy to improve crop yield and spraying efficiency; this implementation method can effectively combine target detection and tracking, significantly optimize the spraying performance of the drone, and ensure the accuracy and effectiveness of agricultural spraying.

[0122] In some embodiments, the running frame rate of the improved YOLOv5s model on the test set reaches 105fps, the mAP@0.5 reaches 0.9184, the precision is 0.9116, and the recall rate is 0.9379, which is significantly better than other network models and meets the requirements of real-time and accuracy of droplet detection in agricultural spraying scenarios. The model performance comparison between the improved Yolo v5s model and the existing model is shown in Table 1:

[0123] Table 1 Comparison of model performance between the improved Yolo v5s model and the existing model

[0124]

[0125] In some embodiments, the DeepSORT model combines appearance features and motion information, and can maintain the continuity and consistency of the target when the droplets are blocked or lost, thereby improving the stability and accuracy of tracking. The number of droplets calculated by the improved model differs by an average of 6.4% from the number of droplets measured manually. This shows that the droplet detection and tracking algorithm can measure the number of droplets more accurately. This provides the basis and conditions for the construction of the droplet number counting system in the next step; the droplet tracking counting error analysis is shown in Table 2:

[0126] Table 2 Analysis of droplet tracking and counting errors

[0127]

[0128] It can be seen from the above embodiments that, compared with the prior art, the present application aims at the problems that the selection and addition ratio of fluorescent dyes in the prior art are relatively complicated, the operation is complicated, the cost is high, the environment is greatly affected, and it is difficult to be widely promoted in practical applications. In addition, the conventional feature extractor is used to extract image features, and a large number of target candidate areas are generated using a sliding window, which cannot effectively handle the problem that droplet detection and tracking become more complicated. The present application includes but is not limited to the following beneficial effects:

[0129] The agricultural spraying droplet detection and tracking method of the present application is implemented by the improved YOLOv5s model and DeepSORT model based on deep learning. The improved YOLOv5s model has a high detection accuracy in complex environments, and can significantly improve the detection speed and real-time performance of droplets to meet the demand for real-time detection in agricultural spraying scenarios. The DeepSORT multi-target tracking algorithm can better handle occlusion and different viewing angles by introducing deep correlation metrics, greatly improving the tracking performance of droplet targets. It also has real-time performance and can perform efficient feature extraction and association in near real-time conditions.

[0130] Furthermore, the agricultural spraying droplet detection and tracking method of the present application dynamically adjusts the droplet spraying parameters according to the motion state of the droplet target, ensuring that the droplet target can still be accurately sprayed on the corresponding crops when it moves; monitors the spraying effect through sensors, and provides real-time feedback to the control system of the drone, adjusts subsequent droplet spraying parameters according to the spraying effect, and optimizes the overall spraying efficiency; by recording the target tracking results of each droplet target during the spraying process, provides data support for subsequent agricultural management, regularly analyzes the spraying effect, and calls preset spraying strategies to improve crop yield and spraying efficiency; this implementation method can effectively combine the improved YOLOv5s model and the DeepSORT model, significantly optimize the spraying performance of the drone, and ensure the accuracy and effectiveness of agricultural spraying.

[0131] See also Figure 5, an agricultural spray droplet detection and tracking device provided to meet one of the purposes of the present application, includes an image frame acquisition module 1100, a target detection module 1200, a target tracking module 1300 and a spraying control module 1400. Among them, the image frame acquisition module 1100 is configured to respond to instructions for detecting and tracking agricultural spray droplets, and obtain spray droplet image frames of the drone during agricultural spraying operations; the target detection module 1200 is configured to use an improved YOLOv5s model that has been trained to a convergence state to perform target detection on the spray droplet image frame to determine the candidate frame corresponding to each droplet target in the spray droplet image frame, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv; the target tracking module 1300 is configured to use a preset The DeepSORT model performs target tracking on the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target, wherein the target tracking result includes the unique identifier, position, size and motion trajectory of each droplet target; the spraying control module 1400 is configured to determine the droplet spraying parameters of the UAV according to the unique identifier, position, size and motion trajectory of each droplet target, input the droplet spraying parameters into the UAV control system, and control the UAV to accurately spray crops to complete the detection and tracking of agricultural spraying droplets.

[0132] Based on any embodiment of this application, please refer to Figure 6 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 6 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a method for detecting and tracking agricultural spray droplets. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the agricultural spray droplet detection and tracking method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0133] In this embodiment, the processor is used to execute Figure 5 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the agricultural spray droplet detection and tracking device of this application, and the server can call the program code and data of the server to execute the functions of all submodules.

[0134] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the agricultural spray droplet detection and tracking method described in any embodiment of the present application.

[0135] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the agricultural spray droplet detection and tracking method described in any embodiment of the present application.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0137] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

[0138] In summary, the agricultural spraying droplet detection and tracking method of the present application dynamically adjusts the droplet spraying parameters according to the motion state of the droplet target, ensuring that the droplet target can still be accurately sprayed on the corresponding crops when it moves; monitors the spraying effect through sensors, and provides real-time feedback to the control system of the drone, adjusts subsequent droplet spraying parameters according to the spraying effect, and optimizes the overall spraying efficiency; by recording the target tracking results of each droplet target during the spraying process, provides data support for subsequent agricultural management, regularly analyzes the spraying effect, and calls the preset spraying strategy to improve crop yield and spraying efficiency; this implementation method can effectively combine the improved YOLOv5s model and the DeepSORT model, significantly optimize the spraying performance of the drone, and ensure the accuracy and effectiveness of agricultural spraying.

Claims

1. A method for detecting and tracking agricultural spray droplets, characterized in that: include: Responding to the command to detect and track agricultural spraying droplets, obtaining spraying droplet image frames of the UAV during the agricultural spraying operation; Using an improved YOLOv5s model that has been trained to a convergent state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv; Using a preset DeepSORT model to track the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target, wherein the target tracking result includes a unique identifier, position, size, and motion trajectory of each droplet target; The droplet spraying parameters of the UAV are determined according to the unique identifier, position, size and motion trajectory of each droplet target, and the droplet spraying parameters are input into the UAV control system to control the UAV to spray crops accurately, so as to complete the detection and tracking of agricultural spraying droplets.

2. The agricultural spray droplet detection and tracking method according to claim 1, characterized in that: The steps of using the preset DeepSORT model to track the candidate box corresponding to each droplet target to determine the target tracking result corresponding to each droplet target include: The Kalman filter in the DeepSORT model is used to model and predict the motion state of each droplet target, and a prediction box corresponding to each droplet target is generated; In the current spray droplet image frame, the prediction box is matched with the candidate box by using a cascade matching strategy. First, the appearance feature vectors of the prediction box and the candidate box in the spray droplet image frame are extracted by using an OSNet network. The similarity between the prediction box and the candidate box is calculated and determined based on the appearance feature vectors of the prediction box and the candidate box by using a deep association measurement method to perform feature comparison. If the appearance feature matches successfully, the motion state of the Kalman filter is updated; if the appearance feature matches fail, a secondary match is performed using the intersection-over-union ratio between the prediction box and the candidate box to determine whether the prediction box is associated with the candidate box; For the successfully matched droplet targets, update their corresponding appearance features and motion states, and create new trackers for the unmatched candidate boxes to initialize their corresponding appearance features and motion states; The Kalman filter is used to continuously track the droplet target that is blocked or lost in the spray droplet image frame, and when the droplet target is re-detected in a subsequent image frame, the correct unique identifier is re-identified and assigned to the droplet target based on the previous state prediction and deep association measurement; The unique identifier, position, size and motion trajectory corresponding to each droplet target are output to complete the target tracking of the candidate box corresponding to each droplet target.

3. The agricultural spray droplet detection and tracking method according to claim 2, characterized in that: The Kalman filter is used to continuously track the droplet target that is blocked or lost in the spray droplet image frame, and when the droplet target is re-detected in a subsequent image frame, the steps of re-identifying and assigning a correct unique identifier to the droplet target based on the previous state prediction and deep association metric include: The Kalman filter is used to estimate and correct the position and speed of the droplet target. According to the system model and the state estimation at the previous moment, the current state is predicted and the covariance matrix of the prediction error is calculated. The calculation formula includes: x k+1 =Ax k +Bu k +w k , in, and are the predicted values ​​of the state and error covariance matrix at the next moment, and P k-1 are the optimal estimates of the state and error covariance matrix at the current moment, Q k is the covariance matrix of the process noise; According to the observed value and predicted value at the current moment, the state estimate is corrected and the covariance matrix is ​​updated. The calculation formula includes: Among them, K k is the Kalman gain, is the estimated value of the state vector, P k is the covariance matrix of the state vector, z k is the observation vector, H k is the observation matrix, R k is the covariance matrix of the observation noise and I is the identity matrix.

4. The agricultural spray droplet detection and tracking method according to claim 2, characterized in that: After the step of extracting the appearance feature vectors of the prediction box and the candidate box in the spray droplet image frame by using the OSNet network, and calculating and determining the similarity between the prediction box and the candidate box by using the deep association measurement method according to the appearance feature vectors of the prediction box and the candidate box to perform feature comparison, the method includes: In response to the data association instruction, the Hungarian algorithm in the DeepSORT model is called to minimize the total matching cost between the prediction box corresponding to the droplet target and the candidate box.

5. The agricultural spray droplet detection and tracking method according to claim 1, characterized in that: The step of using the improved YOLOv5s model that has been trained to a converged state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame includes: The backbone feature extraction network of the improved YOLOv5s model is a CSPDarknet53 network, and the feature fusion network adopts a feature pyramid network and a path aggregation network, and the feature pyramid network and the path aggregation network include multiple GSConv.

6. The agricultural spray droplet detection and tracking method according to claim 1, characterized in that: The step of using the improved YOLOv5s model that has been trained to a converged state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame includes: Inputting the spray droplet image frame into the CSPDarknet53 backbone network of the improved YOLOv5s model to extract multi-level features; In the feature fusion stage, GSConv is used to replace traditional convolution, and the input feature map is operated in two steps in parallel. One part is first subjected to ordinary convolution and then batch normalization, and the other part is first subjected to deep convolution and then batch normalization. The output results of the two parts are then connected through the connection operation, and then the connection results are shuffled to avoid overfitting caused by arranging features in a certain order. In the feature pyramid network, feature maps from different layers are upsampled and fused to form rich high-level semantic information. Feature fusion is further enhanced in the path aggregation network, and low-level features are transferred through a bottom-up path to improve the detection capability of small droplet targets. The fused feature map is input into the detection head of the improved YOLOv5s model to predict the bounding box coordinates, confidence and category probability of each candidate box; The intersection-and-union ratio between the candidate frame and the real frame of each droplet target is calculated and determined, and the final candidate frame of the droplet target is determined according to the intersection-and-union ratio and a non-maximum suppression algorithm.

7. The agricultural spray droplet detection and tracking method according to any one of claims 1 to 6, characterized in that: The droplet spraying parameters include spraying amount, spraying time, spraying angle, spraying speed and droplet distribution; the droplet targets include pesticide droplets or fertilizer droplets.

8. An agricultural spray droplet detection and tracking device, characterized in that: include: An image frame acquisition module is configured to respond to instructions for detecting and tracking agricultural spray droplets, and acquire spray droplet image frames of the drone during the agricultural spraying operation; A target detection module is configured to use an improved YOLOv5s model that has been trained to a convergence state to perform target detection on the spray droplet image frame to determine a candidate frame corresponding to each droplet target in the spray droplet image frame, wherein the convolution layer in the feature fusion network of the improved YOLOv5s model is GSConv; A target tracking module is configured to use a preset DeepSORT model to perform target tracking on a candidate box corresponding to each droplet target to determine a target tracking result corresponding to each droplet target, wherein the target tracking result includes a unique identifier, position, size, and motion trajectory of each droplet target; The spraying control module is configured to determine the droplet spraying parameters of the drone according to the unique identifier, position, size and motion trajectory of each droplet target, input the droplet spraying parameters into the drone control system, and control the drone to accurately spray crops to complete the detection and tracking of agricultural spray droplets.

9. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

Citation Information

Patent Citations

  • Fog drop deposition amount detection method and system

    CN113008742A

  • Statistical filtering infrared small target detection tracking method based on YOLOv5 and Deepsort

    CN114677554A

  • Target detection and tracking method for aerial image of unmanned aerial vehicle based on improved YOLOv7-tin + DeepSort

    CN118279766A

  • Smoke video detection method and system based on lightweight 3d-rdnet model

    WO2021212443A1