Font Size: a A A

Research On The Inspection Method Of Peanut Pod Appearance Quality Based On Machine Vision

Posted on:2024-04-28Degree:MasterType:Thesis
Country:ChinaCandidate:C L WangFull Text:PDF
GTID:2543307106995459Subject:Master of Mechanical Engineering (Professional Degree)
Abstract/Summary:PDF Full Text Request
Peanut is one of the main economic crops and a strategic oil crop in China.In addition,it is the raw material for processing many kinds of products with excellent commercial value.At present,peanuts are widely distributed in our country and there are many varieties.The shape,color,and size of peanuts differ greatly,so it was difficult to screen them through automatic machinery.To improve the yield and quality of peanuts,it is necessary to develop intelligent screening equipment for peanut pods.According to the different uses of peanut pods,the processing technology is also different,but all need to go through the process of harvesting,cleaning,grading,and so on,among which peanut screening is one of the key processes to ensure the quality of peanut.At present,manual sorting has a poor working environment,high labor intensity,and low classification efficiency.Besides,it is highly dependent on personal experience and visual observation ability and was easily affected by subjective factors.The traditional mechanical separation method was usually based on the size of the shape of the peanut,which was easy to damage the peanut pod,and the precision level of separation was difficult to meet the practical needs.Intelligent screening equipment equipped with machine vision has been widely used in the sorting of apples,citrus,and other agricultural products,but there were few studies on the application of machine vision to peanut pod screening,and there was no public data set.Because of the similar shape and texture characteristics of peanut pod that was difficult to distinguish,the detection algorithm of peanut pod’s appearance quality was complex and the recognition accuracy is low,this paper carried out the research on the detection algorithm of peanut pod’s appearance quality based on machine vision.The specific work contents of the research are as follows:(1)Establishment of peanut pod data set.Four kinds of peanut pod including normal,moldy,germinated,and damaged were collected in the field.Due to the different difficulties of collecting peanut pod of each category,the data set samples were unbalanced.To further improve the diversity of the data set,five methods including rotation,mirroring,histogram equalization,adding salt and pepper noise,and Gaussian filtering were adopted for data expansion to avoid overfitting of the model.(2)A method to detect the appearance quality of peanut pods based on traditional characteristics was designed.Peanut pods of different quality grades were highly similar in color,texture,shape,and background at the maturity stage,and could not be distinguished by shape characteristics alone.The histogram of oriented gradients(HOG)and scale-invariant feature transform(SIFT)algorithms were proposed to extract the shape and texture features of peanut pod images.At the same time,a support vector machine(SVM)was trained to classify the proposed features.Because the selection of different kernel functions will have a great impact on the recognition effect of the classifier.In the experiment,the linear kernel function,polynomial kernel function,and radial basis kernel function were selected respectively.The experimental results show that the features extracted by the HOG algorithm were more representative of the peanut pod than those extracted by SIFT algorithm,and the calculation amount in the process of feature extraction by the HOG algorithm was less.The method of "HOG + polynomial kernel function" has the best recognition effect,with a recognition accuracy of 91.5% on the test set,the training time of the model is 16.56 s,and the memory size occupied by the model is 9.1MB.It effectively solved the problem of difficulty to distinguish the similar shape and colors of peanut pods of different grades.(3)A method of peanut pod appearance quality detection based on deep learning was designed.On the one hand,based on the Res Net50 network model,we introduced some improvement measures,such as Frequency Channel Attention,Adaptive Activate or Not,Gradient Centralization,etc.The detailed information in the image is effectively preserved,and the nonlinear representation ability of the model is enhanced.The gradient concentration technique further speeds up the convergence speed of the model and improves the generalization ability of the model.The average recognition accuracy of FAG-Res Net50 model on the test set is 98.00%,which was significantly higher than that of Alex Net,VGG16,Res Net50,and other classical image classification models.On the other hand,introduce Coordinate Attention,Gradient Concentration technique,and Rank Momentum Stochastic Gradient Descent based on the Squeeze Net network model.The Coordinated Attention module captured dependencies in one spatial direction and maintains precise location information in the other spatial direction,which helped the network locate the region of interest more accurately.The Rank Momentum Stochastic Gradient Descent algorithm can adjust the learning rate of each layer adaptively to improve the generalization performance.The improved CGR-Squeeze Net model has the advantages of less training computation,fewer memory resources occupied by the model,and fast recognition speed.The recognition accuracy of the model on the test set is97.92%,and the memory size of the model is only 2.52 MB,which is more suitable for deployment in embedded devices with limited computing resources.(4)Design of peanut pod visual recognition system.To facilitate the use of ordinary users in agricultural production,this paper designs a peanut pod appearance quality recognition software system through Py Qt5,Pytorch,and Open CV.The functions of this visualization system include image import,image editing,model selection,result display,and other functions.Users only need to use the same as other application software.Simply click a few function buttons,can clearly and intuitively observe the identification of the peanut pod.
Keywords/Search Tags:machine vision, peanut pod, support vector machine, convolutional neural network, deep learning
PDF Full Text Request
Related items