A sugarcane thinning rate information automatic extraction method

By using the YOLOv7 deep learning model to identify sugarcane seedlings and generate standard distribution templates, the problem of time-consuming, labor-intensive, and low-accuracy traditional sugarcane seedling shortage detection has been solved, enabling rapid and accurate detection of sugarcane seedling shortage rate.

CN117422901BActive Publication Date: 2026-07-10GUANGXI ZHUANG AUTONOMOUS REGION ACAD OF AGRI SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGXI ZHUANG AUTONOMOUS REGION ACAD OF AGRI SCI
Filing Date
2023-09-18
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional methods for detecting missing sugarcane seedlings are time-consuming and labor-intensive, and cannot accurately measure the rate of missing sugarcane seedlings over a large area, with significant human error.

Method used

The YOLOv7 deep learning model was used to identify sugarcane seedlings, and a standard sugarcane seedling distribution template was generated by optimizing the rotation angle and processing vector points. The missing seedling rate was then calculated by combining the field boundary data.

Benefits of technology

It enables accurate and rapid detection of sugarcane seedling loss rate, reduces human error, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117422901B_ABST
    Figure CN117422901B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of sugarcane seedling research in the field, and particularly relates to a sugarcane seedling deficiency information automatic extraction method, comprising: S1, identifying sugarcane seedlings in unmanned aerial vehicle images; S2, processing sugarcane seedling vector points in order by field block, and finding an optimal angle capable of rotating the crop rows of the current field block to a vertical state; S3, rotating the vector boundary and sugarcane seedling vector points of the current field block to a vertical state according to the optimal angle; S4, detecting the row distribution of the sugarcane seedlings in the current field block; S5, drawing a standard sugarcane seedling distribution template of the current field block under the condition of no seedling deficiency, which is used for comparison with the real field block; S6, confirming the sugarcane seedling deficiency rate and the real position of the seedling deficiency of the current field block; processing each field block in the image in turn, and repeating the above steps S2 to S6, so that the overall sugarcane seedling deficiency in the unmanned aerial vehicle collected image can be obtained. The present application can solve the problem of how to realize accurate and rapid seedling deficiency detection during the growth of sugarcane, and has a good market application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sugarcane seedling research technology, specifically relating to an automatic extraction method for sugarcane seedling loss rate information. Background Technology

[0002] Sugarcane is a crucial crop in the modern sugar industry, producing approximately 80% of the world's sugar. Major sugarcane producing areas are mainly distributed in tropical and subtropical regions south of 24°N latitude, with Guangxi, Guangdong, and Yunnan being the primary sugarcane cultivation bases. Sugarcane yield is not only related to its germplasm but also influenced by factors such as seedling condition. Seedling emergence quality is a key indicator for seedling health monitoring. Rapid detection and scientific quantitative description of seedling loss rates help understand the growth status of sugarcane seedlings, providing strong data support for field operation decisions, enabling timely replanting and seedling improvement, and ultimately holding significant practical importance for increasing sugarcane yield.

[0003] Traditional assessments of sugarcane seedling loss rely primarily on manual counting or visual estimation. Counting is a classic and accurate method, but it requires significant manpower, is labor-intensive, and time-consuming, making it suitable only for small-scale surveys of seedling loss rates. Visual estimation, while faster than counting, suffers from larger errors. Both traditional methods are time-consuming, labor-intensive, and prone to human error, failing to meet the requirements for accurate measurement of large-scale sugarcane seedling loss rates. Therefore, achieving accurate and rapid seedling loss detection during sugarcane growth remains a pressing problem. To address this, this application provides an automatic method for extracting sugarcane seedling loss rate information.

[0004] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide an automatic extraction method for sugarcane seedling loss rate information, so as to solve the problem of how to achieve accurate and rapid seedling loss detection during the sugarcane growth process.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A method for automatically extracting sugarcane seedling loss rate information includes the following steps:

[0008] S1. Identify sugarcane seedlings in drone images;

[0009] The YOLOv7 deep learning model was used to identify sugarcane seedlings in UAV images. The sugarcane seedling identification boxes were converted into vector points. Combined with the field boundary vector data, the vector points were divided and numbered according to the field range.

[0010] S2. Process the sugarcane seedling vector points in each field sequentially to find the optimal angle that can rotate the crop row of the current field to a vertical state.

[0011] By iterating twice at different rotation angles, the optimal rotation angle is gradually approximated.

[0012] First, the variance of the number (density) of sugarcane seedling vector points distributed on the X-axis is used as an indicator, as shown in formula (1); within the range of -5° to 185°, the sugarcane seedling vector points of the current field are rotated in a larger step of 5°. When rotated to angle α, if the condition of the following formula (2) is met, it indicates that the angle interval [α-5, α+5] where the optimal angle is located has been found, and the next step of processing is carried out:

[0013] The formula for calculating variance is as follows:

[0014]

[0015] In the formula, S2 represents the variance of the data set; M represents the mean of the data set; n represents the number of data points in the data set; X1, X2, X3...X n This indicates the specific numerical value of this set of data;

[0016] X α-5 <X α ≥X α+5 (2)

[0017] X α =X max -X min

[0018] In the formula, X α X is the maximum variance of the number (density) of sugarcane seedling vector points when rotated to angle α. max With the minimum value X min The difference between them; X α-5 and X α+5 These are the differences between the maximum and minimum values ​​of the variance of the number (density) of the sugarcane seedling vector points at 5° to the left and right when rotated to angle α.

[0019] Then, within the obtained optimal angle range, rotate the sugarcane seedling vector point of the current field with a step size of 0.5° to find a more refined optimal angle. When rotated to angle α, if the following formula (3) is satisfied, the inclination angle of the crop row in the current field is obtained.

[0020] X α-0.5< X α ≥ X α+0.5 (3)

[0021] In the formula, X α X is the difference between the maximum and minimum values ​​of the variance of the number (density) of sugarcane seedling vector points when rotated to angle α; α-0.5 and X α+0.5 These are the differences between the maximum and minimum variances of the number (density) of sugarcane seedling vector points at 0.5° to the left and right when rotated to angle α.

[0022] S3. Rotate the vector boundary of the current field and the vector point of the sugarcane seedling to a vertical state according to the optimal angle obtained in S2, so as to extract information such as crop rows and missing seedling rate more quickly and accurately.

[0023] S4. Detect the row distribution of sugarcane seedlings in the current field to lay the foundation for marking the beginning and end of crop rows and drawing a standard sugarcane seedling distribution template under the condition of no missing seedlings.

[0024] Set appropriate filters to remove scattered sugarcane seedlings between rows and eliminate the interference of noise outside the rows on the fitting of the crop row centerline;

[0025] Set a sliding window with a width of 1m and a step size of 0.3m to calculate the number (or density) of sugarcane seedling vector points in the current window; move the window from left to right along the X-axis. When the number (or density) of vector points at a certain position X is greater than the number (or density) of vector points on the left and greater than or equal to the number (or density) of vector points on the right, it is considered that there is a crop row at that position, see formula (4); record the number of crop rows and the X-axis coordinate values ​​corresponding to each crop row (rough row position, which needs to be refined by fitting the distribution of sugarcane seedling vector points on each crop row).

[0026] M X-1 < M X ≥ M X+1 (4)

[0027] In the formula, M X M represents the number of sugarcane seedling vector points in the current window when the sliding window is moved to position X; X+1 and M X-1 This represents the number (or density) of sugarcane seedling vector points when the sliding window is at position X±0.3m.

[0028] Assign coordinate values ​​to the sugarcane seedling vector points, use the determined number of rows as the number of clusters for K-means clustering, and use the X-axis coordinate value corresponding to each crop row as the location of the cluster row. In this way, the sugarcane seedling vector points are clustered to complete the segmentation of crop rows.

[0029] The least squares method was used to perform linear fitting on the sugarcane seedling vector points of each row after clustering, and the straight line coordinates of the crop rows were obtained.

[0030] S5. Draw a standard sugarcane seedling distribution template for the current field under the condition of no missing seedlings, and use it to compare with the actual field to obtain the seedling missing situation;

[0031] Randomly count the distances between the vector points of approximately 80% of the sugarcane seedlings in the current field and their nearest neighbors. After sorting, remove the maximum and minimum values ​​at both ends, and average the remaining 60% of the distance values ​​to obtain the plant spacing of the sugarcane seedlings in the current field.

[0032] Intersect the rotated plot vector boundary with each crop row after straight line fitting, and mark the intersection point as the start and end of the corresponding crop row;

[0033] A standard sugarcane seedling distribution template with no missing seedlings was drawn based on the spacing between sugarcane seedlings and the varying lengths of crop rows.

[0034] S6. Confirm the sugarcane missing rate and the actual location of the missing seedlings in the current field;

[0035] The standard sugarcane seedling distribution template obtained in step S5 under the condition of no missing seedlings is compared with the actual field sugarcane seedling vector points one by one. The value of Y±3 / 4 plant spacing of each sugarcane seedling point in the standard distribution template is calculated. Then, the sugarcane seedlings in the actual field within this range are searched. If there are no sugarcane seedlings within this range, the missing seedling point is recorded.

[0036] Count the number of marked missing seedlings in the current field, divide this number by the total number of sugarcane seedlings in the standard template, and obtain the missing seedling rate, as shown in the following formula:

[0037]

[0038] In the formula, Q represents the sugarcane missing seedling rate; X represents the total number of marked missing seedling points in the field; and M represents the total number of sugarcane seedlings in the standard sugarcane seedling distribution template under the condition of no missing seedlings.

[0039] Because the sugarcane seedling vector points have undergone rotation transformation, the missing seedling results also need to be inversely transformed. By remapping the marked missing seedling points back to the original image coordinate system according to the relevant formula, the true location of the missing seedlings in the current field can be determined. The inverse rotation reference formula is as follows:

[0040] X=X′×cosθ-Y′×cosθ (6)

[0041] Y = X′ × sinθ + Y′ × cosθ

[0042] Where X and Y represent the coordinates of the missing seedlings in the actual situation after the reverse rotation; X′ and Y′ represent the coordinates of the missing seedlings in the vertical state before the reverse rotation; θ is the angle of reverse rotation.

[0043] By processing each field in the image sequentially and repeating steps S2 to S6 above, the overall sugarcane seedling shortage situation in the UAV-collected image can be obtained.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) The method for automatically extracting sugarcane seedling loss rate information of the present invention divides and numbers the sugarcane seedling vector points according to the field by using the field boundary vector data, and processes the sugarcane seedling vector points for each field to accurately obtain the seedling loss rate of each field.

[0046] (2) The automatic extraction method for sugarcane seedling shortage rate information of the present invention uses the variance of the number of crops distributed on the X-axis as an indicator to find the optimal angle of rotation of the field. When the field is rotated to the optimal angle, the direction of the sugarcane seedling row and the row spacing of the field can be easily calculated and obtained. Then, a standard sugarcane seedling distribution template in the state of no missing seedlings is generated. By comparing with the actual sugarcane seedling distribution, the seedling shortage rate and seedling location information of the current field are finally obtained. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating the method implementation of the present invention;

[0048] Figure 2 This is a schematic diagram of the sugarcane seedling vector points of the present invention;

[0049] Figure 3 This is a schematic diagram showing the change in the number (density) of sugarcane seedling vector points along the X-axis direction as a function of rotation angle.

[0050] Figure 4 This is a schematic diagram of the variance of the sugarcane seedling vector point as a function of the rotation angle (the angle corresponding to the highest variance point in the red box is the optimal angle);

[0051] Figure 5 This is a schematic diagram of the fitted crop row centerline of the present invention;

[0052] Figure 6 This is the standard sugarcane seedling distribution template under the condition of no missing seedlings in this invention;

[0053] Figure 7 This is a schematic diagram of the marking of missing seedlings according to the present invention;

[0054] Figure 8 This is a schematic diagram showing the actual location of the marked missing seedling points according to the present invention. Detailed Implementation

[0055] The technical solution of this invention patent will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.

[0056] The method of this invention was applied to conduct an automatic extraction experiment of sugarcane seedling loss rate information in Dubang Village, Quli Town, Fusui County, Chongzuo City, Guangxi Province. (See attached figure.) Figure 1 The automatic extraction method for sugarcane seedling loss rate information of the present invention includes the following six steps:

[0057] Step 1: Use a deep learning model (YOLOv7) to identify sugarcane seedlings in UAV imagery. Store the identified sugarcane seedlings in vector point format, and divide the vector points according to the field boundaries, as shown in the attached diagram. Figure 2 As shown;

[0058] Step 2: Process each field sequentially, using two iterations at different rotation angles to find the optimal angle for rotating the sugarcane seedling vector point to a vertical position in the current field. Specifically: First, rotate the sugarcane seedling vector point in the current field within the range of -5° to 185° with a larger step size of 5°, using the variance of the number (or density) of vector points as an indicator to find the interval containing the optimal angle; Second, within the optimal angle interval obtained in the previous step, rotate the sugarcane seedling vector point in the current field with a smaller step size of 0.5° to find a more refined optimal angle. Figure 3 This represents the distribution of the number of sugarcane seedling vector points on the X-axis when the field is not rotated, rotated at any angle, and rotated to the optimal angle.

[0059] Step 3: Based on the optimal angle obtained in Step 2, refer to the appendix. Figure 4 Rotate the vector boundary of the current field and the vector points of the sugarcane seedlings to a vertical state to better obtain row information;

[0060] Step 4: Detect the row distribution of sugarcane seedlings in the current field to lay the foundation for drawing a standard sugarcane seedling distribution template under the condition of no missing seedlings. Specifically: Eliminate the interference of out-of-row noise on the fitting of crop row centerlines through appropriate filtering; Set a sliding window with a width of 1m and a step size of 0.3m to calculate the number (or density) of sugarcane seedling vector points in the current window. Move the window from left to right along the X-axis. When the number (or density) of vector points at a certain position X is greater than the number of vector points to the left and greater than or equal to the number of vector points to the right, it is considered that there is a crop row at that position; Assign X-axis coordinate values ​​to the sugarcane seedling vector points, and then cluster the vector points using the total number of crop rows as the clustering row number. Finally, use the least squares method to fit the clustered sugarcane seedling vector points to obtain the crop row straight line coordinates, as shown in the attached figure. Figure 5 As shown;

[0061] Step 5: Draw a standard field sugarcane seedling distribution template under the condition of no missing seedlings. Specifically: randomly select about 80% of the sugarcane seedling vector points in the current field, calculate the distance between these points and their nearest neighbor, sort them, remove 10% of the maximum and minimum distance values ​​respectively, and average the remaining 60% of the values ​​as the plant spacing of sugarcane seedlings in the current field.

[0062] Intersect the rotated field vector boundary with the crop rows fitted with straight lines, marking the start and end points of each crop row in the current field. Then, based on the obtained plant spacing and the varying lengths of the crop rows, draw a standard field sugarcane seedling distribution template under conditions of no missing seedlings, as shown in the attached diagram. Figure 6 As shown;

[0063] Step Six: Confirm the sugarcane missing seedling rate and the actual location of missing seedlings in the current field. Specifically: Compare the standard sugarcane seedling distribution template of the current field (assuming no missing seedlings) with the actual sugarcane seedling vector points of the field one by one. It is important to note that the actual field needs to be searched for sugarcane seedlings within the range of ±3 / 4 of the plant spacing, using the Y-coordinate value of each seedling point in the standard distribution template. If no seedlings are found, mark the missing seedling point, as shown in the attached diagram. Figure 7 As shown;

[0064] The sugarcane missing rate of the current field is calculated by dividing the number of marked missing seedlings by the total number of sugarcane seedlings in the standard template.

[0065] The marked missing seedling points are mapped back to their original angles using relevant relationships to determine the actual location of the missing seedlings in the current field. (Refer to the appendix.) Figure 8 ;

[0066] Because the drone imagery contains multiple sugarcane fields, in order to obtain the sugarcane seedling shortage situation in the entire drone imagery, it is necessary to process the sugarcane seedling vector points of each field in the imagery in sequence according to the numbering order divided in step one, and repeat steps two to six above to obtain the overall sugarcane seedling shortage rate in the drone imagery.

[0067] This invention, based on the automatic extraction of crop row direction and plant spacing information for a field, generates a standard sugarcane seedling distribution template for the target field and compares it with the actual sugarcane seedling distribution in the field to obtain information such as the seedling shortage rate and location. Since UAV imagery contains multiple sugarcane fields, and the crop row direction, plant spacing, and seedling shortage rate vary among fields, this invention uses field boundary vector data to divide and number the sugarcane seedling vector points according to the field, and processes the vector points for each field to accurately obtain the seedling shortage rate. To determine the crop row direction and extract crop row-plant spacing information for each field, this invention proposes the following reasonable assumption: when the target field is rotated to a suitable angle (optimal angle) so that the crop rows are perpendicular to the X-axis, the crop distribution density in the crop row area is the highest, and the density in the non-crop row area is the lowest. At this point, the variance of the quantity (or density) of all crops (including both crop and non-crop rows) on the X-axis is the largest.

[0068] The automatic extraction method for sugarcane seedling shortage rate information of the present invention uses the variance of the number (density) of crops distributed on the X-axis of the field as an indicator to find the optimal rotation angle of the field. When the field is rotated to the optimal angle, the direction of the sugarcane seedling rows and the row spacing information of the field can be easily calculated and obtained. Furthermore, a standard sugarcane seedling distribution template under the state of no missing seedlings is generated. By comparing it with the actual sugarcane seedling distribution, the current seedling shortage rate and seedling shortage location information of the current field can be obtained.

[0069] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.

Claims

1. A method for automatically extracting sugarcane seedling loss rate information, characterized in that, Includes the following steps: S1. Identify sugarcane seedlings in drone images; S2. Process the sugarcane seedling vector points in each field sequentially to find the optimal angle that can rotate the crop row of the current field to a vertical state. S3. Rotate the vector boundary of the current field and the vector point of the sugarcane seedling to a vertical state according to the optimal angle obtained in S2. S4. Detect the row distribution of sugarcane seedlings in the current field to lay the foundation for marking the beginning and end of crop rows and drawing a standard sugarcane seedling distribution template under the condition of no missing seedlings. S5. Draw a standard sugarcane seedling distribution template for the current field under the condition of no missing seedlings, and use it to compare with the actual field to obtain the seedling missing situation; S6. Confirm the sugarcane missing rate and the actual location of the missing seedlings in the current field; process each field in the image in turn, repeating the above steps S2 to S6, and you can obtain the overall sugarcane missing seedling situation in the image collected by the drone. In step S1, the deep learning model YOLOv7 is used to identify sugarcane seedlings in UAV images. The sugarcane seedling identification box is converted into vector points. Combined with the field boundary vector data, the vector points are divided and numbered according to the field range.

2. The method for automatically extracting sugarcane seedling loss rate information according to claim 1, characterized in that, Step S2 first uses the variance of the distribution of sugarcane seedling vector points on the X-axis as an indicator, and rotates the sugarcane seedling vector points of the current field with a larger step size of 5° in the range of -5° to 185°. Then, within the obtained optimal angle range, rotates the sugarcane seedling vector points of the current field with a step size of 0.5° to find a more refined optimal angle.

3. The method for automatically extracting sugarcane seedling loss rate information according to claim 1, characterized in that, In step S4, a suitable filter is set to remove scattered sugarcane seedlings between rows and eliminate the interference of noise outside the rows on the fitting of the crop row centerline; a sliding window with a width of 1m and a step size of 0.3m is set to calculate the number of sugarcane seedling vector points in the current window. Move the window along the X-axis from left to right. When the number of vector points at a certain position is greater than the number of vector points to the left and greater than or equal to the number of vector points to the right, record the number of crop rows and the corresponding X-axis coordinates of each crop row. Assign coordinate values ​​to the sugarcane seedling vector points. Use the determined number of rows as the number of clusters for K-means clustering, and the X-axis coordinates of each crop row as the location of the clustered row. Cluster the sugarcane seedling vector points in this way to complete the segmentation of crop rows. Use the least squares method to perform linear fitting on the sugarcane seedling vector points of each clustered row and obtain the linear coordinates of the crop rows.

4. The method for automatically extracting sugarcane seedling loss rate information according to claim 1, characterized in that, Step S5: Randomly count the distances between 80% of the sugarcane seedling vector points and their nearest neighbors in the current field. After sorting, remove the maximum and minimum values ​​at both ends, and average the remaining 60% of the distance values ​​as the plant spacing of the sugarcane seedlings in the current field. Intersect the rotated field vector boundary with each crop row after straight line fitting, and mark the intersection points as the start and end points of the corresponding crop rows. Draw a standard sugarcane seedling distribution template under the condition of no missing seedlings based on the sugarcane seedling spacing and the crop rows of different lengths.

5. The method for automatically extracting sugarcane seedling loss rate information according to claim 1, characterized in that, Step S6 compares the standard sugarcane seedling distribution template obtained in step S5 under the condition of no missing seedlings with the actual field sugarcane seedling vector points one by one, calculates the Y±3 / 4 plant distance value of each sugarcane seedling point in the standard distribution template, and then finds the sugarcane seedlings in the actual field within this range; if there are no sugarcane seedlings in this range, the missing seedling point is recorded; the marked missing seedling points are remapped to the original image coordinate system according to the relevant relationship formula, and the true location of the missing seedlings in the current field can be determined.