Font Size: a A A

Development Of Intelligent Coffee Bean Grading System Based On Machine Vision

Posted on:2024-02-20Degree:MasterType:Thesis
Country:ChinaCandidate:H TangFull Text:PDF
GTID:2531307121489244Subject:Mechanics (Professional Degree)
Abstract/Summary:PDF Full Text Request
Coffee is one of the three major beverage crops,mainly grown in certain regions of Africa,Central and South America,and Asia.The value of coffee is largely influenced by the quality of the coffee beans.Currently,there are many standards for grading coffee beans,which heavily rely on manual experience and suffer from poor consistency.This paper proposes a grading index based on particle size and defect rate,and implements an intelligent grading system based on a We Chat mini program using machine vision technology to overcome the limitations of human grading.The main innovation lies in proposing a size detection algorithm that can achieve coffee bean size detection when the shooting angle is not fixed.The network model is optimized using relevant improvement methods to improve the accuracy of coffee bean defect detection.The main contents of the paper are as follows:(1)A coffee bean size characterization and detection algorithm is proposed and can achieve coffee bean size detection when the shooting angle is not fixed.First,a perspective transformation image correction method based on a reference object is proposed to address the randomness of image capture angles and distances in mobile phone photography.The A4 paper is used as a reference object,and its corner coordinates are obtained through threshold segmentation,closing operation,edge extraction,and quadrilateral fitting,and the shooting angle is corrected using a homographic matrix.The distance is calibrated using the corresponding relationship between the paper size and pixel values.The interference of coffee bean shadows affected by lighting is eliminated by using the HSV space,and the coffee bean contour is fitted by ellipse fitting using the least squares method.The coffee bean particle size is calculated using the calibrated size relationship.Finally,a comparative experiment of detection is conducted,and the results show that the average error of coffee bean particle size detection is 1.7%.(2)A coffee bean defect detection method based on improved Mobile Net is proposed.First,the coffee bean detection samples are enhanced,and a detection dataset containing five types of coffee bean defects is constructed.Then,a lightweight classification network based on Mobile Net is constructed and improved.The model parameters are compressed by adjusting the number of convolution channels and optimizing the convolution modules to match the classification task and reduce the model computation.The Mish activation function and adaptive adjustment method of learning rate are introduced to improve the convergence performance of the model.The model parameters are further optimized using transfer learning to improve the model recognition accuracy.The experiments show that the accuracy of the improved model on the test set is 96.16%,and the model parameters are only 1.5×105,which is respectively higher than VGG16_bn,Res Net50,Squeeze Net,and Mobile Net by 0.68%,1.42%,2.42%,and 2.99%.(3)A WeChat mini program-based coffee bean grading system is developed.The system adopts a client/server mode,and the software system server is built using the Flask framework.The server includes initialization,image reception,algorithm detection,data return,and other modules to calculate the coffee bean particle size and defect rate and return the grading detection results to the client.The client is based on the We Chat mini program and includes modules for image capture,data transmission,and result display to achieve information interaction and result presentation.The developed program has been tested and can meet the grading detection requirements of the industry.
Keywords/Search Tags:Defect detection, Size detection, Deep learning, Coffee bean grading
PDF Full Text Request
Related items