A deep learning-based material throwing tool automatic positioning and tracking system and method
By employing a high-definition pixel camera and a deep learning model to optimize the automatic positioning and tracking system for material throwing tools in agricultural harvesting, the problems of low positioning accuracy and low efficiency of material throwing tools have been solved. This system enables fast and accurate positioning and tracking of material throwing tools, thereby improving harvesting efficiency and work quality.
Patent Information
- Application Number
- CN202410059522.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-01-15
AI Technical Summary
Existing methods for positioning throwing tools in agricultural harvesting suffer from low positioning accuracy, low efficiency, and susceptibility to errors, which affect the operating efficiency of combine harvesters. Furthermore, existing deep learning-based automatic positioning and tracking systems for throwing tools need improvement in terms of real-time performance and intelligence.
High-resolution cameras are used to capture videos of agricultural harvesting scenes. The data is manually labeled and augmented through a data processing module. The YOLOv8 deep learning model is trained using EMA attention and DCNv2. The model parameters are optimized using the CIoU Loss function and Adam optimizer. The pose adjustment module of the throwing tool is combined to achieve real-time positioning and adjustment.
It enables rapid and accurate positioning and tracking of the feeding device, improving harvesting efficiency, reducing losses, ensuring operation quality and combine harvester performance, and preventing grain spillage or incomplete loading.
Smart Images

Figure CN117789098B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural harvesting technology, and in particular to an automatic positioning and tracking system and method for material throwing tools based on deep learning. Background Technology
[0002] In current agricultural harvesting scenarios, the accurate placement and positioning of feeding devices are crucial for improving harvesting efficiency and reducing losses. Traditional methods for positioning feeding devices mainly rely on manual operation and simple mechanical control systems. These methods often suffer from low positioning accuracy, low efficiency, and susceptibility to errors. Human subjectivity has a significant impact, which not only places a heavy workload on agricultural workers but also seriously affects the operating efficiency of combine harvesters.
[0003] In recent years, deep learning technology has achieved remarkable results in computer vision, speech recognition, and other fields. By utilizing deep learning technology for image recognition and analysis, it is possible to automatically locate and track throwing tools in agricultural harvesting scenarios. The detection method of deep learning completely simulates the human eye, identifying whether the object being tested is the final target by judging its outline and shape. However, existing deep learning-based automatic positioning and tracking systems for throwing tools still need improvement in terms of real-time performance, accuracy, and intelligence.
[0004] Therefore, the market urgently needs an automatic positioning and tracking system and method for the feeding device that helps drivers reduce the need to adjust the operating parameters of the combine harvester during real-time operation, allowing them to focus more on the quality of operation, ensuring the performance of the combine harvester, and preventing situations such as grain overflow or the need to change vehicles before the machine is fully loaded due to the inability to adjust the parameters in time. Summary of the Invention
[0005] The purpose of this invention is to provide a deep learning-based automatic positioning and tracking system and method for throwing tools, which can achieve rapid and accurate positioning and tracking of throwing tools in agricultural harvesting scenarios, thereby improving harvesting efficiency and reducing losses.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: an automatic positioning and tracking system for a grain throwing device based on deep learning, comprising a grain cart, a grain pile, a throwing device, and a server, and further comprising: A high-resolution camera is used to capture real-time monitoring video of agricultural harvesting scenes and transmit the real-time monitoring video to the data processing module. The data processing module is used to collect and process initial data, put the initial data into the deep network module for training until convergence and store the parameter information on the server, and convert the real-time monitoring video stream into image information and transmit it to the server. The deep network module uses deep learning algorithms to analyze and reason about the processed real-time monitoring video, enabling real-time identification and location of grain trucks and grain piles. The throwing device pose adjustment module adjusts the throwing device pose based on the position data generated by the grain cart recognition by the deep network module and the current throwing device pose fusion judgment.
[0007] A deep learning-based automatic positioning and tracking method for throwing tools includes the following steps: S1. The data processing module collects video data from agricultural harvesting scenes and generates high-quality training data through manual annotation, classification, formatting, and expansion. S2, the deep network module optimizes the training model. The YOLOv8 deep learning model is selected, and the attention mechanism EMA and variable convolution DCNv2 are introduced. The training data is input into the deep learning model for training. The CIoU Loss loss function is used, and the Adam optimizer is combined to perform backpropagation to optimize the model parameters and store them on the server. S3, a high-definition pixel camera, collects real-time monitoring video data of agricultural harvesting scenes; S4, the data processing module converts the real-time monitoring video stream into image information and transmits it to the server; S5, the deep network module analyzes the location of grain carts and grain piles in image information in real time and makes decisions based on real-time data; S6. Adjust the pose of the material throwing device based on the position data generated by the grain truck recognition by the deep network module and the current pose of the throwing device.
[0008] Preferably, the manual annotation, classification, formatting and expansion of video data in step S1 includes the following steps: S11, determine whether the video data meets the requirements, retain the data that meets the requirements and process it into frames, and modify the height and width of each frame to unify the data format. S12. Manually label the processed data, including the location of the grain truck and the shape of the grain pile. S13. Generate a unique tag file for the above data; S14. Determine if the data has a unique tag file. If not, return to S12. If it does, proceed to the next step. S15. Expand the samples by performing geometric transformations, color transformations, Mosaic enhancements, etc. on the labeled data; S16. Store the processed data in the server and transfer the data to the deep network module as needed.
[0009] Preferably, optimizing the trained model in step S2 includes the following steps: S21. While training the deep learning model, standardize the data. S22: Use the backbone network CSPDarknet53 to extract image features. Add EMA attention after the first 2 C2f modules in the backbone network, and replace the convolution in the SPPF of the backbone network with the deformable convolution DCNv2; S23: Pass the feature map into the neck module; S24: The feature map enters the YOLOHead, which includes Anchor-based detection and Anchor-free detection. Each detection head is responsible for predicting a set of bounding boxes, class scores, and object scores; S25: For each predicted bounding box, perform the following calculations: calculate the center coordinate error, width error, and height error of the bounding box; calculate the cross-entropy loss of the object category; calculate the binary cross-entropy loss of the object score; combine the above three losses into the final detection loss; S26: Use the calculated loss for backpropagation with the Adam optimizer to update the model parameters; S27: Repeat the training steps S21 to S26 to continuously optimize the model parameters until the training termination condition is reached; S28: Store the training parameters in an appropriate server, and transmit the data to the posture adjustment module of the throwing tool as required.
[0010] Preferably, for the input feature map X∈R in step S22 C×H×W EMA, the EMA attention processes the feature map as follows: S2201: Divide it into G sub-features according to the number of channels to learn different semantics. The input feature X=[X0, X i , ..., X G-1 , X i ∈R C / / G×H×W ; S2202: Without loss of generality, let G << C, and assume that the learned weight descriptors will be used to enhance the feature representation of the region of interest in each sub-feature; S2203: Extract the weight descriptors of the grouped feature maps through 2 parallel paths on the 1×1 branch and 1 parallel path on the 3×3 branch. In the 1×1 branch, 2 1D global average pooling operations are used to encode the channels along 2 spatial directions, and the 2 encoded features are concatenated to avoid dimensionality reduction in the 1×1 branch. Then, the output after the 1×1 convolution is re-decomposed into 2 vectors, and 2 Sigmoid nonlinear functions are used to fit the 2D binary distribution on the linear convolution. Finally, channel attention is aggregated through multiplication to achieve cross-channel interaction. In the 3×3 branch, 1 3×3 convolution is used to capture multi-scale feature representations; S2204. Use 2D global average pooling to encode the global spatial information in the output of 1×1 branch and 3×3 branch; S2205. The output will be converted into the corresponding dimensional shape, that is: S2206. Add a non-linear function, softmax, to fit the linear transformation, and concatenate the outputs of two branches of the same size to convert them into R. 1×H×W Format; S2207. Multiply the results of the parallel processing above by matrix dot product operation to obtain the spatial attention map.
[0011] Preferably, in step S22, the input feature map X and convolution kernel W are processed as follows: S2211. Use a conventional convolution kernel to extract features from the input image X; S2212. Add an offset field layer to obtain the bias domain of the convolution kernel sampling points. The size of the obtained bias domain and the input features Figure 1 From this, the dynamic offset Δp can be obtained. n The sampling point location p can be obtained. n =p0+Δp n ; S2213. Calculate the offset sampling point position (pixels) using bilinear interpolation. The formula is: Where q represents all spatial locations in the input feature map, x(q) represents the value of a point at all integer locations in the feature map, and G(q,p) is a two-dimensional bilinear interpolation kernel function, which can be decomposed into two one-dimensional kernels. G(q,p)=g(q x ,p x )·g(q y ,p y ) Where g(a,b) = {0,1-|ab|}; S2214. Combining the above steps, add an offset to each data collection point. The calculation formula is as follows: Where R = {(-1,1),(-1,0),…,(0,1),(1,1)}, w(p n ) is p n The convolution kernel weights at position, where x is the feature map to be detected, and p n Δm represents the positional element in R. n These are the weighting coefficients.
[0012] Preferably, in step S25, the true bounding box is recorded as... The prediction box is and The values correspond to the center coordinates and size of the bounding box. CIoU Loss is defined as follows: In the formula: IoU is used to measure the overlap between the predicted bounding box and the ground truth bounding box, α is used as a balancing parameter, and v is used to measure the consistency of the aspect ratio. g and H g W represents the sum of the width and height of the ground truth bounding box and the predicted bounding box, respectively. i H i This represents the area of the overlapping portion.
[0013] Preferably, in step S6, the monitoring area of the video when the grain truck starts discharging material at the center of the video is S, and the adjustable area is set to S. area The time taken to fill a grain cart is T. Divide this time into N equal time periods, each with a length of Δt. The following processing is performed: S61. Use the recognition model to obtain the center coordinates {x} of the output target bounding box. box ,y box}; S62. Calculate the current center position coordinates of the grain truck {x} box_center ,y box_center}; S63. Calculate the distance from the center position of the identified grain truck to the center position of the camera {x}. center ,y center Euclidean distance S64, Determine the difference of π. 2 With S area The size relationship, if π·distence 2 ≥S area If the vehicle speed is too high, a command is sent to stop the material discharge and a reminder is given that the vehicle is moving too fast. Return to step (1) otherwise proceed to the next step. S65. Minimize the sum of the differences between the car's dwell time in different areas and the target dwell time within each time period. The formula is: The constraints are And x i,j ≥0.
[0014] The beneficial effects of this invention are:
[0015] This solution optimizes the training of a deep learning model by: utilizing a data processing module to collect video data from agricultural harvesting scenarios; and generating high-quality training data through manual annotation, classification, formatting, and augmentation. Data augmentation includes geometric transformations, color transformations, and mosaic enhancement. A YOLOv8 deep learning model is selected, incorporating the attention mechanism EMA and variable convolution DCNv2 to enhance detection performance for irregular and severely deformed targets. The processed data is then input into the deep learning model for training. The CIoULoss loss function, combined with the Adam optimizer, is used for backpropagation to optimize model parameters.
[0016] Furthermore, the pose adjustment module for the feeding device is optimized as follows: 1. Grain cart position determination: In the feeder pose adjustment module, the center coordinates of the target box are obtained through the recognition model, and the current center coordinates of the grain cart are calculated; 2. Distance calculation and adjustment: The Euclidean distance from the center position of the recognized grain cart to the center of the camera is calculated, and it is determined whether to stop feeding. Based on the actual situation, thresholds and adjustment strategies can be set to ensure that the grain cart's position is within a suitable range; 3. Dwell time optimization: By minimizing the sum of the differences between the grain cart's dwell time in different areas and the target dwell time in each time period, the dwell time of the grain cart is optimized. Mathematical optimization methods, such as linear programming, can be used to satisfy the constraints.
[0017] Furthermore, the real-time monitoring and adjustment system is optimized as follows: During the actual harvesting process, high-definition pixel cameras are used to collect real-time monitoring video streams, which are then transmitted to a server. Deep learning models are used to analyze the position of grain carts in the video stream in real time, and decisions are made based on real-time data. By applying historical data and real-time recognition results, the pose of the feeding device is automatically adjusted to ensure the accuracy and efficiency of the delivery.
[0018] Furthermore, the design for performance evaluation and adjustment is optimized, specifically: the system's performance is evaluated, including accuracy, real-time performance, and intelligence level. The system's stability and reliability are verified through test data and real-world operation. Based on the evaluation results, system parameters are adjusted, and the training parameters of the deep learning model are optimized to adapt to the automatic positioning and tracking requirements of the material throwing tool under different scenarios and working conditions.
[0019] Furthermore, the system integration and deployment were optimized. Specifically, the data processing module, deep network module, and material throwing device pose adjustment module were integrated into a unified system and deployed to an actual combine harvester to ensure stable operation in real-world scenarios. The system's performance under different scenarios and working conditions was monitored, and further optimization was performed based on feedback information. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a diagram of the overall architecture of the present invention.
[0022] Figure 2 This is a diagram of the YOLOv8 network structure of the present invention.
[0023] Figure 3 This is a diagram of the improved YOLOv8 network structure of the present invention. Detailed Implementation
[0024] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0025] The structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0026] It should also be noted that, unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The term "plural" as used in the patent application specification and claims means two or more; the terms "upper," "lower," "left," "right," "front end," "rear end," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Changes or adjustments to these relative relationships, without substantially altering the technical content, should also be considered within the scope of the invention's implementation.
[0027] The present invention will now be described in further detail with reference to the embodiments and the accompanying drawings.
[0028] Example 1:
[0029] This invention discloses an automatic positioning and tracking system and method for grain throwing devices based on deep learning. The automatic positioning and tracking system mainly includes a grain cart, a grain pile, a throwing device, a server, a high-resolution camera, a data processing module, a deep network module, and a throwing device pose adjustment module. The high-resolution camera is used to collect real-time monitoring video of agricultural harvesting scenes and transmit this video to the data processing module. The data processing module collects and processes initial data, feeds the initial data into the deep network module for training until convergence, stores the parameter information on the server, and converts the real-time monitoring video stream into image information and transmits it to the server. The deep network module uses deep learning algorithms to analyze and infer the processed real-time monitoring video, enabling real-time identification and positioning of the grain cart and grain pile. The throwing device pose adjustment module adjusts the throwing device pose based on the position data generated by the deep network module for the grain cart and the current throwing device pose. The overall architecture is as follows: Figure 1 As shown.
[0030] The automatic positioning and tracking method for the throwing tool includes the following steps: S1. The data processing module collects video data from agricultural harvesting scenes and generates high-quality training data through manual annotation, classification, formatting, and expansion. S2, the deep network module optimizes the trained model, selecting the YOLOv8 deep learning model, such as... Figure 2 As shown, the attention mechanism EMA and the variable convolution DCNv2 are introduced to enhance the capture of important local information, enabling the model to focus on the relevant features of the detected target while improving its modeling capabilities. Figure 3 As shown, the training data is input into the deep learning model for training. The CIoU Loss loss function is used, and the Adam optimizer is combined with backpropagation to optimize the model parameters and store them on the server. S3, a high-definition pixel camera, collects real-time monitoring video data of agricultural harvesting scenes; S4, the data processing module converts the real-time monitoring video stream into image information and transmits it to the server; S5, the deep network module analyzes the location of grain carts and grain piles in image information in real time and makes decisions based on real-time data; S6. Adjust the pose of the material throwing device based on the position data generated by the grain truck recognition by the deep network module and the current pose of the throwing device.
[0031] Example 2:
[0032] The difference between this embodiment and Embodiment 1 is that this embodiment discloses a method for manually annotating, classifying, formatting, and expanding video data in step S1, including the following processes: S11. Determine whether the video data meets the requirements, retain the data that meets the requirements and process it into frames, and modify the height and width of each frame to unify the data format. S12. Manually label the processed data, including the location of the grain truck and the shape of the grain pile. S13. Generate a unique tag file for the above data; S14. Determine if the data has a unique tag file. If not, return to S12. If it does, proceed to the next step. S15. Expand the samples by performing geometric transformations, color transformations, Mosaic enhancements, etc. on the labeled data; S16. Store the processed data in the server and transfer the data to the deep network module as needed.
[0033] Example 3:
[0034] The difference between this embodiment and Embodiment 1 is that: a method for optimizing the trained model in step S2 is disclosed, including the following processing: S21. While training the deep learning model, standardize the data. S22. Use the backbone network CSPDarknet53 to extract image features. Add EMA attention after the first two C2f in the backbone network to avoid channel dimensionality reduction, thereby preserving the information of each channel and reducing computational cost. Replace the convolution in the SPPF of the backbone network with deformable convolution DCNv2, so that the position and size of the convolution kernel can be dynamically adjusted according to the target object. This can better fit the size and shape of the object during feature extraction and optimize the network model's detection performance for irregular and severely deformed targets. S23. The feature map is fed into the neck module. The PANet neck module enhances the representation ability of the backbone network by fusing bottom-up and top-down paths. Adaptive feature pooling allows the model to choose different feature maps when predicting different objects, avoiding a hard match between target size and network depth. S24. The feature map is fed into YOLOHead. YOLOHead includes anchor-based detection and anchor-free detection. Each detection head is responsible for predicting a set of bounding boxes, class scores, and object scores. S25. For each predicted bounding box, perform the following calculations: calculate the center coordinate error, width and height error of the bounding box, calculate the cross-entropy loss of the object category, and calculate the binary cross-entropy loss of the object score. Combine the above three losses into the final detection loss. S26: Perform backpropagation using the calculated loss, and update model parameters with the Adam optimizer to reduce the value of the loss function; S27: Repeat training steps S21 to S26 to continuously optimize model parameters until the training termination condition is reached; S28: Store the training parameters in an appropriate server, and transmit the data to the throwing tool pose adjustment module as needed.
[0035] Embodiment 4:
[0036] The difference between this embodiment and Embodiment 3 is that: a method for processing the input feature map X ∈ R C×H× W using EMA and EMA attention in step S22 is disclosed, which includes the following processes: S2201: Divide it into G sub-features according to the number of channels to learn different semantics. The input feature X = [X0, X i , …, X G-1 , X i ∈ R C / / G×H×W ; S2202: Without loss of generality, let G << C, and assume that the learned weight descriptors will be used to enhance the feature representation of the region of interest in each sub-feature; S2203: Extract the weight descriptors of the grouped feature maps through 2 parallel paths on the 1×1 branch and 1 parallel path on the 3×3 branch. In the 1×1 branch, two 1D global average pooling operations are used to encode channels along two spatial directions, and the two encoded features are concatenated without dimensionality reduction on the 1×1 branch. Then, the output after the 1×1 convolution is re-decomposed into 2 vectors, and two Sigmoid nonlinear functions are used to fit the 2D binary distribution on the linear convolution. Finally, channel attention is aggregated through multiplication to achieve cross-channel interaction. In the 3×3 branch, a 3×3 convolution is used to capture multi-scale feature representations; S2204: Use 2D global average pooling to encode the global spatial information in the outputs of the 1×1 branch and the 3×3 branch; S2205: Convert the output to the corresponding dimensional shape, that is: S2206: Add the nonlinear function softmax to fit the linear transformation, and concatenate the outputs of the two branches of the same size to convert into the format of R 1×H×W ; S2207: Multiply the results of the above parallel processing using matrix dot product operation to obtain the spatial attention map.
[0037] Embodiment 5:
[0038] The difference between this embodiment and embodiment 3 is that this embodiment discloses a method for processing the input feature map X and convolution kernel W in step S22, including the following processing: S2211. Use a conventional convolution kernel to extract features from the input image X; S2212. Add an offset field layer to obtain the bias domain of the convolution kernel sampling points. The size of the obtained bias domain and the input features Figure 1 From this, the dynamic offset Δp can be obtained. n The sampling point location p can be obtained. n =p0+Δp n ; S2213. Calculate the offset sampling point position (pixels) using bilinear interpolation. The formula is: Where q represents all spatial locations in the input feature map, x(q) represents the value of a point at all integer locations in the feature map, and G(q,p) is a two-dimensional bilinear interpolation kernel function, which can be decomposed into two one-dimensional kernels. G(q,p)=g(q x ,p x )·g(q y ,p y ) Where g(a,b) = {0,1-|ab|}; S2214. Combining the above steps, add an offset to each data collection point. The calculation formula is as follows: Where R = {(-1,1),(-1,0),…,(0,1),(1,1)}, w(p n ) is p n The convolution kernel weights at position, where x is the feature map to be detected, and p n Δm represents the positional element in R. n These are the weighting coefficients.
[0039] Example 6:
[0040] The difference between this embodiment and embodiment 3 is that: a method for defining CIoU Loss in step S25 is disclosed, where the real bounding box is denoted as... Predicted box and The values correspond to the center coordinates and size of the bounding box. CIoU Loss is defined as follows: In the formula: IoU is used to measure the overlap between the predicted bounding box and the ground truth bounding box, α is used as a balancing parameter, and v is used to measure the consistency of the aspect ratio. g and H g W represents the sum of the width and height of the ground truth bounding box and the predicted bounding box, respectively. i H i This represents the area of the overlapping portion.
[0041] Example 7:
[0042] The difference between this embodiment and Embodiment 1 is that in step S6, the monitoring area of the video when the grain truck starts discharging material at the center of the video is S, and the adjustable area is set to S. area The time taken to fill a grain cart is T. Divide this time into N equal time periods, each with a length of Δt. The following processing is performed: S61. Use the recognition model to obtain the center coordinates {x} of the output target bounding box. box ,y box}; S62. Calculate the current center position coordinates of the grain truck {x} box_center ,y box_center}; S63. Calculate the distance from the center position of the identified grain truck to the center position of the camera {x}. center ,y center Euclidean distance S64, Determine the difference of π. 2 With S area The size relationship, if π·distence 2 ≥S area If the vehicle speed is too high, a command is sent to stop the material discharge and a reminder is given that the vehicle is moving too fast. Return to step (1) otherwise proceed to the next step. S65. Minimize the sum of the differences between the car's dwell time in different areas and the target dwell time within each time period. The formula is: The constraints are And x i,j ≥0.
[0043] It should be noted that the parts not described in detail in the above embodiments are all prior art.
[0044] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention should be covered within the protection scope of the present invention.
Claims
1. A deep learning-based automatic positioning and tracking method for throwing tools, characterized in that: Includes the following steps: S1. The data processing module collects video data from agricultural harvesting scenes and generates high-quality training data through manual annotation, classification, formatting, and expansion. S2, the deep network module optimizes the training model. The YOLOv8 deep learning model is selected, and the attention mechanism EMA and variable convolution DCNv2 are introduced. The training data is input into the deep learning model for training. The CIoU Loss loss function is used, and the Adam optimizer is combined to perform backpropagation to optimize the model parameters and store them on the server. S3, a high-definition pixel camera, collects real-time monitoring video data of agricultural harvesting scenes; S4, the data processing module converts the real-time monitoring video stream into image information and transmits it to the server; S5, the deep network module analyzes the location of grain carts and grain piles in image information in real time and makes decisions based on real-time data; S6. Adjust the pose of the feeding device based on the position data generated by the grain truck recognition by the deep network module and the current pose of the feeding device; the optimization of the training model in step S2 includes the following steps: S21. While training the deep learning model, standardize the data. S22. Use the backbone network CSPDarknet53 to extract image features. Add EMA attention after the first two C2f in the backbone network. Replace the convolution in the SPPF of the backbone network with deformable convolution DCNv2. S23. Pass the feature map into the neck module; S24. The feature map is fed into YOLOHead, which includes anchor-based detection and anchor-free detection. Each detection head is responsible for predicting a set of bounding boxes, class scores, and object scores. S25. For each predicted bounding box, perform the following calculations: calculate the center coordinate error, width and height error of the bounding box, calculate the cross-entropy loss of the object category, and calculate the binary cross-entropy loss of the object score. Combine the above three losses into the final detection loss. S26. Use the calculated loss for backpropagation and the Adam optimizer to update the model parameters; S27. Repeat training steps S21 to S26 to continuously optimize the model parameters until the training termination condition is met. S28. Store the training parameters on a suitable server and transmit the data to the throwing tool pose adjustment module as needed; in step S22, for the input feature map EMA, EMA attention processes the feature map as follows: S2201, Divide it according to the number of channels into Individual features are used to learn different semantics; input features ; S2202. Without losing generality, let And it is assumed that the learned weight descriptors will be used to enhance the feature representation of the region of interest in each sub-feature; S2203: Weight descriptors for grouped feature maps are extracted through two parallel paths on a 1×1 branch and one on a 3×3 branch. In the 1×1 branch, two 1D global average pooling operations are used to encode the channel along two spatial directions, and the two encoded features are concatenated to prevent dimensionality reduction on the 1×1 branch. The output after the 1×1 convolution is then decomposed into two vectors, and two sigmoid nonlinear functions are used to fit the 2D binary distribution on the linear convolution. Finally, cross-channel interaction is achieved by multiplying and aggregating channel attention. In the 3×3 branch, one 3×3 convolution is used to capture multi-scale feature representations. S2204. Use 2D global average pooling to encode the global spatial information in the output of 1×1 branch and 3×3 branch; S2205. The output will be converted into the corresponding dimensional shape, that is: ; S2206. Add a non-linear function, softmax, to fit the linear transformation, concatenating the outputs of two branches of equal size to convert it into... Format; S2207. Multiply the results of the above processing by matrix dot product operation to obtain the spatial attention map; In step S22, for the input feature map and convolution kernel The following processing methods are available: S2211. Apply a conventional convolution kernel to the input image. Perform feature extraction; S2212. Add an offset field layer to obtain the bias domain of the convolution kernel sampling points. The size of the obtained bias domain is consistent with the input feature map, from which the dynamic offset is obtained. The sampling point location is obtained. ; S2213. Calculate the offset sampling point position (pixels) using bilinear interpolation. The formula is: in, Represents all spatial locations in the input feature map. This represents the values of points at all integer positions in the feature map. A bilinear interpolation kernel function with a two-dimensional kernel can be decomposed into two one-dimensional kernel formulas. in ; S2214. Combining the above steps, add an offset to each data collection point. The calculation formula is as follows: in , for The convolution kernel weights at each position. The feature map to be detected. represent middle position element, These are the weighting coefficients; In step S25, the true bounding box is recorded as... The prediction box is , and The values correspond to the center coordinates and size of the bounding box. CIoU Loss is defined as follows: In the formula: IoU is used to measure the degree of overlap between the predicted bounding box and the ground truth bounding box. Used as a balancing parameter Consistency used to measure aspect ratio and These represent the sum of the width and height of the ground truth bounding box and the predicted bounding box, respectively. The area of the overlapping portion; In step S6, the monitoring area of the video when the grain truck starts discharging material at the center of the video is... Let the adjustable area be... The time taken to fill a grain cart is T. Divide this time into N equal time periods, each with a length of T. The following processing methods are available: S61. Use the recognition model to obtain the center coordinates of the output target bounding box. ; S62. Calculate the current center position coordinates of the grain truck. ; S63, Calculate the distance from the center position of the identified grain truck to the center position of the camera. Euclidean distance ; S64, Judgment and The size relationship, if If the vehicle speed is too high, a command is sent to stop the material discharge and a reminder is given that the vehicle is moving too fast. Return to step (1) otherwise proceed to the next step. S65. Minimize the sum of the differences between the car's dwell time in different areas and the target dwell time within each time period. The formula is: The constraints are , ,and .
2. The method for automatic positioning and tracking of a throwing tool based on deep learning according to claim 1, characterized in that: Step S1, which involves manually annotating, classifying, formatting, and augmenting the video data, includes the following steps: S11. Determine whether the video data meets the requirements, retain the data that meets the requirements and process it into frames, and modify the height and width of each frame to unify the data format. S12. Manually label the processed data, including the location of the grain truck and the shape of the grain pile. S13. Generate a unique tag file for the above data; S14. Determine if the data has a unique tag file. If not, return to S12. If it does, proceed to the next step. S15. Expand the samples by performing geometric transformations, color transformations, and Mosaic enhancements on the labeled data; S16. Store the processed data in the server and transfer the data to the deep network module as needed.
Citation Information
Patent Citations
Grain discharge port positioning system and method and combine harvester
CN110637593A
Workshop dangerous behavior identification alarm method and system based on monitoring video
CN115331172A
