| In the production process of smartphones,surface defect detection is an indispensable part.Aiming at the problems of high cost and low efficiency of manual defect detection in the current mobile phone production process.This thesis designs and implements a smart phone surface defect detection system based on machine vision.According to different functional requirements,it is divided into a surface defect detection module,an image annotation module,and a deep learning model training module.For these three modules,the main research work of this article includes:1.In response to the specific needs of smartphone surface defect detection,combined with traditional image defect detection methods and deep learning target detection algorithms,a surface defect detection module is designed and implemented.First of all,in view of the tilt of the images collected on the industrial site,the contourbased image correction method is used for correction.Secondly,combined with the actual surface defect detection requirements,the image features of screen area,listening hole area and connection area are studied.After the pyramid template matching method is used to obtain the position of listening hole area,the relative position method is used to obtain the position of screen area and connection area respectively.Finally,the thesis analyzes the traditional algorithms of image defects detection and the advantages and disadvantages of deep learning target detection algorithm.Divide the smartphone surface into different area for detection.Use traditional machine vision methods to detect the screen area where defects are easy to detect,which can improve the detection speed.And deep learning methods are used to detect difficult-to-detect areas with pattern changes(such as mobile phone listening hole area,the connection area between screen area and printing area)to improve the defect detection rate.The combination of the two methods can effectively improve the detection speed and performance of smartphone surface defect detection.2.Aiming at the problem of lack of label data and small amount of image data in the image data set obtained in the industrial field,a defect image sample annotation module for deep learning target detection is designed.In this module,the operation steps and labeling methods of traditional image labeling software have been optimized,and the automatic saving function of labeling results has been added.The module provides two image annotation methods: manual annotation and intelligent annotation.Among them,the intelligent labeling method uses the deep learning target detection model for image labeling.At the same time,the traditional image augmentation function is added to facilitate users to amplify image data sets.Through the optimization of the image annotation operation steps and the design of the image intelligent annotation function,the user experience is greatly improved.3.The deep learning model training module is designed to solve the learning optimization problem during the use of the deep learning model.After analyzing the training method of deep learning model,combining C/S software architecture idea and Socket technology,the model training part is encapsulated and deployed to the server side.The user uses the client side to complete the model training task and the model file management task stored on the server side.The smartphone surface defect detection system in this thesis includes functions such as mobile phone image surface defect detection,image data set annotation and augmentation,and deep learning detection model learning optimization.To a certain extent,it can solve the problems of high manual inspection cost and diversification of defect types in the process of smartphone defect detection.It can effectively promote the development of industrial detection intelligence. |