Real-time dynamic identification and positioning method for sugarcane stem nodes

By improving the YOLOv5s network and multi-scale detection structure, and combining polynomial fitting to correct the sugarcane stem node position, the selection of cuts was optimized, which solved the problems of slow sugarcane stem node recognition speed, low accuracy and large model volume, and realized the efficient and accurate cutting of sugarcane pre-cutting intelligent transverse cutting machine.

CN116228844BActive Publication Date: 2025-10-21GUANGXI UNIV FOR NATITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310178352.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2025-10-21
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

Existing sugarcane stalk node recognition methods suffer from slow detection speed and low accuracy in real-time dynamic environments, large model size, and camera distortion affecting positioning accuracy. They also lack optimization of cut location and sugarcane length threshold processing, resulting in the inability of intelligent transverse cutting machines for pre-cut sugarcane seeding to meet the needs of industrialized seeding.

Method used

The YOLOv5s network framework was adopted, and the sugarcane stem node recognition model was improved by bidirectional aggregation of FPN+PAN and Ghost structure. The stem node position was corrected by combining multi-scale detection and univariate sixth-order polynomial fitting distortion proportional function, and the selection of cut position and sugarcane seed length processing were optimized.

Benefits of technology

It improves the accuracy and speed of sugarcane stem node recognition, reduces model size, enhances the accuracy of cut location positioning and the reliability of cutting operations, and meets the needs of factory-scale cutting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116228844B_ABST
    Figure CN116228844B_ABST
Patent Text Reader

Abstract

The application discloses a kind of real-time dynamic identification and positioning method for sugarcane stem node, comprising the following steps: (1) collecting sugarcane sample;(2) making dataset;(3) selecting model and evaluation index;(4) improving sugarcane stem node recognition model;(5) distortion correction of sugarcane stem node position;(6) selection optimization of cut position: based on the pixel position of stem node after distortion correction in step (5), the cut position is calculated, and the selection of cut position is optimized.The real-time dynamic identification and positioning method for sugarcane stem node of the application improves the model in detection accuracy and speed by improving the multi-scale detection structure, then introduces Ghost structure to achieve the effect of simplifying the model.Secondly, the transverse distortion ratio function is fitted by using polynomial function and least square method, which solves the problem of picture transverse distortion, makes the cutting operation more reliable, and improves the cutting accuracy.Finally, the selection optimization algorithm of cutting position is designed to improve the reliability of cut selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sugarcane processing equipment identification systems, and in particular to a real-time dynamic identification and positioning method for sugarcane stem nodes. Background Art

[0002] Sugarcane is my country's most important sugar crop and plays a crucial role in the national economy. However, in the field of mechanized sugarcane planting, using real-time seed-cutting sugarcane planters to cut sugarcane stems presents challenges such as high labor intensity, the resulting cut sugarcane segments are of a fixed length, and a high rate of bud damage. The resulting low-quality sugarcane seeds can seriously impact sugarcane yields year after year. Since sugarcane is a perennial crop, a poor yield in the first year will negatively impact the following year. Therefore, pre-cut sugarcane planting is a more promising planting method. Pre-cut sugarcane planting involves manually cutting large quantities of seed cane with two to three bud segments, approximately 25 to 35 cm in length. The seedlings are then disinfected for planting and are a technology currently being promoted in my country for producing high-quality sugarcane seeds. To address the need for large quantities of high-quality seed cane, researchers have developed a pre-cutting, intelligent, horizontal seed-cutting machine for sugarcane. The device consists of a node recognition unit and a cutter control unit. The operating process is that the conveyor chain at the bottom is responsible for feeding the sugarcane horizontally, and the camera above is responsible for real-time dynamic detection of the position of the sugarcane stem nodes, calculating the incision position based on the stem node position, and then transmitting the incision position to the back-end PLC device through the serial port, thereby controlling the cutter to cut the sugarcane into segments. According to the cutting results, the cut of the sugarcane seeds is smooth, the bud injury rate is lower than that of manual cutting, and the number of bud segments also meets the standards.

[0003] Current research on sugarcane node identification primarily involves traditional machine vision, sensor recognition and analysis, and deep learning. Traditional machine vision methods primarily extract node features through edge detection and then employ various machine learning methods for identification. However, traditional machine vision detection methods lack robustness. Because color varies between sugarcane varieties, node identification performance significantly decreases when sugarcane varieties change, making it difficult to accurately cut sugarcane. Sensor recognition and analysis methods, however, use laser sensors or contact-type piezoelectric sensors to detect nodes. Because sugarcane nodes are concave and convex, resulting in significant fluctuations in the detected signal, node identification can be achieved by distinguishing these fluctuations. Sensor recognition and analysis methods also suffer from poor robustness. The presence of numerous aerial roots in the sugarcane root cane can easily lead to sensor misidentification. The time required to identify a node in an entire cane stem is long, making them difficult to implement in real-world production environments. In terms of deep learning methods, researchers have used various deep learning frameworks to build recognition networks. They then fed the networks a large amount of sugarcane segment image data to learn the characteristics of sugarcane segments. The result is a model for sugarcane segment recognition. Li Qiang et al. used a modified LeNet-5 network to identify sugarcane buds, achieving an accuracy rate of 92%, a model size of 68.35MB, and an average recognition time of 1.2 seconds. Chen Yanxiang et al., based on a modified Yolov3, used edge extraction and segment location algorithms, achieving a harmonic mean recognition rate of 97.3%. Deep learning methods offer a good balance between accuracy and speed, but they rely on individual sugarcane segment images and recognition, making them ineffective for real-time, dynamic cutting scenarios.

[0004] Current sugarcane pre-cutting intelligent transverse seeding machines use a deep learning-based recognition method for sugarcane segment identification. However, with the increasing adoption of factory-based seeding, the efficiency of this equipment must be improved to meet the current demands of factory-based seeding. One of the factors limiting this efficiency is: 1. The current sugarcane segment identification method suffers from slow detection speed. In a real-time dynamic recognition environment, as the conveyor chain speed increases, detection speed cannot keep up, leading to missed sugarcane segments. Missing a single sugarcane segment disrupts the cutting sequence of all subsequent sugarcanes, affecting the accuracy of the sugarcane segment location. 2. Low detection accuracy directly impacts the accuracy of the sugarcane segment location. 3. Existing sugarcane segment identification models are large, limiting their potential for future integration into hardware. 4. Camera distortion can severely impact the precise location of sugarcane segments, resulting in a lack of reliability in cutting positions. 5. There is a lack of optimal incision location selection. The original method relied on the principle that a sugarcane seed must contain two to three segments, meaning that every two segments should be cut once, lacking optimal selection. For example, existing sugarcane pre-cutting intelligent transverse seed cutters have six blades, all of which cut simultaneously. If the cut positions are still selected sequentially from left to right, if the number of cuts is less than the number of cuts, an idle cutter may cut into the sugarcane, reducing the cutter's error tolerance. 6. Lack of threshold processing for sugarcane seed length. Because the density of sugarcane nodes is affected by external factors such as temperature and precipitation, when the number of nodes is densely distributed, selecting the cut position based on two nodes will result in shorter seed lengths and even affect the control of the cutters (the normal distance between the two cutters should be greater than 150 cm). Another problem that can cause the sugarcane seed length to be too long is that when manual leaf stripping is not completely complete, some sugarcane leaves will remain on the sugarcane, covering the node locations. The model cannot observe the node characteristics and cannot recognize them. Therefore, if a few node locations are missing, the cut sugarcane seed length will be too long. Therefore, it is urgent to propose an accurate, efficient and concise real-time dynamic identification and positioning method for sugarcane stem nodes to solve the problem that the sugarcane pre-cutting intelligent horizontal cutter cannot meet the needs of factory cutting.

[0005] The information disclosed in this background technology section is only intended to enhance understanding of the overall background of the invention and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the Invention

[0006] The purpose of the present invention is to provide a real-time dynamic identification and positioning method for sugarcane stem nodes, thereby overcoming the shortcomings of existing identification and positioning methods such as low recognition accuracy and slow response speed.

[0007] To achieve the above object, the present invention provides a method for real-time dynamic identification and positioning of sugarcane stem nodes, comprising the following steps:

[0008] (1) Collect sugarcane samples;

[0009] (2) Dataset creation: A camera was installed on a transverse sugarcane cutter to obtain image data of the sugarcane segments to be cut. The sugarcane segment dataset was randomly divided into a training set, a validation set, and a test set in a certain proportion.

[0010] (3) Selecting models and evaluation indicators: The dataset obtained in step (2) is trained and tested on the YOLOv5s network framework to obtain the original YOLOv5s model test results; wherein, the YOLOv5s network mainly includes an input module, a backbone network module, a neck network module and a prediction head module. The prediction head module performs probability prediction and position information prediction on targets of different categories, wherein P3, P4 and P5 correspond to the detection of small, medium and large targets respectively; the accuracy, recall rate, average precision, model size and inference time are used as evaluation indicators;

[0011] (4) Improved sugarcane stem segment recognition model: After bidirectional aggregation of FPN+PAN, YOLOv5s provides large, medium, and small feature channels for P3, P4, and P5 layers respectively for multi-scale detection, and removes the feature data of the large target detection layer in the detection part; and introduces the Ghost structure into the YOLOv5s network framework to construct a sugarcane stem segment recognition model;

[0012] (5) Distortion correction of sugarcane node position: Fit the lateral distortion ratio function to the sugarcane image information obtained by the camera in step (2), and then obtain the true node pixel value according to the function during real-time dynamic detection;

[0013] (6) Optimization of the selection of the incision position: The incision position is calculated based on the pixel position of the stem node after distortion correction in step (5).

[0014] Preferably, in the above technical solution, the training set in step (2) is a data sample used for model fitting, and the training error is gradient-decreased during the training process to learn the trainable weight parameters; the validation set is a sample set set aside during the model training process, which is used to adjust the hyperparameters of the model and to perform a preliminary evaluation of the model's capabilities; the test set is used to evaluate the generalization ability of the final model.

[0015] Preferably, in the above technical solution, the input module in step (3) is an optimization of the image processing strategy and anchor frame selection; the backbone network module mainly includes the C3 module and the SPPF module, and the C3 module uses the residual network for residual learning; the SPPF module reduces the number of network layers on the basis of SPP and fuses the information features of different receptive fields; the neck network part mainly performs feature fusion in a combination of top-down feature pyramid + top-up path aggregation network, thereby realizing bidirectional aggregation of features of different layers.

[0016] Preferably, in the above technical solution, the accuracy P in step (3) is used to evaluate whether the target found is correct; the recall rate is used to evaluate whether the target found is complete; the average precision AP represents the average detection accuracy when the iou (intersection over union, indicating the overlap between the output result and the true label) is 0.5, obtained by integrating the PR curve; the inference time refers to the time required to detect a single sugarcane image. The specific formula is as follows:

[0017]

[0018]

[0019]

[0020] In the formula, TP is the number of true positive samples, that is, the number of samples that the model determines to be positive, which is actually the number of positive samples; FP is the number of false positive samples, that is, the number of samples that the model determines to be positive, but is actually the number of negative samples; FN is the number of false negative samples, that is, the number of samples that the model determines to be negative, but is actually the number of positive samples.

[0021] Preferably, in the above technical solution, step (4) introduces the Ghost structure into the backbone network module and the neck network module of the YOLOv5s network framework.

[0022] Preferably, in the above technical solution, the Ghost structure in step (4) includes a Ghost convolution module and a Ghost bottleneck module;

[0023] The Ghost convolution module consists of two parts: conventional convolution and linear transformation. First, a part of the feature map is obtained through limited conventional convolution. Then, more Ghost feature maps are generated using cheap linear transformation. The generated Ghost feature maps can greatly express the redundant feature information contained in the conventional convolution. Finally, the two sets of feature maps are combined through identity mapping.

[0024] The Ghost bottleneck module consists of two Ghost convolution modules. The first Ghost convolution serves as an expansion layer to increase the feature dimension and expand the number of channels. The second Ghost convolution is used to reduce the number of channels to match the directly connected features, and finally output after shortcut connection.

[0025] Preferably, in the above technical solution, step (5) of obtaining the true stem node pixel value includes the following steps:

[0026] 1) Calibration of the calibration ruler and recording of lateral distortion information: Place the middle scale of the calibration ruler at the center of the detection area, marked as the origin. In the detection interface, the observed scale pixel value is recorded as O. Based on the principle of minimum distortion at the center position, the pixels of the scales adjacent to the origin are selected as standard pixels, thereby inferring the true pixel values ​​of other scales, recorded as R; then record the ratio of the true scale pixel value to the observed scale pixel value, O / R, and record the ratio at the origin as 1;

[0027] 2) Based on the recorded data, use symmetry to write the O and R values ​​for the scales on the left and right sides of the scale. Using O as the abscissa and O / R as the ordinate, draw a scatter plot of each scale. Then, fit the scattered data with a sixth-degree polynomial to obtain the distortion ratio function.

[0028] 3) Use the distortion ratio function to restore the true pixels of the stem nodes in the image and obtain the true pixel values.

[0029] Preferably, in the above technical solution, in step 1), the calibration ruler is 190 cm long and has 18 scale marks, with each scale mark spaced 10 cm apart; then the scale mark at 100 cm on the calibration ruler is placed at the center of the detection area, which is recorded as the origin;

[0030] Step 2) Use the least squares method to fit the lateral distortion ratio function. The least squares formula is:

[0031]

[0032] Where x i 、y i is the coordinate corresponding to the scatter value, is the polynomial function model to be fitted; when the sum of the squares of the differences between the vertical coordinates of the function model and the vertical coordinates of the scatter values ​​of the entire formula is the smallest, the fit is considered to be the best;

[0033] in The polynomial formula is as follows:

[0034]

[0035] Record the distortion information data according to step 1), and write O, R, and O / R from 10 to 90 cm by using symmetry; substitute O and O / R into the expressions in formulas (1) and (2).

[0036]

[0037] In the formula, x is the observed pixel value. is the distortion ratio function.

[0038] In step 3), the horizontal coordinate pixel value of the screen is 0 - 640. Before inputting the distortion ratio function, the horizontal coordinate of the target pixel needs to be shifted 320 pixels to the left before being input into formula (1), and then the target true pixel is restored by using the output distortion ratio; the formula for the target true pixel is as follows:

[0039]

[0040] In the formula, i is the horizontal coordinate of the target detection frame, and A is the true pixel of the detected boundary obtained through measurement and calculation, with a value of 401; substituting the horizontal coordinate pixel of the target detected by the model into formula (2), the true pixel value can be obtained.

[0041] Preferably, in the above technical solution, the optimization of the incision position selection in step (6) includes:

[0042] 1) Sort the stem node positions from smallest to largest, denoted as nodes; then record an incision position for every two stem nodes from left to right. The incision position is at the center between the second and the third stem nodes. Finally, the positions of all incisions can be obtained in sequence, denoted as tangent points, and then calculate the number of incisions at the tangent points.

[0043] 2) Assume the number of cutting knives of the horizontal sugarcane cutting machine is R. If the number of incisions < R, it is necessary to calculate the number of idle cutting knives, assign the position of the idle cutting knife as the farthest distance. If there are multiple idle cutting knives, the pixel value of 150 cm needs to be subtracted from the farthest distance in sequence because the minimum distance between adjacent two cutting knives is 150 cm.

[0044] If the number of incisions > R, it is necessary to select incisions from the center to both sides of the tangent points.

[0045] If the number of incisions = R, no modification is required.

[0046] Preferably, in the above technical solution, it also includes the threshold processing of the sugarcane seed length, and the method is as follows:

[0047] Let the pixel distance between adjacent incision positions in the node list be \(d_i\), where \(i = 1, 2, 3,\cdots\), the pixel thresholds for the length of the sugarcane seed are \(d_{min}\) and \(d_{max}\). If \(d_i < d_{min}\), then it is necessary to find the positions of the two stem segments contained in it among the cut points according to the position of \(d_i\), expand one more sugarcane segment outward from this position, and then recalculate the incision position;

[0048] If \(d_i > d_{max}\), then it is necessary to calculate the average length of other stem segments in the cut point list, and then estimate the position of the missed detected stem segment in the overly long sugarcane seed, insert this stem segment into the cut point array, and recalculate the incision position.

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

[0050] (1) The real-time dynamic recognition and positioning method for sugarcane stem segments of the present invention has better robustness than traditional machine vision methods and sensor analysis methods, and has greater industrial application value. Compared with other sugarcane stem segment recognition methods using deep learning frameworks, this model is more superior in terms of accuracy, speed, and model size, and performs well in real-time dynamic detection applications, and is more reliable. The recognition scheme of this method has better detection effect and faster detection speed, and corrects the coordinates of the sugarcane stem segment position by fitting the distortion ratio function with a unary sixth-degree polynomial, and proposes an optimization method for the selection of the incision position and a threshold processing method for the length of the sugarcane seed, greatly improving the recognition and detection efficiency of the intelligent horizontal cutting machine for pre-cut sugarcane seeds and the precise positioning of the incision position.

[0051] (2) The real-time dynamic recognition and positioning method for sugarcane stem segments of the present invention removes the detection structure of the last layer based on the YOLOv5s network. By statistically analyzing the pixel values of the stem segments in the dataset, it is found that there are no large targets in the sugarcane stem segment dataset, so the detection related to large targets in the last layer is removed, improving the detection accuracy, rate, and reducing the volume to a certain extent. The Ghost structure is introduced into both the backbone network and the neck network of the network architecture, thus simplifying the model complexity and reducing the model volume.

[0052] (3) The method of the present invention solves the distortion problem of the camera of the sugarcane pre-cutting intelligent transverse seeding machine. The distortion ratio function of the camera is obtained by the method of fitting a univariate sixth-order polynomial function, thereby restoring the pixel information of the real incision position and improving the accuracy and reliability of the incision position. The incision position is selected and optimized. The incision position is obtained based on the stem node position after distortion correction, and then the incision position is selected from the middle to both sides to ensure the uniformity of the cutter position. If the incision position is less than the number of cutters, a larger value is assigned to the idle cutter to ensure that the sugarcane will not be cut. Because when the cutter action is performed, multiple knives will cut at the same time. If the idle cutter is located in front of the sugarcane, the probability of cutting the sugarcane bud may increase. Finally, the sugarcane seed length is thresholded. By setting a maximum and minimum value for the sugarcane seed, when the sugarcane seed length is less than the minimum value, it means that the sugarcane nodes are relatively dense, so the current sugarcane seed is expanded by one sugarcane node and the incision position is updated. When the sugarcane seed length is greater than the maximum value, it means that a sugarcane node has been missed. It is necessary to count the lengths of other currently known stem segments and calculate the average value to infer the position of the missed stem node in the overly long sugarcane seed. The missed stem node position is inserted into the original stem node list and the incision position is recalculated.

[0053] (4) The present method for real-time dynamic identification and location of sugarcane nodes significantly improves both detection accuracy and speed by improving the multi-scale detection structure. The Ghost structure is then introduced to simplify the model. Secondly, a polynomial function and the least squares method are used to fit the lateral distortion ratio function, resolving the issue of lateral distortion in the image. This makes the cutting operation more reliable and improves the cutting accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flow chart of the method for real-time dynamic identification and positioning of sugarcane stem nodes according to the present invention;

[0055] Figure 2 This is a flow chart of a verification test of the method for real-time dynamic identification and positioning of sugarcane nodes according to the present invention;

[0056] Figure 3 2. It is a structural diagram of the improved YOLOv5s in the real-time dynamic identification and positioning method of sugarcane stem nodes according to the present invention;

[0057] Figure 4 is a multi-scale fusion and detection image before improvement in the method according to the present invention;

[0058] Figure 5 is an improved multi-scale fusion and detection graph according to the method of the present invention;

[0059] Figure 6 is an improved diagram of the multi-scale detection structure in the method according to the present invention;

[0060] Figure 7 2 is a block diagram of conventional convolution in the Ghost convolution module according to the method of the present invention;

[0061] Figure 8 : This is a diagram of the Ghost convolution module structure in the method according to the present invention;

[0062] Figure 9 is a structural diagram of the Ghost bottleneck module in the method according to the present invention;

[0063] Figure 10 2. It is a schematic structural diagram of a transverse sugarcane seed cutter according to the method of the present invention;

[0064] Figure 11 is a distortion diagram of the original image during the sugarcane transportation process in the method of the present invention;

[0065] Figure 12 is an image distortion diagram under a calibration ruler during the sugarcane transport process in the method according to the present invention;

[0066] Figure 13 is the lateral distortion ratio function in the method according to the present invention;

[0067] Figure 14 is a distribution diagram of label sizes of a sugarcane node dataset according to the method of the present invention;

[0068] Figure 15 It is the YOLOv5s recognition heat map before improvement;

[0069] Figure 16 It is the YOLOv5s recognition heat map for improved multi-scale detection;

[0070] Figure 17 This is a comparison chart of mAP before and after the overall improvement of the algorithm of the method of the present invention;

[0071] Figure 18 This is the detection effect diagram of the original YOLOv5s; A in the figure is a false detection, and B is a missed detection;

[0072] Figure 19 This is the detection effect diagram of the improved YOLOv5s;

[0073] Figure 20 This is a diagram showing the effect of detecting sugarcane nodes using the method of the present invention during real-time dynamic transmission;

[0074] Figure 21 The diagram shows the position of the cutter and the cutting result in actual seed cutting operation using the method of the present invention. DETAILED DESCRIPTION

[0075] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.

[0076] Unless expressly stated otherwise, throughout the specification and claims, the term "comprise" or variations such as "include" or "comprising", etc., will be understood to include the stated elements or components but not to exclude other elements or other components.

[0077] like Figure 1-21 As shown, a method for real-time dynamic identification and positioning of sugarcane stem nodes includes the following steps:

[0078] 1. YOLOv5s builds a sugarcane stem segment recognition network

[0079] 1.1 Choosing a model

[0080] YOLOv5s is a less complex model within YOLOv5, offering both high detection accuracy and speed. It is widely used in various industrial production activities. The YOLOv5s network primarily consists of the input, backbone, neck, and prediction head. The input optimizes image processing strategies and anchor box selection. The backbone modules primarily include the C3 and SPPF modules. The C3 module utilizes a residual network for residual learning, which helps increase model depth. The SPPF module reduces the number of network layers based on the SPP and fuses information features from different receptive fields, improving the expressiveness of feature maps and the speed of feature fusion. The neck combines a top-down feature pyramid (FPN) with a top-up path aggregation network (PAN) for feature fusion, achieving bidirectional aggregation of features at different layers. The prediction head performs probabilistic and positional predictions for different object categories. P3, P4, and P5 correspond to the detection of small, medium, and large objects, respectively.

[0081] 1.2 Improvement of sugarcane node recognition model

[0082] 1.2.1 Improvements based on multi-scale detection structure

[0083] The multi-scale fusion and detection structure before improvement is as follows Figure 3As shown in the figure, after bidirectional aggregation using FPN+PAN, YOLOv5s needs to provide large, medium, and small feature channels for the P3, P4, and P5 layers, respectively, for multi-scale detection. For an input image of 640×640, P3, P4, and P5 generate 80×80, 40×40, and 20×20 feature maps, respectively, for detecting small objects larger than 8×8, medium objects larger than 16×16, and large objects larger than 32×32.

[0084] However, according to the statistical analysis of the label size of sugarcane stem nodes, it is found that the detection frame size of sugarcane stem nodes is within the detection range of P3 and P4. Therefore, the present invention improves the multi-scale detection structure, such as Figure 4 and Figure 5 As shown in the figure, the large target detection layer of P5 is cropped in the detection part, which reduces the fault tolerance of the model's post-processing stage, allowing the model to focus more on training useful features, reducing the amount of network calculation and parameters, speeding up the model's reasoning speed, and also improving recognition accuracy.

[0085] 1.2.2 Introducing Ghost structure to reduce model complexity

[0086] In order to further reduce the size of the model, the present invention introduces the Ghost structure (Ghost convolution module and Ghost bottleneck module) to its Backbone and Neck parts based on the above improved network structure, so as to achieve the purpose of reducing the complexity of the model. The Ghost convolution module includes two parts: conventional convolution and linear transformation (such as Figure 7 and Figure 8 As shown in the figure, first a part of the feature map is obtained through limited conventional convolution, and then more Ghost feature maps are generated by cheap linear transformation. The generated Ghost feature maps can greatly express the redundant feature information contained in the conventional convolution. Finally, the two sets of feature maps are combined through identity mapping.

[0087] Ghost bottleneck module (such as Figure 9 ) is composed of two Ghost convolution modules, where the first Ghost convolution serves as an expansion layer to increase the feature dimension and expand the number of channels; the second Ghost convolution is used to reduce the number of channels to match the directly connected features, and finally outputs the features after shortcut connection.

[0088] After improving the multi-scale detection structure and introducing the Ghost structure as a whole, an improved sugarcane stem segment recognition model was obtained, as shown in Figure 1-3The model removes the underlying P5 detection, improving the recognition accuracy and detection speed of the model. It also replaces the Conv module and C3 module in the backbone network and neck network with the lightweight Ghost module and C3Ghost module, further reducing the model size.

[0089] 2. Correction of lateral image distortion

[0090] When the horizontal sugarcane cutter performs real-time dynamic identification of sugarcane stem nodes, in order to improve efficiency, the entire sugarcane is transported horizontally. It is necessary to dynamically sample and identify the sugarcane nodes of the entire sugarcane at one time. The prototype structure diagram and the original distorted image during the sugarcane transmission process are shown in the figure. Figure 10 and 11 shown.

[0091] like Figure 10 As shown, the horizontal sugarcane cutting machine comprises a two-stage rake mechanism 1, an image acquisition black box 2, a cutting platform 3, a hydraulic station 4, a sugarcane sorting motor 5, a sugarcane conveying motor 6, a camera 7, a dimming light 8, a photoelectric sensor 9, and an image recognition and control system 10. As the conveying and sorting motors 6 and 5 rotate, the two-stage rake mechanism 1 feeds the sugarcane horizontally onto the conveyor belt. A camera 7, built into the top of the black box 2, dynamically detects sugarcane entering the recognition area in real time and stores the horizontal coordinates of detected nodes. The system then calculates the cutting position, uses a lateral distortion ratio function to correct positioning errors, and selects the optimal cutting position. Finally, the cutting position coordinates are transmitted to the controller 10. Once the sugarcane passes the photoelectric sensor 9, the controller adjusts the cutter blades. Once the sugarcane lands on the cutting platform 3, the hydraulic system 4 activates the cutting operation.

[0092] The prototype camera, an RMONCAM1080P, captured images with severe spherical image distortion. The distortion shows a smaller error in the center and larger errors on the sides, which affects the calculation of the sugarcane cut position and cutting accuracy.

[0093] According to the current characteristics of the horizontal transmission of sugarcane, the detection area of ​​the image screen is a long and narrow rectangle, which results in a very small error in the longitudinal distortion of the image, but a large error in the lateral direction. Therefore, it is very critical to solve the problem of lateral distortion of the image. After many experiments and comprehensive analysis, the present invention adopts the method of manual calibration and polynomial fitting algorithm to correct the influence of lateral distortion of the image. The specific process is to calibrate the image screen with a self-made calibration ruler, record the lateral distortion pixels in the screen, and then use the polynomial fitting algorithm and the least squares method to estimate the lateral distortion ratio function, successfully solving the lateral distortion problem of the stem node position.

[0094] 2.1 Calibration of the calibration ruler and recording of lateral distortion information

[0095] First, make a calibration ruler with a length of 190 cm and 18 scale marks, with each scale mark separated by 10 cm. Then, place the scale mark at 100 cm on the calibration ruler at the center of the test area as the origin, as shown in the following example: Figure 12 As shown. Since lateral distortion is symmetrical about the centerline of the image, we only need to record the pixel values ​​of the scales to the right of the origin to infer the pixel values ​​of the scales to the left. When the detection interface size is 640×480, the observed scale pixel value is recorded as O (Observed value), and based on the principle of minimum distortion at the center position, the pixel values ​​of the scales adjacent to the origin are selected as standard pixels to infer the true pixel values ​​of other scales, recorded as R (Real value). Finally, the ratio of the true scale pixel value to the observed scale pixel value (O / R) is recorded, and the ratio at the origin position is recorded as 1. The lateral distortion information is shown in Table 1.

[0096] Table 1 Horizontal distortion information record

[0097]

[0098] 2.2 Least squares method to fit the lateral distortion ratio function

[0099] The least squares formula is:

[0100]

[0101] Where x i 、y i Indicates the horizontal and vertical coordinates corresponding to the scatter value. is the polynomial function model to be fitted. The best fitting effect is obtained by minimizing the sum of squares of the differences between the vertical coordinates of the function model and the vertical coordinates of the scattered values.

[0102] in The polynomial formula is as follows:

[0103]

[0104] Based on the data in Table 1, use symmetry to calculate O, R, and O / R for 10 to 90 cm. Draw a scatter plot for each scale, with O as the abscissa and O / R as the ordinate. To determine the order of the polynomial, the present invention compared different orders. Higher orders reduce the error, but also increase the computational complexity. After comprehensive consideration, it was ultimately decided to use a sixth-order polynomial for fitting.

[0105] Combining the formulas in (1) and (2), substituting O and O / R, we can get the lateral distortion ratio function as follows: Figure 13 As shown, the formula of the lateral distortion ratio function is as follows:

[0106]

[0107] Where x is the observed pixel value, is the distortion ratio function.

[0108] 2.3 Using the distortion ratio function to restore the true pixels of the stem node

[0109] Since the starting point of the image pixel is in the upper left corner, the horizontal coordinate pixel value of the image ranges from 0 to 640. Therefore, before inputting the distortion ratio function, the horizontal coordinate of the target pixel needs to be shifted (subtracted) 320 pixels to the left to meet the requirements of formula (1). Then, using the output distortion ratio, the target true pixel value is restored. The calculation formula is as follows:

[0110]

[0111] In the formula, i represents the horizontal coordinate of the target detection frame, and A is the real pixel of the detection boundary obtained through measurement and calculation, and its value is 401. Therefore, it is only necessary to substitute the target horizontal coordinate pixel obtained by model detection into formula (2) to obtain the real pixel value.

[0112] 2.4 Error analysis after image lateral distortion correction

[0113] To verify the effectiveness of the distortion correction, the original coordinate O is substituted into the function to obtain the distortion ratio. The distortion ratio is then multiplied by O to obtain the estimated true pixel R'. The estimated true pixel R' is then subtracted from the actual true pixel R to obtain the error between the observed value and the true value. See Table 2 for details.

[0114] Table 2 Error analysis between estimated pixels and true pixels

[0115]

[0116] According to the data analysis in Table 2, the average pixel error of the stem segment after image distortion correction is |R'-R| / 10=0.3382cm. Since the incision is made at the center of the stem segment, the actual incision error value should be halved. The final average pixel error of the incision is 0.1691cm, which fully meets the 5mm error accuracy requirement for actual seed cutting operations.

[0117] 2.5 Optimization of incision location selection

[0118] The incision locations are calculated based on the distortion-corrected node pixel positions. Generally, an incision must include two nodes, so this paper sorts the node positions from smallest to largest, recording them as a node list. Then, from left to right, an incision location is recorded for every two nodes, with the incision location being the center between the second and third nodes. Ultimately, the locations of all incisions are obtained in sequence, recorded as a cut point list, and the number of incisions in the cut point list is then calculated.

[0119] Assume that the number of cutting knives of the horizontal sugarcane seed cutter is R. In this embodiment, the number of cutting knives selected is 6, that is, R = 6. If the number of cut sections < 6, it is necessary to calculate the number of idle cutting knives, assign the positions of the idle cutting knives to the maximum distance. If there are multiple idle cutting knives, it is necessary to subtract the pixel value of 150 cm from the maximum distance in turn, because the minimum distance between two adjacent cutters is 150 cm.

[0120] If the number of cut sections > 6, it is necessary to select cut sections from the center to both sides of the tangent points. For example, if the number of cut sections is 8 now, the six middle cut sections are preferentially selected. If the number of cut sections is 7, the five middle cut sections and one cut section on the left are preferentially selected.

[0121] If the number of cut sections = 6, no modification is required.

[0122] 2.6 Threshold processing of sugarcane seed length:

[0123] Record the pixel distance of adjacent cut section positions in the node list as di, where i is 1, 2, 3..., the pixel threshold dmin and dmax of the sugarcane seed length. If di < dmin, it is necessary to find the positions of the two stem nodes contained in it among the tangent points according to the position of di, expand one more sugarcane node outward from this position, and then recalculate the cut section position;

[0124] If di > dmax, it is necessary to calculate the average value of the lengths of other stem segments in the tangent point list, then estimate the position of the missed stem node in the overly long sugarcane seed, insert this stem node into the tangent point array, and recalculate the cut section position.

[0125] III. Conduct experiments using the above real-time dynamic recognition and positioning method for sugarcane stem nodes

[0126] 3.1 Production of the dataset

[0127] The sugarcane samples are from the sugarcane experimental field of Guangxi Subtropical Agricultural Science New City, Guangxi University, Fusui, Chongzuo City, Guangxi Zhuang Autonomous Region. A total of 404 sugarcane seeds of 6 - 8 months are collected by manual harvesting. The average length is 1.7 m, the average diameter is 30 mm, and the varieties are Zhongzhe 9 and Guitang 42. Among them, 40 sugarcane seeds with about 14 stem nodes are reserved as the test objects for actual seed cutting.

[0128] Image sample data was collected using a horizontal intelligent sugarcane pre-cutting workstation. The camera was positioned approximately 1.5 m above the conveyor chain. Sugarcane seeds were arranged horizontally above the conveyor chain at varying densities. The conveyor chain operated at a speed of approximately 0.15 m / s. Video was recorded with the camera at a resolution of 1920 × 1080 pixels. The captured video was sliced ​​frame by frame, and 439 high-quality images were selected for annotation. To improve the robustness of the model, sugarcane seed samples were used with varying colors and shapes. The original dataset was augmented using data augmentation, including flipping and brightness adjustments. This resulted in a dataset of 2634 sugarcane nodes.

[0129] Based on the sugarcane stem node dataset, the dataset was randomly divided into training set, validation set and test set in a ratio of 8:1:1. The division results are shown in Table 3.

[0130] Table 3 Sugarcane stem segment dataset division

[0131]

[0132] When the input image size is 640×640, the YOLOv5s prediction layer contains three detection heads for detecting objects of different sizes and classifying the object sizes into small objects, medium objects, and large objects. The specific classification is shown in Table 4:

[0133] Table 4 Detection target size classification

[0134]

[0135] According to the classification of target size in Table 4 and Figure 14 An observation of the label size distribution of the sugarcane segment dataset shows that most sugarcane segment objects are between 30.72 and 153.6 pixels in size, with the maximum object pixel value not exceeding 491.52. This is significantly smaller than the size of large objects detected at the P5 layer, indicating that the sugarcane segment dataset primarily contains small objects, further demonstrating the correctness of the improved multi-scale detection structure method proposed in this paper.

[0136] 3.2 Experimental Environment and Evaluation Indicators

[0137] The experimental environment of this invention is: CPU: AMD Ryzen 7 5800H, running memory 16G; GPU: NVIDIA GeForce RTX 3060, video memory 8G; operating system: 64-bit Windows 10, PyTorch deep learning framework, CUDA version 11.0.

[0138] This paper mainly uses precision (P), recall (R), average precision (AP), parameters, computational effort (GFLOPs), model size, and inference time as evaluation indicators. The average precision (AP) represents the average detection accuracy when the intersection over union (iou) (intersection over union, indicating the overlap between the output result and the true label) is 0.5, and the inference time (time) refers to the time required to detect a single sugarcane image. The specific formula is as follows:

[0139]

[0140]

[0141]

[0142] In the formula, TP stands for true positives, which refers to the number of samples correctly identified as positive by the model; FP stands for false positives, which refers to the number of negative samples incorrectly identified as positive by the model; and FN stands for false negatives, which refers to the number of positive samples incorrectly identified as negative by the model. Average precision (AP) is calculated based on the area of ​​the PR curve.

[0143] 3.3 Model Training

[0144] In this paper, YOLOv5s is selected as the original model for sugarcane stem segment recognition. The training configuration is as follows: the input image size is 640×640, the total number of epochs is 500, the batch size batch_size is 32, the initial learning rate is 0.01, the momentum parameter is 0.937, and the final learning rate is 0.001.

[0145] 3.4 Verification and comparative experiments of improved multi-scale detection

[0146] In order to verify the effectiveness of the multi-scale detection improvement, the present invention uses Grad-CAM to take the output of the two networks as input to obtain a heat map of target recognition. The heat map can be used to represent the degree of attention paid by the network to the input image information. Figure 15 and 16 As shown in the figure, by comparing the attention paid to the target sugarcane section by the improved multi-scale detection algorithm and the original YOLOv5s algorithm, the improved algorithm shows a higher degree of attention to the target sugarcane section and a lower degree of attention to irrelevant environmental information. This indicates that in this dataset, the improved multi-scale detection algorithm can better extract the characteristic information of the sugarcane section while reducing the attention paid to irrelevant environmental information, and the effect is reliable.

[0147] Next, the present invention conducted a comparative experiment on the recognition of the algorithms before and after the improvement on the sugarcane stem node test set, and named the improved multi-scale detection model YOLOv5s-p34. The experimental results are shown in Table 5:

[0148] Table 5 Comparison of recognition effects before and after improvement of the improved multi-scale detection algorithm

[0149]

[0150] Table 5 shows that after removing the P5 layer detection, the model's accuracy, recall, and average precision increased by 4.2%, 4.5%, and 4.2%, respectively. The inference time was reduced by 1.4 ms, and the model size and number of parameters were reduced by 3.5 Mb and 1.74 Mb, respectively. This comparative experiment fully validates the effectiveness of the multi-scale detection improvement, which not only effectively improves the detection accuracy of sugarcane stem nodes but also reduces the inference time, model size, and number of parameters to varying degrees.

[0151] 3.5 Ablation Experiment with Ghost Structure

[0152] To verify the optimization effect of the Ghost structure on the improved algorithm, we replaced convolutions at different locations on the YOLOv5s-34 model with the Ghost structure, then conducted training and compared model performance. Model 2 is YOLOv5s-p34, and the improvement effect of the Ghost structure on the Backbone network, the Neck network, and the overall network was tested. The experimental comparison results are shown in Table 6:

[0153] Table 6 Ablation control experiment with the introduction of Ghost structure

[0154]

[0155] Table 6 shows that the introduction of the Ghost architecture reduces model parameters, computational complexity, and size, regardless of the backbone, neck, or overall network. However, the AP values ​​of models 3 and 4 are slightly lower than those of model 2, and only model 5 has an AP value comparable to that of model 2. Therefore, model 5 is currently the best model to incorporate the Ghost architecture. The parameters in the table indicate that model 5 (the YOLOv5-p34 model with the Ghost architecture integrated) achieves a 4.2 percentage point increase in average accuracy over model 1 (the original YOLOv5s model), with precision and recall increasing by 4.6% and 4.4%, respectively. The overall model size is only 41.7% of the original model, the number of parameters is 39.9%, and the inference time is reduced by 0.7ms. Therefore, the integrated introduction of the Ghost architecture can reduce model size and parameter count while balancing model accuracy and inference speed, achieving the effect of model simplification.

[0156] 3.6 Overall performance comparison before and after algorithm improvement

[0157] 3.6.1 mAP comparison chart during training

[0158] Figure 17 This is a comparison chart of mAP before and after the overall improvement of the algorithm. It can be clearly seen from the figure that the detection accuracy of the final improved model is better than the original YOLOv5s.

[0159] 3.6.2 Detection effect comparison chart

[0160] Figure 18 and Figure 19 The following figure compares the detection performance on the test set before and after the overall algorithm improvements. It clearly shows that the improved model significantly outperforms the original YOLOv5s in terms of false detections and missed detections. Statistics show that the test set had a total of 4465 real-world samples, of which the original YOLOv5s detected 4690, with a missed detection rate of 7.4% and a false detection rate of 7%, respectively. The improved model detected 4550, with a missed detection rate of 3% and a false detection rate of 2.4%. This demonstrates the improved algorithm's higher reliability and superiority in recognition.

[0161] 3.7 Comparative Experiments with Mainstream Recognition Algorithms

[0162] In order to verify the superiority of the improved algorithm proposed in this paper compared with other mainstream small target detection algorithms with faster detection speed, this paper conducts comparative experiments with the improved algorithm and YOLOv3-tiny, YOLOv4-Mish[19,20], YOLOv5s, YOLOv5-lite-g, YOLOX-s, YOLOv7-tiny and other algorithms under the same conditions, and all use an image input size of 640*640 and a batch size of 1. The experimental results are shown in Table 7 below.

[0163] Table 7 Comparative test of mainstream algorithms

[0164]

[0165] By comparing the parameters in Table 7, it can be seen that compared with other mainstream target detection algorithms, the improved algorithm proposed in this invention has higher detection accuracy and inference speed, and the model volume is smaller than other algorithms, with higher practicality and more obvious advantages.

[0166] 3.9 Testing and cutting results during actual cutting operations

[0167] Figure 20 This is a diagram showing the effect of the present invention on detecting sugarcane nodes during real-time dynamic transmission. Figure 21The left side shows the actual cutting knife position, and the right side shows the cutting effect.

[0168] IV. Conclusion

[0169] Aiming at the problem that the existing efficiency of the sugarcane intelligent transverse pre-cutting workstation cannot meet the needs of factory cutting work, the present invention proposes an accurate, efficient and concise sugarcane stem node recognition algorithm.

[0170] First, this method significantly improves the model's detection accuracy and speed by improving the multi-scale detection structure. It then introduces a Ghost structure to simplify the model. Secondly, it uses a polynomial function and the least squares method to fit the lateral distortion ratio function, resolving the issue of lateral distortion in the image, making the cutting operation more reliable and improving cutting accuracy. The superiority of the proposed method is then demonstrated by comparison with other mainstream models and similar research algorithms. Finally, actual real-time dynamic cutting experiments verify the practicality and reliability of this method.

[0171] (1) Experimental testing showed that the improved sugarcane stem segment recognition algorithm achieved an average recognition accuracy of 98.2%, an average detection time of 13.2ms, and a model size of only 5.71MB. Compared with the original YOLOv5s model, the time was shortened by 0.7ms; the average detection accuracy increased by 4.2 percentage points, and the model size was reduced by approximately 2.4 times. Compared with the previous two generations of recognition models for the sugarcane intelligent transverse pre-cutting workstation, this model has obvious advantages, significantly improving recognition accuracy and efficiency while reducing model complexity.

[0172] (2) After correction by the lateral distortion ratio function, the average error of the incision pixels in the image is only 1.691 mm, which is fully sufficient for actual cutting operations.

[0173] (3) In order to verify the actual seed cutting situation of the prototype, 40 sugarcane seeds with about 14 nodes were selected as test objects. When the transmission speed was 0.15m / s, the recognition accuracy rate reached 98.3%, the false detection rate was 1.7%, and the missed detection rate was 1.6%. The overall efficiency was improved by 50% compared with the second-generation prototype. Combined with the closed-loop collaborative control system of cutting, the sugarcane bud damage and single bud rate were less than 3%.

[0174] The foregoing descriptions of specific exemplary embodiments of the present invention are for purposes of illustration and description. These descriptions are not intended to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been selected and described for the purpose of explaining the specific principles of the invention and their practical application, thereby enabling those skilled in the art to realize and utilize a variety of exemplary embodiments of the invention and various options and modifications. The scope of the invention is intended to be defined by the claims and their equivalents.

Claims

1. A method for real-time dynamic identification and positioning of sugarcane stem nodes, characterized in that: The following steps are involved: (1) Collect sugarcane samples; (2) Dataset creation: A camera was installed on a transverse sugarcane cutter to obtain image data of the sugarcane segments to be cut. The sugarcane segment dataset was randomly divided into a training set, a validation set, and a test set in a certain proportion. (3) Selecting models and evaluation indicators: The dataset obtained in step (2) is trained and tested on the YOLOv5s network framework to obtain the original YOLOv5s model test results; wherein, the YOLOv5s network mainly includes an input module, a backbone network module, a neck network module and a prediction head module. The prediction head module performs probability prediction and position information prediction on targets of different categories, wherein P3, P4 and P5 correspond to the detection of small, medium and large targets respectively; the accuracy, recall rate, average precision, model size and inference time are used as evaluation indicators; (4) Improved sugarcane stem segment recognition model: After bidirectional aggregation of FPN+PAN, YOLOv5s provides large, medium, and small feature channels for P3, P4, and P5 layers respectively for multi-scale detection, and removes the feature data of the large target detection layer in the detection part; and introduces the Ghost structure into the YOLOv5s network framework to construct a sugarcane stem segment recognition model; (5) Distortion correction of sugarcane node position: Fit the lateral distortion ratio function to the sugarcane image information obtained by the camera in step (2), and then obtain the true node pixel value according to the function during real-time dynamic detection; then import the processed image information into the improved sugarcane node recognition model in step (4) to obtain the sugarcane node position information; (6) Optimization of incision position selection: The incision position is calculated based on the sugarcane stem node position information obtained in step (5); Step (4) introduce the Ghost structure into the backbone network module and the neck network module of the YOLOv5s network framework; Step (4) The Ghost structure includes a Ghost convolution module and a Ghost bottleneck module; The Ghost convolution module consists of two parts: conventional convolution and linear transformation. First, a part of the feature map is obtained through limited conventional convolution. Then, more Ghost feature maps are generated using cheap linear transformation. The generated Ghost feature maps can greatly express the redundant feature information contained in the conventional convolution. Finally, the two sets of feature maps are combined through identity mapping. The Ghost bottleneck module consists of two Ghost convolution modules. The first Ghost convolution serves as an expansion layer to increase the feature dimension and expand the number of channels. The second Ghost convolution is used to reduce the number of channels to match the directly connected features, and finally output after shortcut connection.

2. The method for real-time dynamic identification and positioning of sugarcane stem nodes according to claim 1, characterized in that: The training set in step (2) is the data sample used for model fitting. During the training process, the training error is gradient-decreased to learn the trainable weight parameters. The validation set is a set of samples set aside during model training, which is used to adjust the model's hyperparameters and conduct a preliminary evaluation of the model's capabilities. The test set is used to evaluate the generalization ability of the final model.

3. The method for real-time dynamic identification and positioning of sugarcane stem nodes according to claim 1, characterized in that: The input module in step (3) is the optimization of image processing strategy and anchor box selection; The backbone network module mainly includes the C3 module and the SPPF module. The C3 module uses the residual network for residual learning; The SPPF module reduces the number of network layers based on SPP and integrates information features of different receptive fields; The neck network mainly performs feature fusion by combining a top-down feature pyramid with a top-up path aggregation network, thereby achieving bidirectional aggregation of features at different layers.

4. The method for real-time dynamic identification and positioning of sugarcane stem nodes according to claim 1, characterized in that: In step (3), the accuracy P is used to evaluate whether the target is correct; the recall rate is used to evaluate whether all the targets are found; the average precision AP represents the average detection accuracy when the overlap between the output result and the true label is 0.5, which is obtained by integrating the PR curve; the inference time refers to the time required to detect a single sugarcane image; the specific formula is as follows: In the formula, TP is the number of true positive samples, that is, the number of samples that the model determines to be positive, which is actually the number of positive samples; FP is the number of false positive samples, that is, the number of samples that the model determines to be positive, but is actually the number of negative samples; FN is the number of false negative samples, that is, the number of samples that the model determines to be negative, but is actually the number of positive samples.

5. The method for real-time dynamic identification and positioning of sugarcane stem nodes according to claim 1, characterized in that: Step (5) obtaining the true stem node pixel value includes the following steps: 5.1) Calibration of the calibration ruler and recording of lateral distortion information: Place the middle scale of the calibration ruler at the center of the test area, denoted as the origin. Within the test interface, the observed scale pixel value is recorded as O. Based on the principle of minimal distortion at the center, pixels adjacent to the origin are selected as standard pixels to infer the true pixel values ​​of other scales, denoted as R. The ratio of the true scale pixel value to the observed scale pixel value, O / R, is then recorded, with the ratio at the origin being recorded as 1. 5.2) Based on the recorded data, use symmetry to write the O and R values ​​for the two symmetrical scales on the scale ruler. Using O as the abscissa and O / R as the ordinate, draw a scatter plot of each scale. Then, fit the scattered data with a sixth-degree polynomial to obtain the distortion ratio function. 5.3) Use the distortion ratio function to restore the true pixels of the stem node in the image and obtain the true pixel value.

6. The method for real-time dynamic identification and positioning of sugarcane stem nodes according to claim 5, characterized in that: In step 5.1), the ruler is 190 cm long and has 18 scale marks, with each mark spaced 10 cm apart. The scale mark at 100 cm is then placed at the center of the test area, marking this as the origin. Step 5.2) Use the least squares method to fit the lateral distortion ratio function. The least squares formula is: Where x i 、y i is the coordinate corresponding to the scatter value, is the polynomial function model to be fitted; when the sum of the squares of the differences between the vertical coordinates of the function model and the vertical coordinates of the scatter values ​​of the entire formula is the smallest, the fit is considered to be the best; in The polynomial formula is as follows: According to the distortion information recorded in step 5.1), use symmetry to write out O, R, and O / R for 10 to 90 cm; combine the formulas in formulas (1) and (2), and substitute O and O / R into them. Where x is the observed pixel value, is the distortion ratio function; In step 5.3), the horizontal coordinate pixel value of the image ranges from 0 to 640. Before inputting the distortion ratio function, the horizontal coordinate of the target pixel needs to be shifted 320 pixels to the left before being input into formula (1). Then, the output distortion ratio is used to restore the target real pixel; the target real pixel formula is as follows: Where i is the horizontal coordinate of the target detection frame, A is the real pixel of the detection boundary obtained through measurement and calculation, and its value is 401. Substituting the target horizontal coordinate pixel detected by the model into formula (2), the real pixel value can be obtained.

7. The method for real-time dynamic identification and positioning of sugarcane nodes according to claim 1, characterized in that: The optimization of the incision position selection in step (6) includes: 1) Sort the stem node positions from smallest to largest, denoted as nodes; then record an incision position for every two stem nodes from left to right. The incision position is at the center between the second and the third stem nodes. Finally, the positions of all incisions can be obtained in sequence, denoted as tangent points, and then calculate the number of incisions at the tangent points; 2) Assume the number of cutting knives of the horizontal sugarcane cutting machine is R. If the number of incisions < R, it is necessary to calculate the number of idle cutting knives, and assign the position of the idle cutting knives as the maximum distance. If there are multiple idle cutting knives, the pixel value of 15 cm needs to be subtracted from the maximum distance in sequence because the minimum distance between adjacent cutting knives is 15 cm; If the number of incisions > R, it is necessary to select incisions from the center to both sides of the tangent points; If the number of incisions = R, no modification is required.

8. The method for real-time dynamic identification and positioning of sugarcane stem nodes according to claim 7, characterized in that: It also includes the threshold processing of the sugarcane seed length, and the method is as follows: Denote the pixel distance between adjacent incision positions in the node list as di, where i is 1, 2, 3…, the pixel thresholds of the sugarcane seed length are dmin and dmax. If di < dmin, it is necessary to find the positions of the two stem nodes contained in it among the tangent points according to the position of di, expand one more sugarcane node outward from this position, and then recalculate the incision position; If di > dmax, it is necessary to calculate the average length of other stem segments in the tangent point list, then estimate the position of the missed detected stem node in the overly long sugarcane seed, insert this stem node into the tangent point array, and recalculate the incision position.