| The purity of crop seeds shows direct impact on the quality of agricultural production and subsequent product.Therefore,the seed purity improvement plays a important role on screening of seed types,impurities in seeds,and damaged seeds.The sorting method based on traditional image processing and pattern recognition has fast speed and stable performance compared to manual methods,but it may result in low accuracy and poor generalization ability.Convolutional neural network(CNN)has shown superior performance in seed sorting task benefit from its excellent feature extraction ability.However,due to the large parameter amount and computing cost,it is difficult to deploy on Edge device with limited computing power.In the seed selection process,if existing lightweight networks are directly used,the recognition accuracy will decrease to a certain extent.Therefore,this thesis studies the lightweight deep model-based seed sorting algorithm,which aims to maintain recognition accuracy while designing an efficient lightweight network for seed sorting.The specific work is as follows:(1)An improved Shuffle Net V2 lightweight network seed sorting method is proposed to address the problems of low recognition accuracy,complex structure,and difficult deployment of existing seed sorting models based on convolutional neural networks.First,Shuffle Net V2 is taken as the basic unit block,and the network’s ability to extract shape and flaw feature information is enhanced by optimizing the basic unit module,so as to improve the accuracy of real-time recognition and make the model easier to deploy to Edge device.In addition,a lightweight attention mechanism(CA)module was designed,which utilizes attention weight mechanism to enhance the network’s ability to learn seed texture information features and further improve the performance of the model.The experiments on the red kidney bean,corn,and melon seed datasets showed that the improved network had an accuracy of 97.10%,96.20%,and 96.50%,respectively,with a parameter quantity of only 1.20 M,which is superior to existing models.(2)A seed lightweight pyramid hole convolutional network-based sorting method is proposed to address the problems of large parameter quantities and slow inference speed in the model.The network first proposes the Residual Spatial Pyramid Module(RSPM)to extract multi-scale features,and then combines deep separable convolution technology to reduce model parameters and computational complexity.Then,a lightweight Attention Channel Attention(ECA)module is introduced into the network structure,which utilizes local cross-channel interaction to focus on important information and improve the ability to extract key seed features.The accuracy on the corn,red kidney bean,and melon seed datasets is 96.00%,97.38%,and 97.50%,respectively.The recognition time for a single image on the NVIDIA Quadro board is only 4.51 ms,which is superior to mainstream lightweight networks such as Mobile Netv2,Shufflenetv2,and PPLC Net.(3)A lightweight neural network compression method based on Transformer adaptive optimization is proposed for seed sorting to deal with the complex calculation problem of Transformer,which results in a large amount of parameter redundancy and poor adaptive ability in practical tasks.First,based on the Swim Transformer backbone network,an adaptive token thinning method is used to eliminate redundant information,reduce computational complexity,and realize model lightweight.Then,an Adapt MLP module and a prediction module are proposed,which only add few parameters to optimize the multi-layer perceptron.Finally,the results on three seed datasets demonstrate that the proposed model remains the recognition rate while compressing the model.Specifically,the recognition rates on the red kidney bean seed,corn seed,and melon seed datasets are 98.10%,97.50%,and 97.00%,respectively. |