A method and system for detecting surface defects of transparent conductive film glass

By designing a light and dark alternating light source field structure and building a lightweight YOLOv5 defect detection model, the problems of slow surface defect detection speed and high hardware cost of transparent conductive film glass were solved, and efficient and low-cost automated detection was achieved.

CN117252817BActive Publication Date: 2025-09-16ANHUI NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311111087.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-09-16
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

In the existing technology, the detection speed of the transparent conductive film glass surface defect detection algorithm is slow, the equipment deployment hardware configuration cost is high, and it is difficult to meet the wide application needs of small and medium-sized enterprises.

Method used

A light source field structure with alternating light and dark is designed, and a lightweight YOLOv5 defect detection model is constructed using re-parameterized convolution and position-sensitive convolution. Through data enhancement and super-resolution preprocessing, deep and shallow features are extracted, and features are fused using asymmetric re-parameterized depth-separable convolution and position-sensitive convolution to reduce the amount of computation and parameters.

Benefits of technology

It achieves efficient detection of surface defects of transparent conductive film glass, reduces hardware deployment costs, improves detection accuracy, realizes online automated detection, and saves labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117252817B_ABST
    Figure CN117252817B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of computer vision target detection, and in particular to a method and system for detecting surface defects of transparent conductive film glass. The method comprises placing the transparent conductive film glass in a light source field structure; collecting surface defect images of the transparent conductive film glass, constructing a surface defect dataset of the transparent conductive film glass, and preprocessing the surface defect dataset using a data enhancement algorithm and a super-resolution adversarial network; constructing a defect detection model, downsampling the dataset using a re-parameterized convolution, integrating a position-sensitive convolution module into the backbone network and the neck network of the defect detection model, and extracting deep and shallow features of the surface defect dataset; inputting the deep and shallow features of the surface defect dataset into a lightweight detection model to extract defect features and predict the defect category of the transparent conductive film glass. The present invention uses a lightweight structure to reduce the number of parameters and calculations of the model, thereby improving the model prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision target detection, and in particular to a method and system for detecting surface defects of transparent conductive film glass. Background Art

[0002] Transparent conductive film glass is widely used in our lives, especially in various electronic products. During the production process, a wide variety of surface defects are generated. Therefore, surface defect detection technology is of great significance to improving product quality. Currently, the most widely used detection technologies are manual inspection and machine vision-based defect detection. The manual inspection method requires workers to use a strong light source to identify glass defects in a dark environment. This method is inefficient, poses a great threat to the human eye, and cannot meet the requirements of automated production on the production line. Although glass defect detection technology based on machine vision can make up for the shortcomings of traditional manual inspection, it is difficult to meet the needs of small and medium-sized enterprises due to the complexity of the defect detection algorithm, weak algorithm adaptability, and the susceptibility of detection results to interference from the external environment. High-end technology is monopolized by foreign countries and is expensive.

[0003] At present, defect detection algorithms based on deep learning usually have large-scale network parameters and complex network structures, slow algorithm detection speed, high equipment deployment hardware configuration costs, and cannot meet the requirements of widespread application. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a method and system for detecting surface defects of transparent conductive film glass, which is used to solve the problems in the prior art that the current algorithm has slow detection speed, high equipment deployment hardware configuration cost, and cannot meet the requirements of wide application.

[0005] To achieve the above-mentioned and other related objectives, the present invention provides a method for detecting surface defects of transparent conductive film glass, comprising:

[0006] S1. Design a light source field structure with alternating light and dark, and place the transparent conductive film glass in the light source field structure;

[0007] S2. Collect surface defect images of transparent conductive film glass, construct a surface defect dataset of transparent conductive film glass, and preprocess the surface defect dataset using a data enhancement algorithm and a super-resolution adversarial network;

[0008] S3. Construct a defect detection model, downsample the dataset using reparameterized convolution, integrate the position-sensitive convolution module into the backbone network and neck network of the defect detection model, and extract deep and shallow features of the surface defect dataset;

[0009] S4. According to the defect detection model, the deep and shallow features of the surface defect dataset are input into a lightweight detection model to extract defect features, and the defect category of the transparent conductive film glass is predicted by a detector.

[0010] In one embodiment of the present invention, the defect detection model is a lightweight YOLOv5 defect detection model.

[0011] In one embodiment of the present invention, in step S1, the light source field structure adopts a linear light source.

[0012] In one embodiment of the present invention, in step S2, a line scan camera is used to collect surface defect images of the transparent conductive film glass in real time.

[0013] In one embodiment of the present invention, the surface defect dataset includes a training set, a validation set, and a test set, and the ratio of the training set, the validation set, and the test set is 7:1:2.

[0014] In one embodiment of the present invention, the defect detection model constructed in step S3 uses reparameterized convolution to downsample the data set to extract deep and shallow features of the surface defect data set, including:

[0015] S31. Use asymmetric re-parameterized depth-wise separable convolution to replace the 3×3 downsampling convolution in YOLOv5. The convolution kernel sizes of asymmetric re-parameterized depth-wise separable convolution are (1, 3) and (3, 1).

[0016] S32. The asymmetric re-parameterized depth-separable convolution includes channel-by-channel convolution and point-by-point convolution. The channel-by-channel convolution is connected in parallel with the asymmetric convolution. The surface defect dataset after the channel-by-channel convolution is superimposed and input into the next layer. The convolution kernel sizes of the asymmetric convolution are (1, 3) and (3, 1). The asymmetric convolution and channel-by-channel convolution perform convolution processing on the first quarter of the continuous channels of the surface defect dataset. The convolution adopts residual connection. When the asymmetric re-parameterized depth-separable convolution is a downsampling convolution, the surface defect dataset that is not convolved in the channel-by-channel convolution is enlarged or reduced to half of the original size by average pooling. The point-by-point convolution does not use residual connection. The asymmetric re-parameterized depth-separable convolution only retains the main structure of channel-by-channel convolution and point-by-point convolution. The convolution kernel of the channel-by-channel convolution is fused with the asymmetric convolution. The convolution kernel after fusion is:

[0017]

[0018] Among them, the Φ(·) function represents the expansion of the convolution kernel size of the asymmetric convolution to the size of the convolution kernel of the channel-by-channel convolution. represents the convolution kernel after fusion, k represents the convolution kernel of channel-by-channel convolution, kX 、k Y Represents the convolution kernel of horizontal and vertical asymmetric convolution respectively, i represents the number of channels, x and y represent the horizontal and vertical lengths of the convolution kernel, and the channel-by-channel convolution is fused with the residual connection. The residual connection is equivalent to a convolution kernel with a size of 1×1 and a convolution kernel value of 1, and is fused with the convolution kernel of the point-by-point convolution. At the same time, all convolution kernel normalization layers are superimposed on the convolution operation. The formula is:

[0019]

[0020] Among them, y i represents the output feature map, x i represents the input feature map, a, b represent the convolution weight and bias respectively, γ, β represent the learnable parameters, υ, σ 2 Represents the mean and standard deviation of a batch of inputs, and ε is used to prevent the denominator from being zero.

[0021] In one embodiment of the present invention, the deep and shallow features of the surface defect dataset in step S4 are input into the lightweight detection model to extract defect features, including:

[0022] The surface defect dataset is downsampled five times through the backbone network, and the surface defect datasets obtained by the third, fourth, and fifth downsampling times are spliced ​​and fused with the feature maps of corresponding sizes in the neck network and then input into the detector.

[0023] In one embodiment of the present invention, the backbone network and the main body of the neck network are respectively composed of a MetaFormer structure composed of position-sensitive convolution and a lightweight structure. In the backbone network, the MetaFormer structure is constructed by position-sensitive convolution. The MetaFormer structure includes a spatial part and a channel part. The position-sensitive convolution in the spatial part uses an asymmetric convolution structure in parallel, and the convolution kernel size is (K w ,1),(1,K h ), where K w and K hRespectively represent the width and height of the feature map, dynamically match the width and height of the feature map during training, use parallel position-sensitive convolution to replace the self-attention mechanism in the spatial part, so that the backbone network obtains a global receptive field, the channel part includes a feedforward neural network and an attention mechanism, and a Cross Stage Partial lightweight structure is constructed by position-sensitive convolution in the main part of the neck network. The input feature map of the lightweight structure is the splicing of shallow and deep feature maps, and the first quarter of the continuous channel of the input feature map is input to the bottleneck layer composed of position-sensitive convolution, and the last three quarters of the continuous channel of the input feature map is input to the 1×1 convolution, and the input feature map passing through the bottleneck layer and the 1×1 convolution is spliced ​​together and then input into the 1×1 convolution. The bottleneck layer is composed of a convolution kernel size of (K w ,1),(1,K h ) and a 1×1 convolution.

[0024] In one embodiment of the present invention, the detector adopts a non-maximum suppression algorithm, uses confidence and IoU as criteria for distinguishing defect categories and prediction frames, and obtains the defect category of the transparent conductive film glass predicted by the detector.

[0025] The present invention also provides a transparent conductive film glass surface defect detection system, comprising:

[0026] A light source module is used to design a light source field structure with alternating light and dark, and to place the transparent conductive film glass in the light source field structure;

[0027] A preprocessing module is used to collect surface defect images of transparent conductive film glass, construct a surface defect dataset of transparent conductive film glass, and preprocess the surface defect dataset using a data enhancement algorithm and a super-resolution adversarial network;

[0028] The model building and feature extraction module is used to construct a defect detection model, downsample the dataset using reparameterized convolution, integrate the position-sensitive convolution module into the backbone network and neck network of the defect detection model, and extract deep and shallow features of the surface defect dataset;

[0029] The defect category acquisition module is used to input the deep and shallow features of the surface defect data set into the lightweight detection model to extract defect features according to the defect detection model, and predict the defect category of the transparent conductive film glass through the detector.

[0030] As described above, the method and system for detecting surface defects of transparent conductive film glass of the present invention have the following beneficial effects:

[0031] The surface defect detection method for transparent conductive film glass of the present invention is based on YOLOv5, uses asymmetric re-parameterized deep separable convolution, and integrates secondary structures during inference, thereby reducing the number of parameters and computational complexity of the model. The use of asymmetric convolution structure improves the robustness of the model to target rotation and increases the generalization ability of the model.

[0032] The transparent conductive film glass surface defect detection method of the present invention is based on YOLOv5 and uses position-sensitive convolution to construct a MetaFormer structure and a lightweight structure, so that the network can obtain a global receptive field, further reducing the number of model parameters and calculations, and improving the accuracy of the model.

[0033] The transparent conductive film glass surface defect detection method of the present invention can help enterprises reduce hardware deployment costs, improve defect recognition accuracy, realize online automated detection during the production process, and save labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a flow chart of a method for detecting surface defects of transparent conductive film glass provided in an embodiment of the present application.

[0035] Figure 2 This is a diagram of an asymmetric re-parameterized depth-separable convolution structure for a method for detecting surface defects in transparent conductive film glass provided in an embodiment of the present application.

[0036] Figure 3 A MetaFormer structure diagram of a position-sensitive convolution method for detecting surface defects in a transparent conductive film glass provided in an embodiment of the present application.

[0037] Figure 4 A lightweight structure composed of position-sensitive convolution for a method for detecting surface defects of a transparent conductive film glass provided in an embodiment of the present application.

[0038] Figure 5 A YOLOv5 network structure diagram of a transparent conductive film glass surface defect detection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0040] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0041] See also Figure 1 , Figure 1 This is a flow chart of a method for detecting surface defects of transparent conductive film glass provided in an embodiment of the present application. The present invention provides a method for detecting surface defects of transparent conductive film glass, comprising:

[0042] S1. Design a light source field structure with alternating light and dark, and place the transparent conductive film glass in the light source field structure;

[0043] S2. Collect surface defect images of transparent conductive film glass, construct a surface defect dataset of transparent conductive film glass, and preprocess the surface defect dataset using a data enhancement algorithm and a super-resolution adversarial network;

[0044] S3. Construct a defect detection model, downsample the dataset using reparameterized convolution, integrate the position-sensitive convolution module into the backbone network and neck network of the defect detection model, and extract deep and shallow features of the surface defect dataset;

[0045] S4. According to the defect detection model, the deep and shallow features of the surface defect dataset are input into a lightweight detection model to extract defect features, and the defect category of the transparent conductive film glass is predicted by a detector.

[0046] Specifically, in step S2, a line scan camera is used to collect surface defect images of the transparent conductive film glass in real time, a surface defect dataset of the transparent conductive film glass is constructed, and the surface defect dataset is preprocessed using a traditional data enhancement algorithm and a super-resolution adversarial network.

[0047] In step S2, surface defect images of the transparent conductive film glass in bright field and dark field are acquired using a line scan camera. The images are cropped to a fixed size to construct an original transparent conductive film glass surface defect dataset. The original dataset is classified according to six defects: bubbles, water droplets, stones, lint, scratches, and water stains. The dataset is enhanced using a super-resolution generative adversarial network (Super-Resolution Generative Adversarial Networks), and the resolution is quadrupled. The dataset is divided into a training set, a validation set, and a test set in a ratio of 7:1:2. Data augmentation preprocessing is performed on each image in the training set by randomly superimposing two algorithms from rotation, pooling, Gaussian noise, and scaling.

[0048] In step S3, a lightweight YOLOv5 defect detection model is constructed, and the dataset is downsampled using re-parameterized convolution. The position-sensitive convolution module is integrated into the backbone network and the neck network to extract the deep and shallow features of the surface defect dataset.

[0049] In step S4, a lightweight YOLOv5 defect detection model is constructed according to the above, the training set is input into the lightweight detection model to extract defect features, and the defect category of the transparent conductive film glass is predicted by the detector.

[0050] The transparent conductive film glass surface defect detection method of the present invention mainly detects six types of defects: bubbles, water droplets, stones, hair, scratches, and water stains. It uses asymmetric re-parameterized depth-separable convolution and position-sensitive convolution, which reduces the amount of calculation and parameters, saves hardware deployment costs, and improves the defect target recognition rate.

[0051] Specifically, in step S3, the defect detection model is constructed, and the dataset is downsampled using reparameterized convolution to extract deep and shallow features of the surface defect dataset, including:

[0052] S31. Use asymmetric re-parameterized depth-wise separable convolution to replace the 3×3 downsampling convolution in YOLOv5. The convolution kernel sizes of asymmetric re-parameterized depth-wise separable convolution are (1, 3) and (3, 1).

[0053] S32. The asymmetric re-parameterized depth-separable convolution includes channel-by-channel convolution and point-by-point convolution. The channel-by-channel convolution is connected in parallel with the asymmetric convolution. The surface defect dataset after the channel-by-channel convolution is superimposed and input into the next layer. The convolution kernel sizes of the asymmetric convolution are (1, 3) and (3, 1). The asymmetric convolution and channel-by-channel convolution perform convolution processing on the first quarter of the continuous channels of the surface defect dataset. The convolution adopts residual connection. When the asymmetric re-parameterized depth-separable convolution is a downsampling convolution, the surface defect dataset that is not convolved in the channel-by-channel convolution is enlarged or reduced to half of the original size by average pooling. The point-by-point convolution does not use residual connection. The asymmetric re-parameterized depth-separable convolution only retains the main structure of channel-by-channel convolution and point-by-point convolution. The convolution kernel of the channel-by-channel convolution is fused with the asymmetric convolution. The convolution kernel after fusion is:

[0054]

[0055] Among them, the Φ(·) function represents the expansion of the convolution kernel size of the asymmetric convolution to the size of the convolution kernel of the channel-by-channel convolution. represents the convolution kernel after fusion, k represents the convolution kernel of channel-by-channel convolution, k X 、k Y Represents the convolution kernel of horizontal and vertical asymmetric convolution respectively, i represents the number of channels, x and y represent the horizontal and vertical lengths of the convolution kernel, and the channel-by-channel convolution is fused with the residual connection. The residual connection is equivalent to a convolution kernel with a size of 1×1 and a convolution kernel value of 1, and is fused with the convolution kernel of the point-by-point convolution. At the same time, all convolution kernel normalization layers are superimposed on the convolution operation. The formula is:

[0056]

[0057] Among them, y i represents the output feature map, x i represents the input feature map, a, b represent the convolution weight and bias respectively, γ, β represent the learnable parameters, υ, σ 2 Represents the mean and standard deviation of a batch of inputs, and ε is used to prevent the denominator from being zero.

[0058] See also Figure 2 , Figure 2This is a diagram of the asymmetric re-parameterized deep separable convolution structure for a method for detecting surface defects of transparent conductive film glass provided in an embodiment of the present application. During training, the asymmetric re-parameterized deep separable convolution consists of channel-by-channel convolution and point-by-point convolution. The channel-by-channel convolution and the asymmetric convolution are connected in parallel, and the convolved feature maps are superimposed and input into the next layer. The convolution kernel sizes of the asymmetric convolution are (1, 3) and (3, 1). The asymmetric convolution and the channel-by-channel convolution only perform convolution processing on the first 1 / 4 continuous channels of the feature map. The point-by-point convolution uses residual connections. When the asymmetric re-parameterized deep separable convolution is a downsampling convolution, the feature maps of the channels that are not convolved in the channel-by-channel convolution are scaled to half of their original size through average pooling. Point-by-point convolution does not use residual connections. During inference, the asymmetric re-parameterized depthwise separable convolution only retains the main structure of channel-by-channel convolution and point-by-point convolution. The convolution kernel of the channel-by-channel convolution is fused with the asymmetric convolution kernel, and the channel-by-channel convolution is fused with the residual connection. The residual connection is equivalent to a convolution kernel with a size of 1*1 and a convolution kernel value of 1, and is fused with the point-by-point convolution kernel. At the same time, all convolution batch normalization layers are superimposed on the convolution operation, and the asymmetric re-parameterized depthwise separable convolution replaces the downsampling convolution with a convolution kernel of 3*3 in the backbone network, and the first Cross Stage Partial structure in the backbone network is replaced with an asymmetric re-parameterized depthwise separable convolution.

[0059] See also Figure 3 , Figure 3 The MetaFormer structure diagram of the position-sensitive convolution of a transparent conductive film glass surface defect detection method provided in the embodiment of the present application. The backbone network is constructed by the position-sensitive convolution MetaFormer structure. MetaFormer consists of two parts: space and channel. The position-sensitive convolution in the space part uses an asymmetric convolution structure in parallel, and the convolution kernel size is (K w ,1),(1,K h ), K w and K h They represent the width and height of the feature map respectively, and dynamically match the width and height of the feature map during training. Parallel position-sensitive convolution is used to replace the self-attention mechanism in the spatial part so that the backbone network can obtain a global receptive field. The channel part is composed of a feedforward neural network and a CA attention mechanism. The MetaFormer structure is used to replace the Cross Stage Partial structure in the second, third, and fourth positions in the backbone network.

[0060] See also Figure 4 , Figure 4The lightweight structure of position-sensitive convolution for a method for detecting surface defects of transparent conductive film glass provided in the embodiment of the present application. The input feature map of the lightweight structure is the concatenation of shallow and deep feature maps. The first 1 / 4 continuous channels of the input feature map are input to the bottleneck layer composed of position-sensitive convolution, and the last three-quarters of the input feature map are input to the 1*1 convolution. The feature maps passing through the bottleneck layer and the 1*1 convolution are concatenated and then input to the 1*1 convolution. The bottleneck layer consists of a convolution kernel with a size of (K w ,1),(1,K h ) and 1*1 convolution, and uses the constructed lightweight structure to replace the Cross Stage Partial structure of the feature fusion layer to fuse the feature map features of the shallow and deep layers.

[0061] See also Figure 5 , Figure 5 A YOLOv5 network structure diagram of a method for detecting surface defects in transparent conductive film glass provided in an embodiment of the present application. The model training uses the SGD optimizer, the optimizer momentum is set to 0.935, the initial learning rate is set to 0.01, the learning rate iteration uses the cosine annealing mode, the epoch is set to 250, the batch_size is set to 64, and the training is iterated approximately 21,000 times in total. The data-enhanced dataset is input into the backbone network for training. The image size is fixed at 640*640. The image is downsampled five times through the backbone network. The feature maps downsampled three, four, and five times are spliced ​​and fused with the corresponding size feature maps in the neck network and input into the detector. The detector uses a non-maximum suppression algorithm, and uses confidence and IoU as the criteria for distinguishing defect categories and prediction boxes. The detector screens out prediction boxes whose overlap with other prediction boxes does not exceed the set IoU value to obtain the final prediction result.

[0062] In this embodiment, the improved network is used in the present invention to compare with the original network and other target detection networks to verify its performance. Table 1 is a comparison of model results.

[0063] Table 1:

[0064]

[0065] The improved lightweight YOLOv5 of the present invention improves mAP by 1.7% compared with the original network, reduces the computational complexity and parameter size by 63% (10G) and 60% (8.7MB) respectively, and reduces the detection time by 29%. Compared with the YOLOv7, YOLOv7_tiny and YOLOv8s models, it has advantages in computational complexity and parameter size, and has the fastest detection speed when the image size is the same.

[0066] In summary, the transparent conductive film glass surface defect detection method of the present invention detects surface defects of transparent conductive film glass. A lightweight structure is constructed by asymmetric re-parameterized depth-separable convolution and position-sensitive convolution, which reduces the number of parameters and calculations of the model, reduces the hardware deployment cost of the model, and improves the accuracy of model defect recognition.

[0067] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. A method for detecting surface defects of transparent conductive film glass, characterized in that: include: S1. Design a light source field structure with alternating light and dark, and place the transparent conductive film glass in the light source field structure; S2. Collect surface defect images of transparent conductive film glass, construct a surface defect dataset of transparent conductive film glass, and preprocess the surface defect dataset using a data enhancement algorithm and a super-resolution adversarial network; S3. Construct a defect detection model, downsample the dataset using reparameterized convolution, integrate the position-sensitive convolution module into the backbone network and neck network of the defect detection model, and extract deep and shallow features of the surface defect dataset; S4. According to the defect detection model, the deep and shallow features of the surface defect dataset are input into a lightweight detection model to extract defect features, and the defect category of the transparent conductive film glass is predicted by a detector; In step S3, the defect detection model is constructed, and the dataset is downsampled using reparameterized convolution to extract deep and shallow features of the surface defect dataset, including: S31. Use asymmetric re-parameterized depth-wise separable convolution to replace the 3×3 downsampling convolution in YOLOv5. The convolution kernel sizes of asymmetric re-parameterized depth-wise separable convolution are (1, 3) and (3, 1). S32. The asymmetric re-parameterized depth-separable convolution includes channel-by-channel convolution and point-by-point convolution. The channel-by-channel convolution is connected in parallel with the asymmetric convolution. The surface defect dataset after the channel-by-channel convolution is superimposed and input into the next layer. The convolution kernel sizes of the asymmetric convolution are (1, 3) and (3, 1). The asymmetric convolution and channel-by-channel convolution perform convolution processing on the first quarter of the continuous channels of the surface defect dataset. The convolution adopts residual connection. When the asymmetric re-parameterized depth-separable convolution is a downsampling convolution, the surface defect dataset that is not convolved in the channel-by-channel convolution is enlarged or reduced to half of the original size by average pooling. The point-by-point convolution does not use residual connection. The asymmetric re-parameterized depth-separable convolution only retains the main structure of channel-by-channel convolution and point-by-point convolution. The convolution kernel of the channel-by-channel convolution is fused with the asymmetric convolution. The convolution kernel after fusion is: Among them, the Φ(·) function represents the expansion of the convolution kernel size of the asymmetric convolution to the size of the convolution kernel of the channel-by-channel convolution. represents the convolution kernel after fusion, k represents the convolution kernel of channel-by-channel convolution, k X 、k Y Represents the convolution kernel of horizontal and vertical asymmetric convolution respectively, i represents the number of channels, x and y represent the horizontal and vertical lengths of the convolution kernel, and the channel-by-channel convolution is fused with the residual connection. The residual connection is equivalent to a convolution kernel with a size of 1×1 and a convolution kernel value of 1, and is fused with the convolution kernel of the point-by-point convolution. At the same time, all convolution kernel normalization layers are superimposed on the convolution operation. The formula is: Among them, y i represents the output feature map, x i represents the input feature map, a, b represent the convolution weight and bias respectively, γ, β represent the learnable parameters, υ, σ 2 Represents the mean and standard deviation of a batch of inputs, and ε is used to prevent the denominator from being zero.

2. The method for detecting surface defects of transparent conductive film glass according to claim 1, wherein: The defect detection model is a lightweight YOLOv5 defect detection model.

3. The method for detecting surface defects of transparent conductive film glass according to claim 1, wherein: In step S1, the light source field structure adopts a linear light source.

4. The method for detecting surface defects of transparent conductive film glass according to claim 1, wherein: In step S2, a line scan camera is used to collect surface defect images of the transparent conductive film glass in real time.

5. The method for detecting surface defects of transparent conductive film glass according to claim 1, wherein: The surface defect dataset includes a training set, a validation set, and a test set, and the ratio of the training set, the validation set, and the test set is 7:1:

2.

6. The method for detecting surface defects of transparent conductive film glass according to claim 1, characterized in that: Inputting the deep and shallow features of the surface defect dataset in step S4 into the lightweight detection model to extract defect features includes: The surface defect dataset is downsampled five times through the backbone network, and the surface defect datasets obtained by the third, fourth, and fifth downsampling times are spliced ​​and fused with the feature maps of corresponding sizes in the neck network and then input into the detector.

7. The method for detecting surface defects of transparent conductive film glass according to claim 6, characterized in that: The backbone network and the main body of the neck network are respectively composed of a MetaFormer structure composed of position-sensitive convolution and a lightweight structure. In the backbone network, the MetaFormer structure is constructed by position-sensitive convolution. The MetaFormer structure includes a spatial part and a channel part. The position-sensitive convolution in the spatial part uses an asymmetric convolution structure in parallel, and the convolution kernel size is (K w ,1),(1,K h ), where K w and K h Respectively represent the width and height of the feature map, dynamically match the width and height of the feature map during training, use parallel position-sensitive convolution to replace the self-attention mechanism in the spatial part, so that the backbone network obtains a global receptive field, the channel part includes a feedforward neural network and an attention mechanism, and a Cross Stage Partial lightweight structure is constructed by position-sensitive convolution in the main part of the neck network. The input feature map of the lightweight structure is the splicing of shallow and deep feature maps, and the first quarter of the continuous channel of the input feature map is input to the bottleneck layer composed of position-sensitive convolution, and the last three quarters of the continuous channel of the input feature map is input to the 1×1 convolution, and the input feature map passing through the bottleneck layer and the 1×1 convolution is spliced ​​together and then input into the 1×1 convolution. The bottleneck layer is composed of a convolution kernel size of (K w ,1),(1,K h ) and a 1×1 convolution.

8. The method for detecting surface defects of transparent conductive film glass according to claim 7, characterized in that: The detector adopts a non-maximum suppression algorithm and uses confidence and IoU as criteria for distinguishing defect categories and prediction frames to obtain the defect category of the transparent conductive film glass predicted by the detector.

9. A transparent conductive film glass surface defect detection system, characterized in that: include: A light source module is used to design a light source field structure with alternating light and dark, and to place the transparent conductive film glass in the light source field structure; A preprocessing module is used to collect surface defect images of transparent conductive film glass, construct a surface defect dataset of transparent conductive film glass, and preprocess the surface defect dataset using a data enhancement algorithm and a super-resolution adversarial network; The model building and feature extraction module is used to construct a defect detection model, downsample the dataset using reparameterized convolution, integrate the position-sensitive convolution module into the backbone network and neck network of the defect detection model, and extract deep and shallow features of the surface defect dataset; a defect category acquisition module, configured to input the deep and shallow features of the surface defect dataset into a lightweight detection model to extract defect features based on the defect detection model, and predict the defect category of the transparent conductive film glass through a detector; The model building and feature extraction module is also used to: S31. Use asymmetric re-parameterized depth-wise separable convolution to replace the 3×3 downsampling convolution in YOLOv5. The convolution kernel sizes of asymmetric re-parameterized depth-wise separable convolution are (1, 3) and (3, 1). S32. The asymmetric re-parameterized depth-separable convolution includes channel-by-channel convolution and point-by-point convolution. The channel-by-channel convolution is connected in parallel with the asymmetric convolution. The surface defect dataset after the channel-by-channel convolution is superimposed and input into the next layer. The convolution kernel sizes of the asymmetric convolution are (1, 3) and (3, 1). The asymmetric convolution and channel-by-channel convolution perform convolution processing on the first quarter of the continuous channels of the surface defect dataset. The convolution adopts residual connection. When the asymmetric re-parameterized depth-separable convolution is a downsampling convolution, the surface defect dataset that is not convolved in the channel-by-channel convolution is enlarged or reduced to half of the original size by average pooling. The point-by-point convolution does not use residual connection. The asymmetric re-parameterized depth-separable convolution only retains the main structure of channel-by-channel convolution and point-by-point convolution. The convolution kernel of the channel-by-channel convolution is fused with the asymmetric convolution. The convolution kernel after fusion is: Among them, the Φ(·) function represents the expansion of the convolution kernel size of the asymmetric convolution to the size of the convolution kernel of the channel-by-channel convolution. represents the convolution kernel after fusion, k represents the convolution kernel of channel-by-channel convolution, k X 、k Y Represents the convolution kernel of horizontal and vertical asymmetric convolution respectively, i represents the number of channels, x and y represent the horizontal and vertical lengths of the convolution kernel, and the channel-by-channel convolution is fused with the residual connection. The residual connection is equivalent to a convolution kernel with a size of 1×1 and a convolution kernel value of 1, and is fused with the convolution kernel of the point-by-point convolution. At the same time, all convolution kernel normalization layers are superimposed on the convolution operation. The formula is: Among them, y i represents the output feature map, x i represents the input feature map, a, b represent the convolution weight and bias respectively, γ, β represent the learnable parameters, υ, σ 2 Represents the mean and standard deviation of a batch of inputs, and ε is used to prevent the denominator from being zero.

Citation Information

Patent Citations

  • Thin film surface defect detection method, system and equipment based on deep learning

    CN110473179A

  • Defect detection method and device based on saliency feature pre-extraction and image segmentation

    CN114299066A