A substrate glass defect detection method, system, device and storage medium
By fusing the deep and shallow image features of the substrate glass and optimizing the training model, the problem of information loss in traditional detection technology is solved, and the accuracy of detection is significantly improved.
Patent Information
- Application Number
- CN202411287867.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In the existing substrate glass defect detection technology, traditional feature extraction methods can only extract shallow image features of the surface, resulting in loss of information and reducing the accuracy of detection.
By annotating the images in the training database, extracting deep and shallow image features, fusing them, inputting them into the training model for optimization, generating prediction boxes and calculating their similarity to the annotation box, selecting the optimal prediction box to Output defect type.
It improves the accuracy of feature extraction, reduces information loss during convolution, and significantly improves the accuracy of substrate glass defect detection.
Smart Images

Figure CN118799324B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of glass defect detection, and in particular relates to a substrate glass defect detection method, system, equipment and storage medium. Background Art
[0002] As my country's substrate glass production technology continues to mature, the output of substrate glass has gradually increased. However, substrate glass is prone to defects during the production process, and products with defects cannot be sold directly. Therefore, the quality of the produced substrate glass needs to be inspected before the product leaves the production line.
[0003] In related technologies, the detection of substrate glass mainly adopts manual observation to observe the surface of substrate glass to see whether there are defects such as bubbles, stones, stripes and cracks. With the development of deep learning technology, the method of detecting defects of substrate glass by extracting features from images through convolutional neural networks has gradually been applied in defect detection.
[0004] Regarding the above-mentioned related technologies, traditional feature extraction can only extract relatively superficial shallow image features. During the convolution process, a lot of information in the image is lost, resulting in reduced accuracy of defect detection. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a substrate glass defect detection method, system, equipment and storage medium, which improves the accuracy of feature extraction, avoids information loss in the convolution process, and improves the accuracy of detection.
[0006] A method for detecting defects in substrate glass, comprising:
[0007] Annotating training images in a training database with annotation boxes of different labels to obtain annotated images, wherein the labels represent different defect types of substrate glass;
[0008] Extracting deep image features and shallow image features according to the annotated image;
[0009] Fusing the shallow image features with the deep image features to obtain fused features;
[0010] Inputting the fusion features into a training model to train the training model, changing the weight of the training model, and obtaining an optimized training model;
[0011] Outputting feature points corresponding to different labels according to the optimized training model and the fusion features of the substrate glass image to be detected, and generating multiple prediction frames according to the feature points;
[0012] Obtaining a similarity between the predicted box and the labeled box according to the predicted box, the labeled box, and the loss function;
[0013] Selecting an optimal prediction frame from the plurality of prediction frames according to the similarity;
[0014] According to the label corresponding to the optimal prediction frame, the type of defect of the substrate glass is output.
[0015] Optionally, extracting deep image features and shallow image features according to the annotated image includes:
[0016] Inputting the labeled image into a convolutional neural network model to obtain shallow image features;
[0017] The labeled image is input through the first convolution layer of the convolutional neural network model, and then dimensionally increased through the second convolution layer of the convolutional neural network model to obtain dimensionally increased features;
[0018] The dimension-increased features are subjected to depth-separable convolution through the third convolutional layer of the convolutional neural network model to obtain intermediate features;
[0019] The intermediate features are reduced in dimension through the fourth convolution layer of the convolutional neural network model to obtain reduced-dimensional features, and the reduced-dimensional features are used as deep image features.
[0020] Optionally, the fusing the shallow image features and the deep image features to obtain the fused features includes:
[0021] Get the convolution weights of each convolutional layer of the convolutional neural network model;
[0022] The fusion feature is obtained according to the convolution weight of each convolution layer, the shallow image feature, the dimension increase feature, the intermediate feature, the deep image feature and the fusion formula.
[0023] Optionally, inputting the fusion feature into a training model to train the training model, changing the weight of the training model, and obtaining an optimized training model includes:
[0024] Get the initial weights of the training model;
[0025] Inputting the fusion feature into the training model to train the training model and obtain an output image;
[0026] Verifying the output image through a verification set to obtain a loss value;
[0027] The initial weight of the training model is adjusted according to the loss value to obtain an optimized training model.
[0028] Optionally, selecting an optimal prediction frame from the plurality of prediction frames according to the similarity includes:
[0029] The similarity between each prediction box and the labeled box is calculated through the loss function, and the prediction box with the highest similarity is obtained as the optimal prediction box.
[0030] Optionally, the loss function includes:
[0031] ;
[0032] in, , Respectively represent the width and height of the minimum bounding rectangle, which is the rectangle of the overlapping area of the prediction box and the annotation box. is the width of the annotation box, is the height of the annotation box, is the width of the prediction box, is the height of the prediction box, Represents the Euclidean distance between the annotation box and the prediction box in width, Represents the Euclidean distance between the annotation box and the prediction box in height, is the percentage of the overlapping area of the prediction box and the annotation box to the union area of the prediction box and the annotation box. is the center coordinate of the annotation box, is the center coordinate of the prediction box.
[0033] Optionally, the training images in the training database are annotated with annotation boxes of different labels, and the annotated images obtained include:
[0034] Initialize tag type;
[0035] According to the label type, the training images in the training database are labeled by labeliming to obtain the labeled images.
[0036] A substrate glass defect detection system, comprising:
[0037] A labeling module is used to label the training images in the training database with labeling boxes of different labels to obtain labeled images, wherein the labels represent different defect types of the substrate glass;
[0038] An extraction module, used for extracting deep image features and shallow image features according to the annotated image;
[0039] A fusion module, used for fusing the shallow image features and the deep image features to obtain fused features;
[0040] A training module, used for inputting the fusion features into a training model to train the training model, changing the weight of the training model, and obtaining an optimized training model;
[0041] A prediction module, used to output feature points corresponding to different labels according to the optimized training model and the fusion features of the substrate glass image to be detected, and generate multiple prediction boxes according to the feature points;
[0042] A comparison module, used for obtaining the similarity between the predicted box and the labeled box according to the predicted box, the labeled box and the loss function;
[0043] A selection module, used for selecting an optimal prediction frame from the plurality of prediction frames according to the similarity;
[0044] The output module is used to output the type of defect of the substrate glass according to the label corresponding to the optimal prediction frame.
[0045] A terminal device comprises a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a substrate glass defect detection method is adopted.
[0046] A computer-readable storage medium stores a computer program. When the computer program is loaded and executed by a processor, a substrate glass defect detection method is adopted.
[0047] The beneficial effects of the present invention are as follows: firstly, the images in the database are annotated by annotating frames with different labels, then the annotated images are feature extracted to obtain deep image features and shallow image features, and the deep image features and shallow image features are fused to obtain fused features, and the fused features are input into the training model to train the training model to obtain an optimized training model, and then the fused features of the substrate glass image to be detected are input into the optimized training model, and multiple feature points with different labels are output, and multiple prediction frames are randomly generated according to the feature points, and then the prediction frame and the annotated frame are calculated similarity through the loss function, and the prediction frame with the highest similarity is selected as the optimal prediction frame, and finally the defect type of the substrate glass and the probability of the type are output according to the label type and similarity corresponding to the optimal prediction frame. The semantic information of the image is more complete through the deep image features and shallow image features, and the accuracy of the detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the process of a substrate glass defect detection method of the present invention;
[0049] Figure 2 It is a structural schematic diagram of feature fusion of a substrate glass defect detection method of the present invention;
[0050] Figure 3 It is a schematic diagram of the main structure of a substrate glass defect detection method of the present invention. DETAILED DESCRIPTION
[0051] A substrate glass defect detection method, such as Figure 1 As shown, the present invention includes:
[0052] S100, annotating training images in a training database with annotation frames of different labels to obtain annotated images, where the labels represent different defect types of the substrate glass.
[0053] The training images in the training database are annotated with annotation boxes of different labels, and the annotated images include:
[0054] S1000, initialize tag type.
[0055] S1001. According to the label type, the training images in the training database are labeled by labeliming to obtain labeled images.
[0056] Specifically, firstly, the glass is scanned step by step with an industrial camera to obtain an image of the entire basic glass, with an image size of 224*224. Multiple basic glass images are scanned to form a training database, and the images in the training database include images of substrate glass with or without defects and images of substrate glass with defects.
[0057] The label type corresponds to the type of substrate glass defect. The types of substrate glass defects include normal, scratches, particles and dirt. Each defect type corresponds to a different label. When labeliming is used for standardization, different labeling boxes are marked according to different types of substrate glass defects. Standardize several images of substrate glass, and then establish a training database for all the standardized images, and divide the images in the training database into training set and verification set according to the ratio of 7:3. When labeliming is used for annotation, the annotated images are in XML format. When dividing them into training set and verification set, they are converted to TXT format to match the format of the yolov5 model used in this application.
[0058] S110: extracting deep image features and shallow image features according to the annotated image.
[0059] According to the annotated images, deep image features and shallow image features are extracted, including:
[0060] S1100: input the labeled image into the convolutional neural network model to obtain shallow image features.
[0061] S1101. Input the labeled image through the first convolution layer of the convolutional neural network model, and then increase the dimension through the second convolution layer of the convolutional neural network model to obtain increased dimension features.
[0062] S1102, perform depth-separable convolution on the increased-dimensional features through the third convolutional layer of the convolutional neural network model to obtain intermediate features.
[0063] S1103. Reduce the dimension of the intermediate features through the fourth convolution layer of the convolutional neural network model to obtain reduced-dimensional features, and use the reduced-dimensional features as deep image features.
[0064] Specifically, when extracting features from images, a convolutional neural network is used. When a convolutional neural network is used directly to extract features, the activation function ReLU used has less available information in low dimensions, which can easily cause information loss and only shallow image features can be obtained. Therefore, the convolutional neural network structure is improved and a residual network structure is used. The residual structure uses a method of first reducing the dimension and then increasing the dimension to expand feature extraction and then compress it. First, a 1×1 convolution is used to increase the dimension, and then a 3×3 depthwise separable convolution (DWConv) is used to reduce the number of calculation parameters. Then, a 1×1 convolution is used to reduce the dimension, and finally the result is connected to the input. In addition, after the convolution layer is reduced in dimensionality, activation functions such as ReLU are no longer added for nonlinear transformation to avoid information loss as much as possible.
[0065] The first convolution layer of the convolutional neural network model is the input layer, which inputs the label image, and then increases the dimension through 1×1 convolution in the second layer, and then performs depth-separable convolution in the third convolution layer, and finally reduces the dimension through 1×1 convolution in the fourth convolution layer.
[0066] S120, fusing shallow image features and deep image features to obtain fused features.
[0067] The shallow image features and deep image features are fused to obtain the fused features including:
[0068] S1200. Obtain the convolution weights of each convolutional layer of the convolutional neural network.
[0069] S1210, obtaining fusion features according to the convolution weights of each convolution layer, shallow image features, dimension increase features, intermediate features, deep image features and fusion formula.
[0070] Specifically, when the feature maps are fused, the BiFPN structure is used, the BiFPN structure is added to the Concat in the neck structure, and two feature fusion channels, top-down and bottom-up, are set. Figure 2 As shown in the figure, a connection line is drawn from the P2 and P3 input nodes of the feature layer in the C3S structure in the backbone feature to the feature layer at the same level. The backbone feature is the structure used by the original network of the convolutional neural network. The CS3 structure is as follows Figure 3As shown in the figure, the C3S structure input point is directly input into the 4th node of BiFPN, then the 1×1 convolution is input into the 3rd node, the 3×3 convolution is input into the 2nd node, the 1×1 convolution is input into the 3rd node, and the C3S structure output point is input into the 4th node. Then, special fusion is performed from top to bottom, cross fusion is performed in the middle, and then fusion is performed from bottom to top, so that different degrees of importance of different input features can be learned. Then, the input features are differentiated and fused according to the different degrees of importance.
[0071] BiFPN adopts a weighted feature fusion method, and its weighted feature fusion formula is as follows:
[0072]
[0073] in, are the learning weights, is the convolutional layer, is the learning rate, used to avoid numerical instability, usually 0.0001, is the number of convolutional layers.
[0074] Taking the output of the second node of BiFPN as an example, the 3×3 convolution is input to the second node and then to the intermediate variable. The formula is as follows:
[0075]
[0076] Convolve the intermediate variable backward to get the output. The formula is as follows:
[0077]
[0078] Con() means convolution, represents the input of the convolution, represents the scaling function, , as well as They are the learning weights of the first convolutional layer, the second convolutional layer, and the third convolutional layer respectively.
[0079] S130, inputting the fusion features into the training model to train the model, changing the weight of the training model, and obtaining an optimized training model.
[0080] Input the fusion features into the training model to train the training model, change the weight of the training model, and obtain the optimized training model including:
[0081] S1300: Obtain initial weights of the training model.
[0082] S1310: Input the fusion features into the training model to train the training model and obtain an output image.
[0083] S1320, verify the output image through the verification set to obtain the loss value.
[0084] S1330. Adjust the initial weight of the training model according to the loss value to obtain an optimized training model.
[0085] S140 , outputting feature points corresponding to different labels according to the optimized training model and the fusion features of the substrate glass image to be detected, and generating multiple prediction boxes according to the feature points.
[0086] Specifically, the weights of the training model are the core parameters for learning and predicting data distribution. By optimizing these weights, the model can continuously improve its performance and achieve better prediction capabilities. The initial weights can be set by yourself.
[0087] The fusion features of the glass substrate image to be inspected are also obtained by first extracting deep image features and shallow image features and then fusing them.
[0088] The training model is trained using the data in the training set. The model used in this application is yolov5. The training process is as follows: input the training data into the yolov5 model, and use the current model weights to calculate the predicted value (output) through the network layer. Use the loss function (such as mean square error, cross entropy, etc.) to measure the gap (loss value) between the model output and the true label (validation set). The smaller the value of the loss function, the closer the model's prediction is to the true result. The gradient of the loss function relative to the model weight is calculated by the back propagation algorithm. This indicates the degree of influence of the loss function on each weight. According to the calculated gradient, the optimization algorithm will adjust the weight of the model. Commonly used optimization algorithms are: stochastic gradient descent algorithm. Through repeated iterations during the training process, the final optimized training model is obtained.
[0089] After obtaining the optimized training model, the fusion features of the substrate glass image to be inspected are input into the optimized training model, and the optimized training model will output multiple different feature points, each of which corresponds to a different label type. In one image, there can be multiple feature points of different types and multiple feature points of the same type.
[0090] S150: Obtain the similarity between the predicted box and the labeled box according to the predicted box, the labeled box and the loss function.
[0091] Specifically, prediction boxes of different sizes are randomly generated through feature points, and then the prediction boxes and annotation boxes are compared through loss functions to obtain the similarity between the prediction boxes and annotation boxes. The loss functions include:
[0092] ;
[0093] in, , Respectively represent the width and height of the minimum bounding rectangle, which is the rectangle of the overlapping area of the prediction box and the annotation box. is the width of the annotation box, is the height of the annotation box, is the width of the prediction box, is the height of the prediction box, Represents the Euclidean distance between the annotation box and the prediction box in width, Represents the Euclidean distance between the annotation box and the prediction box in height, is the percentage of the overlapping area of the prediction box and the annotation box to the union area of the prediction box and the annotation box. is the center coordinate of the annotation box, is the center coordinate of the prediction box.
[0094] in, The calculation method is:
[0095] ;
[0096] in, is the intersection area of the predicted box and the true box, represents the union area of the predicted box and the true box.
[0097] A feature point will generate multiple prediction boxes of different sizes. The similarity between the prediction box and the annotation box is calculated through the loss function, and the prediction box with the highest similarity is found as the optimal prediction box.
[0098] S160, obtaining an optimal prediction frame from multiple prediction frames according to the similarity.
[0099] S170 . Output the defect type of the substrate glass according to the label corresponding to the optimal prediction frame.
[0100] Specifically, the defect type and similarity of the substrate glass are displayed in the output prediction box, and the percentage of similarity indicates the probability of this defect. For example, the defect type corresponding to a prediction box is scratch, and the similarity is 70%, which means that there is a 70% chance that it is a scratch defect.
[0101] In this embodiment, four types of glass defects are used for training, namely, normal, scratched, particle, and dirty. The four types of defects are labeled to establish a data set.
[0102] The experimental environment configuration of this embodiment is as follows: during the model training process, the learning rate is set to 0.01, the weight decay is set to 0.0005, the training batch size is 16, the training is 300 rounds, and the SGD optimization with a momentum of 0.937 is adopted. The experimental results are shown in Table 1:
[0103] Table 1
[0104]
[0105] Among them, the benchmark model is YOLOv5, A, B, C and D correspond to the residual module (residual network structure), BiFPN module, RIOU loss function and EIoU loss function, respectively, where the RIOU loss function is the loss function used in this application, P is the precision, R is the recall rate, and mAP is the average precision of all categories at IoU=0.5.
[0106] The results show that the introduction of A, B and C has a certain improvement effect on the benchmark performance. By adding these, the model can improve the detection effect of substrate glass, and the precision and recall of the RIOU loss function are higher than those of the EIoU loss function. Precision and recall are important indicators for evaluating classification models. Therefore, the use of the loss function of this application improves the accuracy of substrate glass defect classification.
[0107] A substrate glass defect detection system, comprising:
[0108] A labeling module is used to label the training images in the training database with labeling boxes of different labels to obtain labeled images, where the labels represent different defect types of the substrate glass;
[0109] An extraction module is used to extract deep image features and shallow image features based on the annotated images;
[0110] A fusion module is used to fuse shallow image features and deep image features to obtain fused features;
[0111] A training module is used to input the fusion features into the training model to train the training model, change the weight of the training model, and obtain an optimized training model;
[0112] A prediction module is used to output feature points corresponding to different labels according to the optimized training model and the fusion features of the substrate glass image to be detected, and generate multiple prediction boxes according to the feature points;
[0113] A comparison module is used to obtain the similarity between the predicted box and the labeled box based on the predicted box, the labeled box and the loss function;
[0114] A selection module is used to select the optimal prediction box from multiple prediction boxes according to similarity;
[0115] The output module is used to output the type of defect of the substrate glass according to the label corresponding to the optimal prediction box.
[0116] The embodiment of the present application also discloses a terminal device, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a substrate glass defect detection method is adopted.
[0117] The terminal device may be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device may also include input and output devices, a network access device and a bus.
[0118] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0119] Among them, the memory can be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device, or it can be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the terminal device, and the memory can also be a combination of an internal storage unit and an external storage device of the terminal device. The memory is used to store computer programs and other programs and data required by the terminal device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.
[0120] Among them, through this terminal device, a substrate glass defect detection method in the above embodiment is stored in the memory of the terminal device, and is loaded and executed on the processor of the terminal device for easy use.
[0121] The embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a substrate glass defect detection method in the above embodiment is adopted.
[0122] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.
[0123] Among them, through this computer-readable storage medium, a substrate glass defect detection method in the above embodiment is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.
[0124] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0125] One or more embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting defects in substrate glass, characterized in that: include: Annotating training images in a training database with annotation boxes of different labels to obtain annotated images, wherein the labels represent different defect types of substrate glass; Extracting deep image features and shallow image features according to the annotated image; Fusing the shallow image features with the deep image features to obtain fused features; Inputting the fusion features into a training model to train the training model, changing the weight of the training model, and obtaining an optimized training model; Outputting feature points corresponding to different labels according to the optimized training model and the fusion features of the substrate glass image to be detected, and generating multiple prediction frames according to the feature points; Obtaining a similarity between the predicted box and the labeled box according to the predicted box, the labeled box, and the loss function; Selecting an optimal prediction frame from the plurality of prediction frames according to the similarity; Outputting the type of defect of the substrate glass according to the label corresponding to the optimal prediction frame; Selecting an optimal prediction frame from the plurality of prediction frames according to the similarity comprises: Calculate the similarity between each prediction frame and the labeled frame through the loss function, and obtain the prediction frame with the highest similarity as the optimal prediction frame; The loss function includes: ; in, , Respectively represent the width and height of the minimum bounding rectangle, which is the rectangle of the overlapping area of the prediction box and the annotation box. is the width of the annotation box, is the height of the annotation box, is the width of the prediction box, is the height of the prediction box, Represents the Euclidean distance between the annotation box and the prediction box in width, Represents the Euclidean distance between the annotation box and the prediction box in height, is the percentage of the overlapping area of the prediction box and the annotation box to the union area of the prediction box and the annotation box. is the center coordinate of the annotation box, is the center coordinate of the prediction box.
2. The substrate glass defect detection method according to claim 1, characterized in that: The extracting of deep image features and shallow image features according to the annotated image comprises: Inputting the annotated image into a convolutional neural network model to obtain the shallow image features; The labeled image is input through the first convolution layer of the convolutional neural network model, and then dimensionally increased through the second convolution layer of the convolutional neural network model to obtain dimensionally increased features; The dimension-increased features are subjected to depth-separable convolution through the third convolutional layer of the convolutional neural network model to obtain intermediate features; The intermediate features are reduced in dimension through the fourth convolutional layer of the convolutional neural network model to obtain reduced-dimensional features, and the reduced-dimensional features are used as the deep image features.
3. The substrate glass defect detection method according to claim 2, wherein: The fusing of the shallow image features and the deep image features to obtain the fused features comprises: Get the convolution weights of each convolutional layer of the convolutional neural network model; The fusion feature is obtained according to the convolution weight of each convolution layer, the shallow image feature, the dimension increase feature, the intermediate feature, the deep image feature and the fusion formula.
4. The substrate glass defect detection method according to claim 1, wherein: The step of inputting the fusion feature into the training model to train the training model, and changing the weight of the training model to obtain the optimized training model comprises: Get the initial weights of the training model; Inputting the fusion feature into the training model to train the training model and obtain an output image; Verifying the output image through a verification set to obtain a loss value; The initial weight of the training model is adjusted according to the loss value to obtain an optimized training model.
5. The substrate glass defect detection method according to claim 1, wherein: The training images in the training database are annotated with annotation boxes of different labels, and the annotated images include: Initialize tag type; According to the label type, the training images in the training database are labeled by labeliming to obtain the labeled images.
6. A substrate glass defect detection system, characterized in that: include: A labeling module is used to label the training images in the training database with labeling boxes of different labels to obtain labeled images, wherein the labels represent different defect types of the substrate glass; An extraction module, used for extracting deep image features and shallow image features according to the annotated image; A fusion module, used for fusing the shallow image features with the deep image features to obtain fused features; A training module, used for inputting the fusion features into a training model to train the training model, changing the weight of the training model, and obtaining an optimized training model; A prediction module, used to output feature points corresponding to different labels according to the optimized training model and the fusion features of the substrate glass image to be detected, and generate multiple prediction boxes according to the feature points; A comparison module, used for obtaining the similarity between the predicted box and the labeled box according to the predicted box, the labeled box and the loss function; A selection module, used for selecting an optimal prediction frame from the plurality of prediction frames according to the similarity; The output module is used to output the type of defect of the substrate glass according to the label corresponding to the optimal prediction frame.
7. A terminal device, comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the processor loads and executes the computer program, the method according to any one of claims 1 to 5 is adopted.
8. A computer-readable storage medium having a computer program stored therein, characterized in that: When the computer program is loaded and executed by a processor, the method according to any one of claims 1 to 5 is adopted.
Citation Information
Patent Citations
Surface defect detection method based on improved YOLO V4 algorithm
CN115861170A
Glass detection method, device, equipment and medium
CN117252845A
Unsupervised small sample defect detection method for glass cover plate
CN117830278A
Method and device for inspecting glass containers according to at least two modes with a view to classifying the containers by their glass defects
WO2024018163A1
