Device for classifying corn ears and control system thereof
By designing a corn ear classification device combining mechanical screening and deep learning technology, the shortcomings of existing equipment in recognition accuracy, environmental adaptability and variety adaptability are solved, efficient and accurate automated classification is achieved, and the stability of seed quality is improved.
Patent Information
- Application Number
- CN202411977718.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-22
AI Technical Summary
The existing corn ear classification equipment has insufficient identification accuracy, ambient light adaptability and variety adaptability, resulting in low classification efficiency, low accuracy and inability to meet the needs of diversified agricultural production scenarios.
A corn ear classification device including a belt drive, identification camera, cylinder and control system was designed, and image acquisition and classification prediction is used to combine mechanical screening and deep learning technology to achieve automated classification.
It improves the degree of automation of corn ear classification, reduces labor costs, improves classification efficiency and accuracy, can meet the needs of large-scale sorting, and significantly improves the stability of seed quality.
Smart Images

Figure CN119857655A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of agricultural machinery and automation control, and in particular to a device for corn ear classification and a control system thereof. Background Art
[0002] In the corn seed production process, accurate classification and sorting of corn ears is an important part of ensuring seed quality. At present, the traditional corn ear sorting work mainly relies on manual operation, which is not only inefficient, but also has a serious impact on the health of operators working in an environment full of dust and noise. In addition, the accuracy of manual sorting is greatly affected by the subjective factors of the operator, making it difficult to ensure stable sorting quality.
[0003] Existing corn ear classification equipment based on visual inspection has many problems that need to be solved. In terms of recognition accuracy, it is often difficult to accurately distinguish corn ears of different shapes, resulting in a large number of corn ears being misclassified or misclassified, which seriously affects the seed screening quality and the stability of subsequent agricultural production.
[0004] These devices have obvious limitations in dealing with different ambient lighting conditions. Whether it is an overexposed area under strong light or a dark corner in a weak light environment, it is very easy to cause distortion and blurring of image acquisition, which in turn leads to deviations and errors in recognition results, and cannot meet the actual needs of diversified agricultural production scenarios.
[0005] Existing equipment lacks sufficient flexibility and versatility in adapting to different corn varieties. Since corn varieties vary significantly in terms of cob size, shape, color, and texture, and these equipment are usually optimized only for specific varieties, they are unable to effectively extract and identify key features when processing other varieties, greatly reducing the classification effect.
[0006] With the development of modern agriculture, the demand for high-quality seeds is increasing, and there is an urgent need for an efficient, accurate and automated corn ear sorting device and method. Summary of the invention
[0007] One object of the present invention is to provide a device for classifying corn ears, which can realize automatic classification and sorting of corn ears, improve sorting efficiency and accuracy, reduce labor costs, and improve the working environment; another object of the present invention is to provide a control system for the corn ear classification device.
[0008] To achieve the above-mentioned purpose, the device for corn ear classification of the present invention comprises a belt conveyor feed port, wherein the belt conveyor feed port is a trough structure, and ribs are arranged on both sides of the trough;
[0009] A belt conveyor, the feed end of which is fixedly connected to the discharge end of the belt conveyor feed port, and baffles are provided on both sides of the belt conveyor;
[0010] The belt conveyor discharge port, the feed end of which is hinged to the discharge end of the belt conveyor through a hinge;
[0011] The recognition camera is arranged directly above the belt conveyor through a mounting frame with an adjustment function, wherein the mounting frame is a gantry bracket, and the recognition camera is a high-resolution industrial camera with a transparent dust cover outside the lens;
[0012] A guide plate, a connecting plate is provided between the two baffles of the belt conveyor, and the connecting plate is fixedly connected to the upper end of the guide plate;
[0013] The normal corn belt conveyor is arranged on the discharge end side of the belt conveyor discharge port through a bracket. When the belt conveyor discharge port is in the initial working position coaxial with the belt conveyor, the normal corn belt conveyor is located directly below the output end of the belt conveyor discharge port;
[0014] The miscellaneous corn belt conveyor is arranged on the discharging end side of the belt conveyor discharging port through a bracket. The miscellaneous corn belt conveyor is located directly below the output end of the belt conveyor, and its center line completely coincides with the vertical projection of the output end of the belt conveyor;
[0015] The cylinder base is arranged on the bottom surface of the belt conveyor and fixed;
[0016] The cylinder is arranged on the cylinder base, the cylinder is connected to the air source through an air pipe, a pressure regulating valve is arranged on the air pipe, and the output end of the cylinder is connected to the bottom surface of the belt conveyor discharge port.
[0017] The height of the ribs on both sides of the belt conveyor feed port trough is h1, and the range of h1 is 10-20 cm.
[0018] The resolution of the recognition camera is greater than or equal to 1920×1080 pixels, and the focal length range of the lens is 5-15 mm.
[0019] The recognition camera and the cylinder are electrically connected to a control unit respectively. The control unit is used to receive the detection result of the recognition camera and control the cylinder according to the detection result to divert the corn ears to a normal corn belt conveyor or a mixed corn belt conveyor through a belt conveyor discharge port.
[0020] The recognition camera is an industrial camera with a shooting frame rate of 50 frames per second and a resolution of 2 million pixels. The shooting area of the recognition camera covers the corn ears on the belt conveyor. It also includes a light source, which is arranged on one side or both sides of the recognition camera. The light source is an LED light source with a color temperature of 5000-7000K and a light intensity of 60-100 lux. The transmission speed of the belt conveyor is 0.33 m / s, and the belt surface of the belt conveyor has an anti-slip texture.
[0021] The control system for a corn ear classification device of the present invention comprises the following steps:
[0022] Image acquisition: The image of corn ears is acquired by using a recognition camera. The parameters of the recognition camera are set to clearly capture the morphological characteristics of the corn ears, and the acquisition frequency is adapted to the transmission speed of the transmission device to ensure that each corn ear is imaged at least once when passing through the acquisition area;
[0023] Model prediction: The collected corn ear images are input into a pre-trained corn ear classification model based on deep learning for prediction. The model adopts an improved YOLOv5 architecture, which performs data enhancement processing on the image at the input end and has the ability to recognize corn ears of different shapes, and obtains multiple sets of position information prediction results and multiple sets of category prediction information results;
[0024] Result analysis: The prediction information is processed by setting a specific confidence threshold, intersection-over-union ratio threshold, category screening condition and analytical functions of related parameters, wherein the confidence threshold value ranges from 0.3 to 0.8, and the intersection-over-union ratio threshold value ranges from 0.4 to 0.7. The analytical function screens and optimizes the prediction results according to a specific algorithm logic, removes redundant and low-confidence prediction results, and obtains the final detection result, which includes prediction box position information, prediction confidence and prediction category information;
[0025] Classification control: According to the predicted category information in the final detection result, the control unit controls the cylinder to sort the corn ears to the corresponding output path. When the predicted category information is a specific value representing normal corn, the cylinder is controlled to be in a non-working state or maintain a specific initial position to transport the normal corn to the normal corn belt conveyor; when the predicted category information is a specific value representing miscellaneous corn, the cylinder is controlled to adjust the angle of the output end of the belt conveyor outlet to transport the miscellaneous corn to the miscellaneous corn belt.
[0026] A control system for a corn ear classification device, in the model prediction step, the Backbone part of the improved YOLOv5 architecture adopts a specific combination of Conv module, C3 module and SPPF module, the Conv module is composed of convolution, Batch Normalization and SiLu activation layers, the C3 module is based on the CSP architecture and includes multiple Bottleneck structures, the SPPF module fuses feature maps of different receptive fields through multiple 5×5 maximum pooling operations to improve the feature extraction and processing capabilities of the model, and the model is trained using a data set containing a large number of normal corn and mixed corn image samples of different varieties and different forms during the training process, the number of training samples is not less than 5000, and the images in the data set are preprocessed, including normalization and labeling.
[0027] The control system for the corn ear classification device adopts CIOU_Loss as the loss function during the training process of the YOLOv5 model, and its calculation formula is:
[0028]
[0029] in:
[0030] CIOU_Loss is the loss function
[0031] IOU is the ratio of the predicted box to the target box;
[0032] Distance2 2 is the Euclidean distance between the center point of the target box and the predicted box;
[0033] DistanceC 2 is the diagonal distance of the minimum enclosing rectangle;
[0034] On the basis of CIOU Loss, an influencing factor is added, including the aspect ratio of the prediction box and the target box;
[0035]
[0036] in:
[0037] v is a parameter that measures the consistency of aspect ratio;
[0038] w gt ,h gt is the width and height of the real frame;
[0039] w p ,h p is the width and height of the prediction box;
[0040] A control method for a corn ear classification device according to the present invention comprises the following steps:
[0041] a. Start the belt conveyor, receive the corn ears through the belt conveyor feed port and smoothly convey them to the recognition area; at the same time, trigger the recognition camera located just above the belt conveyor to collect images. The recognition camera automatically adjusts according to the size, shape and conveying speed of the corn ears to ensure that clear, complete and non-distorted images of the corn ears are collected. The collection frequency is adapted to the conveying speed of the belt conveyor, so that each corn ear is captured at least 3 times when passing through the recognition area;
[0042] b. Input the collected corn ear images into the pre-trained deep learning model for analysis and prediction. The model is based on the improved YOLOv5 architecture and pre-processes the images to enrich the diversity of data samples and enhance the robustness of the model. The Backbone part of the model effectively extracts the multi-dimensional features of corn ears by optimizing the structures and parameters of the Conv module, C3 module and SPPF module. The Neck part adopts the improved PANet structure to achieve efficient fusion of multi-scale features. The Head part finely sets the anchor box and optimizes the target box regression algorithm according to the characteristics of the corn ear, so as to accurately output multiple sets of position information prediction results and multiple sets of category prediction information results.
[0043] c. Strictly screen and process the prediction information using the set confidence threshold, intersection-over-union threshold, category screening conditions and analytical functions of related parameters. The analytical function uses an efficient non-maximum suppression (NMS) algorithm and combines the texture, color and shape feature information of the corn ear for comprehensive judgment and optimization, removes redundant and low-confidence prediction results, and obtains the final accurate detection results, including accurate prediction box position information, reliable prediction confidence and clear prediction category information;
[0044] d. Accurately control the actions of the sorting actuators based on the predicted category information in the final test results;
[0045] When normal corn is predicted, the control signal is used to ensure that the cylinder and the belt conveyor outlet are in a stationary or initial safe position, so as not to interfere with the transportation of corn ears and to transport the normal corn to the normal corn belt conveyor;
[0046] When it is predicted to be mixed corn, the cylinder movement is adjusted by the control signal to drive the angle position of the output end of the belt conveyor discharge port to transport the mixed corn to the mixed corn belt; the sorting accuracy of normal corn and mixed corn is not less than 98%.
[0047] The device for corn ear classification and the control system thereof described in the present invention have the following beneficial effects:
[0048] The high degree of automation effectively reduces labor costs, improves sorting efficiency, and can meet the needs of large-scale corn ear sorting;
[0049] The use of the advanced YOLOv5 model can achieve high-precision corn ear classification, reduce manual intervention, and improve classification efficiency; combined with mechanical screening and deep learning-based visual inspection, corn ears can be classified more comprehensively and accurately; the deep learning model YOLOv5 is used for classification and recognition, with a high accuracy rate, which greatly improves the stability of seed quality compared to traditional manual sorting;
[0050] The guide plate, anti-skid belt and other structures in the device ensure the stable operation and accurate identification of corn ears during the sorting process;
[0051] The improved CIOU_Loss is used as the loss function. While considering the positional relationship between the prediction box and the target box, the aspect ratio factor is introduced, so that the model can learn the characteristics of corn ears more accurately during the training process and improve the accuracy of classification.
[0052] Through a series of training optimization strategies, such as image enhancement, appropriate learning rate setting, batch normalization, momentum optimization, etc., the training efficiency and generalization ability of the model are improved, so that the model can better adapt to the corn ear classification task in different scenarios;
[0053] The model pruning operation reduces the model size and improves the reasoning speed without significantly reducing the accuracy, thus meeting the real-time requirements of the classification device in actual production.
[0054] Reasonable image acquisition frame rate and fast sorting control mechanism ensure the efficient operation of the entire sorting device, which can classify and sort corn ears in a timely and accurate manner, improving production efficiency and seed quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The structure of the device of the present invention is shown in FIG. Figure 1 ;
[0056] Figure 2 The structure of the device of the present invention is shown in FIG. Figure 2 ;
[0057] Figure 3 The structure of the device of the present invention is shown in FIG. Figure 3 ;
[0058] Figure 4 The structure of the device of the present invention is shown in FIG. Figure 4 ;
[0059] Figure 5 To collect normal corn images;
[0060] Figure 6 Output the predicted result image for collecting normal corn images;
[0061] Figure 7 To collect images of mixed corn ears;
[0062] Figure 8 Output the predicted result image for collecting the mixed corn ear image;
[0063] Fig. 9 This is the workflow diagram of the deep learning model YOLOv5;
[0064] In the figure: 1. Belt conveyor feed port; 2. Belt conveyor; 3. Belt conveyor discharge port; 4. Identification camera; 5. Cylinder; 6. Miscellaneous corn belt conveyor; 7. Normal corn belt conveyor; 8. Peeler discharge port; 9. Guide plate; 10. Belt conveyor transmission motor; 11. Connecting plate; DETAILED DESCRIPTION
[0065] Example 1
[0066] The control method for a corn ear classification device described in the present invention is implemented by the following steps:
[0067] 1. Device structure implementation
[0068] (I) Overall structure assembly
[0069] It includes a belt conveyor feed port 1, wherein the belt conveyor feed port 1 is a trough structure, and ribs are provided on both sides of the trough;
[0070] A belt conveyor 2, whose feeding end is fixedly connected to the discharging end of the belt conveyor feeding port 1, and baffles are provided on both sides of the belt conveyor 2;
[0071] The belt conveyor discharge port 3 has a feed end hinged to the discharge end of the belt conveyor 2 through a hinge;
[0072] The recognition camera 4 is arranged directly above the belt conveyor 2 through a mounting frame with an adjustment function, the mounting frame is a gantry bracket, and the recognition camera 4 is a high-resolution industrial camera with a transparent dust cover outside the lens;
[0073] A connecting plate 11 is provided between the guide plate 9 and the two baffles of the belt conveyor 2, and the connecting plate 11 is fixedly connected to the upper end of the guide plate 9;
[0074] The normal corn belt conveyor 7 is arranged on one side of the discharge end of the belt conveyor discharge port 3 through a bracket. When the belt conveyor discharge port 3 is in an initial working position coaxial with the belt conveyor 2, the normal corn belt conveyor 7 is located directly below the output end of the belt conveyor discharge port 3;
[0075] The miscellaneous corn belt conveyor 6 is arranged on the discharge end side of the belt conveyor discharge port 3 through a bracket. The miscellaneous corn belt conveyor 6 is located directly below the output end of the belt conveyor 2, and its center line completely coincides with the vertical projection of the output end of the belt conveyor 2;
[0076] The cylinder base is arranged on the bottom surface of the belt conveyor 2 and fixed;
[0077] The cylinder 5 is arranged on the cylinder base, and is connected to the air source through an air pipe, and a pressure regulating valve is arranged on the air pipe. The output end of the cylinder 5 is connected to the bottom surface of the belt conveyor discharge port 3.
[0078] The height of the ribs on both sides of the belt conveyor feed port 1 is h1, and the range of h1 is 10-20 cm.
[0079] The resolution of the recognition camera 4 is greater than or equal to 1920×1080 pixels, and the focal length range of the lens is 5-15 mm.
[0080] The recognition camera 4 and the cylinder 5 are electrically connected to a control unit respectively. The control unit is used to receive the detection result of the recognition camera 4 and control the cylinder 5 according to the detection result to divert the corn ears to the normal corn belt conveyor 7 or the mixed corn belt conveyor 6 through the belt conveyor discharge port 3.
[0081] The recognition camera 4 is an industrial camera with a shooting frame rate of 50 frames per second and a resolution of 2 million pixels. The shooting area of the recognition camera covers the corn ears on the belt conveyor; it also includes a light source, which is arranged on one side or both sides of the recognition camera. The light source is an LED light source with a color temperature of 5000-7000K and a light intensity of 60-100 lux; the transmission speed of the belt conveyor is 0.33 m / s, and the belt surface of the belt conveyor has an anti-slip texture.
[0082] 2. Control System Implementation
[0083] 1. Image acquisition
[0084] The parameters of the recognition camera 4 are set as follows: the shooting frame rate of the recognition camera 4 is set to 50 frames per second, the resolution is 2 million pixels, and its shooting area covers the corn ears on the belt conveyor; an LED light source is set on one or both sides of the recognition camera 4, the color temperature of the light source is 6000K, and the light intensity is 80 lux to ensure that the recognition camera 4 can be provided with sufficient and uniform lighting under different ambient lighting conditions, so as to ensure that the collected corn ear image is clear and without shadows.
[0085] According to the conveying speed of the belt conveyor 2 of 0.33 m / s, the acquisition frequency of the recognition camera 4 is adjusted to ensure that each corn ear is imaged at least once when passing through the acquisition area.
[0086] 2. Model prediction
[0087] Model architecture construction
[0088] A corn ear classification model based on the improved YOLOv5 architecture was constructed. In the Backbone part, the Conv module consists of convolution, Batch Normalization, and SiLu activation layers. The C3 module is based on the CSP architecture and contains multiple Bottleneck structures. The SPPF module fuses feature maps of different receptive fields through multiple 5×5 maximum pooling operations. During the model training process, a dataset containing a large number of normal corn and hybrid corn image samples of different varieties and different forms is used, with the number of samples not less than 5,000. The images in the dataset are preprocessed by normalization, labeling, and other operations.
[0089] During the training process, CIOU_Loss is used as the loss function, according to the formula
[0090]
[0091] in:
[0092] CIOU_Loss is the loss function
[0093] IOU is the ratio of the predicted box to the target box;
[0094] Distance2 2 is the Euclidean distance between the center point of the target box and the predicted box;
[0095] DistanceC 2 is the diagonal distance of the minimum enclosing rectangle;
[0096] On the basis of CIOU Loss, an influencing factor is added, including the aspect ratio of the prediction box and the target box;
[0097]
[0098] in:
[0099] v is a parameter that measures the consistency of aspect ratio;
[0100] w gt ,h gt is the width and height of the real frame;
[0101] w p ,h p is the width and height of the prediction box;
[0102] Calculate, where IOU is the ratio of the predicted box to the target box, Distance2 2DistanceC is the Euclidean distance between the center point of the target box and the predicted box. 2 is the diagonal distance of the minimum circumscribed rectangular box, and an influencing factor is added on the basis of DIoU Loss, including the aspect ratio of the prediction box and the target box. Through the calculation and optimization of these parameters, the model can accurately classify corn ears.
[0103] (III) Results analysis
[0104] Prediction result processing. The prediction information is processed by setting the confidence threshold of 0.45, the intersection-over-union threshold of 0.45, the category screening conditions and the analytical function of related parameters. The efficient non-maximum suppression (NMS) algorithm is used, and the texture, color and shape feature information of the corn ear are combined for comprehensive judgment and optimization.
[0105] 3. Implementation of control methods
[0106] (I) Corn ear transmission and image acquisition
[0107] Startup and collection
[0108] The belt conveyor 2 is started, and corn ears are fed from the belt conveyor feed port 1, and are smoothly conveyed to the identification area through the belt conveyor 2. At the same time, the identification camera 4 located directly above the belt conveyor 2 is triggered to collect images. The identification camera 4 automatically adjusts the shooting parameters according to the actual size, shape and transmission speed of the corn ears, such as adjusting the focal length according to the size of the corn ears, adjusting the shutter speed according to the transmission speed, etc., to ensure that a clear, complete and non-distorted corn ear image is collected. The collection frequency is adapted to the transmission speed of the belt conveyor (2), so that each corn ear is collected at least 3 times when passing through the identification area.
[0109] (II) Deep learning model analysis and prediction
[0110] Model Run
[0111] The collected corn ear images are input into the pre-trained deep learning model based on the improved YOLOv5 architecture for analysis and prediction. The Backbone part of the model effectively extracts the multi-dimensional features of corn ears by optimizing the structure and parameters of the Conv module, C3 module and SPPF module. The Neck part adopts the improved PANet structure to achieve efficient fusion of multi-scale features. The Head part finely sets the anchor box and optimizes the target box regression algorithm according to the characteristics of the corn ear, so as to accurately output multiple sets of position information prediction results and multiple sets of category prediction information results.
[0112] (III) Screening and processing of prediction results
[0113] Optimize results
[0114] The prediction information is strictly screened and processed using the set confidence threshold, intersection-over-union threshold, category screening conditions and analytical functions of related parameters. The analytical function uses an efficient non-maximum suppression (NMS) algorithm and combines the texture, color and shape feature information of the corn ear for comprehensive judgment and optimization. For example, when the texture features of the corn ear are detected to be highly similar to the standard texture features of normal corn or hybrid corn, the confidence weight of the prediction result is increased accordingly, and redundant and low-confidence prediction results are removed to obtain the final accurate detection results, including accurate prediction box position information, reliable prediction confidence and clear prediction category information.
[0115] (IV) Classification control execution
[0116] Sorting Operation
[0117] According to the predicted category information in the final test result, the action of the sorting actuator is precisely controlled. When the prediction is normal corn, the control signal is used to ensure that the cylinder 5 and the belt conveyor outlet 3 are in a stationary or initial safe position, so as not to interfere with the transportation of corn ears, and the normal corn is transported to the normal corn belt conveyor 7. When the prediction is mixed corn, the control signal is used to adjust the cylinder 5 to drive the output end angle position of the belt conveyor outlet 3, and the mixed corn is transported to the mixed corn belt 6. The sorting accuracy of normal corn and mixed corn is not less than 98%.
Claims
1. A device for sorting corn ears, characterized in that: It comprises a belt conveyor feed port (1), wherein the belt conveyor feed port (1) is a trough structure, and ribs are provided on both sides of the trough; A belt conveyor (2), the feeding end of which is fixedly connected to the discharging end of the belt conveyor feeding port (1), and baffles are provided on both sides of the belt conveyor (2); A belt conveyor discharge port (3), the feed end of which is hinged to the discharge end of the belt conveyor (2) via a hinge; The recognition camera (4) is arranged directly above the belt conveyor (2) via a mounting frame with an adjustment function, wherein the mounting frame is a gantry bracket, and the recognition camera (4) is a high-resolution industrial camera, and a transparent dust cover is arranged outside the lens; A material guide plate (9), a connecting plate (11) is arranged between two baffles of the belt conveyor (2), and the connecting plate (11) is fixedly connected to the upper end of the material guide plate (9); The normal corn belt conveyor (7) is arranged on one side of the discharge end of the belt conveyor discharge port (3) through a bracket. When the belt conveyor discharge port (3) is in an initial working position coaxial with the belt conveyor (2), the normal corn belt conveyor (7) is located directly below the output end of the belt conveyor discharge port (3); A miscellaneous corn belt conveyor (6) is arranged on one side of the discharge end of the belt conveyor discharge port (3) through a bracket, and the miscellaneous corn belt conveyor (6) is located directly below the output end of the belt conveyor (2), and its center line completely coincides with the vertical projection of the output end of the belt conveyor (2); A cylinder base is arranged on the bottom surface of the belt conveyor (2) and fixed; The cylinder (5) is arranged on the cylinder base. The cylinder (5) is connected to the air source through an air pipe. A pressure regulating valve is arranged on the air pipe. The output end of the cylinder (5) is connected to the bottom surface of the belt conveyor discharge port (3).
2. A device for sorting corn ears as claimed in claim 1, characterized in that: The height of the ribs on both sides of the trough body of the belt conveyor feed port (1) is h1, and the range of h1 is 10-20 cm.
3. A device for sorting corn ears as claimed in claim 1, characterized in that: The resolution of the recognition camera (4) is greater than or equal to 1920×1080 pixels, and the focal length range of the lens is 5-15 mm.
4. A device for sorting corn ears as claimed in claim 1, characterized in that: The recognition camera (4) and the cylinder (5) are respectively electrically connected to a control unit, and the control unit is used to receive the detection result of the recognition camera (4), and control the cylinder (5) according to the detection result, so as to divert the corn ears to a normal corn belt conveyor (7) or a mixed corn belt conveyor (6) through a belt conveyor discharge port (3).
5. A device for sorting corn ears as claimed in claim 1, characterized in that: The recognition camera (4) is an industrial camera with a shooting frame rate of 50 frames per second and a resolution of 2 million pixels. The shooting area of the recognition camera covers the corn ears on the belt conveyor. The recognition camera also includes a light source, which is arranged on one side or both sides of the recognition camera. The light source is an LED light source with a color temperature of 5000-7000K and a light intensity of 60-100 lux. The conveying speed of the belt conveyor is 0.33 m / s, and the belt surface of the belt conveyor has an anti-slip texture.
6. A control system for a corn ear sorting device, characterized in that: The following steps are involved: Image acquisition: using a recognition camera (4) to acquire an image of a corn ear, wherein the parameters of the recognition camera (4) are set to be able to clearly capture the morphological features of the corn ear, and the acquisition frequency thereof is adapted to the transmission speed of the transmission device, ensuring that each corn ear is imaged at least once when passing through the acquisition area; Model prediction: The collected corn ear images are input into a pre-trained corn ear classification model based on deep learning for prediction. The model adopts an improved YOLOv5 architecture, which performs data enhancement processing on the image at the input end and has the ability to recognize corn ears of different shapes, and obtains multiple sets of position information prediction results and multiple sets of category prediction information results; Result analysis: The prediction information is processed by setting a specific confidence threshold, intersection-over-union ratio threshold, category screening condition and analytical functions of related parameters, wherein the confidence threshold value ranges from 0.3 to 0.8, and the intersection-over-union ratio threshold value ranges from 0.4 to 0.
7. The analytical function screens and optimizes the prediction results according to a specific algorithm logic, removes redundant and low-confidence prediction results, and obtains the final detection result, which includes prediction box position information, prediction confidence and prediction category information; Classification control: According to the predicted category information in the final detection result, the control unit controls the cylinder (5) to operate and sort the corn ears to the corresponding output path. When the predicted category information is a specific value representing normal corn, the control cylinder (5) is in a non-working state or maintains a specific initial position to transport the normal corn to the normal corn belt conveyor (7); when the predicted category information is a specific value representing mixed corn, the control cylinder (5) adjusts the output end angle of the belt conveyor outlet (3) to transport the mixed corn to the mixed corn belt (6).
7. A control system for a corn ear sorting device as claimed in claim 6, characterized in that: In the model prediction step, the Backbone part of the improved YOLOv5 architecture adopts a specific combination of Conv module, C3 module and SPPF module, the Conv module is composed of convolution, Batch Normalization and SiLu activation layer, the C3 module is based on the CSP architecture and includes multiple Bottleneck structures, and the SPPF module fuses feature maps of different receptive fields through multiple 5×5 maximum pooling operations to improve the feature extraction and processing capabilities of the model, and the model is trained using a data set containing a large number of normal corn and mixed corn image samples of different varieties and different forms during the training process, the number of training samples is not less than 5000, and the images in the data set are preprocessed, including normalization and labeling.
8. A control system for a corn ear sorting device as claimed in claim 7, characterized in that: In the training process of the YOLOv5 model, CIOU_Loss is used as the loss function, and its calculation formula is: in: CIOU_Loss is the loss function IOU is the ratio of the predicted box to the target box; Distance2 2 is the Euclidean distance between the center point of the target box and the predicted box; DistanceC 2 is the diagonal distance of the minimum enclosing rectangle; On the basis of CIOU Loss, an influencing factor is added, including the aspect ratio of the prediction box and the target box; in: v is a parameter that measures the consistency of aspect ratio; w gt ,h gt is the width and height of the real frame; w p ,h p is the width and height of the prediction box.
9. A control method for a corn ear sorting device, characterized in that: The following steps are involved: a. Start the belt conveyor (2), receive the corn cobs through the belt conveyor feed port (1) and smoothly convey them to the identification area; at the same time, trigger the identification camera (4) located just above the belt conveyor (2) to collect images, and the identification camera (4) automatically adjusts according to the size, shape and transmission speed of the corn cobs to ensure that clear, complete and non-distorted corn cob images are collected, and the collection frequency is adapted to the transmission speed of the belt conveyor (2), so that each corn cob is imaged at least three times when passing through the identification area; b. Input the collected corn ear images into the pre-trained deep learning model for analysis and prediction. The model is based on the improved YOLOv5 architecture and pre-processes the images to enrich the diversity of data samples and enhance the robustness of the model. The Backbone part of the model effectively extracts the multi-dimensional features of corn ears by optimizing the structures and parameters of the Conv module, C3 module and SPPF module. The Neck part adopts the improved PANet structure to achieve efficient fusion of multi-scale features. The Head part finely sets the anchor box and optimizes the target box regression algorithm according to the characteristics of the corn ear, so as to accurately output multiple sets of position information prediction results and multiple sets of category prediction information results. c. Strictly screen and process the prediction information using the set confidence threshold, intersection-over-union threshold, category screening conditions and analytical functions of related parameters. The analytical function uses an efficient non-maximum suppression (NMS) algorithm and combines the texture, color and shape feature information of the corn ear for comprehensive judgment and optimization, removes redundant and low-confidence prediction results, and obtains the final accurate detection results, including accurate prediction box position information, reliable prediction confidence and clear prediction category information; d. Accurately control the actions of the sorting actuators based on the predicted category information in the final test results; When the corn is predicted to be normal, a control signal is used to ensure that the cylinder (5) and the belt conveyor outlet (3) are in a stationary or initial safe position, so as not to interfere with the transportation of corn ears and to transport the normal corn to the normal corn belt conveyor (7); When it is predicted to be mixed corn, the cylinder (5) is moved by a control signal to drive the angle position of the output end of the belt conveyor discharge port (3) to convey the mixed corn to the mixed corn belt (6); the sorting accuracy of normal corn and mixed corn is not less than 98%.