Quartz ring defect detection method based on YOLOv11
Through the quartz ring defect detection method based on YOLOv11, the problem of low accuracy and efficiency of quartz ring defect detection in the existing technology is solved, automatic detection is realized, the detection efficiency is increased by 10 times, and small defects can be accurately detected, and production process improvement is promoted.
Patent Information
- Application Number
- CN202411843059.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to achieve high accuracy and high efficiency detection in quartz ring defect detection, especially in complex scenarios.
Using the YOLOv11-based quartz ring defect detection method, a quartz ring defect database was constructed, and an image enhancement database was generated by adjusting the light source intensity, translation and adversarial model. Training was performed using the YOLOv11m model and the model was deployed in the quartz ring defect detection device for detection.
Automatic defect detection of quartz rings is realized, with a detection efficiency of 10 times that of manual labor. It can accurately detect small defects on quartz rings and feed back the test results into the production process to promote process improvement.
Smart Images

Figure CN119831941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of material defect detection, and in particular to a quartz ring defect detection method based on YOLOv11. Background Art
[0002] As the scale of the semiconductor industry continues to grow, the requirements for the size, shape, and precision of quartz components are getting higher and higher. Quartz rings are upstream of semiconductor equipment demand and are consumables. The detection of surface defects is crucial to ensure wafer etching. In the field of industrial defect detection, traditional image algorithms usually require manual design of features, which are suitable for industrial scenarios with simple rules, but may be difficult to apply in complex scenarios. CV algorithms and deep learning algorithms can automatically learn features from data and are suitable for more complex industrial scenarios, but require a large amount of labeled data. The YOLO series of algorithms stand out among defect detection and classification algorithms because they can determine the location and category of the target. YOLOv11 is the latest iteration of the YOLO series developed by the Ultralytics team. It is a cutting-edge, state-of-the-art model that builds on the success of previous YOLO versions and introduces new features and improvements to further improve performance and flexibility. YOLOv11 is designed to be fast, accurate, and easy to use, making it an excellent choice for a variety of object detection and tracking, instance segmentation, image classification, and pose estimation tasks. YOLOv11 introduces C3k2 blocks, SPPF, and C2PSA components to enhance feature extraction capabilities. Its backbone network uses C3k2 blocks, the neck structure introduces the C2PSA module, and the head uses multiple C3k2 blocks and CBS layers to further refine the feature map and finally output the bounding box and category label. YOLOv11 achieved a higher average precision (mAP) on the COCO dataset, while reducing the number of parameters by 22%, showing its advantages in accuracy and efficiency. YOLOv11 introduces a complete architecture design and optimized training pipeline, providing faster processing speed and maintaining the best balance between accuracy and performance.
[0003] Chinese patent CN110596148A discloses a non-intuitive optical detection device and method for quartz glass defects. Specifically, the quartz glass sample to be tested is placed on a stage, and a halogen lamp light source passes through the quartz glass sample to be tested after passing through a rotating polarizer below. The transmitted light passes through a microscope objective lens and a rotating polarizer above to form an image on a CMOS or CCD camera, and multiple images are inversely calculated to obtain non-intuitive images. The method of rotating orthogonal polarized light wave parameter imaging is used to invert and obtain a pseudo-color image with high resolution.
[0004] Chinese patent CN 118172322A discloses a Fresnel lens defect detection method based on improved YOLO v5l, including: building a Fresnel lens image acquisition system; creating a Fresnel lens sample set; dividing the acquired samples into a training set, a validation set and a test set; using an adaptive histogram equalization method to process the screened images to obtain an enhanced data set; building an improved YOLO v5l network, adding an attention mechanism to the backbone network of the model, inputting the enhanced training set, validation set and test set to obtain a Fresnel lens automatic detection model; inputting the image to be detected into the Fresnel lens defect detection model, and outputting the corresponding Fresnel lens defect detection result; the patent combines channel and spatial attention mechanisms to ensure the accuracy of Fresnel lens defect detection while achieving lightweight models.
[0005] Chinese patent CN 102136061A discloses a bearing surface defect detection method and system based on improved YOLOv10. The method acquires bearing defect images, enhances and preprocesses image data, constructs a bearing defect data set, designs and improves the YOLOv10 model, trains the improved YOLOv10 model, tests and evaluates model performance, and comprehensively compares multiple models. While improving detection accuracy, training efficiency, and complex defect recognition capabilities, the patent maintains a low computational complexity, ensuring the deployability and practicality of the model in resource-constrained environments. These advantages together enhance the overall performance of the present invention in bearing defect detection, and provide a strong guarantee for the reliability, production efficiency, and safety of industrial equipment. Summary of the invention
[0006] In order to solve the problems in the background technology, the present invention provides a quartz ring defect detection method based on YOLOv11, which can significantly improve the defect detection accuracy of the quartz ring and achieve high-efficiency detection.
[0007] To achieve this object, the present invention adopts the following technical solutions:
[0008] A quartz ring defect detection method based on YOLOv11, comprising the following steps:
[0009] Step S1, obtain the corresponding original image through the quartz ring defect detection device, build a quartz ring defect database, and enhance the number of images in the database by adjusting the light source intensity, translation, and using the adversarial model method.
[0010] Step S2: preprocess the image using Opencv.
[0011] Step S3: In the Python environment, use the command pip install labelimg to install the labelimg labeling tool. After the installation is complete, start the labeling software in the command line, set the labeling format to YOLO, set the automatic saving of the labeling file generated by the labeling, and unify the image format to jpg.
[0012] Step S4, find the YOLOv11m model from Github, and divide the quartz ring defect data set into a training set and a validation set according to the 28 classification principle. Put the training set data in the images / train folder, and the corresponding labeled data in the labels / train folder; put the validation data in the images / val folder, and the corresponding labeled data in the labels / val folder; modify the hyperparameters in default.yaml to match the corresponding file locations.
[0013] Step S5, train the YOLOv11m model by adjusting parameters, verify the trained YOLOv11m model, select the YOLOv11m model with the best training effect as the defect detection model of the quartz ring, and output it in ONNX format to facilitate subsequent deployment and reasoning.
[0014] Step S6, loading the defect detection model of the quartz ring and performing defect detection on the quartz ring.
[0015] Preferably, the method for enhancing the number of images in the database in step S1 is as follows: for the original image, by adjusting the brightness change of the light source, a light and dark image is obtained; using an image translation algorithm to translate the original image to obtain a translated image; using the PGGAN model in the adversarial network to generate a PGGAN image for the original image; and making the sum of the number of original images, light and dark images, translated images and PGGAN images in the quartz ring defect database no less than 4500.
[0016] Preferably, the image preprocessing method in step S2 comprises the following steps:
[0017] Step S21, using the image library provided by Opencv to generate a structural element, using the following formula to generate a structural element of type rectangle and size (5,5):
[0018] kernel=cv2.getStructuringElement(cv2.MORPH_RECT,(5,5))
[0019] Step S22, using the structural element to simultaneously perform an expansion operation on the images in the quartz ring defect database to obtain an expanded image, the formula is as follows:
[0020] dilate_img=cv2.dilate(image,kernel)
[0021] The structural element is used to perform an erosion operation on the image in the quartz ring defect database to obtain a erosion image. The formula is as follows:
[0022] erode_img=cv2.erode(image,kernel)
[0023] Step S23, in order to make the defect features in the image more prominent, the expansion image and the erosion image obtained in step S22 are subjected to a differential operation to obtain a differential image, and the formula is as follows:
[0024] absdiff_img=cv2.absdiff(dilate_img,erode_img).
[0025] Step S24, grayscale processing is performed on the differential image obtained in step S23 to obtain a grayscale image, and the formula is as follows:
[0026] gray=cv2.cvtColor(absdiff_img,cv2.COLOR_BGR2GRAY).
[0027] Step S25, performing median filtering on the grayscale image in step S24 to remove minor defects and obtain a filtered image, the formula is as follows:
[0028] img_median=cv2.medianBlur(gray,3).
[0029] Preferably, the defects marked in step S3 include cracks, knife marks, scratches, foreign matter, bubbles, open bubbles and gaps.
[0030] Preferably, in the step S5 of training the YOLOv11m model, the input image size is specified to be 640pixel×640pixel, GPU is selected for training device=0, Adam optimizer is selected, mosaic data enhancement is closed after 100 rounds close_mosaic=100, confidence threshold Confidence Threshold=0.4 is set, the optimal number of training rounds epochs=127, and the optimal batch size batch=32.
[0031] Preferably, the quartz ring defect detection method in step S6 comprises the following steps:
[0032] Step S61, detection starts, dust on the surface of the quartz ring is removed by high-pressure gas, the host sends instructions to the visual controller, turns on the light source, turns on the industrial camera, sends instructions to the servo motor, and realizes automatic focusing of the industrial camera through the up and down movement of the servo motor;
[0033] Step S62, the host sends a command to the visual controller to take a photo to determine the initial position of the quartz ring;
[0034] Step S63, the host sends a command to the servo motor, and the servo motor controls the quartz ring to rotate at a given speed, and the exposure time of the industrial camera is determined by the movement speed of the servo motor;
[0035] Step S64, performing image preprocessing as described in step S2 on the quartz ring image captured by the industrial camera;
[0036] Step S65, using the pre-processed image and the quartz ring defect detection model to detect the defect type and location on the quartz ring;
[0037] Step S66, determining whether the quartz ring has moved one circle, if not, going to step S64; if yes, the host sends a command to the servo motor to stop moving;
[0038] Step S67, stitching the images of the quartz ring zone defects to display a complete image of the entire quartz ring and the location of the corresponding defect.
[0039] In step S68, the operator determines the detection result of the quartz ring and whether the detection process is completed. If it is completed, the detection process ends; if it is not completed, the next cycle of detection process is carried out.
[0040] Preferably, the detection result of the quartz ring in step S68 is as follows: if there are cracks on the surface of the quartz ring, it is directly judged as scrap; the other defect types are compared based on the actual size of the defect and the threshold. If the actual size of the defect is greater than the threshold, it is judged as an unrepairable quartz ring, otherwise, it is a repairable quartz ring.
[0041] Preferably, the quartz ring defect detection device includes a light source, a quartz ring bracket, an industrial camera, a servo motor, a visual bracket, a visual controller and an industrial computer, wherein the servo motor and the quartz ring bracket realize the rotation of the quartz ring, the industrial camera, the visual bracket and the visual controller constitute a visual detection platform, and the industrial computer uniformly handles exposure, visual defect detection and adjustment of the quartz ring rotation speed.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] 1. The present invention can realize automatic defect detection of quartz rings, and the detection efficiency is 10 times that of manual detection.
[0044] 2. The present invention uses a quartz ring defect detection model. The C2PSA module in the model introduces a spatial attention mechanism, which enables the model to focus on important areas in the image and improves the ability to detect small defects.
[0045] 3. The present invention can detect the types and positions of defects in quartz rings. The detection of different defects can be further fed back to the production process to promote process improvement. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of the present invention;
[0047] Figure 2 It is a workflow diagram for product defect detection.
[0048] Figure 3 It is a schematic diagram of a quartz ring defect detection device.
[0049] In the figure: 1-light source; 2-quartz ring bracket; 3-quartz ring; 4-industrial camera; 5-servo motor; 6-vision bracket; 7-vision controller; 8-industrial computer. DETAILED DESCRIPTION
[0050] 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.
[0051] like Figure 1 As shown, a quartz ring defect detection method based on YOLOv11 includes the following steps:
[0052] Step S1, taking a picture of the front side of the quartz ring 3 by using a CCD network port camera, and using an algorithm for adjusting the brightness and translation of the light source 1 and generating a new picture by image confrontation to achieve image enhancement.
[0053] In this embodiment, the specific hardware models of the quartz ring 3 visual detection device are: industrial camera (4) (model: MV-CU120-10GM (NPOE)), lens (model MVL-MY-05-110-MP), light source (1) (model: MV-LRSS-166-W).
[0054] Step S2, preprocessing the images in the quartz ring defect database;
[0055] In this embodiment, the image preprocessing steps are as follows:
[0056] Step S21, generating structural elements
[0057] Step S22, performing dilation and erosion morphological operations on the original image.
[0058] Step S23, performing a differential operation on the image after dilation and erosion.
[0059] Step S24, gray-scaling the differential image.
[0060] Step S25: The obtained image is subjected to median filtering to remove minor defects.
[0061] Step S3, using labelimag labeling software to label the defect type and defect area of the image with a size of 3072 pixels × 4096 pixels, and then divide the image into a training set and a test set.
[0062] Step S4, select the YOLOv11m model and modify the parameters.
[0063] Step S5, training and verifying the YOLOv11m model.
[0064] Step S6, deploy the trained quartz ring defect detection model to perform defect detection on the quartz ring 3. The detection process is as follows: Figure 2 shown.
[0065] like Figure 3 As shown, the quartz ring defect detection device adopted by the present invention includes a light source 1, a quartz ring bracket 2, an industrial camera 4, a servo motor 5, a visual bracket 6, a visual controller 7 and an industrial computer 8, wherein the servo motor 5 and the quartz ring bracket 2 realize the rotation of the quartz ring 3, the industrial camera 4, the visual bracket 6 and the visual controller 7 constitute a visual detection platform, and the industrial computer 8 uniformly processes exposure, visual defect detection and adjustment of the rotation speed of the quartz ring 3.
[0066] 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 ring defect detection method based on YOLOv11, characterized in that: The following steps are involved: Step S1, obtaining a corresponding original image through a quartz ring defect detection device, constructing a quartz ring (3) defect database, and increasing the number of images in the database by adjusting the intensity of the light source (1), translating, and using an adversarial model method; Step S2, preprocessing the image using Opencv; Step S3, in the Python environment, use the command pip install labelimg to install the labelimg annotation tool; After the installation is complete, start the annotation software in the command line, set the annotation format to YOLO, set it to automatically save the annotation files generated by the annotation, and unify the image format to jpg; Step S4, find the YOLOv11m model from Github, divide the quartz ring defect data set into a training set and a validation set according to the 28 classification principle; put the training set data in the images / train folder, and the corresponding labeled data in the labels / train folder; put the validation data in the images / val folder, and the corresponding labeled data in the labels / val folder; modify the hyperparameters in default.yaml to match the corresponding file locations; Step S5, training the YOLOv11m model by adjusting parameters, verifying the trained YOLOv11m model, selecting the YOLOv11m model with the best training effect as the quartz ring defect detection model, and outputting it in ONNX format to facilitate subsequent deployment and reasoning; Step S6, loading the quartz ring defect detection model, and performing defect detection on the quartz ring (3).
2. According to claim 1, a quartz ring defect detection method based on YOLOv11 is characterized in that: The method for increasing the number of images in the database in step S1 is as follows: for the original image, by adjusting the brightness change of the light source (1), a light and dark image is obtained; using an image translation algorithm to translate the original image to obtain a translated image; using the PGGAN model in the adversarial network to generate a PGGAN image for the original image; and making the sum of the number of original images, light and dark images, translated images and PGGAN images in the quartz ring defect database no less than 4500.
3. According to the quartz ring defect detection method based on YOLOv11 as claimed in claim 1, it is characterized in that: The image preprocessing method in step S2 comprises the following steps: Step S21, using the image library provided by Opencv to generate a structural element, using the following formula to generate a structural element of rectangular type and size (5,5): kernel=cv2.getStructuringElement(cv2.MORPH_RECT,(5,5)) Step S22, using the structural element to simultaneously perform an expansion operation on the images in the quartz ring (3) defect database to obtain an expanded image, the formula is as follows: dilate_img=cv2.dilate(image,kernel) The structural element is used to perform an erosion operation on the image in the quartz ring defect database to obtain a erosion image. The formula is as follows: erode_img=cv2.erode(image,kernel) Step S23, in order to make the defect features in the image more prominent, the expansion image and the erosion image obtained in step S22 are subjected to a differential operation to obtain a differential image, and the formula is as follows: absdiff_img=cv2.absdiff(dilate_img,erode_img); Step S24, grayscale processing is performed on the differential image obtained in step S23 to obtain a grayscale image, and the formula is as follows: gray=cv2.cvtColor(absdiff_img,cv2.COLOR_BGR2GRAY); Step S25, performing median filtering on the grayscale image in step S24 to remove minor defects and obtain a filtered image, the formula is as follows: img_median=cv2.medianBlur(gray,3).
4. According to a quartz ring defect detection method based on YOLOv11 as claimed in claim 1, it is characterized in that: The defects marked in step S3 include cracks, knife marks, scratches, foreign matter, bubbles, open bubbles and gaps.
5. According to claim 1, a quartz ring defect detection method based on YOLOv11 is characterized in that: In the step S5, during the training of the YOLOv11m model, the input image size is specified to be 640pixel×640pixel, GPU is selected for training device=0, Adam optimizer is selected, mosaic data enhancement is closed after 100 rounds close_mosaic=100, confidence threshold Confidence Threshold=0.4 is set, the optimal number of training rounds epochs=127, and the optimal batch size batch=32.
6. According to the quartz ring defect detection method based on YOLOv11 according to claim 1, it is characterized in that: The quartz ring defect detection method in step S6 uses a quartz ring defect detection device for detection, and includes the following steps: Step S61, detection starts, dust on the surface of the quartz ring (3) is removed by high-pressure gas, the host sends a command to the visual controller (7), turns on the light source (1), turns on the industrial camera (4), sends a command to the servo motor (5), and realizes automatic focusing of the industrial camera (4) by moving the servo motor (5) up and down; Step S62, the host sends a command to the visual controller (7) to take a photo to determine the initial position of the quartz ring (3); Step S63, the host sends a command to the servo motor (5), and the servo motor (5) controls the rotation of the quartz ring (3) at a given speed, and adjusts the exposure time of the industrial camera (4) by the movement speed of the servo motor (5); Step S64, performing image preprocessing as described in step S2 on the image of the quartz ring (3) captured by the industrial camera (4); Step S65, using the pre-processed image and the quartz ring defect detection model to detect the type and location of defects on the quartz ring (3); Step S66, determining whether the quartz ring (3) has moved one circle, if not, proceeding to step S64; if yes, the host sends a command to the servo motor (5) to stop moving; Step S67, stitching the images of the quartz ring (3) with defects to display a complete image of the entire quartz ring (3) and the location of the corresponding defects; In step S68, the operator determines the detection result of the quartz ring (3) and determines whether the detection process is completed. If it is completed, the detection process ends; if it is not completed, the next cycle of the detection process is carried out.
7. A quartz ring defect detection method based on YOLOv11 according to claim 6, characterized in that: The detection result of the quartz ring (3) in step S68 is as follows: if there are cracks on the surface of the quartz ring (3), it is directly judged as a waste; the other defect types are compared based on the actual size of the defect and the threshold. If the actual size of the defect is greater than the threshold, it is judged as an unrepairable quartz ring (3); otherwise, it is a repairable quartz ring (3).
8. According to claim 6, a quartz ring defect detection method based on YOLOv11 is characterized in that: The quartz ring defect detection device comprises a light source (1), a quartz ring bracket (2), an industrial camera (4), a servo motor (5), a visual bracket (6), a visual controller (7) and an industrial computer (8), wherein the servo motor (5) and the quartz ring bracket (2) realize the rotation of the quartz ring (3), the industrial camera (4), the visual bracket (6) and the visual controller (7) constitute a visual detection platform, and the industrial computer (8) uniformly processes exposure, visual defect detection and adjustment of the rotation speed of the quartz ring (3).
Citation Information
Patent Citations
Method for automatically detecting, classifying and identifying defects of rectangular quartz wafer
CN102136061A
Non-intuitive optical detection device and method of quartz glass defects
CN110596148A
Industrial glass defect detection method based on OpenCV optimization algorithm
CN118172322A
New energy lithium battery surface defect detection method based on adaptive deep learning
CN111105405A
Refrigerator trundle detection method, system and device based on visual identification
CN113724240A
Cited By
Chip packaging defect detection method applied to edge device based on YOLOv11m
CN120219388A
Drug packaging defect detection method and device based on improved YOLOv11 model
CN121190437A
Quartz part defect detection method and system based on multi-modal vision
CN122049868A