Quartz optical element defect detection method based on improved YOLOv10

By improving the combination of YOLOv10 model and industrial camera, the problems of slow detection speed and high error detection rate in quartz optical component defect detection are solved, and efficient and accurate defect detection is achieved, which is suitable for industrial production.

CN119831940APending Publication Date: 2025-04-15JIANGSU YUDI OPTICAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411843058.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing quartz optical component defect detection methods have problems such as slow detection speed, high error detection rate, poor ability to adapt to complex environments, and excessive model parameters, which are difficult to meet the needs of large-scale production inspection.

Method used

The improved YOLOv10 model is adopted, and the PSA module is replaced by the CoordAttention mechanism, combined with industrial cameras to enlarge the image 70-100 times, and the detection efficiency is improved through image preprocessing, database enhancement and automated operations.

Benefits of technology

It significantly improves the detection speed of quartz optical components, reduces the error detection rate, is suitable for industrial inspection, and can feedback to the manufacturing process to improve the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831940A_ABST
    Figure CN119831940A_ABST
Patent Text Reader

Abstract

The invention discloses a quartz optical element defect detection method based on improved YOLOv10, and the method comprises the following steps: obtaining a digital image through a quartz optical element defect detection device, and carrying out the preprocessing of the digital image; constructing a quartz optical element defect database; marking the images in the database by using the Label; the improved YOLOv10 model is trained and tested; and loading the trained quartz optical element defect detection model, and detecting the defects of the quartz optical element. The industrial camera used in the invention can amplify the surface of the quartz optical element by 70-100 times, which is far 20-50 times greater than that of manual visual inspection. According to the method, a CoordAttention attention mechanism is used for replacing a PSA module, so that the defect detection accuracy is further improved. According to the invention, by using the YOLOv10 model for target detection, the real-time detection speed is improved, and the false detection rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of surface defect detection of quartz optical elements, and in particular to a quartz optical element defect detection method based on improved YOLOv10. Background Art

[0002] Quartz optical components are key materials in the semiconductor industry, and the detection of surface defects is crucial to ensure product quality. Traditional manual visual inspection methods have high false detection rates and missed detection rates, as well as shortcomings such as slow detection speed and long detection time, which cannot meet the needs of large-scale production inspection. With the development of deep learning technology, automated inspection methods based on deep learning have gradually become a research hotspot. The YOLO (You Only Look Once) series of algorithms occupy an important position in the field of target detection with its excellent real-time performance and accuracy. Machine vision inspection technology is an emerging non-contact automatic inspection technology that can meet the needs of large-scale production inspection. The target detection model for images is the core of machine vision inspection technology, and the most advanced target detection model is YOLOv10. The dual label allocation strategy introduced by YOLOv10 provides more positive samples to enrich model training in the training stage, and realizes a one-to-one detection head through gradient truncation in the inference stage, avoiding non-maximum suppression (NMS) post-processing and reducing inference overhead. It is a target detection system based on image global information for prediction. Compared with YOLOv5, the YOLOv10 model is faster and more accurate, while providing a unified framework for training models. It consists of three modules: input, backbone, and head. The input module scales the input image to a fixed size to meet the input size requirements of the backbone network. The backbone network consists of CBS convolutional layer, E-ELAN convolutional layer, and MPConv convolutional layer. The E-ELAN convolutional layer can improve the learning ability of the network without destroying the original gradient path, and can also learn more diverse features by guiding the calculation blocks of different feature groups. The MPConv convolutional layer adds a Maxpool layer on the basis of the CBS convolutional layer to form two upper and lower branches. Finally, the Concat operation is used to fuse the features extracted from the upper and lower branches, which improves the feature extraction ability of the network. The head network first uses the SPP pyramid structure to make the head network suitable for multi-size input; then the aggregated feature pyramid network structure is used to pass the underlying information to the upper layer along the bottom-up path to achieve the fusion of features at different levels; finally, the REPcon structure is used to adjust the number of channels for features of different scales.

[0003] Chinese patent CN 118172322A discloses an industrial glass defect detection method based on OpenCV optimization algorithm, which is specially designed for the field of industrial glass production. Traditional industrial glass defect detection methods have a series of problems, such as light interference and poor ability to adapt to complex environments. In order to solve these problems, the following steps are adopted: image preprocessing, area detection, glass breakability detection, glass surface scratch detection, and final qualification judgment. First, the glass edge area is obtained by image processing technology, and then the area is judged in detail. Through the OpenCV optimization algorithm, the parameters can be adaptively adjusted to evaluate the integrity and scratches of the glass edge. Finally, through comprehensive judgment, it is determined whether the industrial glass is qualified. The advantage of this method is that it improves the accuracy and versatility of industrial glass defect detection, while reducing labor costs and providing higher guarantees for product quality. In addition, this method has strong interpretability and adaptability, and is suitable for complex and changeable field environments.

[0004] Chinese patent CN 102136061A discloses a method for automatic detection, classification and recognition of rectangular quartz plate defects. The long side of the quartz plate is extracted from the original image and its slope is calculated, and the image is rotated so that the long side of the plate is horizontal in the image; image segmentation is performed to separate the plate target from the background; a plate template is established based on the plate target and its related parameters; peripheral broken strip defects are detected and identified; peripheral edge uneven defects are detected and identified; peripheral edge collapse defects are detected and identified; edge collapse defects are detected and identified; edge uneven defects are detected and identified; edge cracks and scratches are detected and identified; internal cracks, scratches and shadow defects are detected and identified. Its advantages are: accurate detection, correct classification and identification, high work efficiency, and no visual damage.

[0005] The current defect detection method for quartz optical components based on YOLOv10 has the following main shortcomings: 1) The image magnification directly obtained by visual equipment is much larger than the magnification during manual visual inspection (70 times), but lower than the magnification of precision equipment (Keyence's equipment magnification is 500 times), so precision defects cannot be detected properly; 2) Due to the light transmittance of quartz optical components, they are easily disturbed by surrounding light; 3) The model parameters are too large, and there are oscillations during training, which is not conducive to deployment on low-performance chips. Summary of the invention

[0006] In order to solve the problem in the background technology, the present invention provides a quartz optical element defect detection method based on improved YOLOv10, which can significantly improve the detection speed of quartz optical elements.

[0007] To achieve this object, the present invention adopts the following technical solutions:

[0008] A quartz optical component defect detection method based on improved YOLOv10 comprises the following steps:

[0009] Step S1, obtaining a digital image through a quartz optical element defect detection device and performing preprocessing.

[0010] Step S2, constructing a quartz optical component defect database, and enhancing the number of images in the database to no less than 4,000 by translation, rotation, noise addition, brightness adjustment, and using an adversarial model method.

[0011] Step S3, use Labelme to annotate the images in the database and divide the images in the database into two parts, 20% of which are used as a test set and 80% as a training set.

[0012] Step S4, train and test the improved YOLOv10 model. Use the CoordAttention mechanism to replace the PSA module in the YOLOv10-D6 model, build the improved YOLOv10 model, use train.py for training, and use detect.py for testing. The training and test results are placed in the runs folder, and the best training model is selected as the quartz optical component defect detection model.

[0013] Step S5, loading the trained quartz optical component defect detection model to detect the defects of the quartz optical component.

[0014] Preferably, in step S1, the diameter of the quartz optical element is diameter, with a value range of 20-500mm, and the thickness is thick, with a value range of 5-50mm. The quartz optical element defect detection device in step S1 includes a light source, a quartz optical element bracket, an X-axis linear module, a Y-axis linear module, a Z-axis linear module, an industrial camera, a servo motor, a visual bracket, a visual controller, and an industrial computer, wherein the visual bracket serves as a support table, and the X-axis linear module, the Y-axis linear module, the Z-axis linear module and the servo motor constitute a three-axis motion platform.

[0015] Preferably, the image preprocessing method in step S1 comprises the following steps:

[0016] Step S11, the quartz optical element defect detection device magnifies the defect by 50 to 70 times, and the image taken by the industrial camera is unified into 8M and the size is 6072 pixels × 4096 pixels. The image is converted from BMP to JPG through image.open() and image.save(), and then the size is converted to 640 pixels × 640 pixels by the resize() function.

[0017] Step S12, using the function im.convert('L') provided by the PIL library to grayscale the image.

[0018] Step S13, using median filtering to eliminate salt and pepper noise for the image and improve clarity, specifically using cv2.medianBlur(gray,3), in this process, the filter size is selected as 3x3.

[0019] Step S14, select the Laplacian operator as the image sharpening operator to perform image sharpening. Specifically, the cv2.Laplacian(src,ddepth[,dst[,ksize[,scale[,delta[,borderType]]]]]) function in opencv is used to implement the sharpening.

[0020] Preferably, the method for enhancing the image in the database in step S2 is to obtain a new image by randomly rotating, translating, randomly scaling and adding noise to the original image, and generate a new image using the PGGAN model in the adversarial network to ensure that the database images are no less than 4000.

[0021] Preferably, the defects of the quartz optical element include scratches with a length of more than 0.2 mm, cracks with a length of more than 0.2 mm, edge collapse with a diameter of more than Φ0.2 mm, pits / open bubbles with a diameter of more than Φ0.2 mm, and foreign matter with a diameter of more than Φ0.2 mm.

[0022] Preferably, the working method of training the quartz optical component defect detection model is as follows: put the processed image in mydata / images / train, and put the corresponding txt label file in mydata / labels / train. Create a new mydata.yaml file in data / scripts and add the relative path and category information. After completion, in the command input window of the train.py file, select the improved YOLOv10-D6 as the initialization quartz optical component defect detection model, select the path, use Con_Thr as the confidence threshold, use Threshold as the non-maximum suppression threshold, set the number of training rounds to epoch, run the train.py function, and the optimal model is stored in runs / train / exp2 / weights / best.pt. After obtaining the optimal model, test it in detect.py. Among them, the value range of Con_Thr is 0.1-1, the value range of Threshold is 0.1-1, and the value range of the number of training rounds is 10-1000.

[0023] Preferably, the quartz optical element defect detection method comprises the following steps:

[0024] Step S51, the detection starts, the host sends a command to the drive motor to determine whether the quartz optical element defect detection device is in the initial position, if it is in the initial position, the quartz optical element defect detection device remains stationary, otherwise the drive motor controls the X-axis linear module and the Y-axis linear module to move to the initial setting position;

[0025] Step S52, high-pressure gas is used to remove dirt from the product surface, the host sends instructions to the visual controller, turns on the light source, and the industrial camera achieves automatic focusing with the quartz optical element by moving up, down, left, and right;

[0026] Step S53, after the focusing is completed, the Z-axis linear module remains stationary to take pictures, and after completion, a command is sent to the X-axis linear module and the Y-axis linear module to move to the specified position to take pictures.

[0027] Step S54, repeating step S53 four times to complete the image acquisition of the quartz optical element.

[0028] Step S55, stitching the images taken four times to obtain a complete image of the quartz optical element.

[0029] Step S56, performing image preprocessing operation on the captured quartz optical element image according to step S1;

[0030] Step S57: After the preprocessed image is passed through the trained YOLOv10 model, images with different types of defects are obtained. Different types of defects are quantified to give the defect type, actual area and perimeter.

[0031] In step S58, the host determines whether the detection process of the quartz optical element is completed. If it is completed, the detection of the single quartz optical element is completed. If it is not completed, step S53 is repeated.

[0032] Step S59, the quartz optical element defect detection device returns to the initial position;

[0033] In step S510, the operator determines whether the detection process is completed. If it is completed, the detection process ends; if it is not completed, the detection process of the next cycle is performed.

[0034] Preferably, in step S57, the quantitative judgment of different types of defects includes: if there is no defect described in step S3, it is judged as a qualified quartz optical element; if there is a crack on the surface of the quartz optical element, it is directly judged as an unrepairable quartz optical element; the remaining defect types are compared with the actual size of the defect and the threshold value. If the actual size of the defect is greater than the threshold value, it is judged as an unrepairable defect, otherwise, it is a repairable defect.

[0035] Compared with the prior art, the present invention has the following substantial characteristics and significant advantages:

[0036] 1. The industrial camera used in the present invention can magnify the surface of the quartz optical element by 70 to 100 times, far exceeding the 20 to 50 times of manual visual inspection.

[0037] 2. This paper uses an improved YOLOv10 model and replaces the PSA module with the CoordAttention mechanism to further improve the detection accuracy of defects.

[0038] 3. The present invention adopts automated operation, has high detection efficiency, and is suitable for industrial detection. By using the YOLOv10 model for target detection, the real-time detection speed is improved and the false detection rate is reduced.

[0039] 4. The defects detected by the present invention can be fed back to the manufacturing process of quartz optical elements to further improve the manufacturing process of quartz optical elements. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flowchart of the present invention;

[0041] Figure 2 It is a structural diagram of a quartz optical element defect detection model;

[0042] Figure 3 It is a workflow diagram for defect detection of quartz optical components;

[0043] Figure 4 is a schematic diagram of a quartz optical element defect detection device;

[0044] In the figure: 1-servo motor; 2-Z-axis linear module; 3-industrial camera; 4-quartz optical element; 5-visual bracket; 6-light source; 7-X-axis linear module; 8-Y-axis linear module; 9-visual controller, 10-industrial computer. DETAILED DESCRIPTION

[0045] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. The specific embodiments described herein are specific embodiments of the present invention, which are used to illustrate the concept of the present invention, are explanatory and exemplary, and should not be interpreted as limiting the embodiments of the present invention and the scope of the present invention. In addition to the embodiments described herein, those skilled in the art can also adopt other obvious technical solutions based on the contents disclosed in the claims and the specification of this application, and these technical solutions include technical solutions that adopt any obvious replacements and modifications to the embodiments described herein, which are all within the scope of protection of the present invention.

[0046] like Figure 1-2 As shown, a quartz optical element 4 defect detection method based on improved YOLOv10 includes the following steps:

[0047] Step S1, taking an image of the quartz optical element 4 by means of a quartz optical element defect detection device, and preprocessing the image.

[0048] In this embodiment, the hardware of the quartz optical element defect detection device includes an industrial camera 3 (model MV-CH250-90GM), a telecentric lens for the industrial camera 3 (model MVL-KF3524M-25MP), a light source 6 (model MV-LRSS-166-W), an X-axis linear module 7 (model RXP45-L600), a Y-axis linear module 8 (model RXP45-L500), a Z-axis linear module 2 (model R XP45-L500), servo motor 1 (model 57-76-8D25-2.5M), the image accuracy of the surface defect image of the quartz optical element 4 collected is mainly guaranteed by the telecentric lens with a target size of 1 / 1.8", an object distance of 35mm, a depth of field of 0.3mm, a maximum imaging range of 3.69mm×2.46mm and an industrial camera 3 with a resolution of 6072pixel×4096pixel and a pixel size of 3.4μm×2.4μm.

[0049] In this embodiment, the image preprocessing steps are as follows:

[0050] Step S11, converting an image with a size of 6072 pixels × 4096 pixels into an image with a size of 640 pixels × 640 pixels.

[0051] Step S12, converting the obtained image into a grayscale image through a stretching grayscale transformation.

[0052] Step S13, removing noise from the image by median filtering to improve the clarity.

[0053] Step S14, using the Laplacian operator as an image sharpening operator to perform image sharpening.

[0054] Step S2, constructing a quartz optical element 4 image database, and performing image enhancement to expand the number of images in the database.

[0055] In this embodiment, the image enhancement method is a random enhancement method or an adversarial network enhancement method. The image enhancement method in step S2 is a random enhancement method or an adversarial network enhancement method. The database enhancement method in S2 is to obtain a new image by randomly rotating, translating, randomly scaling and adding noise to the original image, and after obtaining a certain number of images, use the PGGAN model in the adversarial network to generate a new image.

[0056] Step S3, after the defect type and defect area are labeled for the images with a size of 640 pixels×640 pixels in the database, the images are divided into a training set and a test set.

[0057] Step S4, obtaining a quartz optical component defect detection model through model training, testing the model using a test set, adjusting model parameters according to error conditions, and obtaining an optimal quartz optical component defect detection model.

[0058] like Figure 3 As shown in the figure, an improved YOLOv10 model is built and trained to obtain a quartz optical component defect detection model.

[0059] Step S5 , after loading the quartz optical element defect detection model, the quartz optical element defect detection device performs defect detection on the quartz optical element 4 .

[0060] like Figure 3 As shown, the defect detection process of the quartz optical element 4 is the same as step S5 in the content of the invention.

[0061] The present invention is not limited to this embodiment, and any equivalent concepts or changes within the technical scope disclosed by the present invention are included in the protection scope of the present invention.

Claims

1. A quartz optical component defect detection method based on improved YOLOv10, characterized in that: The following steps are involved: Step S1, obtaining a digital image through a quartz optical element defect detection device and performing preprocessing; Step S2, constructing a quartz optical component defect database, and enhancing the number of images in the database by translation, rotation, noise addition, brightness adjustment, and using an adversarial model method to be no less than 4,000; Step S3, using Labelme to annotate the images in the database, and divide the images in the database into two parts, 20% of which are used as a test set and 80% as a training set; Step S4, train and test the improved YOLOv10 model; use the CoordAttention mechanism to replace the PSA module in the YOLOv10-D6 model, build an improved YOLOv10 model, use train.py for training, and use detect.py for testing; the training and test results are placed in the runs folder, and the best training model is selected as the quartz optical component defect detection model; Step S5, loading the trained quartz optical element defect detection model to detect defects of the quartz optical element (4).

2. According to claim 1, a quartz optical element defect detection method based on improved YOLOv10 is characterized in that: In the step S1, the diameter of the quartz optical element (4) is diameter, with a value range of 20-500 mm, and the thickness is thick, with a value range of 5-50 mm. The quartz optical element defect detection device in step S1 comprises a light source (6), a quartz optical element (4) bracket, an X-axis linear module (7), a Y-axis linear module (8), a Z-axis linear module (2), an industrial camera (3), a servo motor (1), a visual bracket (5), a visual controller (9), and an industrial computer (10), wherein the visual bracket (5) serves as a support platform, and the X-axis linear module (7), the Y-axis linear module (8), the Z-axis linear module (2) and the servo motor (1) constitute a three-axis motion platform.

3. According to claim 1, a quartz optical element defect detection method based on improved YOLOv10 is characterized in that: The image preprocessing method in step S1 comprises the following steps: Step S11, the quartz optical element defect detection device magnifies the defect by 50 to 70 times, and unifies the image captured by the industrial camera (3) into 8M and a size of 6072 pixels × 4096 pixels; converts the image from BMP to JPG through image.open() and image.save(), and then converts the size to 640 pixels × 640 pixels through the resize() function; Step S12, using the function im.convert('L') provided by the PIL library to grayscale the image; Step S13, using median filtering to eliminate salt and pepper noise for the image and improve clarity, specifically using cv2.medianBlur(gray,3), in this process, the filter size is selected as 3x3; Step S14, select the Laplacian operator as the image sharpening operator to perform image sharpening; specifically, use the cv2.Laplacian(src,ddepth[,dst[,ksize[,scale[,delta[,borderType]]]]]) function in opencv to achieve sharpening.

4. According to claim 1, a quartz optical element defect detection method based on improved YOLOv10 is characterized in that: The method for enhancing the images in the database in step S2 is to obtain new images by randomly rotating, translating, randomly scaling and adding noise to the original images, and using the PGGAN model in the adversarial network to generate new images to ensure that the database images are no less than 4,000.

5. According to claim 1, a quartz optical element defect detection method based on improved YOLOv10 is characterized in that: The defects of the quartz optical element (4) include scratches with a length of more than 0.2 mm, cracks with a length of more than 0.2 mm, edge collapse with a diameter of more than Φ0.2 mm, pits / open bubbles with a diameter of more than Φ0.2 mm, and foreign matter with a diameter of more than Φ0.2 mm.

6. According to claim 1, a quartz optical component defect detection method based on improved YOLOv10 is characterized in that: The working method of training the quartz optical component defect detection model is as follows: put the processed image in mydata / images / train, and put the corresponding txt label file in mydata / labels / train; create a new mydata.yaml file in data / scripts and add the relative path and category information; after completion, select the improved YOLOv10-D6 as the initialization quartz optical component defect detection model in the command input window of the train.py file, select the path, use Con_Thr as the confidence threshold, use Threshold as the non-maximum suppression threshold, set the number of training rounds to epoch, run the train.py function, and store the optimal model in runs / train / exp2 / weights / best.pt; after obtaining the optimal model, test it in detect.py; wherein the value range of Con_Thr is 0.1-1, the value range of Threshold is 0.1-1, and the value range of the number of training rounds is 10-1000.

7. The quartz optical element defect detection method based on improved YOLOv10 according to claim 1, characterized in that: The quartz optical element defect detection method described in step 5 comprises the following steps: Step S51, the detection starts, the host sends a command to the drive motor to determine whether the quartz optical element defect detection device is in the initial position, if it is in the initial position, the quartz optical element defect detection device remains stationary, otherwise the drive motor controls the X-axis linear module (7) and the Y-axis linear module (8) to move to the initial setting position; Step S52, high-pressure gas is used to remove dirt from the surface of the product, the host sends a command to the visual controller (9), turns on the light source (6), and the industrial camera (3) achieves automatic focusing with the quartz optical element (4) by moving up, down, left, and right; Step S53, after the focusing is completed, the Z-axis linear module (2) remains stationary to take pictures, and after completion, sends instructions to the X-axis linear module (7) and the Y-axis linear module (8) to move to the designated position to take pictures; Step S54, repeating step S53 four times to complete the image acquisition of the quartz optical element (4); Step S55, stitching the four photographed images to obtain a complete image of the quartz optical element (4); Step S56, performing image preprocessing operation on the captured image of the quartz optical element (4) according to step S1; Step S57, the preprocessed image is passed through the trained YOLOv10 model to obtain images with different types of defects; different types of defects are quantified to give the defect type, actual area and perimeter; Step S58, the host determines whether the detection process of the quartz optical element (4) is completed. If it is completed, the detection of the single quartz optical element (4) is completed. If it is not completed, step S53 is repeated; Step S59, the quartz optical element defect detection device returns to the initial position; In step S510, the operator determines whether the detection process is completed. If it is completed, the detection process ends; if it is not completed, the detection process of the next cycle is performed.

8. A quartz optical component defect detection method based on improved YOLOv10 according to claim 8, characterized in that: In step S57, quantitative judgment of different types of defects includes: if there is no defect as described in step S3, it is judged as a qualified quartz optical element; if there is a crack on the surface of the quartz optical element (4), it is directly judged as an unrepairable quartz optical element; the remaining types of defects are compared with the actual size of the defect and the threshold value. If the actual size of the defect is greater than the threshold value, it is judged as an unrepairable defect; otherwise, it is a repairable defect.

Citation Information

Patent Citations

  • Method for automatically detecting, classifying and identifying defects of rectangular quartz wafer

    CN102136061A

  • Industrial glass defect detection method based on OpenCV optimization algorithm

    CN118172322A