Agricultural machine feed box feeding method based on rotating target detection
By applying a rotary object detection algorithm and intelligent control system in agricultural machinery, real-time identification of the opening position of the agricultural machinery storage box and automatic alignment of the feeding truck discharge port are achieved, which solves the problem of alignment difficulties in the traditional feeding process, and improves the operating efficiency and automation level.
Patent Information
- Application Number
- CN202411770586.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-11
AI Technical Summary
During the feeding process of traditional agricultural machinery, it is difficult to quickly align the feeding port of the supply truck with the opening of the storage box of the agricultural machinery, resulting in low operating efficiency. The traditional mechanical alignment device is complex in structure and poor in adaptability, making it difficult to be universal.
The feeding method of agricultural machinery box based on rotation target detection is adopted, and computer vision technology and intelligent control system are used to identify the opening position of the agricultural machinery storage box in real time through the rotation target detection algorithm, and the position of the feeding truck discharge port is automatically adjusted through the control system to achieve accurate docking.
The automation and precise replenishment of materials in the agricultural machinery material box has been achieved, the operation efficiency and automation level of agricultural machinery has been improved, manual intervention has been reduced, and the accuracy and robustness of detection have been improved.
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of agricultural machinery automation, and in particular to an agricultural machinery material box filling method based on rotating target detection. Background Art
[0002] In modern agricultural production, sowing and fertilizing operations often need to be completed by seeders and fertilizer spreaders, and the normal operation of these agricultural machinery requires a continuous supply of seeds and fertilizers. In large-scale operations, supply vehicles are usually used to provide agricultural machinery with seeds and fertilizers. However, in actual operation, it is difficult to quickly align the auger discharge port of the supply vehicle with the opening of the storage box of the agricultural machinery, especially in the case of uneven terrain and complex operating environment. The alignment process is time-consuming and requires manual intervention, which reduces the operation efficiency. The traditional method mainly relies on manual alignment of the auger discharge port and the agricultural machinery storage box. This not only requires high experience from the operator, but is also prone to inaccurate docking and material leakage, resulting in waste of fertilizers or seeds, and may affect the normal operation of agricultural machinery. In addition, traditional mechanical alignment devices are usually complex in structure and poor in adaptability. They are difficult to be used between different models of agricultural machinery and supply vehicles, and lack flexibility.
[0003] The rapid development of artificial intelligence and computer vision technology has provided new possibilities for solving this problem. Based on this, the present invention proposes a method for refilling agricultural machinery storage boxes based on rotating target detection. By applying the target detection algorithm, the opening position of the agricultural machinery storage box can be identified in real time, and the position of the auger outlet can be automatically adjusted through the control system to achieve precise docking, thereby improving the automation level and operation efficiency. Summary of the invention
[0004] The present invention aims to solve the problem of difficulty in docking the auger discharge port of a supply vehicle with the opening of a storage box of an agricultural machine in traditional agricultural operations, and proposes a method for replenishing materials in an agricultural machine box based on rotating target detection. By using computer vision technology and an intelligent control system, the material in the agricultural machine box can be replenished automatically and accurately, thereby improving the operating efficiency and automation level of agricultural machinery. The specific technical scheme is as follows: A method for refilling a feed box of an agricultural machinery based on rotating target detection includes a controller, a camera, a refilling vehicle and an agricultural machinery. The controller is respectively connected to the camera and the refilling vehicle for communication. A rotating target detection model is arranged in the controller. The refilling method includes the following steps: Step 1: The camera collects pictures of the agricultural machinery material box and uploads them to the controller; Step 2: The controller inputs the image into the rotating target detection model to perform target detection and outputs the minimum circumscribed rectangle of the feed port of the agricultural machinery feed box and its rotation angle; Step 3: Divide the minimum circumscribed rectangle into a delivery area and a prohibited delivery area, control the discharge port of the feeding vehicle to move to the delivery area, and open the discharge device of the feeding vehicle to feed.
[0005] Furthermore, the steps for building a rotation target detection model are as follows: S1, collect data, collect pictures of agricultural machinery and materials replenishment through cameras; S2. Prepare a data set, create annotation files for all images, annotate the center point, length, width and rotation angle of the minimum circumscribed circle of the agricultural machinery storage box opening, and divide the data set into a training set, a validation set and a test set according to the proportion; S3. Build a rotating target detection model, apply the YOLOv8n-obb model architecture, and use the training set, validation set, and test set to repeatedly train, validate, and test the model until the model converges stably and finally determines the model weight.
[0006] Furthermore, in S2, the ratio of training set, validation set and test set is 8:1:1.
[0007] Furthermore, in step 2, the photos captured by the camera are used as the data source, the controller creates a dataloader and inputs it into the rotating target detection model. The rotating target detection model extracts image features through the backbone network and performs rotating target detection on the image at multiple scales, and outputs the minimum circumscribed rectangle of the feed port of the agricultural machinery box and its rotation angle relative to the camera coordinate system through the IOU and NMS mechanism.
[0008] Furthermore, in step three, based on the minimum circumscribed rectangle of the feed port of the material box, a first parallel line passing through the geometric center point of the minimum circumscribed rectangle and parallel to the long side is constructed, and two second parallel lines and a third parallel line parallel to the first parallel line are constructed on both sides of the first parallel line within the minimum circumscribed rectangle. The second parallel lines, the third parallel lines and the two short sides of the minimum circumscribed rectangle constitute the allowed delivery area, and the remaining areas are prohibited delivery areas.
[0009] Furthermore, the second parallel line and the third parallel line are symmetrically distributed on both sides of the first parallel line, and the distance between the second parallel line and the first parallel line is less than half of the length of the short side of the minimum circumscribed rectangle.
[0010] The beneficial effects of the present invention are: 1. By applying the rotating target detection algorithm, the opening position of the agricultural machinery storage box can be identified in real time, and by adjusting the position of the feeding vehicle's discharge port, precise docking can be achieved, thereby improving the level of automation and operating efficiency.
[0011] 2. The YOLOv8 rotating target detection algorithm is used, which can identify and detect the opening position of the agricultural machinery storage box and extract its minimum circumscribed rectangle. The rotating target detection algorithm can identify non-horizontal or vertical target objects, and is particularly suitable for detecting rectangular openings with changing angles. It can handle the detection problems of agricultural machinery storage boxes at different angles and positions, and improves the detection accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0013] Figure 1 It is an action flow chart of the material replenishing vehicle in an embodiment of the present invention. DETAILED DESCRIPTION
[0014] In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.
[0015] It should be noted that the agricultural machine may be a fertilizer applicator or a seed drill. Taking the discharge device of the feeding vehicle as an auger and the controller as a computer as an example, the present invention provides the following specific implementation scheme: The present invention provides a method for refilling a feed box of agricultural machinery based on rotating target detection, comprising a controller, a camera, a refilling vehicle and agricultural machinery, wherein the camera adopts an RGB camera, the controller is connected to the camera to receive photos sent by the camera, the controller is connected to the refilling vehicle in communication to control the movement of the discharge port of the refilling vehicle, and a rotating target detection model is arranged in the controller. The steps of constructing the rotating target detection model are as follows: S1. Collect data. Use cameras to collect pictures of agricultural machinery materials being replenished. In order to build a database with sufficient diversity, it is necessary to cover various situations that may occur during the material replenishment stage to ensure that the data set can truly reflect different working environments. In addition to collecting standard photos of the replenishment port of the agricultural machinery storage box, it is also necessary to consider the impact of lighting changes on image quality, such as scenes under different lighting conditions such as strong light, shadows, and night lighting, as well as target occlusion, such as weeds, equipment parts, or other objects blocking the replenishment port. In addition, the data set also needs to cover different types of materials, such as fertilizers, seeds, etc., which differ in shape, color, and fluidity. These changes will affect the performance of the image and the accuracy of target detection. By collecting a large number of images under a variety of different environments, the data set will be more comprehensive and representative, which will help the model to show stronger adaptability and robustness under different conditions, ensuring that it can achieve efficient and accurate material detection and replenishment in a variety of situations.
[0016] S2. In order to train the model, create an annotation file for each image, annotate the center point, length, width and rotation angle of the minimum circumscribed circle of the agricultural machinery storage box. Further processing of the data set includes dividing it into a training set, a validation set and a test set in a ratio of 8:1:1. Specifically, 80% of the data will be used for the training set, which is used in the learning process of the model. The weights and biases of the model are continuously adjusted through optimization algorithms such as back propagation and gradient descent, so that the model can extract useful features from the data. 10% of the data will be used for the validation set. The main function of the validation set is to tune hyperparameters (such as learning rate, batch size, etc.) and evaluate the performance of the model. Through the performance on the validation set, the overfitting or underfitting problems of the model can be discovered in time and adjusted accordingly. Finally, the remaining 10% of the data will be used for the test set, which is used to finally evaluate the generalization ability of the model and ensure that the model can perform accurate boundary detection on unseen data.
[0017] S3. Build a rotating target detection model, apply the YOLOv8n-obb model architecture, and use the training set, validation set, and test set to repeatedly train, validate, and test the model until the model converges stably and finally determines the model weight.
[0018] The feeding method comprises the following steps: Step 1: The camera collects color images of the agricultural machinery material box in the current environment and uploads them to the controller.
[0019] Step 2. The controller inputs the image into the rotating target detection model for target detection and outputs the minimum bounding rectangle of the feed port of the agricultural machinery box and its rotation angle. Specifically, the photo captured by the camera is used as the data source, the controller creates a dataloader and inputs it into the rotating target detection model, the rotating target detection model network loads the dataloader and decodes it, extracts image features through the backbone network in a 1p / batchsize mode, and performs rotating target detection on the image at multiple scales, and outputs the minimum bounding rectangle of the feed port of the agricultural machinery box and its rotation angle relative to the camera coordinate system through the IOU and NMS mechanism.
[0020] Step three, divide the minimum circumscribed rectangle into a delivery area and a prohibited delivery area, control the discharge port of the feeding vehicle to move to the delivery area, and open the discharge device of the feeding vehicle to carry out feeding; specifically, according to the minimum circumscribed rectangle of the feed box feed port, construct a first parallel line L1 passing through the geometric center point P of the minimum circumscribed rectangle and parallel to the long side, and construct two second parallel lines L2 and third parallel lines L3 parallel to the first parallel line on both sides of the first parallel line L1 in the minimum circumscribed rectangle. The second parallel lines L2 and the third parallel lines L3 and the two short sides of the minimum circumscribed rectangle constitute the delivery area, and the remaining area is the prohibited delivery area.
[0021] Preferably, the second parallel line L2 and the third parallel line L3 are symmetrically distributed on both sides of the first parallel line L1, and the distance between the second parallel line L2 and the first parallel line L1 is less than half of the length of the short side of the minimum circumscribed rectangle.
[0022] like Figure 1 As shown in the figure, the working process of the feeding vehicle is as follows: When the discharge port of the auger of the feeding vehicle is not in the delivery area, the controller sends a command to the feeding vehicle to control the anti-aircraft gun to expand or retract so that the discharge port of the auger moves to the delivery area. The auger then rotates to add the material into the feed box of the agricultural machinery.
[0023] By applying the rotating target detection algorithm, the opening position of the agricultural machinery storage box can be identified in real time, and by adjusting the position of the feeding vehicle's discharge port, precise docking can be achieved, thereby improving the level of automation and operating efficiency.
[0024] The YOLOv8 rotating target detection algorithm is used, which can identify and detect the opening position of the agricultural machinery storage box and extract its minimum circumscribed rectangle. The rotating target detection algorithm can identify non-horizontal or vertical target objects, and is particularly suitable for detecting rectangular openings with changing angles. It can handle the detection problems of agricultural machinery storage boxes at different angles and positions, and improves the detection accuracy and robustness.
[0025] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A method for refilling a feed box of an agricultural machinery based on rotating target detection, comprising a controller, a camera, a refilling vehicle and an agricultural machinery, characterized in that: The controller is respectively connected to the camera and the feeding vehicle for communication. A rotating target detection model is arranged in the controller. The feeding method includes the following steps: Step 1: The camera collects pictures of the agricultural machinery material box and uploads them to the controller; Step 2: The controller inputs the image into the rotating target detection model to perform target detection and outputs the minimum circumscribed rectangle of the feed port of the agricultural machinery feed box and its rotation angle; Step 3: Divide the minimum circumscribed rectangle into a delivery area and a prohibited delivery area, control the discharge port of the feeding vehicle to move to the delivery area, and open the discharge device of the feeding vehicle to feed.
2. The method for refilling agricultural machinery feed boxes based on rotating target detection according to claim 1, characterized in that: The steps to build the rotation target detection model are as follows: S1, collect data, collect pictures of agricultural machinery and materials replenishment through cameras; S2. Prepare a data set, create annotation files for all images, annotate the center point, length, width and rotation angle of the minimum circumscribed circle of the agricultural machinery storage box opening, and divide the data set into a training set, a validation set and a test set according to the proportion; S3. Build a rotating target detection model, apply the YOLOv8n-obb model architecture, and use the training set, validation set, and test set to repeatedly train, validate, and test the model until the model converges stably and finally determines the model weight.
3. The method for filling agricultural machinery feed boxes based on rotating target detection according to claim 2, characterized in that: In S2, the ratio of training set, validation set and test set is 8:1:
1.
4. The method for refilling agricultural machinery feed boxes based on rotating target detection according to claim 2, characterized in that: In step 2, the photos captured by the camera are used as the data source. The controller creates a dataloader and inputs it into the rotating target detection model. The rotating target detection model extracts image features through the backbone network and performs rotating target detection on the image at multiple scales. The minimum circumscribed rectangle of the feed port of the agricultural machinery box and its rotation angle relative to the camera coordinate system are output through the IOU and NMS mechanism.
5. The method for filling agricultural machinery feed boxes based on rotating target detection according to claim 1, characterized in that: In step three, based on the minimum circumscribed rectangle of the feed box feed port, a first parallel line passing through the geometric center point of the minimum circumscribed rectangle and parallel to the long side is constructed, and two second parallel lines and a third parallel line parallel to the first parallel line are constructed on both sides of the first parallel line within the minimum circumscribed rectangle. The second parallel lines, the third parallel lines and the two short sides of the minimum circumscribed rectangle constitute the allowed delivery area, and the rest of the area is the prohibited delivery area.
6. The method for filling agricultural machinery feed boxes based on rotating target detection according to claim 5, characterized in that: The second parallel line and the third parallel line are symmetrically distributed on both sides of the first parallel line, and the distance between the second parallel line and the first parallel line is less than half of the length of the short side of the minimum circumscribed rectangle.