Pre-cutting type sugarcane seed detection and screening method and system based on deep learning
The sugarcane seed detection and screening method constructed through deep learning uses strideless convolution and weighted feature fusion network, combined with video correlation frames and parallel elimination structure, to achieve automatic and efficient screening of sugarcane seeds, solve the problem of low efficiency of manual screening, and improve the production efficiency and accuracy of sugarcane planting.
Patent Information
- Application Number
- CN202510567034.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-23
AI Technical Summary
Existing sugarcane seed screening mainly relies on manual labor, which has low efficiency and low precision, resulting in high sugarcane planting costs and difficulty in effectively screening out unqualified sugarcane seeds with single stem nodes, no stem nodes, and sugarcane seeds with too close incisions.
A pre-cut sugarcane seed detection and screening method based on deep learning is adopted. The detection model is constructed using strideless convolution and weighted bidirectional feature fusion network. The quality of sugarcane seeds is judged by combining video correlation frames, and automated screening is achieved through a parallel elimination structure.
It realizes the automated and efficient screening of sugarcane seeds, reduces labor costs, improves screening accuracy and production efficiency, adapts to different sugarcane planting environments, and has strong versatility and adaptability.
Smart Images

Figure CN120689714A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural machinery automation, and in particular to a pre-cut sugarcane seed detection and screening method and system based on deep learning. Background Art
[0002] Pre-cut sugarcane seed planting typically uses double-bud segments, which are obtained using fixed-length pre-cut sugarcane seed cutters, segmented sugarcane harvesters, or manual cutting. Double-bud segments are screened and sterilized for controlled quality. They offer advantages such as reduced pest and disease risk, low seed requirements, and high germination, survival, and yield rates. Pre-cut sugarcane seed comes in various forms: single-stem segments, double-stem segments, and stemless segments. The germination point is always at the node. Single-stem segments, with a cut at each end, are exposed to air, leading to dehydration and deterioration, making them difficult to store. Sugarcane varieties with multiple nodes are susceptible to apical dominance, leading to uneven germination. Therefore, double-node segments are generally used as the standard for qualified sugarcane. DB45 / T 2550-2022, Technical Requirements for Stem Segmentation in the Guangxi Zhuang Autonomous Region, states that an incision less than 5mm from the node will affect node germination. Therefore, unqualified sugarcane varieties that fail pre-cut double-bud segments during seed preparation primarily include single-bud segments, segments without nodes, and double-node segments with incisions too close to the node.
[0003] Currently, sugarcane seed selection is typically performed manually, resulting in low production efficiency and high labor intensity. This low efficiency increases sugarcane cultivation costs. Therefore, for large-scale seed production using machine- and segmented sugarcane harvesters, the development of an intelligent, pre-cut sugarcane seed screening system employs image recognition, deep learning, and automated control technologies. This technology plays a crucial role in ensuring increased sugarcane production and revenue.
[0004] 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
[0005] The purpose of the present invention is to provide a pre-cut sugarcane seed detection and screening system and method based on deep learning, so as to overcome the shortcomings of low sugarcane seed screening efficiency, low sugarcane seed screening accuracy, and poor sugarcane seed processing quality.
[0006] To achieve the above objectives, the present invention provides a pre-cut sugarcane seed detection and screening method based on deep learning, comprising the following steps:
[0007] (1) Collect image data of various sugarcane varieties, process the image data, and establish a benchmark dataset;
[0008] (2) Constructing a network model, the network model adopts a strideless convolution and weighted bidirectional feature fusion network structure, and uses the benchmark data set of step (1) to train the network model to obtain a trained weight file;
[0009] (3) Deploying the trained file in step (2) to the actual application scenario, inputting the sugarcane seed image in the actual detection scenario into the network model to obtain the characteristic information of the sugarcane image;
[0010] (4) Using the characteristic information of the sugarcane image extracted in step (3), the quality of the sugarcane seeds in the input image is judged by the sugarcane seed quality discrimination algorithm. For sugarcane seeds judged as unqualified, their image coordinates are recorded, their distance from the rejection mechanism is calculated, and the inferior seed rejection information is sent to the rejection mechanism;
[0011] (5) The inferior seed elimination structure receives the inferior seed elimination task, starts calculating the action time, and eliminates the unqualified sugarcane seeds in a timely manner.
[0012] Preferably, in the above technical solution, step (1) of processing the image data includes labeling the image data of the sugarcane seeds, labeling sugarcane feature data containing specific semantics, and using the labeling results containing specific semantics and various categories of sugarcane images as a benchmark data set for the sugarcane detection and screening system; wherein the specific semantics of the sugarcane feature data include: incision, stem node and whole piece of sugarcane seeds.
[0013] Preferably, in the above technical solution, the network model of step (2) uses YOLOv8 as a benchmark model, and includes a feature processing module, a weighted feature fusion module, and a detection module: the feature processing module obtains a multi-scale feature map of the input image through a feature extraction operation; the weighted feature fusion module can perform a weighted fusion operation on the multi-scale feature map obtained by the feature processing module, and fuse more semantic information to obtain a feature map with richer information; the detection module is used to further weight the processing results of the feature fusion module and convert it into the border information or category information of the target feature.
[0014] Preferably, in the above technical solution, the process of the feature processing module acquiring the multi-scale feature map includes: each feature extraction operation in the feature processing module includes a convolution layer processing, the input image undergoes multiple feature extraction operations, and obtains a feature image output by the convolution layer;
[0015] The convolutional layer of the feature extraction operation uses strideless convolution (SPD-Conv). The process is as follows: Assuming the size of the feature map is S×S×C1, where S×S is the length and width of the feature map, and C1 is the number of channels of the feature map, the SPD convolution layer divides and samples the feature map proportionally according to the following formula:
[0016] f i,j =X[i:S:scale,j:S:scale]
[0017] The scale represents the scale factor of the feature map reduction, generating a sub-feature map, such as f 0,0 , f 0,1 , f 1,0 , f 1,1 , the size of each subgraph is
[0018] Then, these sub-feature maps are spliced along the channel dimension to obtain a new feature map X′, that is, the feature map X(S×S×C1) is converted to
[0019] Preferably, in the above technical solution, the feature fusion module adopts a weighted bidirectional feature pyramid fusion network structure, and the weighted fusion process is:
[0020] In the feature fusion process, learnable weights are introduced so that the network can automatically learn the importance of each feature map and perform weighted fusion on them with different weights, highlighting the weights of feature maps with large contributions and suppressing the weights of unimportant feature maps to optimize the feature map fusion effect. The weighting method is:
[0021]
[0022] where ω i Is a learnable weight that represents the i-th input feature map I i The importance of i ≥0, ε=0.0001 is a very small value to prevent the denominator from being zero, and O represents the output feature map.
[0023] Preferably, in the above technical solution, the main function of the sugarcane seed quality discrimination algorithm in step (4) includes detecting unqualified sugarcane seeds with incisions too close to the stem nodes, single sugarcane nodes, and no sugarcane nodes, and using a method combining video correlation frames to judge inferior seeds: the process includes:
[0024] 1) Obtain the image information of the current video frame and detect the characteristics of the sugarcane seeds. Assign a unique ID to each sugarcane seed segment. When unqualified sugarcane seeds are detected, record the ID information of the unqualified sugarcane seed segment in the current image frame and create a dictionary data type with the unqualified sugarcane seed segment ID as the key and the value set to 1;
[0025] 2) Continue to detect the image information of the next frame, count the ID information of the unqualified sugarcane varieties in the current image frame, and use the current unqualified sugarcane variety ID to retrieve the current key-value pair. If the same key exists, the corresponding value is increased by 1. If the same key does not exist, repeat step 1) to create a new key-value pair.
[0026] 3) When the value of a key-value pair is greater than 10, that is, the sugarcane seed segment with the same ID is detected in 10 consecutive frames of images, the sugarcane seed segment with this ID is determined to be unqualified sugarcane seed.
[0027] Preferably, in the above technical solution, a dual-timer delay control algorithm is used in step (5) to calculate the action execution time of the rejection mechanism; the calculation formula is:
[0028]
[0029] Where K represents the pending culling task, K = 0 or K > 0 respectively represents that there is or is no pending culling task, timing represents the interval between the last two culling task reception times, T represents the received delay time, and T′ represents the actual delay time.
[0030] Preferably, in the above technical solution, the inferior seed elimination structure adopts a parallel dual elimination structure, and the elimination tasks are allocated between the two elimination structures through mutually exclusive logic; the specific steps are:
[0031] 1) When a rejection structure receives a bad rejection task, it starts a timer countdown and locks the use right of the current rejection structure. After time t1, the lock is released again. t1 is the time required for the rejection structure to run once.
[0032] 2) When one of the rejection structures is in the locked state, the received rejection task is assigned to the other rejection structure;
[0033] When assigning culling tasks, the following requirements are made for the spacing of sugarcane seeds:
[0034] Where D is the spacing of sugarcane seeds, V is the sugarcane seed conveying speed, and t2 is the time required for the rejection mechanism to operate once.
[0035] A pre-cut sugarcane seed detection and screening system, the system comprising, in sequence along the direction of movement of the sugarcane seeds:
[0036] The seed supply mechanism includes a sugarcane collecting box, an elevator belt, a sugarcane sorting plate, and a conveyor belt. The elevator belt extends into the sugarcane collecting box. The surface of the elevator belt is provided with evenly distributed sugarcane receiving grooves, the width of which is less than the diameter of two sugarcane stalks. The sugarcane sorting plate is provided above the upper surface of the elevator belt, and the conveyor belt is provided at the discharge end of the elevator belt. (The description of the drop baffle has been deleted, as I think it is dispensable.)
[0037] a sugarcane image acquisition mechanism, which is provided above the conveyor belt of the seed supply mechanism and is used to collect image data of the sugarcane seed segments conveyed by the seed supply mechanism; and
[0038] An inferior seed rejection mechanism is provided at the rear end of the sugarcane image acquisition mechanism and is used to reject detected unqualified sugarcane seeds.
[0039] Preferably, in the above technical solution, the sugarcane image acquisition mechanism includes a black box, a light strip and a camera, the light strip and the camera are arranged in the black box, the light strip provides a non-stroboscopic light source, and the camera acquires the image of the sugarcane seeds in the conveying state;
[0040] Preferably, in the above technical solution, the inferior seed rejection mechanism includes two working units, each of which can work independently, and the two action units work in parallel, and the working units slide left and right to reject unqualified sugarcane seeds.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] (1) The present invention is based on a deep learning method for detecting and screening pre-cut sugarcane seeds, which is used to screen sugarcane segments with close cuts, single stem nodes, or no stem nodes in the process of pre-cut sugarcane seed preparation. First, a strideless convolution and a weighted bidirectional feature fusion network are used to construct a network model suitable for sugarcane seed detection and screening, which optimizes the detail loss and information degradation problems of the original model and improves the detection accuracy and robustness; secondly, a sugarcane seed quality tracking and discrimination algorithm is integrated, and video correlation frames are used to judge the quality of sugarcane seeds, reducing the probability of misjudgment; finally, a parallel elimination structure control algorithm is designed, which allocates elimination tasks based on mutually exclusive logic to achieve accurate elimination of inferior seeds. The method of the present invention integrates multiple links such as data acquisition, deep learning analysis, and result feedback, can achieve fully automated operation, reduce labor costs, improve production efficiency, and can adapt to different sugarcane planting environments, with strong versatility and adaptability.
[0043] (2) The method of the present invention uses an improved multi-scale feature fusion and efficient downsampling in the detection model. By introducing a weighted bidirectional feature fusion pyramid structure and uncompensated convolution as a downsampling module, it can more effectively extract multi-scale information and reduce information loss during the downsampling process. The weighted bidirectional feature fusion pyramid structure can accurately fuse features of different scales, improving the model's ability to perceive sugarcane species characteristics, while the SPD-Conv module can maintain higher feature expression during downsampling, avoiding the common problems of detail loss and information degradation in traditional strided convolution methods, thereby improving detection accuracy and robustness.
[0044] (3) The method of the present invention efficiently parallelizes rejection and intelligent time control. By using two parallel inferior rejection structures and combining them with a dual-timer delay control algorithm, the actions of each rejection structure can be precisely controlled within different time windows, thereby achieving efficient inferior rejection. The dual-timer algorithm ensures the precise timing of the rejection action and improves the coordination and stability of the overall operation. At the same time, the task allocation strategy of the mutually exclusive logic ensures that the tasks between the two parallel structures are reasonably allocated, avoiding conflicts and redundant operations, making the rejection process more intelligent and smooth, and further improving the detection and rejection efficiency.
[0045] (4) The system of the present invention includes a sugarcane seed orderly supply structure, a sugarcane seed image acquisition structure and a poor seed rejection structure, wherein the sugarcane seed orderly supply structure serves as the entrance to the entire system, and orderly delivers disordered sugarcane seeds into the system; the sugarcane seed image acquisition structure is responsible for acquiring sugarcane image information under actual working conditions; and the poor seed rejection structure uses two separate action units, which can perform rejection tasks in parallel. By adopting automated seed supply and modular design, the sugarcane seeds are automatically and orderly transported to the image recognition area, avoiding the tedious manual seed placement and improving the seed supply efficiency. At the same time, the structure has good modular characteristics and can be flexibly used in combination with a seed cutter, or operate independently to adapt to different production needs and operating environments, further improving versatility and adaptability.
[0046] (5) The present invention combines the method and system to form a sugarcane seed detection and screening method and system based on deep learning, which integrates multiple links such as material transportation, data acquisition, quality inspection and inferior seed elimination. It can achieve fully automated operation, reduce labor costs, and improve production efficiency. It can also be applied to actual sugarcane seed preparation production lines and has strong versatility and adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a workflow diagram of the deep learning-based pre-cut sugarcane seed detection and screening method according to the present invention;
[0048] Figure 22 is a schematic diagram of the principle of the stride-free convolution (SPD-Conv) in the pre-cut sugarcane seed detection and screening method based on deep learning according to the present invention;
[0049] Figure 3 is a schematic diagram of the principle of using mutually exclusive logic to allocate rejection tasks in the pre-cut sugarcane seed detection and screening method based on deep learning according to the present invention;
[0050] Figure 4 It is a structural schematic diagram of the pre-cut sugarcane seed detection and screening system of the present invention.
[0051] Figure 5 This is a schematic diagram of the defective rejection structure. (9. Slide rail 10. Stepper motor 11. Coupling 12. Slide table 13. Defective scraper) DETAILED DESCRIPTION
[0052] 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.
[0053] 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.
[0054] like Figures 1 to 4 As shown, a pre-cut sugarcane seed detection and screening method based on deep learning according to a specific embodiment of the present invention includes the following steps:
[0055] Step 1: Collect image data of various sugarcane varieties, process the image data, and establish a benchmark dataset;
[0056] Image data of various sugarcane varieties are collected, and sugarcane feature data with specific semantics are annotated on the collected image data of various sugarcane varieties. The annotated results with specific semantics and various categories of sugarcane images are used as the benchmark data set for the sugarcane variety detection and screening system.
[0057] Image data of various sugarcane segments, cut manually or by a sugarcane cutter, was collected. This data captures diverse characteristics of the sugarcane segments at different exposures and conveying speeds. Image annotation tools were used to annotate the collected image data, using rectangular boxes to select and annotate specific semantic regions. These semantically annotated regions include the cut, the stem node, and the entire segment.
[0058] The specific steps involved first collecting samples of various sugarcane segments, either manually or by a sugarcane cutter. Under conditions similar to actual work scenarios, these images were recorded or photographed at different exposure settings and conveyor speeds. Image data for each type of sugarcane segment was collected, yielding at least 3,000 sample sugarcane images. After collecting the image data for each type of sugarcane segment, an image annotation tool was used to annotate the data. Specific semantic regions were selected and labeled using rectangular boxes. Semantic annotation regions for sugarcane segments included cuts, stem nodes, and entire segments. The image sample data and labeled text were combined in the VOC format to create a sugarcane benchmark dataset.
[0059] Step 2: Build a network model, use the benchmark data set to train the network model, and obtain a trained weight file;
[0060] The network model for sugarcane seed detection and screening uses YOLOv8 as the baseline model. It consists of a feature processing module, a weighted feature fusion module, and a detection module. The feature processing module extracts features to obtain multi-scale feature maps of the input image. The weighted feature fusion module performs a weighted fusion operation on the multi-scale feature maps obtained by the feature processing module, integrating more semantic information to obtain feature maps with richer information. The detection module further weights the processing results of the feature fusion module and converts them into bounding box information or category information of the target feature.
[0061] The process of obtaining multi-scale feature maps by the feature processing module includes: each feature extraction operation in the feature processing module includes a convolution layer processing, the input image undergoes multiple feature extraction operations, and a feature image output by the convolution layer is obtained;
[0062] The convolutional layer of the feature extraction operation uses strideless convolution (SPD-Conv) as the downsampling module. The process is as follows: Assuming the size of the feature map is S×S×C1, where S×S is the length and width of the feature map, and C1 is the number of channels of the feature map, the SPD layer divides and samples the feature map proportionally according to the following formula:
[0063] f i,j =X[i:S:scale,j:S:scale]
[0064] The scale represents the scale factor of the feature map reduction, generating a sub-feature map, such as f 0,0 , f 0,1 , f 1,0 , f 1,1 , the size of each subgraph is
[0065] Then, these sub-feature maps are spliced along the channel dimension to obtain a new feature map X′, that is, the feature map X(S×S×C1) is converted to In order to achieve the purpose of downsampling while retaining more detail information.
[0066] After the feature map passes through SPD-Conv, it passes through a non-step convolution layer containing C2 channels, and makes C2 < scale 2 C1, ensure that after the non-step convolution, the number of channels of the feature map X″ is appropriately reduced, and X′ is converted to Reduce computing pressure.
[0067] The feature fusion module adopts a weighted bidirectional feature pyramid fusion network structure. The weighted fusion process is to introduce learnable weights in the feature fusion process so that the network can automatically learn the importance of each feature map and perform weighted fusion on them with different weights, highlighting the weights of feature maps with large contributions and suppressing the weights of unimportant feature maps to optimize the feature map fusion effect. The weighting method is:
[0068]
[0069] where ω i Is a learnable weight that represents the i-th input feature map I i The importance of i ≥0, ε=0.0001 is a very small value to prevent the denominator from being zero, and O represents the output feature map.
[0070] Use the benchmark dataset for training as follows:
[0071] The training framework chosen was PyTorch 2.1.1, and CUDA 12.1 was used to increase training speed. Training parameters: input image size was 640×640, batch size was 16, SGD was the optimizer, initial and final learning rates were set to 0.01, weight decay was 0.0005, the number of training epochs was 300, and all other parameters retained their default values. To ensure final convergence of the model on real data, mosaic online data augmentation was disabled for the last 10 epochs of training.
[0072] Step 3: Deploy the trained file to the actual application scenario, input the sugarcane seed image in the actual detection scenario into the network model, and obtain the characteristic information of the sugarcane image.
[0073] The process of file deployment is as follows:
[0074] The weight file with the highest accuracy on the validation set from the training results was selected as the final deployment model file. The NVIDIA Jetson Edge Computing Edition was used as the computing unit, and TensorRT was used to accelerate inference. An industrial camera was used to capture images of sugarcane seeds in actual inspection scenarios as input, and the captured video frames were fed into the deployed model using the OpenCV toolkit.
[0075] Step 4: Use the extracted feature information of the sugarcane image to determine the quality of the sugarcane seeds in the input image through the sugarcane seed quality discrimination algorithm. For sugarcane seeds judged as unqualified, record their image coordinates, calculate their distance from the rejection mechanism, and send the inferior seed rejection information to the rejection mechanism.
[0076] The sugarcane seed quality identification algorithm mainly detects unqualified sugarcane seeds with incisions too close to the stem nodes, single nodes, or no nodes. It uses a method that combines video correlation frames to identify inferior seeds. The process is as follows:
[0077] 1) Obtain the image information of the current video frame and detect the characteristics of the sugarcane seeds. Assign a unique ID to each sugarcane seed segment. When unqualified sugarcane seeds are detected, record the ID information of the unqualified sugarcane seed segment in the current image frame and create a dictionary data type with the unqualified sugarcane seed segment ID as the key and the value set to 1.
[0078] 2) Continue to detect the image information of the next frame, count the ID information of unqualified sugarcane varieties in the current image frame, and use the current unqualified sugarcane variety ID to retrieve the current key-value pair. If the same key exists, its corresponding value is increased by one. If the same key does not exist, repeat step 1) to create a new key-value pair.
[0079] 3) When the value of a key-value pair is greater than 10, that is, the sugarcane seed segment with the same ID is detected in 10 consecutive frames of images, the sugarcane seed segment with this ID is determined to be unqualified sugarcane seed.
[0080] Step 5: The inferior seed removal structure receives the inferior seed removal task, starts calculating the action time, and removes the unqualified sugarcane seeds in a timely manner.
[0081] The dual-timer delay control algorithm is used to calculate the action execution time of the rejection mechanism; the calculation formula is:
[0082]
[0083] Where K represents the pending culling task, K = 0 or K > 0 respectively represents that there is or is no pending culling task, timing represents the interval between the last two culling task reception times, T represents the received delay time, and T′ represents the actual delay time.
[0084] In the above technical solution, reference Figure 5 The inferior seed elimination structure adopts a parallel dual elimination structure, and the elimination tasks are allocated between the two elimination structures through mutual exclusion logic; the specific steps are:
[0085] 1) When a rejection structure receives a bad rejection task, it starts a timer countdown and locks the use right of the current rejection structure. After time t1, the lock is released again. t1 is the time required for the rejection structure to run once.
[0086] 2) When one of the rejection structures is in the locked state, the received rejection task is assigned to the other rejection structure;
[0087] When assigning culling tasks, the following requirements are made for the spacing of sugarcane seeds:
[0088] Where D is the spacing of sugarcane seeds, V is the sugarcane seed conveying speed, and t2 is the time required for the rejection mechanism to operate once.
[0089] like Figure 4 The figure shows a pre-cut sugarcane seed detection and screening system. The system comprises a seed supply mechanism, a sugarcane image acquisition mechanism, and a low-quality seed rejection mechanism, arranged in sequence along the direction of sugarcane seed movement. These mechanisms are mounted on a frame 1. The seed supply mechanism includes a sugarcane collection box 2, an elevator belt 3, a sugarcane sorting plate 4, a drop baffle 5, and a conveyor belt 6. The lower end of the elevator belt 3 extends to the bottom of the collection box 2. Evenly distributed sugarcane troughs 31 are arranged on the elevator belt 3's surface. The width of the troughs 31 is greater than the diameter of one sugarcane stick and less than the diameter of two sugarcanes. These troughs are used to orderly extract sugarcane seeds. A sugarcane sorting plate 4 is positioned above the upper surface of the elevator belt 3 to sort out any sugarcane seeds that are not transported in the elevator belt's troughs 31. The drop baffle 5 is positioned vertically, located in the middle and rear section of the elevator belt 3, and covers the upper surface of the elevator belt 3. This prevents the elevator belt 3 from rolling during transport and ensures the orderly delivery of sugarcane seeds to the sugarcane image acquisition mechanism 7.
[0090] The sugarcane image acquisition mechanism 7 is located above the conveyor belt of the seed supply mechanism and is used to collect image data of the sugarcane seed segments conveyed by the seed supply mechanism. The sugarcane image acquisition mechanism includes a black box, a light strip, and a camera. The light strip and camera are located within the black box. The light strip provides a non-stroboscopic light source, and the camera captures images of the sugarcane seeds during transport.
[0091] The inferior seed rejection mechanism 8 is located at the rear end of the sugarcane image acquisition mechanism 7 and is used to reject detected unqualified sugarcane seeds. The inferior seed rejection mechanism 8 comprises two operating units powered by a stepper motor. Each operating unit can operate independently, and the two operating units operate in parallel, sliding left and right to reject unqualified sugarcane seeds.
[0092] The rejection mechanism 8 is used to remove unqualified sugarcane seeds from the conveyor belt. Its basic structure utilizes a high-speed synchronous belt slide module, primarily consisting of a slide rail 81, a stepper motor 82, a coupling 83, a slide 84, and a low-quality scraper 85. The low-quality scraper is made of rubber to increase friction during the rejection process and reduce the transient force generated when contacting the low-quality sugarcane. During operation, the stepper motor, powered by a synchronous belt, drives the slide and low-quality scraper in a reciprocating motion, with each single stroke completing a low-quality rejection action. To improve the efficiency of low-quality rejection, the system utilizes two independent rejection mechanisms. During operation, these two mechanisms coordinate their removal tasks, with the control center coordinating and allocating the low-quality rejection tasks. This can double the rejection efficiency. The foregoing description of specific exemplary embodiments of the present invention is for illustrative and illustrative purposes only. This description is not intended to limit the invention to the precise form disclosed, and it is readily apparent that numerous modifications and variations are possible based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various exemplary embodiments and various choices and changes of the present invention. The scope of the present invention is intended to be defined by the claims and their equivalents.
Claims
1. A pre-cut sugarcane seed detection and screening method based on deep learning, characterized in that: The following steps are involved: (1) Collect image data of various sugarcane varieties, process the image data, and establish a benchmark dataset; (2) Constructing a network model, the network model adopts a strideless convolution and weighted bidirectional feature fusion network structure, and uses the benchmark data set of step (1) to train the network model to obtain a trained weight file; (3) Deploying the trained file in step (2) to the actual application scenario, inputting the sugarcane seed image in the actual detection scenario into the network model to obtain the characteristic information of the sugarcane image; (4) Using the characteristic information of the sugarcane image extracted in step (3), the quality of the sugarcane seeds in the input image is judged by the sugarcane seed quality discrimination algorithm. For sugarcane seeds judged as unqualified, their image coordinates are recorded, their distance from the rejection mechanism is calculated, and the inferior seed rejection information is sent to the rejection mechanism; (5) The inferior seed elimination structure receives the inferior seed elimination task, starts calculating the action time, and eliminates the unqualified sugarcane seeds in a timely manner.
2. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 1, characterized in that: Step (1) of processing image data includes labeling the image data of sugarcane seeds, labeling sugarcane feature data containing specific semantics, and using the labeling results containing specific semantics and various categories of sugarcane images as a benchmark data set for the sugarcane detection and screening system; wherein the specific semantics of the sugarcane feature data include: incision, stem node, and whole sugarcane seed.
3. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 1, characterized in that: The network model of step (2) uses YOLOv8 as the benchmark model, including a feature processing module, a weighted feature fusion module and a detection module: The feature processing module obtains a multi-scale feature map of the input image through a feature extraction operation; The weighted feature fusion module can perform a weighted fusion operation on the multi-scale feature map obtained by the feature processing module, fusing more semantic information to obtain a feature map with richer information; The detection module is used to further weight the processing results of the feature fusion module and convert them into the frame information or category information of the target feature.
4. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 3, characterized in that: The process of the feature processing module obtaining the multi-scale feature map includes: each feature extraction operation in the feature processing module includes a convolution layer processing, the input image undergoes multiple feature extraction operations, and a feature image output by the convolution layer is obtained; The strideless convolution SPD-Conv is used as the downsampling module in the convolution layer of the feature extraction operation. The process is as follows: Assuming that the size of the feature map is S×S×C1, where S×S is the length and width of the feature map, and C1 is the number of channels of the feature map, the SPD layer divides and samples the feature map proportionally according to the following formula: f i,j =X[i:S:scale,j:S:scale] The scale represents the scale factor of the feature map reduction, generating a sub-feature map, such as f 0,0 , f 0,1 , f 1,0 , f 1,1 , the size of each subgraph is Then, these sub-feature maps are spliced along the channel dimension to obtain a new feature map X′, that is, the feature map X(S×S×C1) is converted to 5. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 3, characterized in that: The feature fusion module adopts a weighted bidirectional feature pyramid fusion network structure, and the weighted fusion process is as follows: In the feature fusion process, learnable weights are introduced so that the network can automatically learn the importance of each feature map and perform weighted fusion on them with different weights, highlighting the weights of feature maps with large contributions and suppressing the weights of unimportant feature maps to optimize the feature map fusion effect. The weighting method is: where ω i Is a learnable weight that represents the i-th input feature map I i The importance of i ≥0, ε=0.0001 is a very small value to prevent the denominator from being zero, and O represents the output feature map.
6. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 1, characterized in that: Step (4) The main functions of the sugarcane seed quality discrimination algorithm include detecting unqualified sugarcane seeds with incisions too close to the stem nodes, single sugarcane nodes, and no sugarcane nodes, and using a method combining video correlation frames to judge inferior seeds. The process includes: 1) Obtain the image information of the current video frame and detect the characteristics of the sugarcane seeds. Assign a unique ID to each sugarcane seed segment. When unqualified sugarcane seeds are detected, record the ID information of the unqualified sugarcane seed segment in the current image frame and create a dictionary data type with the unqualified sugarcane seed segment ID as the key and the value set to 1; 2) Continue to detect the image information of the next frame, count the ID information of the unqualified sugarcane varieties in the current image frame, and use the current unqualified sugarcane variety ID to retrieve the current key-value pair. If the same key exists, the corresponding value is increased by 1. If the same key does not exist, repeat step 1) to create a new key-value pair. 3) When the value of a key-value pair is greater than 10, that is, the sugarcane seed segment with the same ID is detected in 10 consecutive frames of images, the sugarcane seed segment with this ID is determined to be unqualified sugarcane seed.
7. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 1, characterized in that: In step (5), the dual timer delay control algorithm is used to calculate the action execution time of the rejection mechanism; the calculation formula is: Where K represents the pending culling task, K = 0 or K > 0 respectively represents that there is or is no pending culling task, timing represents the interval between the last two culling task reception times, T represents the received delay time, and T′ represents the actual delay time.
8. The deep learning-based pre-cut sugarcane seed detection and screening method according to claim 1, characterized in that: The inferior seed elimination structure adopts a parallel dual elimination structure, and the elimination tasks are allocated between the two elimination structures through mutually exclusive logic; the specific steps are: 1) When a rejection structure receives a bad rejection task, it starts a timer countdown and locks the use right of the current rejection structure. After time t1, the lock is released again. t1 is the time required for the rejection structure to run once. 2) When one of the rejection structures is in the locked state, the received rejection task is assigned to the other rejection structure; When assigning culling tasks, the following requirements are made for the spacing of sugarcane seeds: Where D is the spacing of sugarcane seeds, V is the sugarcane seed conveying speed, and t2 is the time required for the rejection mechanism to operate once.
9. A pre-cut sugarcane seed detection and screening system according to the method of claim 1, characterized in that: The system includes the following steps along the direction of sugarcane seed transportation: The seed supply mechanism includes a sugarcane collecting box, an elevator belt, a sugarcane sorting plate, and a conveyor belt. The elevator belt extends into the sugarcane collecting box. The surface of the elevator belt is provided with evenly distributed sugarcane troughs in the transverse direction. The width of the sugarcane troughs is less than the diameter of two sugarcanes. The sugarcane sorting plate is provided above the upper surface of the elevator belt. The conveyor belt is provided at the discharge end of the elevator belt. a sugarcane image acquisition mechanism, which is provided above the conveyor belt of the seed supply mechanism and is used to collect image data of the sugarcane seed segments conveyed by the seed supply mechanism; and An inferior seed rejection mechanism is provided at the rear end of the sugarcane image acquisition mechanism and is used to reject detected unqualified sugarcane seeds.
10. The pre-cut sugarcane seed detection and screening system according to claim 9, characterized in that: The sugarcane image acquisition mechanism includes a black box, a light strip, and a camera. The light strip and the camera are arranged in the black box. The light strip provides a non-stroboscopic light source. The camera acquires images of sugarcane seeds in a conveying state. The inferior seed rejection mechanism includes two working units, each of which can work independently, and the two action units work in parallel. The working units slide left and right to reject unqualified sugarcane seeds.