CN113658109A - Glass defect detection method based on field loss prediction active learning - Google Patents
Glass defect detection method based on field loss prediction active learning Download PDFInfo
- Publication number
- CN113658109A CN113658109A CN202110831710.9A CN202110831710A CN113658109A CN 113658109 A CN113658109 A CN 113658109A CN 202110831710 A CN202110831710 A CN 202110831710A CN 113658109 A CN113658109 A CN 113658109A
- Authority
- CN
- China
- Prior art keywords
- loss
- model
- loss prediction
- glass
- active learning
- 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.)
- Pending
Links
- 239000011521 glass Substances 0.000 title claims abstract description 37
- 230000007547 defect Effects 0.000 title claims abstract description 22
- 238000001514 detection method Methods 0.000 title claims abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 39
- 238000013145 classification model Methods 0.000 claims abstract description 26
- 238000002372 labelling Methods 0.000 claims abstract description 12
- 238000012549 training Methods 0.000 claims abstract description 12
- 238000012163 sequencing technique Methods 0.000 claims abstract description 3
- 230000006870 function Effects 0.000 claims description 12
- 230000003631 expected effect Effects 0.000 claims description 7
- 238000004422 calculation algorithm Methods 0.000 claims description 6
- 238000013528 artificial neural network Methods 0.000 claims description 4
- 238000003062 neural network model Methods 0.000 claims description 4
- 238000011176 pooling Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract 1
- 230000009471 action Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000011426 transformation method Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000007635 classification algorithm Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (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)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Biology (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a glass defect detection method based on field loss prediction active learning, which defines a loss prediction model, wherein the model can be trained and optimized together with a multi-label classification model, and carries out loss prediction on glass samples in an unlabelled sample pool, the first K glass samples with the largest predicted loss values are taken as high-value samples selected by active learning after sequencing, and the high-value samples are added into a labeled sample set after labeling for training the multi-label classification model so as to identify the defect types in glass to be detected. By the method, the classification accuracy of the model under a small multi-label image sample size can be effectively improved, so that the model effect can be expected by using a small data size, and the sample labeling cost is reduced.
Description
Technical Field
The invention belongs to the technical field of convolutional neural networks, and relates to a glass defect detection method based on field loss prediction active learning.
Background
The glass has important significance for urbanization and modern industry, and for the field of glass defect detection, a large amount of glass defect detection work is carried out every day, and most of the glass defect detection work is carried out by manual screening. However, manual identification of glass defects is costly and inefficient. Professional glass defect detecting instruments are expensive, occupied space of equipment is large, and the glass defect detecting instruments are not easy to popularize in common enterprises. There is a strong need for a low cost glass defect detection scheme for these enterprises. The glass may usually have a plurality of different defects, so that the glass belongs to the identification of glass images and belongs to the multi-label classification problem. Correctly identifying and classifying the categories of the defects has important significance for reducing the cost of a factory and improving the efficiency.
Multi-label image classification differs from single-label classification in that the samples to be classified may belong to two or more classes simultaneously, and there is a more complex relationship between the classes. The multi-label classification algorithm is mainly divided into two types: one is a Problem transformation method (Problem transformation methods); the other is an Algorithm conversion method (Algorithm adaptation methods). The basic idea of the problem transformation method is to transform the multi-label classification problem into a simple two-classification problem and then solve the multi-label problem using known methods. The algorithm conversion method is generally to optimize the traditional single-label classification algorithm so as to adapt to the multi-label classification data set. Some classical multi-label learning algorithms are: probabilistic model-based methods, decision tree-based methods, support vector machine-based methods, neural network-based methods, KNN-based methods.
The core idea is to find the training sample with the most value through some heuristic strategies, so that the model can achieve or even exceed the expected effect by using as few labeled samples as possible. Therefore, the method can be well used in the field of glass defect detection. The concept of active learning was proposed by Simon in 1974. Subsequently, the active learning method is infinite in many fields, and is further generalized into classical scenarios such as a generative member Query (Membership Query Synthesis), a streaming-Based Selective learning method (Stream-Based Sampling), and an active learning method Based on an unlabeled sample Pool (Pool-Based Sampling). In comparison, the active learning method based on the unlabeled sample pool forms a large number of unlabeled samples into the unlabeled sample pool, and the samples with the most value are screened from the unlabeled sample pool by designing a sample screening strategy and are preferentially labeled. In addition, with the heat of the internet and the continuous promotion of data acquisition technology, a large amount of unlabelled data can be acquired in many fields at low cost. Therefore, active learning methods based on unlabeled sample pools are most popular and widely used in different fields, and are very important in machine learning and data mining applications.
Disclosure of Invention
The invention aims to: the method is characterized in that a loss prediction active learning model is provided, the most effective image of the classification model is selected to be labeled and used for model training, so that the model can better identify the defects of which types exist in the glass image with the lowest labeling cost, and the expected effect is achieved.
The technical scheme adopted by the invention is as follows:
a glass defect detection method based on field loss prediction active learning comprises the following steps: inputting unmarked glass images to be processed, randomly selecting partial images, and submitting the partial images to an expert for marking to serve as an initial marking data set;
step 2: constructing a multi-label classification model and a loss prediction model;
and step 3: training a multi-label classification model and a loss prediction model by using a current labeling data set;
and 4, step 4: selecting samples from all glass samples which are not marked by using a loss prediction model, and adding a marked data set after marking;
and 5: and (5) repeating the step (3) and the step (4) until the budget is exhausted or the expected effect is achieved, and obtaining the trained multi-label classification model.
Further, the multi-label classification model in the step 2 is composed of an image feature learning model and a graph convolution neural network model;
wherein the multi-label classification loss function is as follows:
wherein C represents the number of categories, sigma represents a sigmoid function,represents the prediction score under category c;
the loss prediction model in the step 2 is composed of a plurality of loss prediction modules, each loss prediction module comprises a whole local average pooling layer and a whole connection layer, the input of the loss prediction module is the characteristics of a middle layer of the multi-label classification model, and the characteristics of each loss prediction module are connected and then subjected to dot product operation with the output of the graph convolution neural network in the multi-label classification model through the whole connection layer to obtain the predicted loss;
wherein the loss function for the predicted loss is as follows:
the final loss function is defined as: loss ═ Ltarget+λ·Lloss(ii) a Where λ is a weight parameter.
Further, based on the current labeled data set, a back propagation algorithm is used for training the multi-label classification model and the loss prediction model in the step 2.
Further, based on the trained loss prediction model obtained in the step 3, performing loss prediction and sequencing on the glass samples in the unlabeled sample pool, and taking the top K samples as important samples selected by active learning; after labeling, add to the labeled sample set.
Further, repeating the step 3 and the step 4 until the budget is exhausted or the expected effect is achieved, and obtaining the trained multi-label image classification model.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. the labeling of the multi-label glass image is complex, the requirement on labeling experts is high, and the labeling cost of the dimensional sample is high. Through experimental tests of a plurality of data sets by the embodiment of the invention, under the condition of the same sample amount, the classification accuracy of the model trained by using the selected sample is higher than that of the model trained by randomly selecting the sample; meanwhile, the invention can achieve more than 80% of the accuracy of the training models of all the training sets by using the sample size which is 50% lower than that of all the training sets. The method has the advantages that the method is remarkably improved in the field of active learning, and high classification accuracy is achieved on the premise of reducing the labeling cost.
2. In the existing multi-label active learning research, a query strategy mostly selects one sample at a time. The active learning method provided by the invention is batch mode query, selects a batch of valuable active learning samples by one-time query, can greatly improve the active learning query efficiency, and is suitable for a multi-label classification model based on deep learning.
3. The method enables the multi-label active learning method to be practically applied to multi-label glass image classification scenes, and expands the application scenes of the multi-label active learning method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and that for those skilled in the art, other relevant drawings can be obtained according to the drawings without inventive effort, wherein:
FIG. 1 is a schematic view of a glass image provided in example 1 of the present invention;
fig. 2 is a schematic flow chart of an active learning method for loss prediction according to embodiment 1 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not to be construed as limiting the invention, i.e., the described embodiments are merely a subset of the embodiments of the invention and not all embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the invention without making any creative effort, fall within the protection scope of the invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The features and properties of the present invention are described in further detail below with reference to examples.
Example one
Referring to fig. 2, the method of embodiment 1 of the present invention includes the following specific steps:
s101: randomly selecting a certain number of images from 3500 training sets of glass image data sets, submitting the images to an expert for marking to serve as an initial marking data set, wherein the images are shown in FIG. 1: (ii) a
S102: constructing a multi-label classification model and a loss prediction model; the multi-label classification model consists of an image feature learning model and a graph convolution neural network model. The image feature learning model uses ResNet-101 here, and the atlas neural network model consists of 2-layer stacked GCNs. The multi-label classification loss function used is as follows:
wherein C represents the number of categories, σ represents the Sigmoid function,indicates the prediction score under category c.
Defining a loss prediction model, as shown in fig. 2, wherein the loss prediction model is composed of a plurality of loss prediction modules, each loss prediction module comprises a global pooling layer and a full-link layer, the input of the loss prediction module is the characteristics of the middle layer of the multi-label classification model, and the characteristics of each loss prediction module are connected and then subjected to dot product operation with the output of the graph convolution neural network in the multi-label classification model through the full-link layer to obtain the predicted loss. The loss function for the predicted loss is as follows:
defining the final joint loss function as: loss ═ Ltarget+λ·Lloss(ii) a Wherein λ is a weight parameter set to 0.25;
s103: training a multi-label classification model and a loss prediction model defined by S102 based on the current label data set for 30 times;
s104: using a loss prediction model to predict and sort the loss of the samples in the unlabeled sample pool, and taking the top K samples as important glass samples selected by active learning; after labeling, adding a labeled sample set;
s105: and repeating S103 and S104 until the budget is exhausted or the expected effect is achieved, and obtaining the trained multi-label classification model.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents and improvements made by those skilled in the art within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (5)
1. A glass defect detection method based on field loss prediction active learning is characterized by comprising the following steps:
step 1: inputting an unmarked glass image to be processed, randomly selecting a partial image, submitting the partial image to an expert for marking, and taking the partial image as an initial marking data set;
step 2: constructing a multi-label classification model and a loss prediction model;
and step 3: training a multi-label classification model and a loss prediction model by using a current labeling data set;
and 4, step 4: selecting samples from all glass samples which are not marked by using a loss prediction model, and adding a marked data set after marking;
and 5: and (5) repeating the step (3) and the step (4) until the budget is exhausted or the expected effect is achieved, and obtaining the trained multi-label classification model.
2. The method for detecting glass defects based on active learning of domain loss prediction according to claim 1, wherein the method comprises the following steps: the multi-label classification model in the step 2 consists of an image feature learning model and a graph convolution neural network model;
wherein the multi-label classification loss function is as follows:
wherein C represents the number of categories, sigma represents a sigmoid function,represents the prediction score under category c;
the loss prediction model in the step 2 is composed of a plurality of loss prediction modules, each loss prediction module comprises a global average pooling layer and a full-connection layer, the input of the loss prediction module is the characteristics of a middle layer of the multi-label classification model, and the characteristics of each loss prediction module are connected and then subjected to dot product operation with the output of the graph convolution neural network in the multi-label classification model through the full-connection layer to obtain the predicted loss;
wherein the loss function for the predicted loss is as follows:
the final loss function is defined as: loss ═ Ltarget+λ·Lloss(ii) a Where λ is a weight parameter.
3. The method for detecting glass defects based on active learning of domain loss prediction according to claim 1, wherein the method comprises the following steps: and (3) training the multi-label classification model and the loss prediction model in the step (2) by using a back propagation algorithm based on the current labeled data set.
4. The method for detecting glass defects based on active learning of domain loss prediction according to claim 1, wherein the method comprises the following steps: based on the trained loss prediction model obtained in the step 3, performing loss prediction and sequencing on glass samples in the unlabeled sample pool, and taking the top K samples as important samples selected by active learning; after labeling, add to the labeled sample set.
5. The method for detecting glass defects based on active learning of domain loss prediction according to claim 1, wherein the method comprises the following steps: and (5) repeating the step (3) and the step (4) until the budget is exhausted or the expected effect is achieved, and obtaining the trained multi-label image classification model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110831710.9A CN113658109A (en) | 2021-07-22 | 2021-07-22 | Glass defect detection method based on field loss prediction active learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110831710.9A CN113658109A (en) | 2021-07-22 | 2021-07-22 | Glass defect detection method based on field loss prediction active learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113658109A true CN113658109A (en) | 2021-11-16 |
Family
ID=78489710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110831710.9A Pending CN113658109A (en) | 2021-07-22 | 2021-07-22 | Glass defect detection method based on field loss prediction active learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113658109A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114638288A (en) * | 2022-03-02 | 2022-06-17 | 云从科技集团股份有限公司 | Sample labeling method and device and computer storage medium |
CN115953588A (en) * | 2023-03-16 | 2023-04-11 | 深圳市华汉伟业科技有限公司 | Important sample mining method and characteristic image detection method for image |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109900501A (en) * | 2019-01-31 | 2019-06-18 | 石家庄铁道大学 | High-speed EMUs vehicle artificial intelligence lossless detection method |
WO2020073951A1 (en) * | 2018-10-10 | 2020-04-16 | 腾讯科技(深圳)有限公司 | Method and apparatus for training image recognition model, network device, and storage medium |
CN112488147A (en) * | 2020-11-02 | 2021-03-12 | 东北林业大学 | Redundancy removal active learning method based on countermeasure network |
CN112818755A (en) * | 2021-01-13 | 2021-05-18 | 华中科技大学 | Gait recognition method based on active learning |
-
2021
- 2021-07-22 CN CN202110831710.9A patent/CN113658109A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020073951A1 (en) * | 2018-10-10 | 2020-04-16 | 腾讯科技(深圳)有限公司 | Method and apparatus for training image recognition model, network device, and storage medium |
CN109900501A (en) * | 2019-01-31 | 2019-06-18 | 石家庄铁道大学 | High-speed EMUs vehicle artificial intelligence lossless detection method |
CN112488147A (en) * | 2020-11-02 | 2021-03-12 | 东北林业大学 | Redundancy removal active learning method based on countermeasure network |
CN112818755A (en) * | 2021-01-13 | 2021-05-18 | 华中科技大学 | Gait recognition method based on active learning |
Non-Patent Citations (1)
Title |
---|
DONGGEUN YOO等: "Learning Loss for Active Learning", 《ARXIV》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114638288A (en) * | 2022-03-02 | 2022-06-17 | 云从科技集团股份有限公司 | Sample labeling method and device and computer storage medium |
CN115953588A (en) * | 2023-03-16 | 2023-04-11 | 深圳市华汉伟业科技有限公司 | Important sample mining method and characteristic image detection method for image |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107633255B (en) | Rock lithology automatic identification and classification method under deep learning mode | |
CN111414942A (en) | Remote sensing image classification method based on active learning and convolutional neural network | |
CN108038492A (en) | A kind of perceptual term vector and sensibility classification method based on deep learning | |
CN104573669A (en) | Image object detection method | |
CN113743119B (en) | Chinese named entity recognition module, method and device and electronic equipment | |
CN112685504B (en) | Production process-oriented distributed migration chart learning method | |
CN113658109A (en) | Glass defect detection method based on field loss prediction active learning | |
CN109800795A (en) | A kind of fruit and vegetable recognition method and system | |
CN113378913A (en) | Semi-supervised node classification method based on self-supervised learning | |
CN106156805A (en) | A kind of classifier training method of sample label missing data | |
CN108596204B (en) | Improved SCDAE-based semi-supervised modulation mode classification model method | |
CN112465226B (en) | User behavior prediction method based on feature interaction and graph neural network | |
CN117516937A (en) | Rolling bearing unknown fault detection method based on multi-mode feature fusion enhancement | |
CN116028878A (en) | Diversified query active learning method and device for image classification | |
CN114898136B (en) | Small sample image classification method based on characteristic self-adaption | |
CN110796260B (en) | Neural network model optimization method based on class expansion learning | |
CN105787045B (en) | A kind of precision Enhancement Method for visual media semantic indexing | |
CN114897085A (en) | Clustering method based on closed subgraph link prediction and computer equipment | |
CN111191033A (en) | Open set classification method based on classification utility | |
CN115795037B (en) | Multi-label text classification method based on label perception | |
CN109543571B (en) | Intelligent identification and retrieval method for special-shaped processing characteristics of complex products | |
CN111797135A (en) | Structured data processing method based on entity embedding | |
CN115827871A (en) | Internet enterprise classification method, device and system | |
CN113159976B (en) | Identification method for important users of microblog network | |
CN113987170A (en) | Multi-label text classification method based on convolutional neural network |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211116 |