Abstract:Aiming at the problems of difficulty in imaging the surface defects of curved glass and low recognition accuracy,a detection method of curved glass surface defects based on YOLOv4 was proposed.According to the direction of the light source,the optical characteristics of the plane and the curved surface were determined,and the bright-field backside diffused illumination was used to obtain image information.After the lighting plan was established,the defect pictures of different surfaces were obtained.The improved K-means clustering algorithm was used,and the function of the intersection over union was used to determine the measurement of the Anchor frame,which solved the problem that the size of the original Anchor frame was not suitable for the detection of small object with glass defects.The proposed method was compared and verified with mainstream defect detection algorithms such as Faster R-CNN and YOLOv3.The results show that the mean average precision (mAP) of the improved YOLOv4 method can reach 80.14%,the mAP is improved by 8.29% and 16.11%,and it has better robustness and detection effect.