| With the continuous update of computer hardware system and the continuous improvement of computer functions,deep learning and machine vision technology have been widely applied in pattern recognition,speech recognition,agricultural production and other fields.Our wheat planting area and annual yield increase year by year and become one of the world’s largest wheat producer and consumer,wheat has become the second largest economic food crop after rice.The screening of wheat impurities and wheat imperfect grains is still in the stage of over-relying on artificial level.Therefore,the intelligent and mechanized detection method before wheat enters the market can not only greatly improve the detection and identification efficiency of wheat appearance quality,but also save human and material resources and financial resources,reduce production costs,and increase the economic benefits of wheat.In view of the problem of intelligent recognition of wheat appearance quality at the present stage,many scholars at home and abroad have carried out relevant research,using hyperspectral imaging technology,using image processing combined with classifier technology,most of the methods have expensive equipment,time-consuming,cumbersome process and other problems.In this paper,the acquisition device is designed and selected.Deep learning was applied to wheat appearance quality detection,and an improved deep learning algorithm was proposed for classification of wheat impurities.An improved target detection algorithm was proposed for the recognition and detection of wheat imperfect grains.The visual interface of wheat imperfect grain detection and recognition system was built.The main research work of this paper is as follows:(1)Built a wheat appearance quality detection platform based on machine vision technology.Firstly,the camera,light source and motor of the image acquisition device are selected.Secondly,the comb separation plate of wheat was designed to solve the problem of adhesion stacking in the process of wheat collection.The timing circuit of relay is designed based on STC89C52 single chip microcomputer.In the circuit of relay access device,its intermittent closing and breaking corresponds to the intermittent movement and stopping movement of the conveyor belt driven by motor.Setting the interval time of data acquisition of industrial camera can effectively solve the motion blur problem of image data set.Finally,it is proved that the image acquisition device has good performance(2)A wheat impurity recognition algorithm based on improved Inception V3 was studied.Firstly,data set enhancement,image preprocessing and KS classification methods were used to process wheat impurity images.Among them,wheat husk,straw,ear and normal wheat were 4000 images each,and the training set and test set were11200 and 4800 images respectively.Then Goog Le Net,Res Net34 and Inception V3 models are selected for classification training of image data set,and Inception V3 network with the fastest convergence speed is selected as the basic network.Aiming at the problems of low accuracy and poor generalization ability of Inception V3 model on impurity wheat classification and recognition test set,an improved convolutional neural network CBAM-Inception V3 model was proposed to select appropriate learning rate and optimization algorithm and other super parameters.The gradient class activation mapping method(Grad-CAM)was used for visualization analysis.Finally,the improved convolutional neural network CBAM-Inception V3 model is compared with Ca-Inceptionv3 and Inception V3 models added in CA module.The results show that the accuracy of Inception V3 model is 83.5% and 82.41% on the test set,and the accuracy of CA-Inception V3 model is 92.3% and 92.29% on the test set.The accuracy of CBAM-Inception V3 was 92.9% and the F1-score was 92.92%.The average prediction time of the CBAM-Inception V3 model for the test set is 0.045 sheets /s,which is obviously better than the other two models.The results showed that the CBAMInception V3 model could be used as a classification and recognition method of wheat impurities,and the machine vision and improved convolutional neural network CBAMInception V3 model could be used to identify wheat impurities,which could improve the speed and efficiency of wheat quality recognition.(3)An image detection and recognition model of wheat imperfect grain based on object detection was studied.A total of 660 data set images were collected in the experiment,including 180 perfect grain images,180 damaged grain images,180 germinating grain images,and 120 mixed images of intact damaged grain and germinating grain images.Then the data set was expanded to twice the original size by data augmentation method.Because FPN network integrates advanced features of deep convolutional layer and low-level features of shallow convolutional layer,it can achieve good detection effect for small objects and small details.Therefore,combined with FPN network and F-Faster RCNN model of Faster RCNN network,the Retina Net model and F-Faster RCNN model are introduced to compare and analyze the training results of the SSD model,the Retinanet model and F-Faster RCNN model,and analyze the detection results of three models on different IOU values.When the IOU value is equal to 0.5,the detection efficiency is the highest,and the results show that the m AP of the three model training sets can reach 99%.Finally,30 images were selected as the test set,and the results showed that the m AP value of SSD model was 99.98%,which was slightly lower than the other two models,and F-Faster RCNN model could detect the particles that could not be detected by SSD model.Thirty images of damaged grains,intact grains and germinated grains were selected.The number of wheat grains in the images was estimated by Image J image processing software,and the correct rates of damaged grains,intact grains and germinated incomplete grains were 97.17%,97.56% and95.65%,respectively,combined with the target detection and recognition results.A wheat imperfect kernel recognition system based on Py Qt5 was built,which intuitively displayed the prediction pictures and recognition results in the way of visual interface,simplified the detection and recognition process,improved the detection efficiency and provided software support for the detection of wheat imperfect kernel.In this paper,machine vision technology was used to detect the appearance quality of wheat,which provided a new analysis method for the detection of wheat impurities and imperfect grains.As a fast and reliable detection method,the improved deep learning algorithm proposed in this paper provides a certain method reference for the detection of the appearance quality of other agricultural products,and has a broad application prospect. |