Search

CN-121982436-A - Industrial glass defect detection method and system based on improved YOLO series

CN121982436ACN 121982436 ACN121982436 ACN 121982436ACN-121982436-A

Abstract

The application discloses an industrial glass defect detection method and system based on an improved YOLO series, which are characterized in that a prediction frame and a real frame are respectively projected to two mutually orthogonal axes by reconstructing a boundary frame regression loss function, linear intersection ratio and geometric penalty terms are independently calculated, an orthogonal decoupling measurement mechanism is introduced, anisotropic dynamic attention factors are respectively introduced in each axis, and the problem of long and wide coupling of a traditional algorithm in processing glass slender defects is solved. The method can effectively solve the problem that the YOLO series model is inaccurate in positioning of the micro target after training according to the decoupled regression function, remarkably improves the accuracy and the robustness of the target detection model in detecting glass defects, and simultaneously optimizes the capturing capability of the model on the micro target under a complex background. The application can provide an automatic detection scheme with high precision, high efficiency and strong robustness for industrial glass production, effectively reduce the omission ratio and improve the control level of the yield.

Inventors

  • LAN JIE
  • XIAO HUA
  • FANG YULONG
  • LAN YONGSHENG
  • CHEN YI

Assignees

  • 安徽蓝实玻璃科技股份有限公司

Dates

Publication Date
20260505
Application Date
20260107

Claims (10)

  1. 1. The industrial glass defect detection method based on the improved YOLO series is characterized by comprising the following steps of using a target detection model which is obtained through training according to the following steps and is constructed by using the cross-correlation ratio to detect and identify defects in industrial glass images: Performing defect marking and data enhancement on pre-acquired industrial glass image data, and dividing the processed data into a training set, a verification set and a test set; In each training period, respectively executing the following steps of inputting image data into the target detection model, inputting a prediction vector output by a model detection head into a loss function constructed based on an orthogonal decoupling mode, calculating positioning loss of the model detection head, calculating total loss based on the positioning loss, confidence loss and classification loss, carrying out back propagation along the direction of reducing the total loss value by using a gradient descent algorithm, and iteratively updating corresponding parameters in the target detection model; After traversing all image data in the training set is completed, sequentially forward transmitting each image data in the verification set by using a currently obtained target detection model, and optimizing the model super-parameters; Training is completed when the model meets convergence criteria.
  2. 2. The method for detecting defects in industrial glass based on the modified YOLO series as claimed in claim 1, wherein the localized losses obtained based on the loss function constructed in an orthogonal decoupling manner The method comprises the following steps: ; Wherein α and β are normalized dynamic weights generated from regression errors using a softmax mechanism, respectively; after projecting the predicted frame outputted by the object detection model and the real frame marked by the image data onto two mutually orthogonal axes, wherein the linear intersection ratio of the x axis, Projecting a predicted frame output by the target detection model and a real frame marked by image data onto two mutually orthogonal axes, wherein the linear intersection ratio of the y axis is the same as that of the y axis; after the prediction frame and the real frame are projected on two mutually orthogonal axes, the geometric penalty term of the x axis is calculated; after the prediction frame and the real frame are projected on two mutually orthogonal axes, a geometric penalty term in the y axis is obtained; Representing the weighting of the orthogonal decoupled x-axis linear cross ratio; representing the weighting of the orthogonal decoupled y-axis linear cross-ratios, Representing the balance coefficient.
  3. 3. The method for detecting industrial glass defects based on improved YOLO series according to claim 2, wherein the geometric penalty term is a blank ratio in a minimum circumscribed interval of x-axis predicted frame and real frame projection and a blank ratio in a minimum circumscribed interval of y-axis predicted frame and real frame projection, respectively.
  4. 4. The improved YOLO series based industrial glass defect detection method of claim 2, wherein the dynamic weights are: ; Wherein, the As an x-axis regression error term, =1- ; As a y-circumferential regression error term, =1- E denotes the nonlinear mapping of each axial regression error term using the natural index.
  5. 5. The method for detecting defects in industrial glass based on the modified YOLO series as claimed in claim 1, wherein for the object detection model based on any one of yolov, yolov-tiny, yolov4-spp, yolov5, yolov-tiny, yolov6, yolov, the loss function of OA-GIoU constructed based on the orthogonal decoupling mode is: ; Wherein, the Representing the weighting of the orthogonal decoupled x-axis linear cross ratio; representing the weighting of the orthogonal decoupled y-axis linear cross-ratios, Representing the balance coefficient; representing the minimum circumscribed interval length in the X-axis direction, Representing the minimum circumscribed interval length in the Y-axis direction.
  6. 6. The method for detecting defects in industrial glass based on modified YOLO series as claimed in claim 5, wherein said OA-GIoU loss function is used to replace original YOLO target detection model in said target detection model training process (CIoU/SIoU)。
  7. 7. The method for detecting industrial glass defects based on improved YOLO series as claimed in claims 1-6, wherein the pre-training weights of the target detection model loaded on the co macro dataset are first subjected to transfer learning during training.
  8. 8. The method for detecting defects in industrial glass based on the modified YOLO series as claimed in claim 7, wherein the learning rate of the model is dynamically attenuated by cosine annealing strategy in each training cycle.
  9. 9. The method for detecting defects of industrial glass based on improved YOLO series according to claim 8, wherein the change of the loss value on the verification set is monitored in real time in the process of judging whether the model reaches the convergence standard, and when the performance index of the model on the verification set continuously rises for a plurality of periods to reach the pre-examination standard, an early stop mechanism is triggered to finish training.
  10. 10. An industrial glass defect detection system, comprising: The camera equipment is used for collecting image data of the industrial glass; A target detection model of yolov, yolov-tiny, yolov4-spp, yolov5, yolov-tiny, yolov6, yolov7, yolox, pp-yolo, or rcnn model of using cross-correlation to construct a loss function, which receives image data of industrial glass and detects defects therein, locates and outputs defect types after training according to the method of any one of claims 1-9 in advance.

Description

Industrial glass defect detection method and system based on improved YOLO series Technical Field The application belongs to the technical field of visual inspection, and particularly relates to an industrial glass defect detection method and system based on an improved YOLO series. Background Industrial glass, such as cover glass, photovoltaic glass, automotive glass, etc., is used as a core base material in high-end manufacturing and precision instruments, and the quality of the surface of the material is directly related to the optical properties, mechanical strength and appearance quality of the final product. However, conventional glass defect detection methods have long relied on manual visual inspection under specific intense light, or simply mechanical contact measurement. Although the existing manual detection has certain flexibility, considering that glass has the characteristics of transparency and light reflection, the long-time detection by adopting a visual observation mode is extremely easy to cause visual fatigue, so that the detection omission ratio is high, the subjectivity is strong, the efficiency is low, and the method is difficult to adapt to the high-speed and high-precision production rhythm of a modern production line. With the advancement of intelligent manufacturing technology, the accuracy of machine vision-based nondestructive testing technology gradually approaches that of manual work. The method utilizes the high-resolution industrial camera and the image processing algorithm to carry out full-automatic scanning and analysis on the glass surface, and can remarkably improve the objectivity and consistency of detection. However, existing machine vision inspection techniques still face the following challenges when dealing with complex industrial glass scenes: 1) The defect morphology of industrial glass is very specific and is usually manifested as very fine scratches, cracks, bubbles or stones. Scratches and cracks, which tend to have extreme aspect ratios (i.e., dominated by "elongated" features), and very small differences in grayscale (low contrast) between edges and normal glass regions, are very easily ignored or result in fracture detection under conventional feature extraction algorithms. 2) The glass material has high light transmittance and high reflectivity, the imaging process is extremely easy to be influenced by the change of ambient light, the texture of the backlight module and the mechanical vibration of equipment, and a large number of false edges and noise points are easy to generate. When processing such high dynamic range and complex background images, conventional algorithms have difficulty accurately stripping micro-defect targets from the high noise background. 3) The existing target detection algorithm often has games between model weight reduction and detection precision, and particularly under the transmission speed of a few meters per second of a glass production line, the traditional detection algorithm is not enough in speed, or the capturing capability of micro defects is sacrificed in order to speed, so that the harsh requirement of online real-time detection is difficult to meet. 4) Glass defects tend to occupy very few pixels with concomitant reflective interference. In the existing deep convolutional neural network based on visual images, detailed texture information of a small target is easily lost in the deep feature transmission process, so that the omission ratio of tiny bubbles or shallow scratches is higher; 5) The traditional loss function lacks a dynamic adjustment mechanism for regression quality, and the weight cannot be adaptively adjusted according to the matching degree of a prediction frame and a real frame, so that the model cannot concentrate on high-difficulty samples which are difficult to regress in the later period of training, and the upper limit of final detection precision is limited. Disclosure of Invention According to the application, ioU (cross-over ratio) and variants thereof (such as CIoU and SIoU) are adopted as a loss function for defect detection aiming at the existing standard YOLO model, the width and the height of a prediction frame are regarded as a coupled whole for calculation, defects such as scratches on the surface of glass are usually extremely long and narrow, the mutual coupling of the length and width gradients causes difficulty in independently adjusting the fitting degree of a frame when the model optimizes the defects of the extremely high aspect ratio, positioning drift or regression convergence is slow, small target detail textures are easy to lose, and the defects of missed detection are caused by incapacity of focusing on high-difficulty samples which are difficult to regress. The technical scheme includes that an industrial glass defect detection method based on an improved YOLO series is adopted, the method comprises the steps of using a target detection model which is obtained through train