CN114092472A - Method, device and medium for detecting uncertain samples in defect detection - Google Patents

Method, device and medium for detecting uncertain samples in defect detection Download PDF

Info

Publication number
CN114092472A
CN114092472A CN202210057165.7A CN202210057165A CN114092472A CN 114092472 A CN114092472 A CN 114092472A CN 202210057165 A CN202210057165 A CN 202210057165A CN 114092472 A CN114092472 A CN 114092472A
Authority
CN
China
Prior art keywords
defect
target
sample
detection
gaussian mixture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210057165.7A
Other languages
Chinese (zh)
Other versions
CN114092472B (en
Inventor
张重阳
李若琦
秦彪
张保柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Haitang Information Technology Co ltd
Original Assignee
Ningbo Haitang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Haitang Information Technology Co ltd filed Critical Ningbo Haitang Information Technology Co ltd
Priority to CN202210057165.7A priority Critical patent/CN114092472B/en
Publication of CN114092472A publication Critical patent/CN114092472A/en
Application granted granted Critical
Publication of CN114092472B publication Critical patent/CN114092472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of image target detection, and provides a method, a device and a medium for detecting an uncertain sample in defect detection, which comprise the following steps: s1, collecting an image of a sample to be detected; s2, detecting the input sample image to be detected through the trained defect target detector to obtain the category and the feature vector of the defect target; s3, estimating the cognitive uncertainty of the target through the modeled preset Gaussian mixture model group according to the category and the characteristic vector of the defect target, and judging whether the sample to be detected is an uncertain sample according to the cognitive uncertainty of the target. The method has the advantages that the method for estimating the cognitive uncertainty based on the Gaussian mixture model can effectively detect the uncertainty samples of the defect detector and distribute the uncertainty samples to manual detection, so that the false detection rate of the defect detection model can be greatly reduced, and the reasonable combination of manual detection and machine detection is realized.

Description

Method, device and medium for detecting uncertain samples in defect detection
Technical Field
The invention relates to the technical field of image target detection, in particular to a method, a device and a medium for detecting an uncertain sample in defect detection.
Background
Since the manufacturing process and the production environment cannot be maintained in an absolutely ideal state during the production process, the surface of the product may inevitably have defects, resulting in an unacceptable quality. If unqualified defective products flow into the market, the user experience is influenced, the reputation of a manufacturer is damaged, and a safety accident is caused to cause irrecoverable serious consequences. Therefore, the detection of the appearance quality of the product according to the production standard before the product leaves the factory is of great importance to the development of production enterprises.
With the continuous development of computer vision technology, defect detection based on deep learning gradually replaces manual detection, and becomes a mainstream detection technology for large-scale automatic industrial production. The deep learning model can achieve good detection performance for input samples satisfying the training sample distribution, but when the input samples do not satisfy the training sample distribution (called out-of-distribution samples or uncertain samples), the model prediction result is uncontrollable. Even more, models often produce overly confident predictions for the out-of-distribution samples, detecting them into certain known classes and giving high confidence. This raises serious concerns for the safety and reliability of deploying defect detectors for the manufacturing enterprise.
The predominant method of detection of the out-of-distribution samples is to estimate the cognitive uncertainty of the detector. Cognitive uncertainty is typically measured by a sampling-based approach. The sample-based approach obtains multiple predictions by predicting the same input with different models, or predicting different inputs with the same model. And obtaining a final prediction result by carrying out weighted average on the multiple prediction results, and taking the variance of the multiple results as cognitive uncertainty estimation.
The sampling-based method needs multiple predictions, so that the detection time is greatly increased, and the requirement of large-scale automatic production on real-time detection is difficult to meet. Therefore, how to solve the defects of the current uncertainty estimation method and realize real-time and accurate uncertainty measurement has extremely high research value and practical significance.
Disclosure of Invention
The invention aims to provide a method for detecting an uncertain sample in defect detection, which is used for solving the problem that the current uncertainty estimation method is difficult to meet real-time detection.
In order to achieve the purpose, the invention adopts the technical scheme that:
a method for detecting uncertain samples in defect detection comprises the following steps:
s1, collecting an image of the sample to be detected;
s2, detecting the input sample image to be detected through the trained defect target detector to obtain the category and the feature vector of the defect target;
s3, estimating the cognitive uncertainty of the target through the modeled preset Gaussian mixture model group according to the category and the characteristic vector of the defect target, and judging whether the sample to be detected is an uncertain sample according to the cognitive uncertainty of the target.
Further, the step of obtaining a trained defective target detector comprises:
a1, constructing a defect target detector according to a preset target detection model;
a2, setting a class center point with each defect class fixed in a feature space of a defect target detector;
a3, training the constructed defect target detector through a training sample, and setting a preset loss function to optimize parameters of the defect target detector, so that the characteristic distance from the characteristics output by the defect target detector to the class center point is minimum, and the trained defect target detector is obtained.
Further, the preset loss function comprises a classification loss function and a clustering loss function;
a classification loss function for calculating the loss between the predicted class detected by the defect object detector and the class truth label given by the object;
and the clustering loss function is used for calculating the distance loss between the defect target characteristics detected by the defect target detector and the class center point characteristics of the defect class.
Further, the preset gaussian mixture model group comprises a plurality of gaussian mixture models, wherein each gaussian mixture model corresponds to a defect type in the target detector.
Further, the step of obtaining the modeled preset gaussian mixture model group includes:
b1, creating training sample sets of different classes of corresponding models required for modeling a preset Gaussian mixture model group;
b2, selecting a feature vector which is correctly detected as a detection target of each category in the training sample set of each category;
and B3, fitting the parameters of the corresponding Gaussian mixture model by using the feature vectors of the correctly detected targets in each category through a maximum expectation algorithm to obtain a Gaussian mixture model group containing feature vector distribution of each category.
Further, the condition for selecting the feature vector correctly detected as the class detection target is that the intersection ratio of the predicted detection frame and the truth-value frame set in the label is greater than a first preset threshold and the predicted class confidence is greater than a second preset threshold.
Further, step S3 includes:
c1, estimating the likelihood function of the corresponding distribution of the feature vector of the defect target belonging to each category of Gaussian mixture model by using the trained preset Gaussian mixture model group;
c2, forming the model group by the estimated likelihood functions of all classes into cognitive certainty scores of all classes of the target detected by the defect target detector by the sample;
and C3, comparing the cognitive certainty scores of all the categories with a preset cognitive certainty score threshold value, and when the cognitive certainty scores of all the categories are smaller than the preset cognitive certainty score threshold value, judging that the current sample is an uncertain sample.
In a second aspect of the present invention, there is provided an apparatus for detecting an indeterminate sample in defect detection, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor is enabled to execute the method for detecting an indeterminate sample in defect detection.
In a third aspect of the invention, a computer-readable storage medium is provided, wherein instructions that, when executed by a processor in a device, enable the device to perform the method for detecting uncertain samples in defect detection.
Compared with the prior art, the invention at least comprises the following beneficial effects:
(1) the invention adopts the cognitive uncertainty estimation method based on the Gaussian mixture model, can effectively detect the uncertainty sample of the defect target detector, and distributes the uncertainty sample to manual detection, thereby greatly reducing the false detection rate of the defect detection model and realizing the reasonable combination of manual detection and machine detection;
(2) the uncertain sample detection method adopted by the invention only needs to carry out single reasoning on the sample, so that the real-time uncertain sample detection can be realized only by introducing very small calculation overhead;
(3) based on the method, the invention provides the detection system and the detection device, and can meet the requirement of large-scale automatic industrial production, thereby replacing the labor force to a certain extent and saving the labor cost.
Drawings
FIG. 1 is a flow chart of a method for detecting an indeterminate sample according to an embodiment of the present invention;
FIG. 2 is a flow chart of a trained target detector in an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a predetermined Gaussian mixture model set according to an embodiment of the present invention;
FIG. 4 is a flow chart of a trained set of predetermined Gaussian mixture models in an embodiment of the present invention;
fig. 5 is a specific flowchart of the method for determining an uncertain sample according to the embodiment of the present invention.
Detailed Description
It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.
Moreover, descriptions of the present invention as relating to "first," "second," "a," etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit ly indicating a number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
The following are specific embodiments of the present invention, and the technical solutions of the present invention will be further described with reference to the drawings, but the present invention is not limited to these embodiments.
As shown in fig. 1, the method for detecting an uncertain sample in defect detection according to the present invention comprises the steps of:
s1, acquiring an image of the sample to be detected;
s2, detecting the input sample image to be detected through the trained defect target detector to obtain the category and the feature vector of the defect target;
s3, estimating the cognitive uncertainty of the target through the modeled preset Gaussian mixture model group according to the category and the feature vector of the defect target, and judging whether the sample to be detected is an uncertain sample according to the cognitive uncertainty of the target.
As shown in fig. 2, the step of obtaining the trained defect target detector in step S2 includes:
a1, constructing a defect target detector according to a preset target detection model;
a2, setting a class center point with each defect class fixed in a feature space of a defect target detector;
a3, training the constructed defect target detector through a training sample, and setting a preset loss function to optimize parameters of the defect target detector, so that the characteristic distance from the characteristics output by the defect target detector to the class center point is minimum, and the trained defect target detector is obtained.
For the construction of a defective object detector, it is possible to construct a defective object detector based on the fast-RCNN model. Of course, other detection models, such as RetinaNet model, YOLO model, etc., may also be used.
For each class, the invention sets a fixed class center point in the feature space of the detector
Figure 999722DEST_PATH_IMAGE001
. These class center points are fixed during the training process, and have a positive parameter α in the class dimension corresponding to each class, and have a negative parameter α in all other class dimensions, thus obtaining the following formula:
Figure 713600DEST_PATH_IMAGE002
the preset loss functions adopted for optimizing the parameters of the defect target detector comprise classification loss functions and clustering loss functions.
The classification loss function is used to calculate the cross entropy loss L between the predicted class detected by the defective object detector and the class truth label given by the objectCLSThe loss is the original classification loss of the defective target detector, which can supervise the original classification function of the target detector. The classification loss function is defined as follows:
Figure 558584DEST_PATH_IMAGE003
where N is the number of classification classes, M is the number of prediction bounding boxes, pcTo predict the probability of being of class c, ycIs the probability that the label is actually class c (y when the current predicted target class is c)c=1, otherwise yc=0)。
Another part of the preset loss function is the Euclidean distance loss L between the defect target feature detected by the defect target detector and the class center point feature of the defect classCTSI.e. the cluster loss function. When the given prediction feature vector is 1 and the given current prediction target belongs to the class c, L isCTSThe definition is as follows,
Figure 16110DEST_PATH_IMAGE004
wherein C iscIs the class center point in the feature space corresponding to the class c.
The overall classification penalty L is therefore as follows,
Figure 564903DEST_PATH_IMAGE005
wherein λ is a weight parameter.
According to the method, the distance between the characteristic vector and the class center point in the characteristic space is restrained and predicted by adding the clustering loss function in the loss function, and the position to which the training sample of each class is mapped in the characteristic space has a stricter requirement on the basis of the original classification loss, so that the defect target detector obtained by training has a structured characteristic space, and a foundation is laid for the subsequent characteristic vector distribution modeling.
In the preferred embodiment, the classification loss function is selected as the cross entropy loss, and the clustering loss function is selected as the Euclidean distance loss. Of course, the classification Loss function may be a Loss function such as Focal local, and the clustering Loss function may be a Loss function such as mahalanobis distance.
As shown in fig. 3, the preset gaussian mixture model group in step S3 includes a plurality of gaussian mixture models, each of which is a gaussian mixture model GiCorresponding to an object class i in the defect object detector. Wherein, a Gaussian mixture model GiThe system comprises 8 Gaussian distribution components, wherein each Gaussian distribution component comprises three parameters which are respectively component weight parameters
Figure 184103DEST_PATH_IMAGE006
Mean value parameter
Figure 513453DEST_PATH_IMAGE007
Sum covariance matrix parameters
Figure 774670DEST_PATH_IMAGE008
After the parameters of the gaussian mixture model group are set, modeling and training the feature vectors of each category through the gaussian mixture model group are required, and as shown in fig. 4, the step of obtaining the trained preset gaussian mixture model group includes:
b1, creating training sample sets of different classes of corresponding models required for modeling a preset Gaussian mixture model group;
b2, selecting a feature vector which is correctly detected as a detection target of each category in the training sample set of each category;
and B3, fitting the parameters of the corresponding Gaussian mixture model by using the feature vectors of the correctly detected targets in each category through a maximum expectation algorithm to obtain a Gaussian mixture model group containing feature vector distribution of each category.
In order to select all the feature vectors l with correct prediction, it is first determined whether each prediction is correct. The condition for judging the correctness is that the intersection ratio of the predicted detection frame and the truth value frame set in the label is greater than a first preset threshold and the predicted category confidence is greater than a second preset threshold, which is expressed as follows:
Figure 302603DEST_PATH_IMAGE009
where is the predicted bounding box, b is the annotated true value box, θiouTo a set first preset threshold value, siTo predict confidence that the class is class i, θconfIs a set second preset threshold. Constructing a training sample set by taking the intersection ratio of the detection box and the truth box and the class confidence as conditions for judging the detection correctness, wherein thetaiouThe value may be 0.6, thetaconfThe value may be 0.7.
In the embodiment of the invention, the feature vector corresponding to each type of correct prediction is selected as the training sample set of each type by setting the correct prediction condition, so that each type of effective feature vector can be selected for subsequent modeling of the feature vector distribution of each type.
Further, a training sample set containing the feature vector of each category is used to fit the Gaussian mixture model parameters of the category through a maximum expectation algorithm. The standard calculation framework for the maximum Expectation algorithm consists of alternating E-steps (Expectation-step) and M-steps (Maximization step). Wherein step E fixes the parameter theta of the previous iteration(t-1)Solving for latent variable probability distribution q(t)Making likelihood L (theta, q) take a maximum value; m step fixed q(t)Solving for theta(t)The likelihood L (theta, q) is maximized. The two are alternated to converge the parameters to local optimum values.
Sequentially performing parameter fitting on the Gaussian mixture model on each class of feature vector training samples by adopting a maximum expectation algorithm to obtain a group of Gaussian mixture models
Figure 358284DEST_PATH_IMAGE010
Modeling feature vectors of n classes of training sample set in feature spaceAnd (4) distribution.
The method carries out parameter fitting on the Gaussian mixture model of a specific category through a maximum expectation algorithm, and the adopted Gaussian mixture model can model probability distribution of any shape, so that the category distribution of a characteristic space does not need to be restrained and assumed. The convergence of the maximum expectation algorithm also ensures that the iteration of the parameters approaches the local optimal solution. Therefore, the cognitive uncertainty of the target can be estimated through the trained Gaussian mixture model group in the detection process, and the uncertain samples are judged.
As shown in fig. 5, the step of determining an uncertain sample in step S3 includes:
c1, estimating the likelihood function of the corresponding distribution of the feature vector of the defect target belonging to each category of Gaussian mixture model by using the trained preset Gaussian mixture model group;
c2, forming the model group by the estimated likelihood functions of all classes into cognitive certainty scores of all classes of the target detected by the defect target detector by the sample;
and C3, comparing the cognitive certainty scores of all the categories with a preset cognitive certainty score threshold value, and when the cognitive certainty scores of all the categories are smaller than the preset cognitive certainty score threshold value, judging that the current sample is an uncertain sample.
Wherein the sample can obtain the feature vector of the defect target after passing through the trained defect target detector
Figure 909351DEST_PATH_IMAGE011
And by utilizing the preset Gaussian mixture model group, the log-likelihood function of the corresponding distribution of the characteristic vector belonging to each type of Gaussian mixture model can be estimated.
Let the class be i and the corresponding Gaussian mixture model be GiThen predicted feature vector
Figure 699891DEST_PATH_IMAGE011
Belonging to a Gaussian mixture model GiProbability of (2)
Figure 285593DEST_PATH_IMAGE012
The log-likelihood of (c) is calculated as follows:
Figure 777754DEST_PATH_IMAGE013
the above equation describes the feature vector of the sample
Figure 816117DEST_PATH_IMAGE011
The log likelihood function which accords with the distribution of the class i in the feature space, when the log likelihood function is larger, the sample accords with the class to be higher; when the log-likelihood function is smaller, the degree of conformity of the representative sample in the class is lower, that is, the cognitive uncertainty of the model to the feature vector belonging to the current class is high. The log-likelihood function can therefore be regarded as a certainty score that the current sample belongs to a certain class.
And then, sequentially calculating the log-likelihood function of the sample in each category to obtain a deterministic score vector P of the model group to the sample. Assuming that there are n categories, the dimension of the score vector P is n, and the calculation is as follows:
Figure 887979DEST_PATH_IMAGE014
according to the invention, the cognition uncertainty of the model to the input sample can be effectively measured by taking the log-likelihood function of the characteristic vector of the sample and the characteristic space distribution in each category as the certainty score, and the basis for detecting the uncertainty sample is taken.
In a preferred embodiment, log-likelihood is used as the cognitive uncertainty indicator. Of course, in other embodiments, the degree to which the sample satisfies the distribution may be described by using an index such as likelihood, negative log-likelihood, or the like.
Then, an uncertain sample is detected according to the obtained cognitive uncertainty, a certainty score threshold value needs to be set at first, and when the certainty of all categories (each item of the obtained certainty score vectors P) is smaller than the threshold value, the characteristic vector representing the sample does not meet the characteristic space distribution of any category, and the sample is regarded as the uncertain sample.
The invention realizes the detection of uncertain samples by carrying out threshold value filtration on the certainty fraction vectors of the samples, namely, a report can be generated and the samples are distributed to professional detection personnel for fine detection, thereby avoiding the wrong detection of uncertain samples by a target detector, improving the detection precision and realizing the reasonable distribution of detection models and detection personnel.
The invention models and trains the distribution of the feature vectors of each class in the training samples in the feature space through the Gaussian mixture model, realizes the detection of uncertain samples, and distributes the uncertain samples to professional detection personnel for fine detection, thereby reducing the false detection rate, meeting the defect detection requirements in mass automatic industrial production and saving the labor cost.
In another embodiment of the present invention, an apparatus for detecting an uncertain sample in defect detection is further provided, which includes at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor is enabled to execute the method for detecting an uncertain sample in defect detection.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, wherein instructions that, when executed by a processor in a device, enable the device to perform the above-described method for detecting indeterminate samples in defect detection.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.

Claims (9)

1. A method for detecting uncertain samples in defect detection is characterized by comprising the following steps:
s1, collecting an image of a sample to be detected;
s2, detecting the input sample image to be detected through the trained defect target detector to obtain the category and the feature vector of the defect target;
s3, estimating the cognitive uncertainty of the target through the modeled preset Gaussian mixture model group according to the category and the characteristic vector of the defect target, and judging whether the sample to be detected is an uncertain sample according to the cognitive uncertainty of the target.
2. The method of claim 1, wherein the step of obtaining a trained defect target detector comprises:
a1, constructing a defect target detector according to a preset target detection model;
a2, setting a class center point with each defect class fixed in a feature space of a defect target detector;
a3, training the constructed defect target detector through a training sample, and setting a preset loss function to optimize parameters of the defect target detector, so that the characteristic distance from the characteristics output by the defect target detector to the class center point is minimum, and the trained defect target detector is obtained.
3. The method for detecting uncertain samples in defect detection according to claim 2, wherein the preset loss function comprises a classification loss function and a clustering loss function;
the classification loss function is used for calculating the loss between the prediction class detected by the defect object detector and the class truth label given by the object;
and the clustering loss function is used for calculating the distance loss between the defect target characteristics detected by the defect target detector and the class center point characteristics of the defect class.
4. The method of claim 1, wherein the predetermined set of Gaussian mixture models includes a plurality of Gaussian mixture models, and each Gaussian mixture model corresponds to a defect class in the target detector.
5. The method for detecting uncertain samples in defect detection as recited in claim 2, wherein the step of obtaining the modeled preset gaussian mixture model set comprises:
b1, creating training sample sets of different classes of corresponding models required for modeling a preset Gaussian mixture model group;
b2, selecting a feature vector which is correctly detected as a detection target of each category in the training sample set of each category;
and B3, fitting the parameters of the corresponding Gaussian mixture model by using the feature vectors of the correctly detected targets in each category through a maximum expectation algorithm to obtain a Gaussian mixture model group containing feature vector distribution of each category.
6. The method of claim 5, wherein the condition for selecting the proper feature vector to be detected as the class detection target is that the intersection ratio of the predicted detection frame and the truth frame set in the label is greater than a first predetermined threshold and the confidence of the predicted class is greater than a second predetermined threshold.
7. The method for detecting uncertain samples in defect detection as recited in claim 1, wherein step S3 comprises:
c1, estimating the likelihood function of the corresponding distribution of the feature vector of the defect target belonging to each category of Gaussian mixture model by using the trained preset Gaussian mixture model group;
c2, forming the model group by the estimated likelihood functions of all classes into cognitive certainty scores of all classes of the target detected by the defect target detector by the sample;
and C3, comparing the cognitive certainty scores of all the categories with a preset cognitive certainty score threshold value, and when the cognitive certainty scores of all the categories are smaller than the preset cognitive certainty score threshold value, judging that the current sample is an uncertain sample.
8. An apparatus for detecting an uncertain sample in defect detection, comprising at least one processor and at least one memory, wherein the memory stores a computer program which, when executed by the processor, enables the processor to perform the method for detecting an uncertain sample in defect detection according to any of claims 1-7.
9. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor in a device, enable the device to perform the method for detecting indeterminate samples in defect detection as set forth in any one of claims 1-7.
CN202210057165.7A 2022-01-19 2022-01-19 Method, device and medium for detecting uncertain samples in defect detection Active CN114092472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210057165.7A CN114092472B (en) 2022-01-19 2022-01-19 Method, device and medium for detecting uncertain samples in defect detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210057165.7A CN114092472B (en) 2022-01-19 2022-01-19 Method, device and medium for detecting uncertain samples in defect detection

Publications (2)

Publication Number Publication Date
CN114092472A true CN114092472A (en) 2022-02-25
CN114092472B CN114092472B (en) 2022-05-03

Family

ID=80308829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210057165.7A Active CN114092472B (en) 2022-01-19 2022-01-19 Method, device and medium for detecting uncertain samples in defect detection

Country Status (1)

Country Link
CN (1) CN114092472B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630751A (en) * 2023-07-24 2023-08-22 中国电子科技集团公司第二十八研究所 Trusted target detection method integrating information bottleneck and uncertainty perception

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090279772A1 (en) * 2008-05-12 2009-11-12 General Electric Company Method and System for Identifying Defects in NDT Image Data
US20150242589A1 (en) * 2014-02-25 2015-08-27 Siemens Aktiengesellschaft Method and System for Image-Based Estimation of Multi-Physics Parameters and Their Uncertainty for Patient-Specific Simulation of Organ Function
CN110197286A (en) * 2019-05-10 2019-09-03 武汉理工大学 A kind of Active Learning classification method based on mixed Gauss model and sparse Bayesian
CN111615676A (en) * 2018-03-26 2020-09-01 赫尔实验室有限公司 System and method for estimating uncertainty of decisions made by a supervised machine learner
CN113255590A (en) * 2021-06-25 2021-08-13 众芯汉创(北京)科技有限公司 Defect detection model training method, defect detection method, device and system
CN113496247A (en) * 2020-04-03 2021-10-12 百度(美国)有限责任公司 Estimating an implicit likelihood of generating a countermeasure network
US20210334587A1 (en) * 2018-09-04 2021-10-28 Boe Technology Group Co., Ltd. Method and apparatus for training a convolutional neural network to detect defects
CN113723467A (en) * 2021-08-05 2021-11-30 武汉精创电子技术有限公司 Sample collection method, device and equipment for defect detection

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090279772A1 (en) * 2008-05-12 2009-11-12 General Electric Company Method and System for Identifying Defects in NDT Image Data
US20150242589A1 (en) * 2014-02-25 2015-08-27 Siemens Aktiengesellschaft Method and System for Image-Based Estimation of Multi-Physics Parameters and Their Uncertainty for Patient-Specific Simulation of Organ Function
CN111615676A (en) * 2018-03-26 2020-09-01 赫尔实验室有限公司 System and method for estimating uncertainty of decisions made by a supervised machine learner
US20210334587A1 (en) * 2018-09-04 2021-10-28 Boe Technology Group Co., Ltd. Method and apparatus for training a convolutional neural network to detect defects
CN110197286A (en) * 2019-05-10 2019-09-03 武汉理工大学 A kind of Active Learning classification method based on mixed Gauss model and sparse Bayesian
CN113496247A (en) * 2020-04-03 2021-10-12 百度(美国)有限责任公司 Estimating an implicit likelihood of generating a countermeasure network
CN113255590A (en) * 2021-06-25 2021-08-13 众芯汉创(北京)科技有限公司 Defect detection model training method, defect detection method, device and system
CN113723467A (en) * 2021-08-05 2021-11-30 武汉精创电子技术有限公司 Sample collection method, device and equipment for defect detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KAZUKI SATO ET AL: "Predictable Uncertainty-Aware Unsupervised Deep Anomaly Segmentation", 《2019 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS》 *
杨永国: "基于自适应高斯混合模型的软件测试用例集约简算法研究", 《计算机测量与控制》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630751A (en) * 2023-07-24 2023-08-22 中国电子科技集团公司第二十八研究所 Trusted target detection method integrating information bottleneck and uncertainty perception
CN116630751B (en) * 2023-07-24 2023-10-31 中国电子科技集团公司第二十八研究所 Trusted target detection method integrating information bottleneck and uncertainty perception

Also Published As

Publication number Publication date
CN114092472B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN110070141B (en) Network intrusion detection method
CN110942072B (en) Quality score based on quality assessment, detection model training and detection method and device
CN108564136B (en) A kind of airspace operation Situation Assessment classification method based on fuzzy reasoning
CN108182500A (en) Ammunition Storage Reliability Forecasting Methodology based on accelerated life test
CN111639882B (en) Deep learning-based electricity risk judging method
CN115661500B (en) Target detection method based on second-order distribution and uncertainty perception clustering fusion
CN111834010A (en) COVID-19 detection false negative identification method based on attribute reduction and XGboost
CN112883651B (en) System-level testability design multi-objective optimization method based on improved PBI method
CN114419007B (en) Defect type identification method and system for multi-strategy fusion deep learning network model
CN112633174B (en) Improved YOLOv4 high-dome-based fire detection method and storage medium
CN114092472B (en) Method, device and medium for detecting uncertain samples in defect detection
CN111860265B (en) Multi-detection-frame loss balanced road scene understanding algorithm based on sample loss
CN111291822A (en) Equipment running state judgment method based on fuzzy clustering optimal k value selection algorithm
CN116938771A (en) Network abnormal flow detection method and device
KR101741248B1 (en) Method and apparatus for estimating causality among variables
CN116520281A (en) DDPG-based extended target tracking optimization method and device
CN108320112A (en) A kind of method and device of determining equipment health status
CN114139636B (en) Abnormal operation processing method and device
CN113450344B (en) Strip steel surface defect detection method and system
CN113343123B (en) Training method and detection method for generating confrontation multiple relation graph network
Nair et al. Maximum likelihood uncertainty estimation: Robustness to outliers
CN109697438A (en) A kind of specific group's Assembling Behavior early detection and aggregation ground prediction technique and system
CN112559759A (en) Method and equipment for identifying error relation in knowledge graph
CN109635008B (en) Equipment fault detection method based on machine learning
CN115577290A (en) Distribution network fault classification and source positioning method based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant