A farmland navigation path extraction method based on subordination filtering strategy

Through the RS-YOLOv8 lightweight model and affiliation filtering strategy, the isolated misdetection of corn plants and root detection frames in corn farmland was eliminated, and the center point at the bottom of the root detection frame was extracted as feature points, which solved the problem that the navigation path was susceptible to environmental changes, and achieved high-precision and real-time navigation path extraction.

CN120236180BActive Publication Date: 2025-09-02JILIN AGRICULTURAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510301900.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-09-02
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

The existing navigation path extraction method based on canopy detection frame is susceptible to environmental changes in corn farmland, resulting in unstable position of feature points, affecting the accuracy and real-time nature of navigation paths.

Method used

The RS-YOLOv8 lightweight model combined with the affiliation filtering strategy was used to detect the affiliation between corn plants and roots, remove the isolated false detection box, extract the center point at the bottom of the root detection box as feature points, divide the crop ridges using clustering algorithm, and fit the navigation path through the least squares method.

Benefits of technology

It improves the accuracy and real-timeness of the navigation path, reduces the impact of environmental interference on navigation path extraction, and ensures the reliability and accuracy of the navigation path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236180B_ABST
    Figure CN120236180B_ABST
Patent Text Reader

Abstract

The present invention discloses a farmland navigation path extraction method based on a dependency filtering strategy. The method comprises the following steps: establishing a dataset of corn crop rows under various growth environments, annotating the corn plants and their roots using annotation tools, and performing data enhancement on the dataset; detecting the plants and roots using the RS-YOLOv8 lightweight model; filtering the root detection frames that overlap with the plant detection frames based on a dependency filtering algorithm between the corn plant and root detection frames, and removing isolated false positives; extracting regions of interest (ROIs) based on the filtered detection frames using a region filtering algorithm; extracting the bottom center point of the root detection frame as a feature point, using a clustering algorithm to divide the crop ridges, and fitting the crop row lines within the ROI using the least squares method to extract the navigation path. The technical solution of the present invention extracts high-quality feature points that are not easily affected by environmental interference from the root detection frame, and then fits the navigation path to ensure the reliability of the route information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method for extracting farmland navigation paths based on a subordination relationship filtering strategy. Background Art

[0002] In order to improve agricultural production efficiency, intelligent agricultural equipment has gradually become a key technical means of modern agriculture. Among them, the autonomous operation capability of agricultural robots is particularly important, and precise navigation technology is the core guarantee for achieving their efficient and autonomous operation.

[0003] Currently, research in navigation technology focuses primarily on satellite navigation and visual navigation. Satellite navigation utilizes the GPS system to provide positioning and path planning for agricultural machinery. However, in complex farmland environments, GPS signals are easily obstructed and cannot meet real-time requirements. To address the limitations of satellite navigation technology, visual navigation technology has gradually become a research hotspot. Visual navigation technology uses cameras to acquire environmental information in real time, extracting path features from complex environments and providing accurate navigation data for agricultural machinery. Navigation paths, as important visual cues in the environment, have become a research focus. In the field of navigation path extraction, many researchers have explored and achieved considerable progress using traditional image processing techniques. The navigation paths extracted by these methods meet the requirements of actual farmland operations in terms of accuracy and angular error, but they generally suffer from long computation times and difficulty in real-time processing.

[0004] In recent years, the rise of deep learning technology has provided new solutions for visual navigation. Convolutional neural network-based visual navigation technology is capable of efficiently extracting crop row information, significantly outperforming traditional image processing methods in terms of computational efficiency. Furthermore, this technology can meet precision requirements in practical applications, demonstrating greater reliability and practicality, and is gradually replacing traditional image processing methods. Existing deep learning-based crop row detection methods mostly rely on extracting feature points using a canopy detection frame and then extracting a navigation path. This approach has several limitations. First, due to the lateral deviation between the corn canopy and the root system, agricultural machinery can easily cause wheels to crush crops during autonomous driving. Second, natural environmental disturbances (such as wind and varying lighting) can cause feature point position fluctuations, affecting navigation path accuracy. Furthermore, when the edges of captured images contain incomplete plants, the deviation between feature points extracted using the canopy detection frame and the true feature points is even more significant, significantly impacting navigation path extraction. The root cause of these issues is that canopy feature points are susceptible to environmental changes and their positions are unstable. Therefore, optimization is needed to address the interference caused by environmental changes on feature point and navigation path extraction. Summary of the Invention

[0005] The technical solution of the present invention to solve the above technical problems is to provide a farmland navigation path extraction method based on a subordination relationship filtering strategy, comprising the following steps:

[0006] Step 1: Create a dataset of corn crop rows under various growth environments, use annotation tools to annotate the corn plants and their roots, and perform data augmentation on the dataset;

[0007] Step 2: Detect plants and roots using the RS-YOLOv8 lightweight model;

[0008] Step 3: Based on the subordinate relationship filtering algorithm between the corn plant and the root detection frame, the root detection frame that overlaps with the plant detection frame is screened and isolated false detection frames are eliminated;

[0009] Step 4: Based on the filtered detection frame, the region of interest (ROI) is extracted through the region screening algorithm, including determining the key detection frame, connecting the key points to form the boundary line, and filling the interference area;

[0010] Step 5: Extract the bottom center point of the root detection frame as the feature point, use the clustering algorithm to divide the crop ridge, and use the least squares method to fit the crop row line within the ROI to extract the navigation path.

[0011] Furthermore, in step 2, the YOLOv8 model is improved to construct the RS-YOLOv8 model. The improvements include:

[0012] Add a tiny detection head module to the detection head to improve the small target detection capability, and replace the loss function with PIoU2;

[0013] The lightweight edge aggregation module (DBA), C2f_SCAA module and optimized GAM module are introduced into the neck network to enhance edge feature extraction, multi-scale perception and anti-interference capabilities;

[0014] The hierarchical adaptive sparsity pruning algorithm (LAMP) is used to lightweight the model.

[0015] Furthermore, the C2f_SCAA module replaces the original Bottleneck structure by connecting two CS_CAA modules in series. The CS_CAA module includes channel shuffling, contextual anchor attention, and dilated convolution branches to enhance multi-scale feature interaction.

[0016] The optimized GAM module adds 1×1 point-by-point convolution at the output stage to reduce redundant features;

[0017] The DBA module uses depthwise separable convolution to replace standard convolution to reduce computational complexity.

[0018] Furthermore, in step 1, when labeling, multiple adhered plants are labeled as a whole, and the root detection frame is focused on the root area close to the ground surface;

[0019] Data enhancement includes horizontal flipping, noise addition, and motion blur.

[0020] Furthermore, in step 3, the specific steps of the subordination relationship filtering algorithm include:

[0021] Classify the detection boxes into class A (seedling) and class B (root), and treat class B as a subordinate object;

[0022] Determine whether the B-type detection box intersects with any A-type detection box. If so, retain it; otherwise, remove it.

[0023] The intersection judgment condition is that the two detection frames have overlapping areas in both the horizontal and vertical directions.

[0024] Furthermore, in step 4, the region screening algorithm includes:

[0025] Divide the image into left and right sides based on the center point of the seedling detection frame, and select the key detection frames close to the center line and bottom edge on the left and right sides;

[0026] Connect the corner points of the key detection box to form a boundary line, extend the boundary line to intersect with the edge of the image, and fill the area outside the boundary line as the interference area.

[0027] Furthermore, in step 5, the feature point coordinates (x0, y0) are converted from the coordinates of the root detection box, and the conversion formula is as follows:

[0028] x0=x center ;

[0029]

[0030] Among them, (x center ,y center ) represents the center coordinate of the detection frame of the corn plant root, and height represents the height of the detection frame;

[0031] The K-means algorithm is used to cluster the feature points, and the same cluster corresponds to a crop ridge;

[0032] The crop lines on the left and right sides are fitted using the least squares method, and the line connecting their top and bottom intersections is calculated as the navigation path.

[0033] The technical solution of the present invention uses the Labelimg tool to annotate corn plants and their roots. Based on YOLOv8n, a lightweight RS-YOLOv8 model is proposed to improve the network model's detection performance for small-sized targets such as corn plant roots while achieving model lightweighting. A dependency filtering algorithm based on the corn plant and root detection frames is designed to filter out isolated root false detection frames that do not conform to the actual position in the model prediction results. A regional screening algorithm is designed to extract regions of interest (ROIs) based on the filtered prediction results, screening out regions of interest related to the navigation task and eliminating interference regions that do not contain navigation information. The center point of the bottom of the root detection frame is extracted as a feature point, a clustering algorithm is used to cluster the feature points of the same crop ridge, and the least squares method is used to fit the crop line within the ROI to ultimately extract the navigation path. To address the problem that feature points extracted based on the plant canopy detection frame are easily affected by environmental interference, resulting in fluctuations in the feature point positions and thus affecting the accuracy of navigation path extraction, the present invention proposes extracting high-quality feature points that are less susceptible to environmental interference using the root detection frame, and then fitting the navigation path to ensure the reliability of route information. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 the structures shown in these drawings without paying any creative work.

[0035] Figure 1 This is an algorithm flow chart of the farmland navigation path extraction method based on the subordination relationship filtering strategy of the present invention;

[0036] Figure 2 This is an example diagram of the dataset images and image data annotations of the present invention;

[0037] Figure 3 This is the RS-YOLOv8 network architecture diagram of the present invention;

[0038] Figure 4 This is a structural diagram of the DBA module of the present invention;

[0039] Figure 5 This is a structural diagram of the C2f_SCAA module of the present invention;

[0040] Figure 6 The GAM module structure diagram optimized for the present invention;

[0041] Figure 7 This is a flow chart of the LAMP pruning algorithm of the present invention;

[0042] Figure 8 This is a flow chart of the dependency filtering algorithm of the present invention;

[0043] Figure 9 This is a schematic diagram of the region screening algorithm of the present invention;

[0044] Figure 10 This is a diagram showing the extraction results of navigation paths for corn crops under various growth environments according to the present invention. DETAILED DESCRIPTION

[0045] The present invention proposes a farmland navigation path extraction method based on a subordination filtering strategy, aiming to design a farmland navigation path extraction method based on a subordination filtering strategy that is not easily affected by environmental interference.

[0046] The farmland navigation path extraction method based on the subordination relationship filtering strategy proposed by the present invention will be described below in a specific embodiment:

[0047] Example 1:

[0048] In the technical solution of this embodiment, Figure 1 As shown, a farmland navigation path extraction method based on a subordinate relationship filtering strategy includes the following steps:

[0049] Step 1: Create a dataset of corn crop rows under various growth environments, use annotation tools to annotate the corn plants and their roots, and perform data augmentation on the dataset.

[0050] Use the Labelimg tool to annotate corn plants and their roots, using the "seedling" and "root" categories. During labeling, because corn leaves often cling to each other and obscure each other during growth, individual plants are difficult to accurately label. Therefore, in some scenes, multiple corn plants are labeled as a whole.

[0051] Data enhancement includes horizontal flipping, noise addition, and motion blur.

[0052] Step 2: Detect plants and roots using the RS-YOLOv8 lightweight model;

[0053] RS-YOLOv8 lightweight model, such as Figure 3 As shown in the figure, it mainly includes Backbone (backbone network) responsible for extracting multi-level features of the input image and providing basic feature information for subsequent detection; Neck (neck network) is responsible for aggregating multi-scale features, enhancing feature expression capabilities, and improving the detection effect of targets of different sizes; Head (detection head) is responsible for target classification and bounding box regression based on the aggregated features to complete the target detection task.

[0054] In the head section, an additional small detection head module is added to the original detection head. The improved detection head structure strengthens the extraction of high-resolution features, significantly improving the model's ability to capture details of small objects, and laying a solid foundation for the optimization of subsequent modules. The loss function is replaced with PIoU2 instead of CIoU in YOLOv8n. By optimizing the anchor box regression path and gradient adjustment strategy, the PIoU2 loss function not only accelerates the model's convergence speed but also further improves the accuracy of the detection box.

[0055] In the Neck part, add the lightweight edge aggregation module (DBA) based on the selective edge aggregation module (SBA), such as Figure 4 As shown in the figure, by effectively combining shallow detail information with deep semantic information, the model's ability to accurately depict the target contour and accurately locate the target is significantly improved. In response to the high computational cost of SBA, DBA introduces depth-separable convolution to replace standard convolution, which reduces computational complexity while maintaining detection accuracy, and achieves more efficient edge feature processing and aggregation; in order to improve the detection accuracy and robustness of the model in complex scenes, the C2f feature fusion module in the YOLOv8n structure is improved. The Bottleneck in C2f has the problems of insufficient global context modeling and redundant receptive field interference, which limits its perception of small-sized targets. To this end, the CS_CAA module is proposed, and the Bottleneck structure is replaced by two series-connected CS_CAA modules to obtain the C2f_SCAA module, as shown in Figure 5 As shown in the figure, the C2f_SCAA module uses context fusion and attention mechanism to strengthen multi-scale feature perception and information interaction between channels, significantly suppresses redundant information interference, and improves the model's detection accuracy for small targets; in order to address the problem of reduced detection performance of corn plant roots caused by factors such as lighting changes, weed interference, and similar colors, the GAM module is introduced and optimized, as shown in the figure. Figure 6 As shown in the figure, the optimized GAM module integrates channel and spatial attention, enhancing the model's ability to express salient features and improving its adaptability and stability in complex environments. To address the problem of excessive redundant features in the GAM output stage, the optimized GAM module adds 1×1 point-by-point convolution, optimizes feature channel reorganization and compaction processing, reduces redundant features, and enhances feature integration capabilities, thereby improving the model's flexibility and adaptability.

[0056] After optimizing the model structure, in order to reduce the network parameter occupation and reduce the model complexity, the hierarchical adaptive sparsity pruning algorithm (LAMP) based on vector amplitude is introduced, such as Figure 7As shown in the figure, the algorithm quantifies the importance of parameters in the network layer and dynamically adjusts the pruning ratio, which not only retains the key feature expression ability but also effectively reduces redundant parameters, thereby improving the real-time performance of the model detection while ensuring the stability of the detection accuracy.

[0057] Specifically, the CS_CAA module adopts a residual structure design. It first transforms the input feature map into a set of concise regional feature maps through 3×3 ordinary convolutions. It then introduces a channel shuffle operation to improve the efficiency of inter-channel information exchange by rearranging channels, thereby enhancing the diversity of feature representation. Furthermore, the module combines the contextual anchor attention mechanism (CAA) to weight the shuffled feature maps, highlighting salient features and suppressing irrelevant information. Next, the CS_CAA module performs morphological filtering on the feature maps through a branch structure combined with dilated convolutions with different dilation rates. Different convolution operations process regional feature maps of different sizes based on specific receptive fields, avoiding interference from redundant receptive fields and ensuring the diversity and integrity of feature representation. Finally, the feature maps output by the branches are concatenated and fused through 1×1 pointwise convolutions. The introduction of pointwise convolutions not only changes the channel dimension but also integrates information between branches, making the fused features more compact and efficient. Finally, by performing a residual connection with the input feature map, the module preserves the detailed information of the input features and alleviates the vanishing gradient problem, resulting in the final output feature map.

[0058] Step 3: Based on the subordinate relationship filtering algorithm between the corn plant and the root detection frame, the root detection frame that overlaps with the plant detection frame is screened and isolated false detection frames are eliminated;

[0059] Define two types of labels: "seedling" (Class A) and "root" (Class B), and set Class A labels as the main detection objects and Class B labels as their subordinate objects. Design a subordinate relationship filtering algorithm based on the detection frame of corn plants and their roots to determine whether a Class B detection frame is subordinate to the Class A detection frame, such as Figure 8 As shown in Figure 2, the specific steps of the filtering algorithm are:

[0060] Model prediction results: The model trained on the training set images is used to predict the test set images. The prediction results can be divided into the following three cases: the root detection box is completely within any seedling detection box; there is partial overlap between the root detection box and any seedling detection box; there is no overlap between the root detection box and any seedling detection box in the image.

[0061] Detection box classification and information conversion: Based on the prediction results, the detection box is divided into seedling_box (category A) and root_box (category B) according to the category information.

[0062] The detection box output by the YOLO model uses a normalized format, defined as: {class, x center ,y center ,w,h};

[0063] Where: class represents the label category, 0 represents class A (seedling_box), 1 represents class B (root_box); (x center ,y center ) are the normalized coordinates of the center point of the detection frame; w, h are the normalized width and height of the detection frame.

[0064] In order to facilitate subsequent processing, the normalized coordinates {class,x center ,y center ,w,h} into a bounding box represented by pixel coordinates [x min ,y min ,x max ,y max ], the conversion formula is as follows:

[0065]

[0066] Where W and H are the width and height of the image respectively;

[0067] Determine whether there is overlap between two types of detection frames: Use the axis independence principle to determine whether the two detection frames have an intersection. If the detection frames intersect in both dimensions, they are considered to have an overlapping area and are associated detection frames. Otherwise, they are considered to have no overlapping area.

[0068] Hypothesized detection box and but:

[0069] like There is no intersection

[0070] like There is no intersection

[0071] Otherwise, there is an intersection;

[0072] Filter associated detection boxes and save the results: For each root detection box in root_box, traverse all seedling detection boxes in turn to determine whether there is an overlapping area. For the root detection box, if there is an intersection with any seedling_box detection box, then keep the root_box detection box as a subordinate object, otherwise discard it;

[0073] Finally, all seedling_box detection frames and the filtered root_box detection frames are saved together as the final prediction results of the detection frames.

[0074] The RS-YOLOv8 network predicts the image test set, and the detection results are saved in a label file. This label file is then filtered using a dependency relationship algorithm to effectively remove redundant root detection frames that are unrelated to the plant detection frames, improving the accuracy of the detection results. This filtering algorithm ensures that each retained root detection frame is associated with the plant detection frame, thereby better reflecting the spatial distribution characteristics of plants and roots in real-world scenarios.

[0075] Step 4: Based on the filtered detection frame, the region of interest (ROI) is extracted through the region screening algorithm, including determining the key detection frame, connecting the key points to form the boundary line, and filling the interference area;

[0076] Design a region screening algorithm to extract the region of interest (ROI) based on the filtered prediction results to determine whether a region should be removed. Figure 9 As shown in Figure 2, the specific steps of the region screening algorithm are:

[0077] Determine the spatial position of the seedling detection frame: Divide the detection frame into seedling_box (class A) and root_box (class B) according to the category information. According to the coordinates of the center point of each detection frame in the seedling_box (x center ,y center ) to determine its spatial position. The specific judgment conditions are:

[0078] like The seedling detection box is located on the left side of the image

[0079] Otherwise, the seedling detection box is located on the right side of the image;

[0080] Determine the key seedling detection box: on the left side of the image, select the seedling detection box closest to the center line as Left_Closest, and select the seedling detection box farthest and closest to the bottom edge of the image as Left_Farthest; on the right side of the image, select the seedling detection box closest to the center line as Right_Closest, and select the seedling detection box farthest and closest to the bottom edge as Right_Farthest;

[0081] Coordinate transformation: transform the YOLO normalized coordinates of the four detection boxes Left_Closest, Left_Farthest, Right_Closest, and Right_Farthest into {class,x center ,y center ,w,h} to pixel coordinates [xmin ,y min ,x max ,y max ]. Extract the upper left corner points of Left_Closest and Left_Farthest (Left_Closest_TL, Left_Farthest_TL), and the upper right corner points of Right_Closest and Right_Farthest (Right_Closest_TR, Right_Farthest_TR);

[0082] Connect key points to determine the region boundary: Connect Left_Closest_TL and Left_Farthest_TL to form the boundary line Left_Boundary. If Left_Boundary intersects the image boundary at fewer than two points, extend Left_Boundary until it intersects at two points. Similarly, connect Right_Closest_TR and Right_Farthest_TR to form the boundary line Right_Boundary, and perform similar processing.

[0083] Fill the interference area to extract the crop row: Use Left_Boundary to divide the image into left and right areas, and fill the left area with black. Use Right_Boundary to divide the image into left and right areas, and fill the right area with black. The black-filled area is the interference area, and the remaining area is the region of interest;

[0084] Using a region-based filtering algorithm on the label file after dependency filtering effectively identifies regions of interest relevant to the navigation task and eliminates interfering regions that lack navigation information. This algorithm optimizes the crop row extraction process, improving the accuracy and robustness of subsequent detection and navigation tasks.

[0085] Step 5: Extract the bottom center point of the root detection frame as the feature point, use the clustering algorithm to divide the crop ridge, and use the least squares method to fit the crop row line within the ROI to extract the navigation path.

[0086] The feature point coordinates are marked as (x0, y0), which are converted from the coordinates of the root detection box. The conversion formula is as follows:

[0087] x0=x center

[0088]

[0089] In the above formula, (x center ,y center) represents the center coordinate of the detection frame of the corn plant root, and height represents the height of the detection frame.

[0090] The clustering algorithm clusters the extracted feature points, grouping them together on the same ridge into the same cluster to facilitate subsequent line fitting. Given the small number of feature points in the data sample and the relatively uniform distribution of the data, the K-means clustering algorithm was chosen. K-means is a center-based clustering method whose core algorithm focuses on iteratively updating cluster centers to gradually minimize the distance from points within a cluster to the center, thereby effectively grouping the data.

[0091] The basic idea of ​​the least squares method is to find the line closest to all observations by minimizing the sum of squares of the errors between the fitted model and the observed data. Specifically, given n sets of observation point data (x i ,y i ), the goal of the least squares method is to minimize the following objective function:

[0092]

[0093] Among them, y i -(kx i +b) represents the vertical distance between the i-th observation point and the fitted straight line. By continuously adjusting the parameters k and b to minimize S, the best fitting straight line can be obtained.

[0094] Based on the clustering results and the least squares method, the expressions for the crop rows on the left and right sides of the ROI are as follows:

[0095] y1=k1x+b1

[0096] y2=k2x+b2

[0097] After fitting the crop row lines on the left and right sides, the intersection points of the fitted lines with the top of the image are L1 and R1, respectively, and the intersection points with the bottom of the image are L2 and R2, respectively. The intersection point of L1 and R1 is C1, and the intersection point of L2 and R2 is C2. Connecting C1 and C2 yields the center navigation path of the corn crop row.

[0098] Example 2:

[0099] A farmland navigation path extraction method based on a subordinate relationship filtering strategy includes the following steps:

[0100] Step 1: Create a dataset of corn crop rows under various growth environments. Figure 2As shown in the figure, the corn crop row images included in the dataset were captured at the experimental field of Jilin Agricultural University in Changchun, Jilin Province (125.41°E, 43.81°N). The images were taken from May 25 to June 15, 2024, under various growth conditions, including normal growth, weed coexistence, adhesion growth, and seedling-missing growth. A total of 1422 original images were collected, and the dataset was divided into training, validation, and test sets in an 8:1:1 ratio. The dataset was annotated using the labeling tool Labelimg, focusing on corn plants and their roots. Due to the frequent adhesion and mutual occlusion between leaves during corn growth, some individual plants are difficult to accurately label. Therefore, in some scenes, multiple corn plants are labeled as a whole. To increase data diversity and better extract key features of corn plants and their roots, the dataset images were augmented with data such as horizontal flipping, noise, and motion blur. The enhanced dataset contains 5682 images.

[0101] Step 2: Input the divided training set images into the RS-YOLOv8 network for training, save the trained weight file, use the weight file to predict the test set images, and save the prediction results to the label file. The RS-YOLOv8 network structure diagram and its internal module diagram are shown in the figure. Figure 3 shown.

[0102] The RS-YOLOv8 detection model uses the CSPDarknet in the YOLOv8 network as the backbone, extracts features from the input image (640×640), and extracts feature maps of four different sizes, including feature1 (160×160), feature2 (80×80), feature3 (40×40), and feature4 (20×20). After the feature map enters the neck, feature4 is upsampled and fused with feature3 to obtain feature map feature5. Feature5 is then processed by the C2f module and upsampled and combined with feature2 to obtain feature map feature6. Feature6 is further upsampled after being processed by the C2f module and combined with feature1 to obtain feature map feature7. Feature7 is used as the input of the C2f-SCAA module. After processing by the C2f-SCAA module, the model It can improve the detection accuracy and robustness of small-sized targets in complex scenes. The feature map processed by the C2f-SCAA module is used as the input of the GAM. This operation can solve the problems faced by the model when detecting corn plant roots in complex environments, such as the similar color of roots and soil, lighting changes, and weed interference. The feature map processed by the GAM module is input into the head part of YOLO for classified target detection (160×160). The feature map processed by the GAM module is downsampled and fused with the feature map in the upsampling process. The fused feature map is then processed by the C2f module and the output feature map is input into the head part of YOLO for classified target detection (80×80). The feature map is further downsampled and fused in the same way, and the output feature maps are successively input into the head part of YOLO for classified target detection (40×40 and 20×20). The DBA module in the neck can improve the model's ability to capture edge and detail features when detecting small targets such as corn plant roots.

[0103] The specific training process of the RS-YOLOv8 detection network model is explained as follows:

[0104] The constructed dataset was fed into the model for training. The learning rate was set to 0.01, and SGD was used as the optimizer. The training process involved 200 iterations, a batch size of 32, a momentum of 0.937, and a weight decay of 0.0005.

[0105] In step 3, the position information of the two types of detection frames stored in the label file saved in step 2 is used to analyze the correlation between the two types of detection frames, identify and remove isolated root detection frames that are not in line with reality, and thus further improve the detection accuracy of the root detection frames. The specific steps of the subordinate relationship filtering algorithm based on the corn plant and its root detection frames are as follows:

[0106] Model prediction results: The model trained on the training set images is used to predict the test set images. The prediction results can be divided into the following three cases: the root detection box is completely within any seedling detection box; there is partial overlap between the root detection box and any seedling detection box; there is no overlap between the root detection box and any seedling detection box in the image.

[0107] Detection box classification and information conversion: Based on the prediction results, the detection box is divided into seedling_box (category A) and root_box (category B) according to the category information.

[0108] The detection box output by the YOLO model uses a normalized format, defined as: {class, x center ,y center ,w,h}

[0109] Where: class represents the label category, 0 represents class A (seedling_box), 1 represents class B (root_box); (x center ,y center ) are the normalized coordinates of the center point of the detection frame; w, h are the normalized width and height of the detection frame.

[0110] In order to facilitate subsequent processing, the normalized coordinates {class,x center ,y center ,w,h} into a bounding box represented by pixel coordinates [x min ,y min ,x max ,y max ], the conversion formula is as follows:

[0111]

[0112]

[0113] Where W and H are the width and height of the image respectively;

[0114] Determine whether there is overlap between two types of detection frames: Use the axis independence principle to determine whether the two detection frames have an intersection. If the detection frames intersect in both dimensions, they are considered to have an overlapping area and are associated detection frames. Otherwise, they are considered to have no overlapping area.

[0115] Hypothesized detection box and but:

[0116] like There is no intersection

[0117] like There is no intersection

[0118] Otherwise, there is an intersection;

[0119] Filter associated detection boxes and save the results: For each root detection box in root_box, traverse all seedling detection boxes in turn to determine whether there is an overlapping area. For the root detection box, if there is an intersection with any seedling_box detection box, then keep the root_box detection box as a subordinate object, otherwise discard it;

[0120] Finally, all seedling_box detection frames and the filtered root_box detection frames are saved together as the final prediction results of the detection frames.

[0121] The label file processed by the filtering algorithm can effectively remove redundant root detection frames that are not related to the plant detection frame, improving the accuracy of the detection results. It also provides a new approach to solving the problem of false detection that is prone to occur in target detection models in complex scenes.

[0122] Step 4: Extract the region of interest (ROI) based on the label file filtered in step 3. The specific steps of the region screening algorithm are as follows: Figure 9 As shown in the figure, based on the image prediction, by screening out the regions of interest related to the navigation task and eliminating the interference areas that do not contain navigation information, the crop row extraction process can be further optimized, and the accuracy and robustness of subsequent detection and navigation tasks can be improved. The specific steps of the region screening algorithm for extracting the region of interest (ROI) based on the detection results are as follows:

[0123] Determine the spatial position of the seedling detection frame: Divide the detection frame into seedling_box (class A) and root_box (class B) according to the category information. According to the coordinates of the center point of each detection frame in the seedling_box (x center ,y center ) to determine its spatial position. The specific judgment conditions are:

[0124] like The seedling detection box is located on the left side of the image

[0125] Otherwise, the seedling detection box is located on the right side of the image;

[0126] Determine the key seedling detection box: on the left side of the image, select the seedling detection box closest to the center line as Left_Closest, and select the seedling detection box farthest and closest to the bottom edge of the image as Left_Farthest; on the right side of the image, select the seedling detection box closest to the center line as Right_Closest, and select the seedling detection box farthest and closest to the bottom edge as Right_Farthest;

[0127] Coordinate transformation: transform the YOLO normalized coordinates of the four detection boxes Left_Closest, Left_Farthest, Right_Closest, and Right_Farthest into {class,x center ,y center ,w,h} to pixel coordinates [x min ,y min ,x max ,y max ]. Extract the upper left corner points of Left_Closest and Left_Farthest (Left_Closest_TL, Left_Farthest_TL), and the upper right corner points of Right_Closest and Right_Farthest (Right_Closest_TR, Right_Farthest_TR);

[0128] Connect key points to determine the region boundary: Connect Left_Closest_TL and Left_Farthest_TL to form the boundary line Left_Boundary. If Left_Boundary intersects the image boundary at fewer than two points, extend Left_Boundary until it intersects at two points. Similarly, connect Right_Closest_TR and Right_Farthest_TR to form the boundary line Right_Boundary, and perform similar processing.

[0129] Fill the interference area to extract the crop row: Use Left_Boundary to divide the image into left and right areas, and fill the left area with black. Use Right_Boundary to divide the image into left and right areas, and fill the right area with black. The black-filled area is the interference area, and the remaining area is the region of interest;

[0130] A region-of-interest (ROI) extraction algorithm based on the filtered label file ensures accurate crop row extraction by eliminating irrelevant interference areas. This optimizes the crop row extraction process and improves the accuracy and robustness of subsequent detection and navigation tasks.

[0131] Step 5, Figure 10 The following figures show the results of crop row line and navigation path extraction under various growing conditions, including normal growth, weed coexistence, clumping growth, and seedling-missing growth. The model's performance in detecting corn navigation paths under these four growing conditions was compared with manually demarcated lines. The figures show that the model demonstrates excellent detection performance for corn rows in all four growing conditions, effectively overcoming the challenges posed by complex environments to navigation path extraction.

[0132] The feature point coordinates are marked as (x0, y0), which are converted from the coordinates of the root detection box. The conversion formula is as follows:

[0133] x0=x center

[0134]

[0135] In the above formula, (x center ,y center ) represents the center coordinate of the detection frame of the corn plant root, and height represents the height of the detection frame.

[0136] The clustering algorithm clusters the extracted feature points, grouping them together on the same ridge into the same cluster to facilitate subsequent line fitting. Given the small number of feature points in the data sample and the relatively uniform distribution of the data, the K-means clustering algorithm was chosen. K-means is a center-based clustering method whose core algorithm focuses on iteratively updating cluster centers to gradually minimize the distance from points within a cluster to the center, thereby effectively grouping the data.

[0137] The basic idea of ​​the least squares method is to find the line closest to all observations by minimizing the sum of squares of the errors between the fitted model and the observed data. Specifically, given n sets of observation point data (x i ,y i ), the goal of the least squares method is to minimize the following objective function:

[0138]

[0139] Among them, y i -(kx i +b) represents the vertical distance between the i-th observation point and the fitted straight line. By continuously adjusting the parameters k and b to minimize S, the best fitting straight line can be obtained.

[0140] Based on the clustering results and the least squares method, the expressions for the crop rows on the left and right sides of the ROI are as follows:

[0141] y1=k1x+b1

[0142] y2=k2x+b2

[0143] After fitting the crop row lines on the left and right sides, the intersection points of the fitted lines with the top of the image are L1 and R1, respectively, and the intersection points with the bottom of the image are L2 and R2, respectively. The intersection point of L1 and R1 is C1, and the intersection point of L2 and R2 is C2. Connecting C1 and C2 yields the center navigation path of the corn crop row.

[0144] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A farmland navigation path extraction method based on a subordination filtering strategy, characterized in that: The following steps are involved: Step 1: Create a dataset of corn crop rows under various growth environments, use annotation tools to annotate the corn plants and their roots, and perform data augmentation on the dataset; Step 2: Detect plants and roots using the RS-YOLOv8 lightweight model; Step 3: Based on the subordinate relationship filtering algorithm between the corn plant and the root detection frame, the root detection frame that overlaps with the plant detection frame is screened and isolated false detection frames are eliminated; Step 4: Based on the filtered detection frame, the region of interest is extracted through the region screening algorithm, including determining the key detection frame, connecting the key points to form the boundary line, and filling the interference area; Step 5: Extract the bottom center point of the root detection frame as the feature point, use the clustering algorithm to divide the crop ridge, and use the least squares method to fit the crop line within the ROI to extract the navigation path; In step 2, we improve the YOLOv8 model and build the RS-YOLOv8 model. The improvements include: Add a tiny detection head module to the detection head to improve the small target detection capability, and replace the loss function with PIoU2; The lightweight edge aggregation module DBA, C2f_SCAA module and optimized GAM module are introduced into the neck network to enhance edge feature extraction, multi-scale perception and anti-interference capabilities; A hierarchical adaptive sparsity pruning algorithm is used to lightweight the model.

2. The farmland navigation path extraction method based on the subordination relationship filtering strategy according to claim 1 is characterized in that: The C2f_SCAA module replaces the original Bottleneck structure by connecting two CS_CAA modules in series. The CS_CAA module includes channel shuffling, contextual anchor attention, and dilated convolution branches to enhance multi-scale feature interaction. The optimized GAM module adds 1×1 point-by-point convolution at the output stage to reduce redundant features; The lightweight edge aggregation module uses depthwise separable convolution instead of standard convolution to reduce computational complexity.

3. The farmland navigation path extraction method based on the subordination relationship filtering strategy according to claim 1 is characterized in that: In step 1, when labeling, multiple adhered plants are labeled as a whole, and the root detection frame is focused on the root area close to the ground surface; Data enhancement includes horizontal flipping, noise addition, and motion blur.

4. The farmland navigation path extraction method based on the subordination relationship filtering strategy according to claim 1 is characterized in that: In step 3, the specific steps of the subordination relationship filtering algorithm include: Classify the detection boxes into class A and class B, and treat class B as the subordinate object; Determine whether the B-type detection box intersects with any A-type detection box. If so, retain it; otherwise, remove it. The intersection judgment condition is that the two detection frames have overlapping areas in both the horizontal and vertical directions.

5. The farmland navigation path extraction method based on the subordination relationship filtering strategy according to claim 1 is characterized in that: In step 4, the region screening algorithm includes: Divide the image into left and right sides based on the center point of the seedling detection frame, and select the key detection frames close to the center line and bottom edge on the left and right sides; Connect the corner points of the key detection box to form a boundary line, extend the boundary line to intersect with the edge of the image, and fill the area outside the boundary line as the interference area.

6. The farmland navigation path extraction method based on the subordination relationship filtering strategy according to claim 1 is characterized in that: In step 5, the feature point coordinates (x0, y0) are converted from the coordinates of the root detection box. The conversion formula is as follows: x0=x center ; Among them, (x center ,y center ) represents the center coordinate of the detection frame of the corn plant root, and height represents the height of the detection frame; The K-means algorithm is used to cluster the feature points, and the same cluster corresponds to a crop ridge; The crop lines on the left and right sides are fitted using the least squares method, and the line connecting their top and bottom intersections is calculated as the navigation path.

Citation Information

Patent Citations

  • Corn rhizome navigation datum line extraction method based on navigation trend line

    CN112712534A

  • Intelligent agricultural machine path planning method and device based on remote sensing image and deep learning

    CN116882612A