Font Size: a A A

Glass Defect Detection And Classification System Based On Machine Vision

Posted on:2022-05-13Degree:MasterType:Thesis
Country:ChinaCandidate:X YangFull Text:PDF
GTID:2491306341969539Subject:Electrical engineering
Abstract/Summary:PDF Full Text Request
With the progress of China’s industrial level,the production capacity of glass products is increasing.However,in the production process of glass,it is inevitable that there will be defects such as scratches,nodules,inclusions and so on.Therefore,the development of glass defect detection system with excellent performance is of great significance to the glass industry.Machine vision inspection technology is a technology that simulates human visual function by computer,extracts feature information from the image of objective things,and applies it to the actual product inspection.Focusing on the key technology of machine vision glass defect detection and classification,this paper builds a hardware detection platform based on machine vision,studies the characteristics of glass defects,and classifies glass defects.The main contents and research results are as follows:1.System construction: the overall scheme of glass defect detection technology based on machine vision is proposed.In terms of hardware,the selection of main hardware equipment is given,and a stable and feasible hardware electronic control part is built,which can meet the requirements of electrical drive,image acquisition and other modules of the system,and provide a reliable foundation for subsequent image processing and pattern recognition.2.Glass defect feature Engineering: starting from feature extraction and feature selection,firstly,the defect area is extracted from five typical defect image samples,and 12 feature dimensions of defect area,such as area,perimeter,roundness,rectangularity,convexity,non-uniformity,fluffy,structural factor,compactness,average distance,average distance deviation and roundness are constructed to form defect feature Vector.Next,based on the Embedded feature selection method,the decision tree model is constructed by Gini coefficient and information gain,and the importance ranking of 12 features under the single decision tree model is obtained.In order to improve the accuracy of feature selection,the random forest and extra tree model are used to pre select the first four important features,among which the random forest model selects the four most important features of anisometry,area,dist_mean and contlength;the extra tree model selects the four most important features of area,sigma,circularity and dist_mean.The performance of the two models is verified on the accuracy comparison curve of the experiment.We find that the accuracy of the extra tree model is higher than that of the random forest model both in the iterative process and in the final stable situation.3.Glass defect classification: Support vector machine model is used to classify 5 types of glass defect samples.Four types of kernel functions are used to optimize the support vector machine,and it is found that the rbf kernel function is comprehensively optimal with a recognition time of 4.58 ms and an accuracy of about 95%.Finally,a nonlinear separable support vector machine model with rbf as the kernel function is determined.After completing the training and learning,the loss function and recognition accuracy of the initial model are obtained.Comparing the optimization of the model hyperparameters C and γ by grid search and random search,experiments show that the hyperparameters after random optimization can improve the model better than the grid search hyperparameters.For 200 test sets,the recognition time of the model after random optimization is 0.39 ms faster than that of grid optimization,and the gap between the loss function and accuracy is small,but when the random search selects the penalty coefficient C to take the continuous uniform probability distribution and γ selects Exponential probability distribution which takes the logarithm,the optimization speed of its algorithm is 1 to2 times faster than that of grid search.
Keywords/Search Tags:Glass defect, Machine vision, Feature engineering, Support vector machine
PDF Full Text Request
Related items