| China is a major agricultural country,and as the foundation of agriculture,the quality of crop seeds directly or indirectly affects crop yield.Therefore,the detection and sorting of seed quality is of great significance for safeguarding the economic interests of the country and farmers.The traditional mechanical sorting device has poor sorting effect on bad particles such as insect erosion,disease spots,and damage,and the original good seeds are also prone to damage.Some regions are manually sorting crop seeds,which is timeconsuming and laborious,and the visual fatigue and subjective bias caused by long-term sorting are also difficult to avoid.In the application of machine vision in seed sorting,equipment such as color sorting machines and optical sorting machines have improved the quality of sorting,but they are expensive.Further research is needed to manufacture detection devices that are generally inexpensive,fast,non-destructive,and accurate.The design of seed detection devices and research on seed variety detection methods are key to improving seed sorting technology.Based on the above reasons,this article constructs a corn seed detection and sorting system based on machine vision for sorting corn seeds,and designs an effective deep learning detection model.The main research content is as follows:(1)A corn seed detection and sorting system has been designed and developed based on the requirements of seed detection and sorting.Based on the working principle and workflow of the system,the overall design of the system and the selection and design of components for various mechanisms such as seed dropping,transmission,image acquisition,and sorting have been completed.(2)According to the requirements of image acquisition and the system sorting method,the design of the system control part is completed,mainly including the variable speed control design of the transmission mechanism,the synchronous camera acquisition rate design and image acquisition software design of the image acquisition mechanism,the PLC wiring method and control program design of the sorting mechanism,etc.(3)Selecting Zheng Dan 958,a nationally approved corn seed,as the model experiment seed,preprocessing methods such as filtering and enhancing image contrast were used to improve image quality.Select the YOLOv5 series network as the seed detection model.The YOLOv5-s deep learning network model was trained using the prepared dataset and tested for model results.The results showed that the YOLOv5 network had an AP value of 96.66%and an F1 value of 89.6%for good corn seed detection,and an AP value of 92.35%and an F1 value of 86.2%for bad corn seed detection.The mAP value was 95%,with an average F1 value of 87.9%.The average time for detecting each image was about 0.27 seconds,and the time for detecting a single seed was 0.027 seconds.Perform performance analysis on the model training results,and use the same experimental method to train YOLOv5-m,YOLOv5-1,and YOLOv5-x models to obtain the performance index of the detection model.By comparing the performance indices of several models,YOLOv5-s was selected as the target detection model for the seed sorting system.This research provides method support for the systematization and automation of corn seed sorting,overcoming the drawbacks of manual sorting being time-consuming and laborious,as well as seed damage caused by mechanical sorting.It provides necessary reference for achieving fast,accurate,and non-destructive seed sorting. |