Improved YOLOv8 chip surface defect detection model and construction method and application thereof

Through the improved YOLOv8 target detection model, combined with a variety of advanced technical means, the problem of insufficient reliability and lack of adaptability to different types of defects in complex backgrounds is solved, and efficient defect identification and detection is achieved.

CN119399146APending Publication Date: 2025-02-07JIANGSU UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411453724.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

Existing chip surface defect detection methods are insufficient in complex contexts to detect reliability and lack adaptability to different types of defects.

Method used

The improved YOLOv8 object detection model is adopted, and the model's detection ability of different types of defects and complex backgrounds is improved by building Backbone module, Neck module and Head module, combining DCNv3 network, BiFPN feature pyramid, CBAM attention mechanism and Focal Loss loss function.

Benefits of technology

It improves the adaptability to different types of defects and the detection reliability in complex contexts, and realizes the accurate identification and detection of chip surface defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399146A_ABST
    Figure CN119399146A_ABST
Patent Text Reader

Abstract

The invention discloses an improved YOLOv8 chip surface defect detection model construction method and application, and the method comprises the steps: constructing a network structure of an improved YOLOv8 target detection model, which comprises a Backbone module, a Neck module and a Head module; the Backbone module comprises a multi-layer DCNv3 network, a C2f network and an SPPF network, and outputs a first effective feature layer, a second effective feature layer and a third effective feature layer after performing multi-layer convolution processing on the picture; the Neck module adopts a BiFPN bidirectional feature pyramid feature fusion structure, inputs three effective feature layers output by the Backbone module into a ConcatBiFPN network for bidirectional adaptive fusion, and then outputs the three effective feature layers through a CBAM attention mechanism network; the Head module comprises a Deect network structure, and the Deect network structure is connected with a CBAM attention mechanism network and outputs a target detection result; the improved YOLOv8 target detection model structure is used for accurately recognizing the surface defects of the chip, and the adaptability to different types of defects is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision technology, and in particular to a method for constructing an improved YOLOv8 chip surface defect detection model and an application thereof. Background Art

[0002] In recent years, with the advancement of semiconductor technology, chip surface defect detection has gradually become an important research direction in the field of electronic engineering. In the design of high-performance and high-density integrated circuits, timely detection and elimination of defects are crucial to improving product quality. Traditional detection methods often rely on manual visual inspection or simple tests, which is not only inefficient but also leads to an increased risk of missed detection and false detection. Therefore, it is particularly important to develop an efficient and automated chip surface defect detection method to meet the strict high quality requirements of modern electronic products.

[0003] With the rapid development of deep learning technology, defect detection methods based on convolutional neural networks have gradually replaced traditional methods. These methods can effectively process complex image data, automatically extract features, and significantly improve the accuracy and efficiency of detection. Researchers have developed detection systems for chip surface defects based on models such as the YOLO series and Faster R-CNN. These systems not only have high-precision defect recognition capabilities, but can also process a large amount of detection information in real time.

[0004] However, existing detection methods still have some shortcomings, such as detection reliability in complex backgrounds and lack of adaptability to different types of defects, which urgently need further optimization and improvement. Summary of the invention

[0005] In order to address the deficiencies in the prior art, this application proposes an improved YOLOv8 chip surface defect detection model construction method and application, which can improve the adaptability to different types of defects and the detection reliability under complex backgrounds, and realize accurate identification of chip surface defects.

[0006] The technical solution adopted by the present invention is as follows:

[0007] A method for constructing a chip surface defect detection model of an improved YOLOv8 includes the following steps:

[0008] Step 1, build the network structure of the improved YOLOv8 target detection model, including Backbone module, Neck module and Head module; the Backbone module includes a multi-layer DCNv3 network, a C2f network and an SPPF network, and outputs the first effective feature layer, the second effective feature layer and the third effective feature layer after performing multi-layer convolution processing on the image;

[0009] The Neck module adopts the BiFPN bidirectional feature pyramid feature fusion structure, inputs the three effective feature layers output by the Backbone module into the Concat_BiFPN network for bidirectional adaptive fusion, and then outputs them through the CBAM attention mechanism network respectively;

[0010] The Head module includes a Detect network structure, which is connected to the CBAM attention mechanism network and outputs target detection results;

[0011] Step 2: Based on the improved YOLOv8 target detection model structure built in step 1, use images of chip surface defects to train, verify, and test the target detection model.

[0012] Further, the network structure of the Backbone module is: from input to output, it is formed by sequentially connecting the first DCNv3 network structure, the second DCNv3 network structure, the first C2f network structure, the third DCNv3 network structure, the second C2f network structure, the fourth DCNv3 network structure, the third C2f network structure, the fifth DCNv3 network structure, the fourth C2f network structure and the SPPF network structure. Among them, the input of the first DCNv3 network structure is a picture, and the second C2f network structure, the third C2f network structure and the SPPF network structure output the first effective feature layer, the second effective feature layer and the third effective feature layer to the Neck module respectively.

[0013] Furthermore, the DCNv3 network structure is composed of deformable convolution, SILU activation function and deformable ROI pooling; among them, the deformable convolution adds an offset to the input features, enhances the feature expression ability of the deformable convolution extraction through SILU smooth nonlinear mapping, and serves as the input of the deformable ROI pooling layer, which outputs a feature map with spatial information.

[0014] Furthermore, the deformable convolution is composed of a Conv layer, an offset field layer, and an offsets layer connected in sequence; in the Conv layer, a standard convolution operation is performed on the input feature map. The position of the sampling point in the convolution operation is not fixed. In the offset field layer, a separate convolution layer is used to generate the offset of each convolution kernel sampling point according to the input feature map. When the Conv layer is performing convolution, the offset generated by the Offset field layer is applied to the sampling point of the convolution kernel in the offsets layer, and the sampling point is adjusted according to the offset.

[0015] Furthermore, the deformable ROI pooling layer includes an Fc layer and an offsets layer; in the deformable ROI pooling layer, the feature map is input into the Fc layer, the Fc layer generates an offset, the offset is used to adjust the pooling point in each RoI area, and then input into the offsets layer to dynamically adjust the position of the pooling point according to the offset, and finally outputs a feature map with spatial information.

[0016] Furthermore, the Concat_BiFPN network structure adds BiFPN on the basis of ordinary splicing, performs adaptive bilateral connection between multi-level feature maps, and achieves bidirectional adaptive fusion effect; the calculation formula of the Concat_BiFPN network structure is expressed as:

[0017]

[0018] Among them, y i Represents the output feature map, x i is the input feature map, represents the upsampled feature map, represents the downsampled feature map, w i,1 、w i,2 、w i,3 are the weights corresponding to the three items in the formula.

[0019] Furthermore, the network structure of the CBAM attention mechanism multiplies the output features of the channel attention module and the spatial attention module element by element to obtain the final attention-enhanced features.

[0020] Furthermore, the process of training, validating and testing the model in step 2 is as follows:

[0021] Step 2.1, obtain images with chip surface defects, and annotate the images to form a chip surface defect dataset; divide the dataset into a training set, a validation set, and a test set;

[0022] Step 2.2: Use the training set and validation set of the dataset to train and validate the above-mentioned improved YOLOv8 target detection model.

[0023] An improved YOLOv8 chip surface defect detection model is constructed using the above method.

[0024] A chip surface defect detection method comprises the following steps:

[0025] Step 1: Collect pictures of surface defects of the chip to be identified;

[0026] Step 2: Input the image of the chip surface defects to be identified into the above-mentioned improved YOLOv8 target detection model to detect the chip surface defects, and output the information of the chip surface defects in the industrial production process, including the coordinates and size (x, y, w, h) of the bounding box, the category confidence and the probability distribution of the target category.

[0027] Beneficial effects of the present invention:

[0028] 1. In order to solve the problem that existing detection methods lack adaptability to different types of defects, the present invention adopts the Concat_BiFPN network structure in the Neck module. The Concat_BiFPN network structure adopts an adaptive weighting mechanism, which can perform adaptive bilateral connections between multi-level feature maps, that is, bidirectional information transmission between different levels to enhance the fusion of multi-scale features, and can effectively process targets of different scales, especially the detection ability of small targets is greatly improved. The bidirectional flow characteristics of its structure can promote information transmission between multi-level features and improve the model's ability to express different features. It enables multi-level feature maps to simultaneously obtain global and local information, achieve bidirectional adaptive fusion effects, and thus improve the accuracy and efficiency of target detection.

[0029] 2. Traditional convolutional networks have limitations in processing objects with complex geometric deformations due to the use of fixed-size convolution kernels. To solve this problem, the DCNv3 network structure introduces deformable convolutions. By learning the sampling position of each convolution kernel in the input feature map, the convolution operation can adapt to the shape changes in the image. The spatial deformability of the convolution kernel is enhanced, and important areas in the feature map can be located more accurately. This helps the model better detect objects with different angles, shapes, and postures, especially those in complex backgrounds.

[0030] 3. CBAM first weights the features in the channel dimension through the channel attention module, and then weights the features in the spatial dimension through the spatial attention module, so that the model can selectively enhance important features in multiple dimensions. It uses the attention mechanism to enhance the network's feature selection ability. By paying attention to the importance of different channels and spatial positions, it helps the model better focus on key features and ignores redundant or irrelevant information, which can improve the network's feature selection ability and thus improve the accuracy of the final detection. In particular, for image scenes with complex backgrounds and unclear target objects, there is a significant performance improvement.

[0031] 4. Focal Loss is a loss function designed specifically to solve the problem of class imbalance. This loss function reduces the impact of easy-to-classify samples on the overall loss by giving higher weights to difficult-to-classify samples, thereby preventing the network from ignoring difficult samples among a large number of easy-to-classify samples. In the case of small targets, complex backgrounds, or class imbalance, Focal Loss can effectively improve the detection ability of the model, reduce false positives and false negatives, and improve accuracy and recall when the ratio of class samples is extremely unbalanced.

[0032] 5. The present invention adopts the ReLU nonlinear activation function, which maintains linear output in the positive range and outputs zero in the negative range. This function can ensure that the network has high computational efficiency while maintaining nonlinearity, and can effectively support the training of deep networks, maintain stable gradient transfer, and effectively alleviate the gradient vanishing problem.

[0033] 6. By integrating these technical modules, the present invention can make YOLOv8 better cope with common challenges such as complex backgrounds, small targets, and category imbalance, and can improve detection capabilities at different scales and different geometric deformations. In general, the model construction method can make the YOLOv8 target detection model have stronger feature expression capabilities, better geometric deformation adaptability, better ability to handle category imbalance, faster computing efficiency and better stability, thereby improving its performance in detection accuracy, recall rate, robustness and computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a flow chart of a chip surface defect detection model construction method and application of an improved YOLOv8 of the present invention.

[0035] Figure 2 It is a structural schematic diagram of the improved YOLOv8 target detection model of the present invention.

[0036] Figure 3 This is a schematic diagram of the DCNv3 network structure.

[0037] Figure 4 It is a structural diagram of the CBAM attention mechanism module.

[0038] Figure 5 This is a schematic diagram of the Concat_BiFPN structure.

[0039] Figure 6 This is one of the effect diagrams of the improved YOLOv8 target detection model of the present invention in identifying chip surface defects. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0041] Example 1

[0042] like Figure 1 As shown, the chip surface defect detection model construction method of an improved YOLOv8 proposed in this application includes the following steps:

[0043] Step 1: Build the network structure of the improved YOLOv8 target detection model. The network structure is as follows: Figure 2 As shown, the improved YOLOv8 target detection model structure includes a Backbone module, a Neck module and a Head module. The present invention adds a CBAM attention mechanism module to the Neck module of the original YOLOv8 target detection model. The CBAM attention mechanism module improves the feature expression ability of the convolutional neural network by adaptively learning channel and spatial attention weights.

[0044] The structure of the improved YOLOv8 target detection model is as follows:

[0045] 1. Backbone module

[0046] The Backbone module is composed of 5 DCNv3 network structures, 4 C2f network structures and one SPPF network structure; from input to output, it is formed by connecting the first DCNv3 network structure, the second DCNv3 network structure, the first C2f network structure, the third DCNv3 network structure, the second C2f network structure, the fourth DCNv3 network structure, the third C2f network structure, the fifth DCNv3 network structure, the fourth C2f network structure and the SPPF network structure in sequence. Among them, the input of the first DCNv3 network structure is a picture, and the second C2f network structure, the third C2f network structure and the SPPF network structure output the first effective feature layer, the second effective feature layer and the third effective feature layer to the Neck module respectively.

[0047] More specifically, if Figure 3 As shown, the DCNv3 network structure of the present invention is composed of deformable convolution, SILU activation function and deformable ROI pooling; wherein, the deformable convolution adds an offset to the input feature, enhances the feature expression ability of the deformable convolution extraction through SILU smooth nonlinear mapping, and serves as the input of the deformable ROI pooling layer, and the deformable ROI pooling layer outputs a feature map with spatial information.

[0048] like Figure 3As shown in the figure, the deformable convolution is composed of a Conv layer, an offset field layer, and an offsets layer connected in sequence; in the Conv layer, a standard convolution operation is performed on the input feature map. The position of the sampling point in the convolution operation is not fixed, and the sampling point will be adjusted according to the offset generated by the subsequent offset field layer. In the offset field layer, a separate convolution layer is used to generate the offset (offsets) of each convolution kernel sampling point based on the input feature map, which is used to generate an offset value that describes how the convolution kernel moves at each position. When the Conv layer is performing convolution, the offset generated by the Offsetfield layer is applied to the sampling point of the convolution kernel in the offsets layer. The sampling point at each convolution kernel position is not fixed, and the sampling point moves according to the offset. The offset allows the convolution kernel to flexibly adjust according to the local geometric structure of the input to capture more expressive features.

[0049] like Figure 3 As shown in the figure, the deformable ROI pooling layer includes an Fc layer and an offsets layer; in the deformable ROI pooling layer, the feature map is input into the Fc layer, the Fc layer generates an offset, the offset is used to adjust the pooling point in each RoI area, and then input into the offsets layer to dynamically adjust the position of the pooling point according to the offset, and finally outputs a feature map with spatial information.

[0050] More specifically, the above offset can be determined by learning the feature map and RoI. The present invention can adaptively locate parts of objects of different shapes by adding the offset.

[0051] More specifically, the DCNv3 network structure uses the SiLU activation function. SiLU is a further improvement on the traditional activation functions Sigmoid and ReLU. It has the advantages of both functions. Unlike Sigmoid and ReLU, the SiLU function has the characteristics of no upper bound and lower bound, that is, the output value will not increase or decrease infinitely, but fluctuate within a certain range. This feature helps alleviate the problem of gradient disappearance or explosion, thereby preventing the slow training process from occurring. In addition, the SiLU function is smooth and non-monotonic. This smoothness plays an important role in the optimization and generalization process. The function expression is as follows:

[0052] SiLU(x)=x·Sigmoid(x)

[0053] Among them, x is the input value in the network.

[0054] In this embodiment, in the Backbone module, the input image is convolved multiple times, and finally three effective feature layers are extracted. The shapes of the three feature layers are: P1 = (80, 80, 256), P2 = (40, 40, 512), and P3 = (20, 20, 512).

[0055] 2. The Neck module adopts the BiFPN bidirectional feature pyramid feature fusion structure to fuse feature layers of different shapes. The Neck module consists of 2 Conv, 4 C2f network structures, 2 upsample Upsample, 1 Concat network structure, 3 Concat_BiFPN, and 3 CBAM attention mechanism network structures; among them, the first upsample is connected with the first Concat_BiFPN network structure, the fifth C2f network structure, the second upsample, the second Concat_BiFPN network structure, the sixth C2f network structure, the first CBAM attention mechanism network structure, the first Conv network structure, the Concat network structure, the seventh C2f network structure, the second CBAM attention mechanism network structure, the second Conv network structure, the third Concat_BiFPN network structure, the eighth C2f network structure, and the third CBAM attention mechanism network structure in sequence, and the fifth C2f network structure is connected to the Concat network structure. Among them, the inputs of the first upsampling and the third Concat_BiFPN network structures are both connected to the SPPF network structure, and the third effective feature layer output by the SPPF network structure is used as input; the input of the first Concat_BiFPN network structure is also connected to the third C2f network structure, and the second effective feature layer output by the third C2f network structure is used as input; the input of the second Concat_BiFPN network structure is also connected to the second C2f network structure, and the first effective feature layer output by the second C2f network structure is used as input.

[0056] Combined with Figure 4 , the CBAM attention mechanism network structure multiplies the output features of the channel attention module and the spatial attention module element by element to obtain the final attention enhancement feature. This attention enhancement feature will be used as the input of the subsequent network layer to suppress noise and irrelevant information while retaining key information. The CBAM attention mechanism network structure in the present invention improves the feature expression ability of the convolutional neural network by adaptively learning the channel and spatial attention weights.

[0057] Figure 4The upper middle part is the channel attention mechanism. The channel attention mechanism first performs global maximum pooling and global average pooling on the input feature map to generate two channel feature vectors, representing the maximum feature and average feature of each channel, respectively. Next, these two vectors are input into a shared fully connected layer to learn the attention weights of each channel, and the final weight vector is obtained through interaction. Then, the Sigmoid activation function is applied to normalize the weights to between 0 and 1. Finally, these attention weights are multiplied by each channel of the original feature map to generate an attention-weighted feature map, thereby emphasizing important channels and suppressing irrelevant channels.

[0058] Figure 4 The lower part of the is the spatial attention mechanism, which first performs maximum pooling and average pooling on the input feature map along the channel dimension to generate features of different context scales. Then, these two features are concatenated along the channel dimension to form a feature map that combines information of different scales, and processed through a convolutional layer to generate spatial attention weights. Next, the Sigmoid activation function is applied to limit the weights between 0 and 1. Finally, these spatial attention weights are applied to the original feature map to weight the features of each spatial position, thereby highlighting important areas and suppressing the influence of unimportant areas.

[0059] More specifically, the Concat_BiFPN network structure adds BiFPN on the basis of ordinary splicing to achieve a bidirectional adaptive fusion effect. The Concat_BiFPN network structure consists of a feature extraction layer, an upsampling module, a cross-connection layer, a fusion module and an output layer.

[0060] The formula is as follows:

[0061]

[0062] Among them, y l,i is the output of the ith position of the lth level feature map in the Concat_BiFPN network structure, x l,i is the input of the ith position of the lth level feature map, l min and l max are the smallest and largest levels in the feature pyramid, w1 and w2 are learnable parameters; y l is the output of the l-th level feature map, i is the i-th position of the feature map, y l+1 is the output of the l+1th level feature map, x l,j is the input of the jth position of the lth level feature map, where j is i±3.

[0063] The Concat_BiFPN network structure can perform adaptive bilateral connections between multi-level feature maps, so that the multi-level feature maps can simultaneously obtain global and local information, thereby improving the accuracy and efficiency of target detection;

[0064] Assume that the input feature map is x1,x2,...,x n , where n represents the number of input feature maps. The calculation formula of the Concat_BiFPN network structure can be expressed as:

[0065]

[0066] Among them, y i Represents the output feature map, x i is the input feature map, represents the upsampled feature map, represents the downsampled feature map, w i,1 、w i,2 、w i,3 are the weights of each item, which can be learned.

[0067] Specifically, the upsampled feature map and the downsampled feature map can be calculated by the following formula:

[0068]

[0069] Among them, Upsample(·) represents upsampling, Downsample(·) represents downsampling, and 1 is the maximum value of j during downsampling.

[0070] When calculating the weight, it can be calculated by the following formula:

[0071] w i,1 =sigmoid(z i ,1)

[0072]

[0073] w i,3 =1-w i,1 -w i,2

[0074] Among them, z i,1 、z i,2 are learnable bias parameters, which are trained via back-propagation.

[0075] like Figure 5As shown, the three effective feature layers output by Backbone are respectively input into the three Concat_BiFPN network structures in Neck. In order to clearly introduce the fusion process, the first effective feature layer output by the second C2f network structure is recorded as feature map P1, the second effective feature layer output by the third C2f network structure is recorded as feature map P2, and the third effective feature layer output by the SPPF network structure is recorded as feature map P3; the feature map P1 is connected to the feature fusion network and fused with the corresponding feature map N1 to be detected at the same scale; similarly, the feature map P3 output by the SPPF module is fused with the corresponding N3 at the same scale. The feature map N2 to be detected is obtained by fusion of the features of three different network layers, namely, the feature map obtained by downsampling from the previous network layer N1, the feature map P2 output by the third C2f, and the feature map generated by upsampling fusion of the feature extraction network part F2.

[0076] 3. The Head module is the YOLOv8 target detection head, which is mainly composed of three Detect network structures. The first Detect network structure is connected to the first CBAM attention mechanism network structure, the second Detect network structure is connected to the second CBAM attention mechanism network structure, and the third Detect network structure is connected to the third CBAM attention mechanism network structure.

[0077] More specifically, the Detect network structure includes convolutional layers, bounding box regression, category prediction, anchor boxes, loss function calculation, and non-maximum suppression.

[0078] Furthermore, the loss function uses Focal Loss, which is based on the standard cross entropy loss, calculates the difference between the predicted probability and the true label, introduces a parameter to adjust the loss contribution of easy-to-classify samples, and combines the power of the predicted probability to reduce the impact of accurately classified samples on the total loss and enhance the contribution of difficult-to-classify samples. The formula is:

[0079] FL(p t )=-α t (1-p t ) γ log(p t )

[0080] Among them, p t is the model’s predicted probability for the true category, α t is a balancing factor used to control the importance of each category, and parameter γ is a regulating factor used to adjust the loss contribution of easy-to-classify samples.

[0081] Step 2: Based on the improved YOLOv8 target detection model structure built in step 1, train, verify and test the image target detection model based on chip surface defects.

[0082] Step 2.1, dataset preparation.

[0083] First, 600 images with chip surface defects are obtained using an industrial camera, and Labelimg is used to annotate multiple categories of “DIE_BROKEN”, “DIE_INK”, and “DIE_CRACK” to form a chip surface defect dataset. In this embodiment, the annotation format adopts the PascalVOC format.

[0084] More specifically, the images in the data set in step 2.1 are preprocessed; the preprocessing specifically includes selecting translation, flipping, rotation, contrast, random scaling, brightness and saturation to enhance the chip surface defect data set, wherein the brightness and saturation are expanded by 1.5 times, and the rest are expanded by 1 times, so as to increase the data set while improving the stability and robustness of the network. Then the chip surface defect data set is resized without distortion to a uniform size of 640*640. At the same time, the Mosaic data enhancement method is used to splice four pictures, which indirectly increases the batch_size, so that a single GPU can achieve a better training effect. The enhanced data set is divided into a training set, a validation set and a test set, and the division ratio is: (training set + validation set): test set = 9:1, wherein the training set: validation set = 9:1.

[0085] Step 2.2, train the model based on the dataset.

[0086] The improved YOLOv8 target detection model is trained using the training set and validation set of the dataset. The training epoch is set to 450 times. The backbone feature extraction network is frozen in the first 150 epochs and the initial learning rate is set to 0.01. The backbone feature extraction network is unfrozen in the last 300 epochs and the initial learning rate is set to 0.0001. The target detection is verified on the test set of the constructed chip surface defect dataset to complete the accurate identification of chip surface defects.

[0087] Example 2

[0088] An improved YOLOv8 chip surface defect detection model trained by the above method can be used for chip surface defect detection.

[0089] Example 3

[0090] Based on the above chip surface defect detection model, the present invention also proposes a chip surface defect detection method, comprising the following steps:

[0091] Step 1: Use an industrial camera to collect images of surface defects of the chip to be identified;

[0092] Step 2: Input the image of the chip surface defect to be identified into the above-mentioned improved YOLOv8 target detection model to detect the chip surface defects, and output the information of the chip surface defects in the industrial production process, including the coordinates and size of the bounding box (x, y, w, h), the category confidence and the probability distribution of the target category, such as Figure 6 .

[0093] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. A method for constructing a chip surface defect detection model based on an improved YOLOv8, characterized in that: The steps include: Step 1, build the network structure of the improved YOLOv8 target detection model, including Backbone module, Neck module and Head module; the Backbone module includes a multi-layer DCNv3 network, a C2f network and an SPPF network, and outputs the first effective feature layer, the second effective feature layer and the third effective feature layer after performing multi-layer convolution processing on the image; The Neck module adopts the BiFPN bidirectional feature pyramid feature fusion structure, inputs the three effective feature layers output by the Backbone module into the Concat_BiFPN network for bidirectional adaptive fusion, and then outputs them through the CBAM attention mechanism network respectively; The Head module includes a Detect network structure, which is connected to the CBAM attention mechanism network and outputs target detection results; Step 2: Based on the improved YOLOv8 target detection model structure built in step 1, use images of chip surface defects to train, verify, and test the target detection model.

2. According to the method for constructing a chip surface defect detection model of an improved YOLOv8 according to claim 1, it is characterized in that: The network structure of the Backbone module is: from input to output, it is formed by sequentially connecting the first DCNv3 network structure, the second DCNv3 network structure, the first C2f network structure, the third DCNv3 network structure, the second C2f network structure, the fourth DCNv3 network structure, the third C2f network structure, the fifth DCNv3 network structure, the fourth C2f network structure and the SPPF network structure. Among them, the input of the first DCNv3 network structure is a picture, and the second C2f network structure, the third C2f network structure and the SPPF network structure output the first effective feature layer, the second effective feature layer and the third effective feature layer to the Neck module respectively.

3. According to the method for constructing a chip surface defect detection model of an improved YOLOv8 according to claim 2, it is characterized in that: The DCNv3 network structure is composed of deformable convolution, SILU activation function and deformable ROI pooling; among them, the deformable convolution adds an offset to the input features, enhances the feature expression ability of the deformable convolution extraction through SILU smooth nonlinear mapping, and serves as the input of the deformable ROI pooling layer, which outputs a feature map with spatial information.

4. According to claim 3, a method for constructing a chip surface defect detection model of an improved YOLOv8, characterized in that: Deformable convolution is composed of a Conv layer, an offset field layer, and an offsets layer connected in sequence; in the Conv layer, a standard convolution operation is performed on the input feature map. The position of the sampling point in the convolution operation is not fixed. In the offsetfield layer, a separate convolution layer is used to generate the offset of each convolution kernel sampling point according to the input feature map. When the Conv layer is performing convolution, the offset generated by the offset field layer is applied to the sampling point of the convolution kernel in the offsets layer, and the sampling point is adjusted according to the offset.

5. According to claim 3, a method for constructing a chip surface defect detection model of an improved YOLOv8, characterized in that: The deformable ROI pooling layer includes an Fc layer and an offsets layer. In the deformable ROI pooling layer, the feature map is input into the Fc layer, and the Fc layer generates an offset. The offset is used to adjust the pooling points in each RoI area, and then input into the offsets layer to dynamically adjust the position of the pooling points according to the offset, and finally outputs a feature map with spatial information.

6. The method for constructing a chip surface defect detection model of an improved YOLOv8 according to claim 1, characterized in that: The Concat_BiFPN network structure adds BiFPN on the basis of ordinary splicing, performs adaptive bilateral connection between multi-level feature maps, and achieves bidirectional adaptive fusion effect; the calculation formula of the Concat_BiFPN network structure is expressed as: Among them, y i Represents the output feature map, x i is the input feature map, represents the upsampled feature map, represents the downsampled feature map, w i,1 、w i,2 、w i,3 are the weights corresponding to the three items in the formula.

7. The method for constructing a chip surface defect detection model of an improved YOLOv8 according to claim 1, characterized in that: The network structure of the CBAM attention mechanism is to multiply the output features of the channel attention module and the spatial attention module element by element to obtain the final attention-enhanced features.

8. The method for constructing a chip surface defect detection model of an improved YOLOv8 according to claim 1, characterized in that: The process of training, validating, and testing the model in step 2 is as follows: Step 2.1, obtain images with chip surface defects, and annotate the images to form a chip surface defect dataset; divide the dataset into a training set, a validation set, and a test set; Step 2.2: Use the training set and validation set of the dataset to train and validate the above-mentioned improved YOLOv8 target detection model.

9. An improved YOLOv8 chip surface defect detection model, characterized in that: It is constructed using the chip surface defect detection model construction method of an improved YOLOv8 as described in claim 1.

10. A chip surface defect detection method, characterized in that: The steps include: Step 1: Collect pictures of surface defects of the chip to be identified; Step 2: Input the image of the chip surface defects to be identified into the above-mentioned improved YOLOv8 target detection model to detect the chip surface defects, and output the information of the chip surface defects in the industrial production process, including the coordinates and size (x, y, w, h) of the bounding box, the category confidence and the probability distribution of the target category.

Citation Information

Cited By

  • Prefabricated part appearance defect detection and classification method based on target detection

    CN119672029A

  • Power transmission channel surrounding environment identification method and system based on unmanned aerial vehicle inspection image

    CN120747798A

  • Surface defect detection method and equipment based on DINOv3 model and medium

    CN121190466A