A method for real-time detection and quality evaluation of surface defects of micro device topography based on improved YOLOv8

By improving the YOLOv8 network, combining multi-angle light sources and the Retinex algorithm, and embedding CBAM and BiFPN, adaptive illumination correction and feature fusion are performed, solving the problems of high reflectivity interference and real-time performance in the detection of surface defects of micro-devices, and realizing high-precision, low-cost automated detection and classification.

CN123160409APending Publication Date: 2026-11-24CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510655330.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies for detecting surface defects in micro-devices suffer from insufficient small defect detection capabilities, high reflectivity interference, high data annotation costs, and insufficient real-time performance, making it difficult to meet the demands for high-precision and high-speed detection.

Method used

A multi-angle ring LED light source combined with a polarizer is used to eliminate specular reflection. Multi-scale Retinex and gamma correction algorithms are used to dynamically equalize the illumination. A CBAM module and a BiFPN network are embedded. Combined with random mosaic enhancement and local grayscale transformation, semi-supervised learning is performed and lightweight deployment is carried out to achieve real-time detection.

Benefits of technology

It improves the recall rate of small defects, anti-reflective ability, reduces labeling costs, and meets the real-time detection needs of high-speed production lines, significantly improving detection accuracy and grading accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160409A_ABST
    Figure CN123160409A_ABST
Patent Text Reader

Abstract

This invention discloses a real-time detection and quality assessment method for surface defects in micro-devices based on an improved YOLOv8, belonging to the field of semiconductor manufacturing inspection technology. This method suppresses high reflectivity interference through a multi-angle ring light source and an improved Retinex algorithm, and improves image quality by combining bilateral filtering and nonlocal mean denoising. It embeds a CBAM attention module and a BiFPN feature fusion network into YOLOv8 to enhance small defect detection capabilities; employs dynamic data augmentation and semi-supervised training strategies to reduce the need for labeled data; accelerates embedded real-time inference (≥30FPS) through channel pruning and TensorRT; and automatically classifies defect levels based on morphological analysis and a comprehensive scoring model. Experiments show that this invention achieves 98.7% mAP@0.5, a small defect recall rate of 96.5%, and a yield rate of 99.5% on a test set of 5000 chip images, making it widely applicable to semiconductor packaging production lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semiconductor manufacturing inspection technology, specifically to a real-time detection and quality assessment method for surface defects of micro-devices based on an improved YOLOv8, which is particularly suitable for the automated detection and grading of micro-defects on the surface of highly reflective chips. Background Technology

[0002] The morphology and surface finish of minute devices significantly impact their functional efficiency and stability, serving as a key factor in determining their performance. For example, defects on fiber optic connector end faces and chip surfaces (such as scratches, cracks, and stains) directly affect the performance and reliability of semiconductor devices. Traditional inspection methods primarily rely on manual microscopic observation or machine vision algorithms based on hand-crafted features. For instance, defect detection methods based on the Canny operator and morphological operations have low sensitivity to minute defects (such as nanoscale scratches), with a false negative rate exceeding 5%, and are easily affected by uneven lighting and surface reflections. Furthermore, traditional algorithms require customized feature extraction rules for different surface types, exhibiting poor generalization ability and difficulty adapting to complex and changing production line environments.

[0003] In recent years, deep learning technology has been introduced into the field of defect detection. Existing solutions mostly employ convolutional neural networks (CNNs) or two-stage object detection models (such as Faster R-CNN). For example, a PCB board defect detection method based on YOLOv5 has limitations for small targets (area <0.1 mm²). 2 The recall rate is below 80%. Furthermore, chip surfaces are mostly polished metal or silicon-based materials, and traditional imaging methods (such as direct illumination from a single light source) are prone to specular reflection, leading to overexposure or shadow occlusion of defect areas (see literature). Supervised learning requires a large amount of precisely labeled defect data, but the uneven distribution of surface defect samples (e.g., high proportion of stains, scarce crack samples) limits the model's generalization ability. Existing models (such as YOLOv5) have inference speeds below 20 FPS on embedded devices, making it difficult to meet the high-speed inspection requirements of production lines.

[0004] In existing technologies, the Retinex algorithm is used for image illumination correction, but it is prone to color distortion in dynamic multi-light source scenes; the YOLO series models are applied to industrial quality inspection due to their efficient single-stage detection characteristics, but their native network is insufficient for extracting features of small targets. Attention mechanisms (such as CBAM) enhance key region features by weighting channels and spatial dimensions, but they are not combined with cross-level feature fusion, which limits the detection accuracy of small defects; semi-supervised learning can reduce annotation costs, but the problem of pseudo-label noise is particularly prominent in chip defect scenarios. Summary of the Invention

[0005] The existing technology has the following drawbacks:

[0006] 1. Insufficient small defect detection capability: Traditional algorithms and standard YOLO models are ineffective at detecting small targets (e.g., areas <0.1mm). 2 The recall rate is low and cannot meet the requirements for high-precision detection.

[0007] 2. High reflectivity interference: Surface reflection causes image overexposure or shadow occlusion defects, and the traditional Retinex algorithm is unstable under dynamic lighting conditions;

[0008] 3. High data labeling cost: Supervised learning relies on a large amount of labeled data, while the uneven distribution of defective samples increases the difficulty of model training;

[0009] 4. Insufficient real-time performance: Existing models have low inference speed on embedded devices, making them difficult to adapt to high-speed production lines.

[0010] This invention proposes the following technical solution to address the shortcomings of existing technologies:

[0011] Anti-reflective imaging and adaptive preprocessing: Employs a multi-angle ring LED light source (12 groups of LEDs, incident angle adjustable from 15° to 60°), combined with a polarizer to eliminate specular reflection. Figure 3 Based on a multi-scale Retinex (MSR) and gamma correction (γ = 0.6-1.2) fusion algorithm, the illumination and reflection components are dynamically balanced. This results in a high-quality image with uniform illumination, suppressing overexposure and shadow areas.

[0012] The CBAM module is embedded in the YOLOv8 backbone network, and the channel attention weights are calculated using MLP (128-dimensional).

[0013] The BiFPN (Bi-FPN) network with repeated weighting is introduced to replace the FPN.

[0014] Bidirectional Feature Pyramid Network (BiFPN) is an efficient multi-scale feature fusion network. It is an optimization of the traditional Feature Pyramid (FPN), which can efficiently connect bidirectionally across scales and simplify the network structure for weighted feature fusion. At the same time, it introduces learnable weights to determine the importance of different input features, thereby improving the feature fusion effect.

[0015] Random mosaic enhancement: Randomly stitch together 4 training images to simulate a dense defect scene;

[0016] Local grayscale transformation: Apply random brightness (±10%~30%) and contrast (±10%~20%) perturbations to the defect area;

[0017] The LabelMatch semi-supervised algorithm is used to select pseudo-label iterative optimization models with a confidence score > 0.9.

[0018] Perform lightweight deployment and real-time detection. Channel pruning and INT8 quantization are used to greatly reduce the model size; the TensorRT engine is used to optimize the calculation graph, achieving real-time detection with high FPS on Jetson Nano.

[0019] Defect quantification and quality grading Morphological analysis: Dilation and erosion are performed on the defect area to extract the area, aspect ratio, and distance from the edge; and grading thresholds are set: Grade A (S≤0.2), Grade B (0.2<S≤0.5), Grade C (S>0.5).

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] 1. Improved detection accuracy: The recall rate for small defects of the improved YOLOv8 is increased to 96.5% (on a test set of 5,000 images), which is 15% higher than that of the baseline model;

[0022] 2. Enhanced anti-reflection capability: The multi-angle light source and MSR-Gamma algorithm reduce the image overexposure rate by 70% and increase the contrast of the defect area by 40%;

[0023] 3. Reduced training cost: The semi-supervised strategy reduces the demand for labeled data by 50%;

[0024] 4. Optimized real-time performance: The inference speed on the embedded end reaches 32 FPS, meeting the high-speed detection requirements of production lines;

[0025] 5. Automated grading: The accuracy of the quality scoring model is ≥98%, and the sorting efficiency is increased by 3 times. Description of Drawings

[0026] Figure 1 is a flowchart of a method for detecting surface defects and evaluating quality of micro devices according to an embodiment of the present invention;

[0027] Figure 2 is a schematic diagram of an improved YOLOv8 network architecture of the present invention;

[0028] Figure 3 is a structural diagram of a multi-angle ring light source device used in the present invention. Detailed Description of the Embodiments

[0029] This embodiment provides a method for real-time detection of surface defects and quality evaluation of micro-morphologies based on an improved YOLOv8. Referring to the flowchart shown in Figure 1 , the method includes the following steps:

[0030] Step 1: Surface image acquisition and anti-reflection preprocessing

[0031] 1. Multi-angle light source configuration: A ring LED light source array ( Figure 3It contains 16 sets of adjustable angle LED beads, with a light source incident angle range of 20°-70°, and eliminates specular reflection through a polarizer; The light source controller dynamically adjusts the brightness (100-600 lux) according to the surface material to ensure image uniformity.

[0032] 2. Adaptive Illumination Correction: An improved Retinex algorithm is applied to separate the illumination component L(x,y) and the reflection component R(x,y), as shown in the formula:

[0033] log(I(x,y))=ɑlog(L(x,y))+(1-ɑ)log(R(x,y))

[0034] Where α is a dynamic weighting factor (0.3-0.7), which is adaptively adjusted according to local contrast.

[0035] Perform segmented gamma correction on the illumination component (γ = 0.6 for overexposed areas and γ = 1.4 for shadow areas) and output an equalized image.

[0036] Step 2: Image Filtering and Noise Suppression

[0037] 1. Hybrid filtering processing: Bilateral filtering: kernel size 7×7, spatial standard deviation σd=1.5, grayscale standard deviation σr=25, preserving edge details while suppressing noise; Non-local mean denoising: search window 9×9, similar blocks 5×5, denoising intensity h=12, formula is:

[0038]

[0039] Where Z(p) is the normalization coefficient.

[0040] 2. Morphological enhancement: Top-hat transformation (structuring element is a circle with a radius of 3 pixels) is performed on the denoised image to highlight small defect areas; adaptive threshold segmentation (Otsu algorithm) is applied to extract the binarized image of potential defects.

[0041] Step 3: Improve YOLOv8 network training and optimization

[0042] 1. Network architecture improvement ( Figure 2 ):

[0043] Backbone network improvement: A CBAM module is embedded after the residual blocks of CSPDarknet. Feature maps are dynamically weighted using channel attention (global average pooling + MLP) and spatial attention (7×7 convolution), with the following formula:

[0044]

[0045] Among them, M c and M SThese are the channel and spatial attention weight matrices, respectively.

[0046] 2. Feature Fusion Improvement: FPN is replaced with BiFPN, fusing features from P3-P7 levels through bidirectional cross-scale connections, and learnable weights are introduced to optimize feature contributions.

[0047]

[0048] Set initial weights w i =1.0, learning rate 0.001;

[0049] 3. Use random mosaic enhancement (splitting ratio 0.5) and local grayscale transformation (brightness ±20%, contrast ±15%);

[0050] 4. Semi-supervised training: 1000 initial labeled data images, pseudo-label confidence threshold of 0.9, 3 iterations.

[0051] Step 4: Defect Quantification and Quality Grading

[0052] Defect parameter extraction: Perform morphological closing operation (kernel size 5×5) on the region within the detection frame and connect the fracture edges;

[0053] Extract the defect area A, perimeter P, aspect ratio R of the minimum bounding rectangle, and minimum distance D from the chip edge. Establish a grading model: Define the comprehensive scoring formula:

[0054] S = 0.5A + 0.2R + 0.3D

[0055] Where A and D are the normalized area and distance values;

[0056] Grading rules:

[0057] Grade A (Qualified): S≤0.15;

[0058] Grade B (Repairable): 0.15 <S≤0.40.15<S≤0.4;

[0059] Grade C (Scrapped): S>0.4

[0060] Step 5: Model Deployment and Detection

[0061] 1. Channel pruning removes convolutional kernels with a contribution of <1e-5, reducing the number of model parameters by 30%;

[0062] 2. Deployed using the TensorRT engine, achieving an inference speed of 32 FPS at FP16 precision;

[0063] 3. After morphological processing of the test results (3×3 expansion nuclei, 2×2 corrosion nuclei), the defect parameters are calculated and a quality report is output.

[0064] Dataset: 5000 chip images (including scratches, cracks, and stains), labeled in accordance with the IPC-A-610 standard;

[0065] Results: mAP@0.5 reached 98.7%, small defect recall rate was 96.5%, and inference speed was 32 FPS.

[0066] In industrial applications, this invention can be integrated into semiconductor packaging production lines and fiber optic connector production lines to achieve fully automated defect detection and sorting, increasing the yield rate to 99.5% and resulting in significant economic benefits.

[0067] The following detailed embodiments illustrate the implementation of the present invention, enabling those skilled in the art to understand its technical advantages and implementation details. It should be noted that, unless otherwise specified, the technical features in the following embodiments can be combined with each other.

Claims

1. A method for real-time detection and quality assessment of surface defects in micro-devices based on an improved YOLOv8, characterized in that, Includes the following steps: Step 1: The surface is imaged using a multi-angle ring LED light source array with an incident angle of 20°-70°. Specular reflection is eliminated by a polarizer, and the illumination component and reflection component are separated based on the improved Retinex algorithm. The illumination component is then subjected to segmented gamma correction to output an equalized image. Step 2: Perform bilateral filtering and nonlocal mean denoising on the equalized image to preserve edge details and suppress noise. Then, extract potential defect regions through top-hat transformation and adaptive threshold segmentation. Step 3: Embed the Channel-Spatial Attention Module (CBAM) into the backbone network of YOLOv8, dynamically weight the feature maps through global average pooling and 7×7 convolution, and replace the original Feature Pyramid Network (FPN) with a Bidirectional Feature Pyramid Network (BiFPN), introducing learnable weights to optimize multi-scale feature fusion; Step 4: Use random mosaic enhancement and local grayscale transformation strategies to dynamically enhance the training data, combine semi-supervised training algorithms to generate pseudo-labels and select high-confidence samples to iteratively optimize the model; Step 5: Compress the model through channel pruning and INT8 quantization, and use the TensorRT engine to achieve real-time inference on embedded devices with a detection speed of ≥30FPS; Step 6: Perform morphological closing operations and parameter extraction on the detected defects, construct a comprehensive scoring model based on normalized area, aspect ratio and distance from the edge, and automatically classify the quality level according to the preset threshold.

2. The method according to claim 1, characterized in that, The improved Retinex algorithm described in step one satisfies the following formula: log(I(x,y))=ɑlog(L(x,y))+(1-ɑ)log(R(x,y)) Wherein, α is a dynamic weighting factor, with a value range of 0.3-0.7, which is adaptively adjusted according to local contrast.

3. The method according to claim 1, characterized in that, The feature fusion of BiFPN in step three satisfies the following formula: Among them, w i The weights are learnable and are initially set to 1.

0. ε is a minimal constant.

4. The method according to claim 1, characterized in that, The semi-supervised training described in step four includes the following steps: The baseline model is trained using the initial labeled data. Pseudo-labels are generated for the unlabeled data. Prediction results with a confidence level > 0.9 are selected and added to the training set. The model parameters are then optimized using consistency regularization.

5. The method according to claim 1, characterized in that, The threshold for channel pruning in step five is 1e-5. After pruning, the number of model parameters is reduced by 30%, and INT8 quantization compresses the model volume to 35% of its original size.

6. The method according to claim 1, characterized in that, The comprehensive scoring model described in step six is ​​as follows: S = 0.5A + 0.2R + 0.3D Where A and D are the normalized defect area and distance from the edge, respectively.