Wheat seedling row centerline detection method based on improved YOLOv3

By improving the YOLOv3 target detection model and feature point extraction technology, the problem of extracting the center line of wheat seedlings in complex environments in wheat fields is solved, and more accurate and stable detection of the center line of wheat seedlings is achieved, and the navigation and operation efficiency of intelligent agricultural machinery is improved.

CN114612899BActive Publication Date: 2025-04-29QINGDAO UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210261479.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2025-04-29
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

In wheat fields, under complex situations such as the changes in the shape of wheat seedlings over time, weeds, shadows and light, it is difficult to accurately extract the center line of wheat seedlings, affecting the independent navigation and operating efficiency of intelligent agricultural machinery.

Method used

The center line detection method for wheat seedlings based on improved YOLOv3 is adopted, which includes improving YOLOv3 target detection model to detect wheat seedlings, extracting characteristic points of wheat seedlings using grayscale threshold, extracting the center point of wheat seedlings in a circular scanning window, and fitting the center line through the least squares method.

Benefits of technology

This method can extract the center line of wheat seedlings more accurately and stably in complex environments, with wider adaptability and improves the navigation and operation efficiency of intelligent agricultural machinery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114612899B_ABST
    Figure CN114612899B_ABST
Patent Text Reader

Abstract

The present invention provides a wheat seedling row centerline detection method based on improved YOLOv3, and the wheat seedling row centerline detection method based on improved YOLOv3 comprises: step 1, using improved YOLOv3 target detection model to detect wheat seedling rows; step 2, using defined gray threshold to extract wheat seedling feature points in a detection frame; step 3, using a circular scanning window to extract the center point of the wheat seedling row; step 4, using the least square method to fit the center points of each column of wheat seedlings respectively, and extracting the center line of each column of wheat seedlings. The wheat seedling row centerline detection method based on improved YOLOv3 is not affected by weeds, shadows and light changes, and is also suitable for wheat seedling images with a certain yaw angle. Therefore, the wheat seedling row centerline detection method based on improved YOLOv3 is more adaptable and stable, and provides a technical reference for visual navigation of intelligent agricultural machinery in wheat fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent agricultural machinery visual navigation, and in particular to a wheat seedling row centerline detection method based on improved YOLOv3. Background Art

[0002] As one of the world's major food crops, the stability and increase of wheat production are of great significance to the world's food security and the guarantee of people's living standards. Studies have shown that taking measures such as root cutting, fertilization, and weeding between wheat seedlings in the early stage can increase wheat yield. However, field operations in the past were mainly completed by manual or low-automation machinery, which is labor-intensive, inefficient and costly. As an important part of precision agriculture, intelligent agricultural machinery visual navigation technology has received more and more attention and has been applied to crop sowing, weeding, harvesting and other links. However, the complex conditions such as the change of wheat seedling morphology over time, weeds, shadows, and light changes in wheat fields have a certain impact on the extraction of the center line of wheat seedling rows. The accurate and stable extraction of the center line of wheat seedling rows can provide a reference for the autonomous navigation and operation of agricultural machinery in wheat fields. To this end, we invented a new wheat seedling row center line detection method based on improved YOLOv3. Summary of the invention

[0003] The purpose of the present invention is to provide a wheat seedling row centerline detection method based on improved YOLOv3 to provide a technical reference for early wheat field intelligent agricultural machinery visual navigation.

[0004] The object of the present invention can be achieved by the following technical measures: a wheat seedling row centerline detection method based on improved YOLOv3, the wheat seedling row centerline detection method based on improved YOLOv3 includes:

[0005] Step 1: Detect wheat seedling rows using the improved YOLOv3 target detection model;

[0006] Step 2, extracting wheat seedling feature points in the detection frame using the defined grayscale threshold;

[0007] Step 3, using a circular scanning window to extract the center point of the wheat seedling row;

[0008] Step 4, using the least square method to fit the center points of each row of wheat seedlings respectively, and extract the center lines of each row of wheat seedlings;

[0009] In step 1, the wheat seedling images used for model training should be taken during the wheat wintering period and the greening period; the camera head should be 100-150 cm above the ground; the angle between the camera optical axis and the horizontal line should be 30°-60°; the shooting yaw angle should be 0°-30°; the images should be taken in different directions along the wheat seedling row; multiple resolutions should be used for shooting; the images taken should contain a variety of conditions, including weeds, shadows, different lighting, etc.

[0010] In step 1, the collected images are expanded, including changing brightness, rotating, mirroring, adding noise, etc.; through the above operations, a wheat seedling image database is established.

[0011] In step 1, the bounding box output by the YOLOv3 model is improved from the original horizontal bounding box to a rotatable bounding box. The annotation parameters of the rotated bounding box are expressed as (x, y, w, h, α), where (x, y) represents the coordinates of the center point of the box, w and h represent the width and height of the box before rotation, and α represents the angle of the bounding box rotated clockwise around the center point (x, y), in radians, and its value range is [0, π).

[0012] In step 1, based on the annotation information, the K-means algorithm is used to cluster the size and rotation angle of the bounding box respectively. The size of the bounding box is divided into 9 cluster center points, and the rotation angle parameter of the bounding box is divided into 6 cluster center points.

[0013] In step 1, the loss function of the model needs to be changed. The part related to multi-classification prediction is removed from the loss function. At the same time, the smooth L1 function is used to represent the loss of angle prediction. The specific formula is as follows:

[0014] Loss = L α +L x,y +L w,h +L conf

[0015]

[0016]

[0017]

[0018]

[0019]

[0020] Among them, S 2 represents the size of the output feature map (S=13, 26, 52). B represents the number of candidate bounding boxes for each grid in the feature map (B=3×6). Indicates whether the jth candidate bounding box in the i-th grid is responsible for target detection. If so, Otherwise 0. The opposite is true. Represent the predicted rotation angle and the actual rotation angle of the jth candidate bounding box in the i-th grid. coord ,λnoobj They are used to balance the training losses of bounding box and confidence respectively. They represent the predicted coordinates and true coordinates of the center point of the jth candidate bounding box in the i-th grid respectively. They represent the predicted values ​​of the j-th candidate bounding box size in the i-th grid. They represent the true value of the size of the jth candidate bounding box in the i-th grid. They represent the predicted confidence and true confidence of the target in the jth candidate bounding box in the i-th grid respectively.

[0021] In step 2, the model only outputs values ​​with a height greater than The image is converted to a grayscale image through the H channel in the HLS color space, and the method for extracting wheat seedling feature points is as follows:

[0022]

[0023] Among them, grey i,j is the gray value of the image at point (i, j). T is the gray threshold, which is related to the growth stage of the wheat seedling. i,j =1, it means that point (i, j) is a wheat seedling feature point.

[0024] In step 3, a circular scanning window is defined, which is scanned from the midpoint of the upper edge of the bounding box to the midpoint of the lower edge of the bounding box along a straight line. During the scanning process, the mean point of the feature points inside the window is calculated and used as the center point of the wheat seedling row.

[0025] In step 3, the position coordinates of the four vertices of the bounding box before rotation are calculated based on the center point (x, y) of the rotated bounding box output by the model and the parameters such as the width w and height h of the box, which are the upper left vertex Top right vertex Bottom right vertex Bottom left vertex Then, the coordinates of the four vertices of the bounding box after rotation are calculated according to the rotation angle α The calculation method is as follows:

[0026]

[0027]

[0028] Where (x i ,y i ) is the vertex coordinate before rotation, are the coordinates of the rotated vertices, i=1, 2, 3, 4.

[0029] In step 3, the starting point and end point of the circular window movement are the center points of the upper edge and the lower edge of the rotation bounding box, respectively, and the circular window moves along the straight line connecting the two points. The starting point and the end point of the movement are related to the rotation angle α. When the starting point is and The midpoint of and The midpoint of When the starting point is and The midpoint of and The midpoint of the moving path. Based on the starting point and the end point, the moving path equation can be calculated. When α=0, the path equation is X=x. When 0<α<π, the path equation is Y=k*X+b, where

[0030] In step 3, the circular window is The radius of the circle is centered at the starting point and scans along the selected path. Each time it moves to a new position, the average values ​​of the horizontal and vertical coordinates of all the points in the circular window are calculated and used as the center point of the wheat seedling row.

[0031] In step 4, the least squares method is used to fit the center points of the wheat seedling rows.

[0032] In step 4, a comprehensive method of angle and distance is used to evaluate the extraction effect of the center line of the wheat seedling row. The calculation method is as follows:

[0033]

[0034]

[0035]

[0036]

[0037] Where θ represents the angle error between the extracted center line of the wheat seedling row and the accurate center line of the wheat seedling row, d 1 Indicates the distance from the intersection of the extracted wheat seedling row centerline and the upper edge of the image to the exact wheat seedling row centerline, d 2 Indicates the distance from the intersection of the extracted wheat seedling row centerline and the lower edge of the image to the exact wheat seedling row centerline. represents the distance error between the extracted wheat seedling row centerline and the accurate wheat seedling row centerline, k 1 k represents the slope of the center line of the wheat seedling row extracted by the straight line. 2 、b 2 They respectively represent the slope and intercept of the exact center line of the wheat seedling row.

[0038] The method for detecting the center line of a row of wheat seedlings based on improved YOLOv3 in the present invention has the following specific steps: using the improved YOLOv3 target detection model to detect rows of wheat seedlings; using a defined grayscale threshold to extract wheat seedling feature points in a detection frame; using a circular scanning window to extract the center point of the row of wheat seedlings; using the least squares method to fit the center points of each column of wheat seedlings respectively, and extracting the center line of each column of wheat seedlings. The method for detecting the center line of a row of wheat seedlings based on improved YOLOv3 has wider adaptability and is more stable. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flowchart of a specific embodiment of the wheat seedling row centerline detection method based on improved YOLOv3 of the present invention;

[0040] Figure 2 It is a schematic diagram of annotation parameters of a rotating bounding box in an improved YOLOv3 model in a specific embodiment of the present invention;

[0041] Figure 3 This is a result diagram of detecting wheat seedling rows using an improved YOLOv3 model in a specific embodiment of the present invention;

[0042] Figure 4 A schematic diagram of a feature point extraction process in a specific embodiment of the present invention;

[0043] Figure 5 A result diagram of feature point extraction in a specific embodiment of the present invention;

[0044] Figure 6 A schematic diagram of a center point extraction process in a specific embodiment of the present invention;

[0045] Figure 7 A result diagram of center point extraction in a specific embodiment of the present invention;

[0046] Figure 8 It is a schematic diagram of a method for evaluating the center line of a wheat seedling row in a specific embodiment of the present invention;

[0047] Fig. 9 This is a rendering of the effect of extracting the center lines of wheat seedling rows at different growth times using a wheat seedling row center line detection method based on improved YOLOv3 in a specific embodiment of the present invention;

[0048] Fig.10 This is a rendering of the effect of extracting the center line of a row of wheat seedlings in different environments using a wheat seedling row center line detection method based on an improved YOLOv3 in a specific embodiment of the present invention;

[0049] Fig.11This is a rendering of the effect of extracting the center lines of wheat seedling rows at different rotation angles using a wheat seedling row center line detection method based on improved YOLOv3 in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0050] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations and / or combinations thereof.

[0052] like Figure 1 As shown, Figure 1 The flowchart of the wheat seedling row centerline detection method based on improved YOLOv3 of the present invention. The wheat seedling row centerline detection method based on improved YOLOv3 includes:

[0053] (1) Detect wheat seedling rows using the improved YOLOv3 target detection model;

[0054] (2) Extracting wheat seedling feature points in the detection frame using the defined grayscale threshold;

[0055] (3) Using a circular scanning window to extract the center point of the wheat seedling row;

[0056] (4) Use the least squares method to fit the center points of each column of wheat seedlings and extract the center lines of each column of wheat seedlings.

[0057] The following are several specific embodiments of the present invention.

[0058] Example 1

[0059] In a specific embodiment 1 of the present invention, the wheat seedling row centerline detection method based on improved YOLOv3 includes:

[0060] Step 1. The wheat seedling images used for model training should be taken during the wheat wintering period and the greening period; the camera head should be 100-150cm away from the ground; the angle between the camera optical axis and the horizontal line should be 30°-60°; the shooting yaw angle should be 0°-30°; shooting should be carried out in different directions along the wheat seedling row; shooting should be carried out with multiple resolutions; the captured images should contain a variety of situations, including weeds, shadows, different lighting, etc. Expand the collected images, including changing brightness, rotating, mirroring, adding noise, etc.; through the above operations, establish a wheat seedling image database. The bounding box output by the YOLOv3 model is improved from the original horizontal bounding box to a rotatable bounding box. The annotation parameters of the rotated bounding box are expressed as (x, y, w, h, α), such as Figure 2 As shown in the figure, (x, y) represents the coordinates of the center point of the box, w and h represent the width and height of the box before rotation, and α represents the angle of rotation of the bounding box around the center point (x, y) in the clockwise direction. Its unit is radians and its value range is [0, π). Based on the annotation information, the K-means algorithm is used to cluster the size and rotation angle of the bounding box respectively. The size of the bounding box is divided into 9 cluster centers, and the rotation angle parameters of the bounding box are divided into 6 cluster centers. The loss function of the model needs to be changed. The part related to multi-classification prediction in the loss function is removed. At the same time, the smooth L1 function is used to represent the loss of angle prediction. The specific formula is as follows:

[0061] Loss = L α +L x,y +L w,h +L conf

[0062]

[0063]

[0064]

[0065]

[0066]

[0067] Among them, S 2 represents the size of the output feature map (S=13, 26, 52). B represents the number of candidate bounding boxes for each grid in the feature map (B=3×6). Indicates whether the jth candidate bounding box in the i-th grid is responsible for target detection. If so, Otherwise 0. The opposite is true. Represent the predicted rotation angle and the actual rotation angle of the jth candidate bounding box in the i-th grid. coord ,λ noobj They are used to balance the training losses of bounding box and confidence respectively. They represent the predicted coordinates and true coordinates of the center point of the jth candidate bounding box in the i-th grid respectively. They represent the predicted values ​​of the j-th candidate bounding box size in the i-th grid. They represent the true value of the size of the jth candidate bounding box in the i-th grid. They represent the predicted confidence and true confidence of the target in the jth candidate bounding box in the i-th grid respectively.

[0068] Figure 3 This is the result of wheat seedling row detection. It can be seen from the figure that the output bounding box locates the wheat seedling row accurately.

[0069] Step 2: The model only outputs values ​​with a height greater than The bounding box of Figure 4 As shown in the figure, the image is converted to a grayscale image through the H channel in the HLS color space, and the method for extracting the wheat seedling feature points is as follows:

[0070]

[0071] Among them, grey i,j is the gray value of the image at point (i, j). T is the gray threshold, which is related to the growth stage of the wheat seedling. i,j =1, it means that point (i, j) is a wheat seedling feature point.

[0072] Figure 5 This is the result of feature point extraction. It can be seen from the figure that the contour points of the wheat seedling leaves have been roughly extracted.

[0073] Step 3, such as Figure 6 As shown in the figure, a circular scanning window is defined, which scans from the midpoint of the upper edge of the bounding box to the midpoint of the lower edge of the bounding box along a straight line. During the scanning process, the mean point of the feature points (solid points) inside the window is calculated and used as the center point of the wheat seedling row (hollow point). According to the center point (x, y) of the rotated bounding box output by the model and the parameters such as the width w and height h of the box, the position coordinates of the four vertices of the bounding box before rotation are calculated, which are the upper left vertex, Top right vertex Bottom right vertex Bottom left vertex Then, the coordinates of the four vertices of the bounding box after rotation are calculated according to the rotation angle α The calculation method is as follows: Where (x i ,y i ) is the vertex coordinate before rotation, is the vertex coordinate after rotation, i = 1, 2, 3, 4. The starting point and end point of the circular window movement are the center points of the upper and lower edges of the rotation boundary box, and it moves along the straight line connecting the two points. The starting point and end point of the movement are related to the rotation angle α. When the starting point is and The midpoint of and The midpoint of When the starting point is and The midpoint of and The midpoint of the moving path. Based on the starting point and the end point, the moving path equation can be calculated. When α=0, the path equation is X=x. When 0<α<π, the path equation is Y=k*X+b, where Round window with The radius of the circle is centered at the starting point and scans along the selected path. Each time it moves to a new position, the average values ​​of the horizontal and vertical coordinates of all the points in the circular window are calculated and used as the center point of the wheat seedling row. Figure 7 For Figure 5 The center points of the wheat seedling rows are extracted based on the .

[0074] Step 4: Fit the center point of the wheat seedling row using the least squares method. A comprehensive method of angle and distance is used to evaluate the extraction effect of the wheat seedling row center line. The calculation method is as follows:

[0075]

[0076]

[0077]

[0078]

[0079] Where θ represents the angle error between the extracted center line of the wheat seedling row and the accurate center line of the wheat seedling row, d 1 Indicates the distance from the intersection of the extracted wheat seedling row centerline and the upper edge of the image to the exact wheat seedling row centerline, d 2 Indicates the distance from the intersection of the extracted wheat seedling row centerline and the lower edge of the image to the exact wheat seedling row centerline. represents the distance error between the extracted wheat seedling row centerline and the accurate wheat seedling row centerline, k 1k represents the slope of the center line of the wheat seedling row extracted by the straight line. 2 , b 2 Respectively represent the slope and intercept of the exact center line of the wheat seedling row. Figure 8 As shown in the figure, Line1 (dashed line) represents the extracted center line of the wheat seedling row, Line2 (solid line) represents the accurate center line of the wheat seedling row, θ represents the angle between the two lines, A and B represent the intersection points of the two lines with the upper edge of the image, C and D represent the intersection points of the two lines with the lower edge of the image, and d 1 d2 represents the distance from point A to Line 2, and d3 represents the distance from point C to Line 1.

[0080] By testing and counting 200 wheat seedling images in the test set, the average angle error is 0.82° and the average distance error is 12.16 pixels.

[0081] Embodiment 2:

[0082] In the specific embodiment 2 of the present invention, wheat seedling images are selected from wheat seedling pictures taken at four time points, namely, 2021.02.25, 2021.03.11, 2021.03.25, and 2021.04.07, and the wheat seedling row centerline detection method based on the improved YOLOv3 is used for testing. Fig. 9 As shown in the figure, it can be seen that the wheat seedlings at the first time point have just started to grow after winter, and the outline of the wheat seedling row is clear. The improved YOLOV3 model can accurately detect the position of the wheat seedling row, and the extracted center line of the wheat seedling row is relatively accurate. As the wheat seedlings grow, the wheat seedling row becomes wider and wider, and the leaves of some adjacent rows of wheat seedlings have crossed together, but the model can still detect the approximate position of the wheat seedling row, and the extracted center line of the wheat seedling row can represent the wheat seedlings in the corresponding row to a certain extent.

[0083] Embodiment 3:

[0084] In the specific embodiment 3 of the present invention, in order to verify the adaptability of the wheat seedling row centerline detection method based on the improved YOLOv3 to the wheat field environment, images with weeds, shadows, strong light, and dark light were selected from the image set for testing. Fig.10 It can be seen that the detection of wheat seedling rows and the extraction of center lines are not affected. Therefore, the wheat seedling row center line detection method based on improved YOLOv3 has a certain degree of anti-interference to weeds, shadows and light changes.

[0085] Embodiment 4:

[0086] In the specific embodiment 4 of the present invention, the influence of the yaw angle during the shooting process on the wheat seedling row centerline detection method based on the improved YOLOv3 is verified. In reality, when agricultural machinery is working in the field, it is inevitable that there will be a certain yaw angle in the image acquisition process due to uneven ground, mechanical vibration and possible linear errors in crop rows. Therefore, a stable crop row centerline extraction method should also be applicable to images acquired when the camera yaw angle is not 0. Here, images with a certain yaw angle are simulated by rotating the image set at different angles. Fig.11 The results of wheat seedling row centerline extraction when the image is rotated 10°, 20°, and 30°. It can be seen from the figure that the rotation of the image does not have much effect on the extraction of wheat seedling row lines. Therefore, the wheat seedling row centerline detection method based on the improved YOLOv3 has a certain adaptability to wheat seedling images with yaw angles.

[0087] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0088] Except for the technical features described in the specification, all other technical features are known technologies to those skilled in the art.

Claims

1. A wheat seedling row centerline detection method based on improved YOLOv3, characterized in that: The wheat seedling row centerline detection method based on improved YOLOv3 includes: Step 1: Detect wheat seedling rows using the improved YOLOv3 target detection model; Step 2, using the defined grayscale threshold to extract wheat seedling feature points in the bounding box of the wheat seedling row output by the target detection model; Step 3, using a circular scanning window to extract the center point of the wheat seedling row; Step 4, using the least square method to fit the center points of each row of wheat seedlings respectively, and extract the center lines of each row of wheat seedlings; In step 1, the bounding box output by the YOLOv3 model is improved from the original horizontal bounding box to a rotatable bounding box; In step 1, remove the part of the model's loss function related to multi-classification prediction, and use the smooth L1 function to represent the loss of angle prediction; In step 3, a circular scanning window is defined, which scans from the midpoint of the upper edge of the bounding box to the midpoint of the lower edge of the bounding box along a straight line; during the scanning process, the mean point of the feature points inside the window is calculated and used as the center point of the wheat seedling row.

2. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 1, characterized in that: In step 1, the wheat seedling images used for model training were taken in two time periods: the wheat wintering period and the greening period; the camera head was 100-150 cm above the ground; the angle between the camera optical axis and the horizontal line was 30°-60°; the yaw angle of the shooting was 0°-30°; the images were taken in different directions along the wheat seedling row; and the images were taken at multiple resolutions; In step 1, the collected images are expanded to establish a wheat seedling image database.

3. The wheat seedling row centerline detection method based on improved YOLOv3 according to claim 1, characterized in that: In step 1, the annotation parameters of the rotated bounding box are expressed as (x, y, w, h, α), where (x, y) represents the coordinates of the center point of the box, w and h represent the width and height of the box before rotation, respectively, and α represents the angle of rotation of the bounding box around the center point (x, y) in a clockwise direction, in radians, with a value range of [0, π].

4. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 1, characterized in that: In step 1, based on the annotation information, the K-means algorithm is used to cluster the size and rotation angle of the bounding box respectively. The size of the bounding box is divided into 9 cluster center points, and the rotation angle parameter of the bounding box is divided into 6 cluster center points.

5. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 1, characterized in that: In step 1, the smooth L1 function is used to represent the loss of angle prediction. The specific formula is as follows: Loss=L α +L x,y +L w,h +L conf Among them, S 2 represents the size of the output feature map (S=13, 26, 52); B represents the number of candidate bounding boxes for each grid in the feature map (B=3×6); Indicates whether the jth candidate bounding box in the i-th grid is responsible for target detection. If so, Otherwise, it is 0. The opposite is true of its situation; Respectively represent the predicted rotation angle and the actual rotation angle of the jth candidate bounding box in the i-th grid; λ coord ,λ noobj Used to balance the training loss of bounding box and confidence respectively; Represent the predicted coordinates and true coordinates of the center point of the jth candidate bounding box in the i-th grid respectively; They represent the predicted values ​​of the jth candidate bounding box size in the i-th grid respectively; Represent the true value of the size of the jth candidate bounding box in the i-th grid; They represent the predicted confidence and true confidence of the target in the jth candidate bounding box in the i-th grid respectively.

6. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 1, characterized in that: In step 2, the model only outputs values ​​with a height greater than The image is converted to a grayscale image through the H channel in the HLS color space, and the method for extracting wheat seedling feature points is as follows: Among them, grey i,j is the gray value of the image at point (i, j), T is the gray threshold, which is related to the growth stage of the wheat seedling; if P i,j =1, it means that point (i,j) is a wheat seedling feature point.

7. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 1, characterized in that: In step 3, the position coordinates of the four vertices of the bounding box before rotation are calculated based on the center point (x, y) of the rotated bounding box output by the model and the parameters such as the width w and height h of the box, which are the upper left vertex Top right vertex Bottom right vertex Bottom left vertex Then, the coordinates of the four vertices of the bounding box after rotation are calculated according to the rotation angle α The calculation method is as follows: Where (x i ,y i ) is the vertex coordinate before rotation, are the coordinates of the vertices after rotation, i=1,2,3,4; In step 3, the starting point and end point of the circular window movement are the center points of the upper edge and the lower edge of the rotation bounding box, respectively, and the circular window moves along the straight line connecting the two points; the starting point and the end point of the movement are related to the rotation angle α; when When the starting point is and The midpoint of and The midpoint of When the starting point is and The midpoint of and The midpoint of the moving path is obtained according to the starting point and the end point. When α=0, the path equation is X=x; when 0<α<π, the path equation is Y=k*X+b, where In step 3, the circular window is The radius of the circle is centered at the starting point and scans along the selected path. Each time it moves to a new position, the average values ​​of the horizontal and vertical coordinates of all the points in the circular window are calculated and used as the center point of the wheat seedling row.

8. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 1, characterized in that: In step 4, the least squares method is used to fit the center points of the wheat seedling rows.

9. The method for detecting the centerline of a wheat seedling row based on improved YOLOv3 according to claim 8, characterized in that: In step 4, a comprehensive method of angle and distance is used to evaluate the extraction effect of the center line of the wheat seedling row. The calculation method is as follows: Among them, θ represents the angle error between the extracted center line of the wheat seedling row and the accurate center line of the wheat seedling row, d1 represents the distance from the intersection of the extracted center line of the wheat seedling row and the upper edge of the image to the accurate center line of the wheat seedling row, and d2 represents the distance from the intersection of the extracted center line of the wheat seedling row and the lower edge of the image to the accurate center line of the wheat seedling row. It represents the error in distance between the extracted center line of the wheat seedling row and the accurate center line of the wheat seedling row, k1 represents the slope of the center line of the wheat seedling row extracted by the straight line, k2 and b2 represent the slope and intercept of the accurate center line of the wheat seedling row respectively.

Citation Information

Patent Citations

  • Monocular vision-based agricultural vehicle navigation line detection system and method

    CN105987684A

  • Wheat crop row detection method based on characteristic point clustering

    CN107067430A