Unmanned intertillage weeding agricultural machine navigation method based on visual identification and machine learning
The navigation method for unmanned tillage and weeding agricultural machinery, which combines visual recognition and machine learning, solves the problem of manual driving and operation required for semi-mechanized equipment. It enables autonomous navigation and precise operation of agricultural machinery, improves operational accuracy and efficiency, and reduces safety hazards.
Patent Information
- Application Number
- CN202511574438.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-01-23
AI Technical Summary
Existing semi-mechanized weeding equipment requires manual operation, which is technically demanding, and the row spacing is difficult to control, leading to safety hazards during long-term operation.
A navigation method for unmanned tillage and weeding agricultural machinery based on visual recognition and machine learning is adopted. The method uses a camera to collect farmland images, a pre-trained model to identify the position of seedlings, initializes the tracking filter box, calculates the tracking line, and combines Kalman filtering and YOLO algorithm to realize autonomous navigation and field ridge recognition of agricultural machinery, and supports automatic turning.
It enables autonomous navigation and precise alignment of agricultural machinery, improves operational accuracy and efficiency, reduces reliance on manual labor and operational difficulty, and enhances the safety and automation level of agricultural operations.
Smart Images

Figure CN121384031A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of agricultural production, and particularly relates to an unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning. BACKGROUND
[0002] With the acceleration of global agricultural modernization, the demand for efficient, precise and low-labor-dependent agricultural production is increasingly urgent. At present, agriculture is facing challenges such as structural shortage of labor, low efficiency of traditional cultivation mode, and ecological problems caused by excessive use of pesticides and fertilizers. Unmanned agricultural equipment has become one of the core directions to solve the above problems. Among them, intertillage weeding, as a key field operation during the growth cycle of crops (directly affecting nutrient absorption, ventilation and light transmission and final yield of crops), has a particularly prominent demand for automation and intelligent upgrading. Traditional intertillage weeding operation replaces manual labor with semi-mechanized equipment.
[0003] However, semi-mechanized equipment (such as a towed weeding machine) needs to be manually driven and controlled, which not only has high technical requirements for the operator, but also has the problem of inaccurate control of operation row spacing (which can easily lead to missed weeding or damage to seedlings) and safety hazards caused by long-time operation fatigue. SUMMARY
[0004] The purpose of the present application is to provide an unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning, which solves the technical problems in the prior art that semi-mechanized equipment needs to be manually driven and controlled, which not only has high technical requirements for the operator, but also has the problem of inaccurate control of operation row spacing and safety hazards caused by long-time operation fatigue.
[0005] To achieve the above purpose, the present application provides an unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning, comprising the following steps: collecting farmland images through a camera, pre-processing the images, and identifying the positions of seedlings in the images using a pre-trained machine learning model; based on the identified positions of the seedlings, initializing a plurality of tracking filter boxes, and calculating a tracking line according to the tracking filter boxes to guide the agricultural machine to walk; when a ridge is identified, controlling the agricultural machine to travel along the edge of the ridge and perform a U-turn operation.
[0006] In the step of "collecting farmland images through a camera, pre-processing the images, and identifying the positions of seedlings in the images using a pre-trained machine learning model", the camera platform is installed on the unmanned weeding machine, facing straight ahead, 1.2 meters high from the ground, and the camera is installed at an angle of 30° with the horizontal plane. The collected image has a pixel of 640x480.
[0007] Wherein, the number of the plurality of tracking filter frames is nine, which are respectively set at [140, 94], [140, 154], [140, 214], [60, 94], [70, 154], [80, 214], [220, 94], [210, 154], [190, 214] of the image.
[0008] Wherein, when at least two tracking filter frames exist, the intermediate tracking line is calculated; when the intermediate tracking line is not good, the intermediate tracking line at this time is calculated and predicted according to the tracking lines on both sides, which enhances the robustness of the real-time tracking path of the robot.
[0009] Wherein, the path planning step further comprises using Kalman filter frame algorithm, credibility filter frame mechanism, credibility tracking line mechanism and tracking line prediction mechanism to maintain and update the tracking filter frame and the tracking line.
[0010] Wherein, in the step of "when the ridge is identified, the agricultural machine is controlled to travel along the edge of the ridge and perform the turning operation", the identification method for the ridge is to use the YOLO identification algorithm to identify the ridge after training, and then the real-time identification process of the ridge during the operation of the robot can be performed; The specific turning strategy after the ridge is identified is to travel along the edge of the ridge for a specified distance, then perform the turning action in a spacious and safe position, and continue to enter the working state after turning to connect the place where the last operation was performed without missing the rice seedling row.
[0011] The unmanned middle cultivation and weeding agricultural machine navigation method based on visual recognition and machine learning of the application, through automatic visual recognition and tracking control, the method uses a camera to collect farmland images in real time, accurately identifies seedling positions based on a pre-trained model and generates tracking lines, realizes autonomous navigation and accurate row alignment of the agricultural machine, and further supports automatic turning and continuous operation through ridge identification and edge tracking function, significantly improves operation accuracy and efficiency, reduces manpower dependence and operation difficulty, and enhances the safety and automation level of agricultural operation. In this way, the technical problems of semi-mechanized equipment requiring manual driving and control in the prior art, high technical requirements for operators, inaccurate operation row distance control, and safety hazards caused by long-time operation fatigue are solved. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments or the prior art of the present application, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows.
[0013] Figure 1 is a schematic diagram of original rice seedling data in a scene of the unmanned middle cultivation and weeding agricultural machine navigation method based on visual recognition and machine learning of the application.
[0014] Figure 2 is a schematic diagram of raw rice seedling data under scene two of the unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning of the present application.
[0015] Figure 3 is a schematic diagram of pre-processing of the visual recognition method of the present application.
[0016] Figure 4 is a schematic diagram of the visual recognition result of the present application.
[0017] Figure 5 is a schematic diagram of real-time tracking route calculation of the present application.
[0018] Figure 6 is a schematic diagram of real-time tracking route prediction of the present application. DETAILED DESCRIPTION
[0019] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, the embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0020] Please refer to Figures 1-6 , Figure 1 is a schematic diagram of raw rice seedling data under scene one of the unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning of the present application. Figure 2 is a schematic diagram of raw rice seedling data under scene two of the unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning of the present application. Figure 3 is a schematic diagram of pre-processing of the visual recognition method of the present application. Figure 4 is a schematic diagram of the visual recognition result of the present application. Figure 5 is a schematic diagram of real-time tracking route calculation of the present application. Figure 6 is a schematic diagram of real-time tracking route prediction of the present application.
[0021] The present application provides an unmanned intertillage weeding agricultural machine navigation method based on visual recognition and machine learning, comprising the following: S1, collecting farmland images through a camera, pre-processing the images, and identifying the seedling positions in the images using a pre-trained machine learning model; For this specific embodiment, the camera platform is installed on the unmanned weeding machine, facing straight ahead, 1.2 meters high from the ground, the camera is installed at an angle of 30° with the horizontal plane, and the collected image pixels are 640x480.
[0022] Taking the collected original image as an example, Figure 1 pre-processing (rectangular region format is [x1:x2, y1:y2]) is performed; the original Figure 1The two rectangular regions [0:80, 0:480] and [560:640, 0:480] are removed to obtain... Figure 2 ; Will Figure 2 The four rectangular regions [0:480, 0:80], [0:480, 110:140], [0:480, 170:200], and [0:480, 230:480] are colored black to obtain... Figure 3 ; by Figure 3 For example, seedlings with high recognition rates are marked with rectangular boxes. Using YOLOv5 with a training set to test set ratio of 7:3, a seedling recognition model is obtained. The model achieves a precision and recall rate of over 0.93.
[0023] Using seedling recognition models Figure 3 Perform recognition to obtain a recognition box, such as Figure 4 As shown.
[0024] S2. Based on the identified seedling positions, initialize multiple tracking filter boxes and calculate the tracking line according to the tracking filter boxes to guide the agricultural machinery to move; In this specific implementation, after identifying rice seedlings, the identified seedling data is utilized to achieve autonomous navigation and planning for the robot in the field. The specific implementation details and rules are as follows: Nine tracking filter boxes are initialized based on the identified target. The specific generation rules for the filter boxes are as follows: First, the filter boxes are initialized at fixed positions. Since the real-time image size of the robot is 480x640, and after multiple rounds of repeated comparative experiments, the positions of these nine filter boxes are set at [140,94], [140, 154], [140,214], [60,94], [70,154], [80,214], [220,94], [210,154], and [190,214] in the image. After initializing these filter boxes, the distance needs to be determined using the identified rice seedling frames. The closest real recognition frame to each filter box is selected, and the information from the real recognition frame is used to update the newly initialized filter boxes with a certain weight ratio. Nine filter boxes are selected because nine are sufficient for the current path recognition and tracking of the robot, while also taking into account the computation time requirements of the robot's real-time operation.
[0025] If the conditions for calculating the tracking line are met, the tracking information at that time is calculated. The specific rules for the tracking line are as follows: First, for the filter box, three boxes are selected for the left, center, and right. The final tracking line is the selected center tracking line. The tracking line can only be calculated when at least two filter boxes exist. If the tracking effect of the center line is poor, but the tracking lines on both sides still exist, the center tracking line can be calculated and predicted based on the tracking lines on both sides. This effectively enhances the robustness of the robot's real-time tracking path. Figure 5 .
[0026] After the tracking stabilizes, continuous tracking maintenance and planning are required according to the algorithm's rules. The general process includes: Kalman filter box algorithm, confidence filter box mechanism, confidence tracking line mechanism, tracking line prediction mechanism, etc., effectively enabling the robot's autonomous recognition and navigation in the field. In cases of poor recognition or various terrain changes, the tracking line prediction mechanism will be triggered. The detailed logic of this algorithm is as follows: ---Create a READY object to prepare for the algorithm to run; ---Create a clustering algorithm object ALGORITHM; ---Run the main function of the algorithm; ---Read the data file (objlist.txt) of the detection box; ---Start iteration; ---Read in all bounding box data for this image; ---Processing will begin after reading is complete; ---Convert the information in this image into a data matrix format; ---The detection box data of this image is divided into three layers (top, middle, and bottom). ---The initial search for the three intermediate clusters (upper, middle, and lower levels) follows the specific rules as follows: 1. Obtain index information; 2. Reset the initialization index of the three-layer intermediate filter box; 3.1. If the bottom-level intermediate filter boxes are not yet initialized, first set the value of the bottom-level initialization filter box to 1, indicating that the initialization process for the bottom-level intermediate filter boxes has begun. Next, if the middle-level intermediate filter boxes have been successfully initialized, then use the information from the middle-level intermediate filter boxes to search for the bottom-level intermediate clusters; if the bottom-level intermediate filter boxes have not been successfully initialized, then directly initialize the bottom-level intermediate filter boxes. If the bottom-level intermediate filter boxes are still not successfully initialized at this point, then repeat the above process using the information from the top-level intermediate filter boxes.
[0027] 3.2. If the middle layer intermediate filter frame has not completed initialization, the rule is similar to 3.1; 3.3. If the top layer intermediate filter frame has not completed initialization, the rule is similar to 3.1; ---For the three filter frames of the lower layer, the iterative updating operation is as follows: 1.1. If the detection frame data on the picture is empty, count the lower layer filter frame that has been searched; 1.2. If it is not empty, the following operations are performed: judge whether the bottom layer intermediate filter frame still exists or has not been successfully initialized. If the intermediate cluster does not exist, first judge whether the filter frame on the left exists. If it does not exist, it returns to the standard setting; if it exists, update it according to the detection frame obtained from the bottom layer. Then judge whether the filter frame on the right exists, and the processing principle is the same as that of the filter frame on the left. If the intermediate filter frame exists, first see if it is selected this time. If not, update the intermediate filter frame. Next, see the situation of the filter frames on the left and right: if the filter frame on one side exists, update the filter frame on this side first; if none of them exists or both of them exist, update the filter frame on the left first.
[0028] ---The iterative updating operation of the three filter frames of the middle layer is similar to that of the lower layer; ---For the top layer, only the intermediate filter frame is further updated; ---The judgment of the absolute threshold is as follows: if the intermediate filter frame crosses the absolute threshold on the left or right, the data is set to zero, and after pausing for several pictures, the processing is restarted; ---The judgment of the filter frame slope is as follows: if the straight lines formed between the intermediate filter frames of the upper, middle and lower layers do not meet the slope requirement, the filter frame farther from the middle is corrected to follow the filter frame with better effect; ---Correction of the distance between the filter frames on the left and right; ---Draw the final filter frame; ---Save the final data obtained after processing to the result file; ---Reset the data of all detection frames for the next reading; As shown in Figure 6 ; S3, when the ridge is recognized, the agricultural machine is controlled to travel along the edge of the ridge and perform a turning operation.
[0029] For this specific embodiment, the method for identifying the ridge is to use the YOLO recognition algorithm to train and recognize the ridge, and then the real-time identification process of the ridge during the operation of the robot can be performed; For the specific turning strategy after identifying the ridge, after traveling a specified distance along the edge of the ridge, the turning action is performed again in a wide and safe position, and after turning, the working state is continued to connect the last working place, without missing the rice seedling row.
[0030] Using a visual recognition and machine learning-based unmanned weeding agricultural machine navigation method of the present embodiment, the present application realizes autonomous navigation and accurate row alignment of the agricultural machine through automatic visual recognition and tracking control. The method uses a camera to collect real-time images of the farmland, accurately identifies the seedling position based on a pre-trained model, and generates a tracking line. At the same time, through the ridge recognition and edge tracking function, it further supports automatic turning and continuous operation, significantly improves the operation accuracy and efficiency, reduces the dependence on manpower and the difficulty of operation, and enhances the safety and automation level of agricultural operation. In this way, the technical problems of semi-mechanized equipment requiring manual driving and control in the prior art are solved, which not only has high technical requirements for the operator, but also has the technical problems of inaccurate control of operation row distance and safety hazards caused by long-time operation fatigue.
[0031] The above only discloses one or more preferred embodiments of the present application, and cannot limit the scope of the rights of the present application. Those skilled in the art can understand that all or part of the above-mentioned embodiments can be implemented, and equivalent changes made according to the claims of the present application still fall within the scope of the present application.
Claims
1.A method for unmanned weeding machine navigation based on visual recognition and machine learning, comprising the following steps: collecting images of farmland by a camera, pre-processing the images, and identifying the positions of seedlings in the images using a pre-trained machine learning model; initializing a plurality of tracking filter boxes based on the identified positions of the seedlings, and calculating tracking lines according to the tracking filter boxes to guide the weeding machine to walk; when a ridge is identified, controlling the weeding machine to travel along the edge of the ridge and perform a turning operation. 2.The method according to claim 1, wherein in the step of collecting images of farmland by a camera, pre-processing the images, and identifying the positions of seedlings in the images using a pre-trained machine learning model, the camera platform is installed on the unmanned weeding machine, facing forward, 1.2 meters above the ground, and the camera is installed at an angle of 30° with the horizontal plane, and the collected image has a pixel of 640x480. 3.The method according to claim 2, wherein the number of the plurality of tracking filter boxes is nine, and the tracking filter boxes are respectively set at [140, 94], [140, 154], [140, 214], [60, 94], [70, 154], [80, 214], [220, 94], [210, 154], and [190, 214] of the image. 4.The method according to claim 3, wherein when at least two tracking filter boxes exist, a middle tracking line is calculated, and when the middle tracking line is not effective, a middle tracking line at this time is calculated and predicted according to the tracking lines on both sides, thereby enhancing the robustness of the real-time tracking path of the robot. 5.The method according to claim 4, wherein the path planning step further comprises using Kalman filter box algorithm, credibility filter box mechanism, credibility tracking line mechanism, and tracking line prediction mechanism to maintain and update the tracking filter boxes and the tracking lines. 6.The method according to claim 5, wherein in the step of when a ridge is identified, controlling the weeding machine to travel along the edge of the ridge and perform a turning operation, the method for identifying the ridge is to use YOLO identification algorithm to identify the ridge after training, and then the real-time identification process of the ridge during the operation of the robot can be performed; and the specific turning strategy after the ridge is identified is to travel along the edge of the ridge for a specified distance, then perform a turning operation in a spacious and safe position, and continue to enter the working state after the turning operation to connect the place where the last operation was performed without missing the rice seedlings.