A small sample panel defect detection method, system, device and storage medium

By pre-training a deep learning model and combining sample fusion and parameter tuning, the problems of misjudgment and missed detection in small sample panel defect detection are solved, and high-precision defect identification and classification are achieved.

CN116433651BActive Publication Date: 2026-04-14CHENGDU UNION BIG DATA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHENGDU UNION BIG DATA TECH CO LTD
Filing Date
2023-05-10
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional panel defect detection methods rely on manual image interpretation, which is easily affected by the experience and mental state of the personnel, resulting in a high false positive rate. Furthermore, deep learning-based defect detection algorithms have low accuracy in small sample sizes and are prone to missed detections.

Method used

By pre-training a deep learning model based on original sample images, combining sample fusion and sample balancing, adjusting classifier parameters, and using cosine similarity calculation, accurate identification and classification of defect features can be achieved.

Benefits of technology

It improves the accuracy of defect detection in small sample panels, reduces false detections and missed detections, and enhances detection precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116433651B_ABST
    Figure CN116433651B_ABST
Patent Text Reader

Abstract

The application provides a small sample panel defect detection method, system, device and storage medium, and relates to the technical field of defect detection.The method comprises the following steps: pre-training a deep learning model based on an original sample image to obtain a defect detection model M1, wherein the defect detection model M1 comprises a feature extractor and a classifier; performing sample fusion processing and / or sample balance processing on the original sample image and a new sample image to obtain a training data set; adjusting the parameters of the classifier of the defect detection model M1 based on the training data set to obtain a defect detection model M2; and performing defect detection on a to-be-detected image based on the defect detection model M2 to output defect recognition and classification results.The application adopts a model fine-tuning training mode, can better learn relevant feature information for defects of a small number of samples, and thus improves the accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect detection technology, and more specifically, to a method, system, device, and storage medium for detecting defects in small sample panels. Background Technology

[0002] Panel manufacturing plants generate many defects during panel production. However, the entire panel production process is complex and has a long production cycle. It often takes a long time from the substrate to the completion of production. Therefore, defects generated in each process stage need to be monitored at all times to prevent them from flowing into the next process and causing a decrease in yield.

[0003] Traditional defect detection methods involve using AOI (Automatic Optical Inspection) instruments to capture images of panel products, followed by manual defect assessment. Once a defect is found, it is corrected to prevent it from entering the next process. Traditional defect detection relies on manual image interpretation, which is susceptible to variations in experience and mental state, leading to a high misjudgment rate. Furthermore, it incurs relatively high labor costs. Therefore, many panel manufacturing plants have begun to introduce automated defect detection and classification systems to replace manual inspection. However, these systems typically use deep learning-based target detection algorithms as their core algorithms. The accuracy of deep learning in defect detection and classification is limited by the defect distribution in the training set images. When the sample size is unbalanced or small, it cannot learn image feature information, resulting in low accuracy in predicting defects in small samples and a high risk of missed detections. Summary of the Invention

[0004] This invention provides a method, system, device, and storage medium for detecting defects in small sample panels, which solves the problems of low accuracy in predicting defects in small sample panels and the tendency for false detections and missed detections.

[0005] In a first aspect, embodiments of the present invention provide a method for detecting process defects in a panel, the method comprising the following steps:

[0006] A deep learning model is pre-trained based on the original sample images to obtain a defect detection model M1, wherein the defect detection model M1 includes a feature extractor and a classifier;

[0007] Perform sample fusion and / or sample balancing on the original sample images and the new sample images to obtain the training dataset;

[0008] Based on the training dataset, the parameters of the classifier of defect detection model M1 are adjusted to obtain defect detection model M2;

[0009] The defect detection model M2 is used to detect defects in the image to be inspected, and to output defect identification and classification results.

[0010] In the above embodiments, the present invention first trains a deep learning model using a large number of original sample images to obtain a defect detection model M1. At this time, the feature extractor of the defect detection model M1 can extract defect features, and the classifier can accurately identify and classify base class defects. Then, a large number of original samples and a small number of new samples are subjected to sample fusion processing and / or sample balancing processing. Since there are multiple ways to fuse images, the number of images in the training dataset is definitely greater than the number of new sample images. Since the relative positions of the fused images are known, the operation of labeling the positions of new class defects can be omitted. Finally, the classifier of the defect detection model M1 is retrained using the training dataset to achieve fine-tuning of the model, so that the fine-tuned model can accurately identify and classify new class defects.

[0011] As some optional implementations of this application, the classifier of the defect detection model M1 is a cosine similarity-based classifier, that is, the similarity score between different defect categories is calculated by calculating the cosine similarity, which helps to reduce intra-class variance and improve the detection accuracy of new defect categories when the number of training samples is small.

[0012] As one of the optional implementations of this application, when adjusting the parameters of the classifier of the defect detection model M1 based on the training dataset, the relevant parameters of the feature extractor are frozen, that is, the relevant parameters of the feature extractor are not changed.

[0013] As one of the optional implementations of this application, the process of pre-training a deep learning model based on the original sample images to obtain the defect detection model M1 is as follows:

[0014] Label the base class defects on the original sample image, that is, label the location and type of the base class defects;

[0015] The labeled original sample images are input into a deep learning model for feature extraction and defect classification.

[0016] As some optional embodiments of this application, the process for sample fusion processing of the original sample image and the new sample image is as follows:

[0017] Defect extraction processing is performed on the new type of defect image on the new sample image to obtain the new type of defect image;

[0018] Image fusion processing is performed on the new type of defect image and the original sample image by pixel overlay, so that the new type of defect and the base type defect have different positional relationships, so as to obtain the fused sample image, and the fused sample image is added to the training dataset.

[0019] The process of performing sample equalization on the original sample image and the new sample image is as follows:

[0020] The original sample images are filtered, and new types of defects in the new sample images are labeled, that is, the location and type of new types of defects are labeled;

[0021] The filtered original sample images and the labeled new sample images are added to the training dataset in the same proportion.

[0022] In the above embodiments, by filtering the original sample images, a small number of images that best represent the base class defects can be obtained and added to the training dataset in the same proportion as the new sample images, which can solve the problem of low detection accuracy of small sample defects caused by sample imbalance.

[0023] As some optional implementations of this application, the positional relationship between the new type of defect and the base type of defect includes overlapping, intersecting, and separating.

[0024] As one of the optional implementation methods of this application, the process of adjusting the parameters of the classifier of the defect detection model M1 based on the training dataset is as follows:

[0025] The fused sample images, original sample images, and new sample images from the training dataset are input into the defect detection model M1;

[0026] By using backpropagation, the loss function value is gradually reduced to adjust the parameters of the classifier.

[0027] In the above embodiments, the present invention first extracts feature maps of new types of defects through the feature extractor of the defect detection model M1, then adjusts the parameters of the classifier of the defect detection model M1, classifies the feature maps of defects through the classifier of the defect detection model M1, and continuously updates the parameters by calculating the loss function value based on backpropagation, so that the loss function value is smaller.

[0028] In a second aspect, the present invention provides a small sample panel defect detection system, the system comprising:

[0029] A model pre-training unit, wherein the model pre-training unit pre-trains a deep learning model based on the original sample images to obtain a defect detection model M1, wherein the defect detection model M1 includes a feature extractor and a classifier;

[0030] An image processing unit performs sample fusion processing and / or sample balancing processing on the original sample images and the new sample images to obtain a training dataset;

[0031] A model parameter adjustment unit adjusts the parameters of the classifier of the defect detection model M1 based on the training dataset to obtain the defect detection model M2.

[0032] The defect detection unit performs defect detection on the image to be detected based on the defect detection model M2, and outputs defect identification and classification results.

[0033] In a third aspect, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the small sample panel defect detection method.

[0034] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the small sample panel defect detection method.

[0035] The beneficial effects of the present invention are as follows: The model fine-tuning method of the present invention trains the deep learning model, enabling a small number of samples to learn relevant feature information better, thereby improving the accuracy of panel defect detection. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart of a small sample panel defect detection method according to an embodiment of the present invention;

[0038] Figure 2 This is a flowchart illustrating model pre-training according to an embodiment of the present invention;

[0039] Figure 3 This is a flowchart illustrating model fine-tuning according to an embodiment of the present invention;

[0040] Figure 4 This is a structural diagram of the small sample panel defect detection system according to an embodiment of the present invention. Detailed Implementation

[0041] To better understand the above technical solutions, the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations thereof. In the absence of conflict, the technical features in the embodiments and embodiments can be combined with each other.

[0042] It should also be understood that, in order to simplify the description of the invention and thus aid in the understanding of at least one embodiment, multiple features may sometimes be grouped into a single embodiment, drawing, or description thereof in the foregoing description of the embodiments of the invention. However, this method of disclosure does not imply that the subject matter of the invention requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiment disclosed above.

[0043] Example 1

[0044] This invention provides a method for detecting defects in small-sample panel data. Please refer to [link to relevant documentation]. Figure 1 The method includes the following steps:

[0045] (1) A deep learning model is pre-trained based on the original sample images to obtain a defect detection model M1, wherein the defect detection model M1 includes a feature extractor and a classifier. The deep learning model can be Faster RCNN, etc. The feature extractor of the defect detection model M1 is used for extracting feature maps, and the classifier is used for classifying the defect categories of the feature maps.

[0046] For details, please refer to Figure 2 The feature extractor includes a backbone network, a region candidate network, a region of interest pooling network, and a region of interest feature extraction network.

[0047] For details, please refer to Figure 2 The process of pre-training a deep network model based on the original sample images to obtain the defect detection model M1 is as follows:

[0048] (1.1) Label the base class defects on the original sample images, that is, label the location and type of the base class defects. The base class defects are common panel defects. Therefore, the number of original sample images is large and it is easy to collect images.

[0049] (1.2) Input the labeled sample images into the deep learning model for feature extraction and defect classification. By inputting the original sample images into the deep learning model for model training, the model is able to extract features of panel defects and classify base class defects.

[0050] (2) Perform sample fusion and / or sample equalization on the original sample images and the new sample images to obtain the training dataset;

[0051] Specifically, the process of sample fusion processing for the original sample image and the new sample image is as follows:

[0052] (2.1) Perform defect extraction processing on the new sample images to obtain new defect images; the new defect is a rare panel defect, so the number of new sample images is small and it is difficult to collect images.

[0053] (2.2) Image fusion processing is performed on the new class defect image and the original sample image by pixel overlay, so that the new class defect and the base class defect have different positional relationships to obtain the fused sample image, and the fused sample image is added to the training dataset; that is, the image containing only the new class defect (excluding the background image) is fused with the original sample image (including the background image) so that the fused sample image contains both the new class defect and the base class defect. Therefore, the position and category of the new class defect can be marked according to the base class image, which assists the feature extractor in extracting feature maps from the new class image; the positional relationship between the new class defect and the base class defect includes overlap, intersection and separation.

[0054] Specifically, the process of performing sample equalization on the original sample image and the new sample image is as follows:

[0055] (2.3) Filter the original sample images and label the new types of defects in the new sample images, that is, label the location and type of the new types of defects;

[0056] (2.4) Add the filtered original sample images and the labeled new sample images to the training dataset.

[0057] In this embodiment of the invention, by filtering the original sample images, a small number of images that best represent the base class defects can be obtained and added to the training dataset in the same proportion as the new sample images, which can solve the problem of low detection accuracy of small sample defects caused by sample imbalance.

[0058] (3) Adjust the parameters of the classifier of the defect detection model M1 based on the training dataset to obtain the defect detection model M2. The classifier of the defect detection model M1 is a cosine similarity classifier. The classifier of the defect detection model M1 is a cosine similarity classifier, that is, the similarity score between different defect categories is calculated by calculating the cosine similarity, which helps to reduce intra-class variance and improve the detection accuracy of new defect categories when the number of training samples is small.

[0059] Specifically, when adjusting the parameters of the classifier of the defect detection model M1 based on the fused sample images, the relevant parameters of the feature extractor are frozen. This is because the feature extractor already has the ability to extract feature maps, so there is no need to adjust the parameters accordingly.

[0060] Specifically, the process of adjusting the parameters of the classifier of defect detection model M1 based on the training dataset to obtain defect detection model M2 is as follows; please refer to [link / reference]. Figure 3 :

[0061] (3.1) Input the fused sample images, original sample images and new sample images from the training dataset into the defect detection model M1;

[0062] (3.2) The loss function value is gradually reduced by using backpropagation to adjust the parameters of the classifier;

[0063] Specifically, the formula for calculating the loss function value is as follows:

[0064]

[0065] Among them, L i (S i,j ,y i The ) represents the category calculated by the classifier that belongs to the true category y. i The function, where n represents the number of sample images in the training dataset;

[0066] Specifically, the formula for calculating cosine similarity is:

[0067]

[0068] Where α represents the scaling factor, F(X) i W represents the weights of the input feature map. j γ represents the weights of other different categories. m The representative parameter adjusts the data;

[0069] In this embodiment of the invention, when the sample input to the defect detection model M1 is an original sample image or a newly labeled sample image: γ m The value is set to 1, and F(X) is adjusted accordingly. i and weight W j This makes the cosine similarity S i,j The value of γ is kept balanced, and the loss function value is continuously calculated using backpropagation to make the loss function value smaller; when the sample input to the defect detection model M1 is a fused sample image: (i) when the fused sample image is an overlap of a new type of defect and a base type defect, the corresponding γ is reduced. m Adjust F(X) appropriately. i and weight W jThis makes the cosine similarity S i,j The value of γ is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller; (ii) when the fused sample image is the intersection of the new class defect and the base class defect, γ is appropriately increased on the basis of (i). m Adjust F(X) appropriately. i and weight W j This makes the cosine similarity S i,j The value of γ is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller; (iii) when the fused sample image is a new type of defect that is separate from the base class defect, γ m The value is set to 1, and F(X) is adjusted accordingly. i and weight W j This makes the cosine similarity S i,j The value of the loss function is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller.

[0070] (4) Based on the defect detection model M2, perform defect detection on the image to be detected, and output the defect identification and classification results. That is, input the image to be detected that may contain new types of defects into the defect detection model M2, and determine whether there are new types of defects through the defect detection model M2.

[0071] In this embodiment of the invention, after the model is fine-tuned based on the new type of defect, the relevant parameters of the model fine-tuning can be saved in an independent space. When it is necessary to detect such defects, it is only necessary to call the relevant parameters. Therefore, the model can achieve accurate detection of multiple defects through parameter calling.

[0072] In the above embodiments, the present invention first trains a deep learning model using a large number of original sample images to obtain a defect detection model M1. At this time, the feature extractor of the defect detection model M1 can extract defect features, and the classifier can accurately identify and classify base class defects. Then, image fusion processing and / or sample balancing processing are performed on a large number of original samples and a small number of new samples. Since there are multiple ways to perform image fusion, the number of images in the training dataset is definitely greater than the number of new sample images. Since the relative positions of the fused images are known, the operation of labeling the positions of new class defects can be omitted. Finally, the classifier of the defect detection model M1 is retrained using the training dataset to achieve fine-tuning of the model, so that the fine-tuned model can accurately identify and classify new class defects.

[0073] Example 2

[0074] This invention provides a small-sample panel defect detection system, which corresponds one-to-one with the method described in Embodiment 1. Please refer to [link / reference]. Figure 4 The system includes:

[0075] (1) Model pre-training unit, wherein the model pre-training unit pre-trains a deep learning model based on the original sample images to obtain a defect detection model M1, wherein the defect detection model M1 includes a feature extractor and a classifier;

[0076] (2) Image processing unit, wherein the image processing unit performs sample fusion processing and / or sample equalization processing on the original sample image and the new sample image to obtain a training dataset;

[0077] (3) Model parameter adjustment unit, which adjusts the parameters of the classifier of defect detection model M1 based on the training dataset to obtain defect detection model M2;

[0078] (4) Defect detection unit, which performs defect detection on the image to be detected based on defect detection model M2, so as to output defect identification and classification results.

[0079] Specifically, the process of pre-training a deep network model based on the original sample images to obtain the defect detection model M1 is as follows:

[0080] (1.1) Label the base class defects on the original sample images, that is, label the location and type of the base class defects. The base class defects are common panel defects. Therefore, the number of original sample images is large and it is easy to collect images.

[0081] (1.2) Input the labeled sample images into the deep learning model for feature extraction and defect classification. By inputting the original sample images into the deep learning model for model training, the model is able to extract features of panel defects and classify base class defects.

[0082] Specifically, the process of sample fusion processing between the original sample image and the new sample image by the image processing unit is as follows:

[0083] (2.1) Perform defect extraction processing on the new sample images to obtain new defect images; the new defect is a rare panel defect, so the number of new sample images is small and it is difficult to collect images.

[0084] (2.2) Image fusion processing is performed on the new class defect image and the original sample image by pixel overlay, so that the new class defect and the base class defect have different positional relationships to obtain the fused sample image, and the fused sample image is added to the training dataset; that is, the image containing only the new class defect (excluding the background image) is fused with the original sample image (including the background image) so that the fused sample image contains both the new class defect and the base class defect. Therefore, the position and category of the new class defect can be marked according to the base class image, which assists the feature extractor in extracting feature maps from the new class image; the positional relationship between the new class defect and the base class defect includes overlap, intersection and separation.

[0085] Specifically, the process by which the image processing unit performs sample equalization on the original sample image and the new sample image is as follows:

[0086] (2.3) Filter the original sample images and label the new types of defects in the new sample images, that is, label the location and type of the new types of defects;

[0087] (2.4) Add the filtered original sample images and the labeled new sample images to the training dataset.

[0088] Specifically, the process by which the model parameter tuning unit tunes the classifier parameters of the defect detection model M1 based on the training dataset to obtain the defect detection model M2 is as follows:

[0089] (3.1) Input the fused sample images, original sample images and new sample images from the training dataset into the defect detection model M1;

[0090] (3.2) The loss function value is gradually reduced by using backpropagation to adjust the parameters of the classifier;

[0091] Specifically, the formula for calculating the loss function value is as follows:

[0092]

[0093] Among them, L i (S i,j ,y i The ) represents the category calculated by the classifier that belongs to the true category y. i The function, where n represents the number of sample images in the training dataset;

[0094] Specifically, the formula for calculating cosine similarity is:

[0095]

[0096] Where α represents the scaling factor, F(X) i W represents the weights of the input feature map.j γ represents the weights of other different categories. m The representative parameter adjusts the data;

[0097] In this embodiment of the invention, when the sample input to the defect detection model M1 is an original sample image or a newly labeled sample image: γ m The value is set to 1, and F(X) is adjusted accordingly. i and weight W j This makes the cosine similarity S i,j The value of γ is kept balanced, and the loss function value is continuously calculated using backpropagation to make the loss function value smaller; when the sample input to the defect detection model M1 is a fused sample image: (i) when the fused sample image is an overlap of a new type of defect and a base type defect, the corresponding γ is reduced. m Adjust F(X) appropriately. i and weight W j This makes the cosine similarity S i,j The value of γ is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller; (ii) when the fused sample image is the intersection of the new class defect and the base class defect, γ is appropriately increased on the basis of (i). m Adjust F(X) appropriately. i and weight W j This makes the cosine similarity S i,j The value of γ is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller; (iii) when the fused sample image is a new type of defect that is separate from the base class defect, γ m The value is set to 1, and F(X) is adjusted accordingly. i and weight W j This makes the cosine similarity S i,j The value of the loss function is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller.

[0098] In this embodiment of the invention, the system adopts a model fine-tuning training method, which can better learn relevant feature information for defects in a small number of samples, thereby improving the accuracy of defect detection.

[0099] Example 3

[0100] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the small sample panel defect detection method described in Embodiment 1.

[0101] The computer device provided in this embodiment can implement the method described in Embodiment 1. To avoid repetition, it will not be described again here.

[0102] Example 4

[0103] This invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the small sample panel defect detection method described in Embodiment 1.

[0104] The computer-readable storage medium provided in this embodiment can implement the method described in Embodiment 1. To avoid repetition, it will not be described again here.

[0105] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0106] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can 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 those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for detecting defects in small sample panels, characterized in that, The method includes the following steps: A deep learning model is pre-trained based on the original sample images to obtain a defect detection model M1, wherein the defect detection model M1 includes a feature extractor and a classifier; Perform sample fusion and / or sample equalization on the original sample images and the new sample images to obtain the training dataset; The process of sample fusion processing for the original sample image and the new sample image is as follows: Defect extraction processing is performed on the new type of defect image on the new sample image to obtain the new type of defect image; Image fusion processing is performed on the new type of defect image and the original sample image by pixel overlay, so that the new type of defect and the base type defect have different positional relationships, so as to obtain the fused sample image, and the fused sample image is added to the training dataset. Based on the training dataset, the classifier parameters of defect detection model M1 are adjusted to obtain defect detection model M2; the classifier of defect detection model M1 is a cosine similarity-based classifier. The process of adjusting the parameters of the classifier for the defect detection model M1 based on the training dataset is as follows: The fused sample images, original sample images, and new sample images from the training dataset are input into the defect detection model M1; Backpropagation is used to gradually reduce the loss function value in order to adjust the parameters of the classifier; The formula for calculating the loss function value is as follows: ; in, The classification category calculated by the classifier belongs to the true category y. i The function, where n represents the number of sample images in the training dataset; The formula for calculating the cosine similarity is: ; in, F(X) represents the scaling factor. i W represents the weights of the input feature map. j Represents the weights of other different categories. The representative parameter adjusts the data; When the input samples for the defect detection model M1 are either original sample images or newly labeled sample images: The value is set to 1, and F(X) is adjusted. i and weight W j This makes the cosine similarity S i,j The value is kept balanced, and the loss function value is continuously calculated using backpropagation to make the loss function value smaller; when the sample input to the defect detection model M1 is a fused sample image: (i) when the fused sample image is an overlap of a new type of defect and a base type defect, the loss function value is reduced. And adjust F(X). i and weight W j This makes the cosine similarity S i,j The values ​​are kept balanced, and the loss function value is continuously calculated using backpropagation to make the loss function value smaller; (ii) when the fused sample image is the intersection of the new class defect and the base class defect, add to (i) And adjust F(X). i and weight W j This makes the cosine similarity S i,j The value remains balanced, and the loss function value is continuously calculated using backpropagation to make the loss function value smaller; (iii) when the fused sample image is a new type of defect that is separate from the base class defect, The value is 1, which adjusts F(X). i and weight W j This makes the cosine similarity S i,j The value of the loss function is kept balanced, and the loss function value is continuously calculated by backpropagation to make the loss function value smaller. The defect detection model M2 is used to detect defects in the image to be inspected, and to output defect identification and classification results.

2. The method for detecting defects in a small sample panel according to claim 1, characterized in that, When adjusting the parameters of the classifier for the defect detection model M1 based on the training dataset, the relevant parameters of the feature extractor are frozen.

3. The method for detecting defects in a small sample panel according to claim 1, characterized in that, The process of pre-training a deep learning model based on the original sample images to obtain the defect detection model M1 is as follows: Label the base class defects on the original sample image, that is, label the location and type of the base class defects; The labeled original sample images are input into a deep learning model for feature extraction and defect classification.

4. The method for detecting defects in a small sample panel according to claim 1, characterized in that, The process of performing sample equalization on the original sample image and the new sample image is as follows: The original sample images are filtered, and new types of defects in the new sample images are labeled, that is, the location and type of new types of defects are labeled; The filtered original sample images and the labeled new sample images are added to the training dataset in the same proportion.

5. The method for detecting defects in a small sample panel according to claim 1, characterized in that, The positional relationship between new class defects and base class defects includes overlap, intersection, and separation.

6. A small-sample panel defect detection system for implementing the method of claim 1, characterized in that, The system includes: A model pre-training unit, wherein the model pre-training unit pre-trains a deep learning model based on the original sample images to obtain a defect detection model M1, wherein the defect detection model M1 includes a feature extractor and a classifier; An image processing unit performs sample fusion processing and / or sample balancing processing on the original sample images and the new sample images to obtain a training dataset; A model parameter adjustment unit adjusts the parameters of the classifier of the defect detection model M1 based on the training dataset to obtain the defect detection model M2. The defect detection unit performs defect detection on the image to be detected based on the defect detection model M2, and outputs defect identification and classification results.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes a computer program, it implements the small sample panel defect detection method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the small sample panel defect detection method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Welding image defect identification method and device, storage medium and equipment

    CN112116560A

  • Few-sample defect detection method using defect-free image

    CN114140398A

  • Small sample image classification method

    CN115830401A