CN110738237A - Defect classification method and device, computer equipment and storage medium - Google Patents

Defect classification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110738237A
CN110738237A CN201910871937.9A CN201910871937A CN110738237A CN 110738237 A CN110738237 A CN 110738237A CN 201910871937 A CN201910871937 A CN 201910871937A CN 110738237 A CN110738237 A CN 110738237A
Authority
CN
China
Prior art keywords
defect
classification
defects
classifier
image
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
Application number
CN201910871937.9A
Other languages
Chinese (zh)
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.)
Shenzhen Xinshizhi Technology Co Ltd
Original Assignee
Shenzhen Xinshizhi 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 Shenzhen Xinshizhi Technology Co Ltd filed Critical Shenzhen Xinshizhi Technology Co Ltd
Priority to CN201910871937.9A priority Critical patent/CN110738237A/en
Publication of CN110738237A publication Critical patent/CN110738237A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • 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
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Pathology (AREA)
  • Immunology (AREA)
  • Biochemistry (AREA)
  • Analytical Chemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The application relates to a defect classification method which comprises the steps of obtaining defect images corresponding to defects shot by each camera, wherein conditions of the defects shot by different cameras are different, extracting features of the defects in each defect image to obtain a defect feature value corresponding to each defect image, classifying the defects by using defect classifiers corresponding to the corresponding cameras according to the defect feature values corresponding to the defect images to obtain classification results corresponding to the defect classifiers, and determining target classification of the defects according to the classification results corresponding to the defect classifiers.

Description

Defect classification method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for classifying defects.
Background
Defect detection is involved in various industries, such as detection of glass defects, detection of steel sheet defects, detection of film defects, and the like. The purpose of defect detection is to find defective products in time, and some types of defects can be repaired in the processing process, so that classification after defect detection is particularly important.
In the conventional defect classification, classification is performed by the classification rule of the single , and since the defect may not have patterns under different environments, the classification rule of the single is often not accurate enough.
Disclosure of Invention
In view of the above, there is a need to provide methods, apparatuses, systems, computer devices, and storage media for defect classification that improve the accuracy of defect classification.
, an embodiment of the present invention provides a method of defect classifications, the method comprising:
acquiring a defect image corresponding to defects shot by each camera, wherein the conditions for shooting the same defect by different cameras are different;
extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image;
classifying the defects by adopting a defect classifier corresponding to a corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier;
and determining the target classification of the defects according to the classification result corresponding to each defect classifier.
In a second aspect, an embodiment of the present invention provides kinds of defect classification apparatuses, including:
the acquisition module is used for acquiring defect images corresponding to defects shot by each camera, and the conditions for shooting the same defect by different cameras are different;
the extraction module is used for extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image;
the classification module is used for classifying the defects by adopting defect classifiers corresponding to the corresponding cameras according to the defect characteristic values corresponding to the defect images to obtain classification results corresponding to the defect classifiers;
and the determining module is used for determining the target classification of the defects according to the classification result corresponding to each defect classifier.
In a third aspect, an embodiment of the present invention provides computer apparatuses, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the following steps:
acquiring a defect image corresponding to defects shot by each camera, wherein the conditions for shooting the same defect by different cameras are different;
extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image;
classifying the defects by adopting a defect classifier corresponding to a corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier;
and determining the target classification of the defects according to the classification result corresponding to each defect classifier.
In a fourth aspect, an embodiment of the present invention provides computer-readable storage media, storing a computer program, which when executed by a processor, causes the processor to perform the following steps:
acquiring a defect image corresponding to defects shot by each camera, wherein the conditions for shooting the same defect by different cameras are different;
extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image;
classifying the defects by adopting a defect classifier corresponding to a corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier;
and determining the target classification of the defects according to the classification result corresponding to each defect classifier.
According to the defect classification method, the defect classification device, the computer equipment and the storage medium, defect images corresponding to defects and obtained by shooting with different cameras under different conditions are obtained, then defect characteristic values in each defect image are extracted, classification is carried out by adopting corresponding defect classifiers, and finally final target classification is obtained according to classification results under different conditions.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flow chart of a method of defect classification in embodiments;
FIG. 2 is a schematic diagram of embodiments in which multiple cameras capture the same defect area;
FIG. 3 is a diagram illustrating correspondence between cameras and defect classifiers in exemplary embodiments;
FIG. 4 is a flow chart illustrating a method for defect classification in embodiments;
FIG. 5 is a block diagram showing the structure of an apparatus for classifying defects in exemplary embodiments;
FIG. 6 is a block diagram of an apparatus for defect classification in another embodiments;
fig. 7 is an internal structural view of a computer device in embodiments.
Detailed Description
For purposes of making the objects, aspects and advantages of the present invention more apparent, the present invention will be described in detail below with reference to the accompanying drawings and examples.
As shown in fig. 1, there are defect classification methods, which can be applied to a terminal, and this embodiment is exemplified by being applied to a terminal.
And 102, acquiring a defect image corresponding to defects shot by each camera, wherein the conditions for shooting the same defects by different cameras are different.
The method comprises the steps that different cameras are adopted to shoot the same defect to obtain different defect images, the different cameras shoot the same defect under different conditions, wherein the conditions comprise at least of angles, illumination and the like, the different angles and the illumination shoot the same defect to obtain different defect images, the number of the cameras is at least two, the defect images refer to images containing defects, each camera shoots defect images aiming at the same defect, and the number of the cameras is correspondingly the same as the number of the defect images.
And 104, performing feature extraction on the defects in each defect image to obtain a defect feature value corresponding to each defect image.
And respectively extracting defect characteristics of the defects in each defect image, and then obtaining a defect characteristic value corresponding to each defect image. The defect feature values include: a plurality of defect features and a feature value for each defect feature. The defect characteristics can be set in a user-defined mode according to needs, for example, the defect area, the defect perimeter, the defect flatness, the defect roundness, the defect length and the defect width can be used as the defect characteristics.
And step 106, classifying the defects by using the defect classifier corresponding to the corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier.
The defect classification rules in different defect classifiers can be the same or different, as shown in fig. 3, the diagram is a schematic diagram of the corresponding relationship between the cameras and the defect classifiers in embodiments.
And step 108, determining the target classification of the defects according to the classification result corresponding to each defect classifier.
The method comprises the steps of carrying out feature extraction on a plurality of defect images which are obtained by shooting under different conditions and correspond to defects to obtain a plurality of defect feature values, classifying each defect feature value by using a defect classifier corresponding to a camera, and determining target classification of the defects according to a plurality of classification results.
For example, it is assumed that defect types are determined by judging the defect area and the defect perimeter, such as 2cm2<Area of defect<4cm2And 1cm of<Perimeter of defect<And 5cm, judging that the defect type is A, wherein the defect type can be another type although some defects meet the conditions because the states of the defects under different conditions can be different. Therefore, in order to improve the accuracy of defect type determination, it is necessary to determine the final classification only when the set conditions are satisfied under different conditions, in consideration of a plurality of aspects. For example, if the defect type is determined to be type A, not only the condition at the angle 1 but also the condition at the angle 2 are satisfied, for example, at the angle 1, type A is satisfied, 3cm2<Area of defect<4cm2And 2cm from the top<Perimeter of defect<5cm, at an angle of 2, the type A needs to be satisfied, 3.2cm2<Area of defect<4.2cm2And 2.5cm<Perimeter of defect<5.2cm, which can be determined to be type a only if the defect is found to satisfy the conditions at different angles at the same time.
Since the shape of the defect under different conditions may be different, if the classification by separately using defect classifiers is often not accurate enough, the target classification of the defect can be determined more accurately by comprehensively considering the classification results under different conditions.
According to the defect classification method, the defect images corresponding to the defects shot under different conditions are obtained, then the defect characteristic values are extracted, corresponding defect classifiers are adopted for classification, and finally the final target classification is obtained according to the classification results under different conditions.
In embodiments, the defect feature values include a plurality of defect features and a feature value of each defect feature, and the defect classifier stores defect classification rules, which are preset according to the feature values of the defect features, and the defect classification rules are different among the defect classifiers.
The extracted defect characteristic values comprise a plurality of defect characteristics and a characteristic value of each defect characteristic, wherein the defect classification rule refers to a specifically set classification expression rule, namely, a relation between the characteristic value of each defect characteristic and the classification is set, for example, three defect characteristics are assumed, the defect area, the defect perimeter and the defect flatness, for example, when the defect area meets an area condition 1, the defect perimeter meets a perimeter condition 1, and the defect flatness meets a flatness condition 1, the corresponding type is classified into a type A, the relation between the characteristic value of each defect characteristic and the classification can be set in a self-defining mode, the defect characteristic values extracted under different conditions are different, the defect classifier and the camera are corresponding, the goal is to classify the defects under the respective conditions, and the classification is facilitated by setting different defect classification rules in different defect classifiers due to the fact that the same defect presents different characteristics under different conditions.
In embodiments, the defect classifier is obtained by obtaining a training sample set including training defect feature values and corresponding defect types, the training defect feature values being obtained by feature extraction of defects in a training defect image, using the training defect feature values as input of the defect classifier, and using the defect types as expected output to train the defect classifier, so as to obtain a trained defect classifier, wherein the trained defect classification includes defect classification rules obtained by training.
The specific learning method comprises the following steps of obtaining a training sample set, wherein the training sample set comprises defect characteristic values and corresponding defect types, the defect characteristic values are extracted from training defect images, the defect characteristic values serve as input of the defect classifier, the corresponding defect types serve as expected output to train the defect classifier, and the trained defect classifier is obtained, namely the trained defect classifier comprises the defect classification rules.
In embodiments, classifying the defects by using the defect classifier corresponding to the corresponding camera according to the defect feature value corresponding to each defect image to obtain the classification result corresponding to each defect classifier, including taking the defect feature value corresponding to each defect image as the input of the defect classifier corresponding to the corresponding camera, and obtaining the classification result output by the defect classifier.
After the defect classifier is obtained through training, the defect characteristic value can be used as the input of the defect classifier, and then the corresponding classification result is predicted through the defect classifier. Namely, after the training of the defect classifier is completed, the defect classification rule is determined, and a final classification result can be obtained according to the defect classification rule and the defect characteristic value.
In embodiments, acquiring defect images corresponding to defects shot by each camera, wherein each camera corresponds to defect images, comprises acquiring area images of defect areas shot by each camera, wherein the area images comprise at least defects, and extracting defect images corresponding to defects from the area images according to coordinates of the defects in the area images.
Different cameras are used for shooting defect areas, and referring to fig. 2, since many defects exist, in order to obtain a defect image corresponding to defect from each area image, a defect image corresponding to defect needs to be extracted from each area image according to the coordinates of the defect in the area image, and the defects corresponding to coordinates are the same.
In embodiments, determining the target classification of the defect according to the classification result corresponding to each defect classifier includes obtaining the classification result of each defect classifier for the same defect, and obtaining the target classification output by the target classifier by using a plurality of classification results as the input of the target classifier, wherein the target classifier stores the target classification rules.
For example, if two defect classifiers are provided, the classification result output by the th defect classifier is A, and the classification result output by the second defect classifier is B, the target classifier has the function of obtaining a final target classification C according to A and B.
The target classification rules in the target classifier set classification rules between the combination of the respective classification results and the final target classification, for example, assume that there are three defect classifiers, each of which has three classification cases, and assume that the classifications included in defect classifier 1 have a1, B1, and C1; the classifications contained in defect classifier 2 are a2, B2, and C2; the classification included in the defect classifier 3 includes A3, B3, and C3, and sets final classifications corresponding to each combination, for example, the types corresponding to a1, a2, and A3 are set in advance as an I type, the types corresponding to a1, a2, and B3 are set in advance as an II type, the types corresponding to a1, a2, and C3 are set in advance as a III type, and the relationship between the combination of each classification result finally obtained and the final target classification is set in advance, that is, the target classification can be determined according to each obtained classification result.
In embodiments, the defect features include defect area, defect perimeter, defect flatness, defect roundness, defect concavity, defect background gray difference, defect tightness, defect rectangularity, defect length, and defect width, and the extracting the features of the defects in each defect image to obtain a defect feature value corresponding to each defect image includes extracting the feature value of each defect feature according to the feature attributes of each defect feature.
The defect features can be many, the more defect features are extracted, the more accurate description of the defect is, and the more accurate classification result is correspondingly obtained. The defect area refers to the size of the area occupied by the defect, and the defect perimeter refers to the total length of the edge of the defect. The flatness, roundness, concavity, rectangularity and tightness of the defect are all characteristics reflecting the morphological characteristics of the defect. The defect area, the defect perimeter, the defect length and the defect width are characteristics used for reflecting the size of the defect; the defect background gray difference is a characteristic used for reflecting the color characteristics of the defect. And extracting the characteristic value of the defect characteristic by aiming at the characteristic attribute of each defect characteristic. And facilitating the subsequent classification according to the defect characteristic value.
As shown in fig. 4, which is a flow diagram of a defect classification method in embodiments, a plurality of cameras acquire images under different conditions to obtain defect images having the same defect as , extract defect feature values according to the defect images, classify the defect images according to the defect feature values by using defect classifiers corresponding to the cameras, and determine a target classification according to results output by the defect classifiers.
As shown in fig. 5, there are proposed kinds of defect classification apparatuses, including:
an obtaining module 502, configured to obtain a defect image corresponding to the defect captured by each camera, where conditions for capturing the same defect by different cameras are different;
an extracting module 504, configured to perform feature extraction on a defect in each defect image to obtain a defect feature value corresponding to each defect image;
a classification module 506, configured to classify the defect by using a defect classifier corresponding to the corresponding camera according to the defect feature value corresponding to each defect image, so as to obtain a classification result corresponding to each defect classifier;
a determining module 508, configured to determine a target classification of the defect according to a classification result corresponding to each defect classifier.
In embodiments, the defect feature values include a plurality of defect features and a feature value of each defect feature, and the defect classifier stores defect classification rules, which are preset according to the feature values of the defect features, and the defect classification rules in different defect classifiers are different.
As shown in FIG. 6, in embodiments, the defect classification rule in the defect classifier is obtained by deep learning, each camera corresponds to defect classifiers, and the apparatus for classifying defects further comprises:
a training module 501, configured to obtain a training sample set, where the training sample set includes training defect feature values and corresponding defect types, and the training defect feature values are obtained by performing feature extraction on defects in a training defect image; and taking the training defect characteristic value as the input of the defect classifier, taking the defect type as the expected output to train the defect classifier, and obtaining the trained defect classifier, wherein the trained defect classification comprises the trained defect classification rule.
In embodiments, the classification module is further configured to use the defect feature value corresponding to each defect image as an input of a defect classifier corresponding to the corresponding camera, and obtain a classification result output by the defect classifier.
In embodiments, the acquiring module is further configured to acquire an area image of defect areas captured by each camera, where the area image includes at least defects, and extract a defect image corresponding to defects from each area image according to coordinates of the defects in the area image.
In embodiments, the determining module is further configured to obtain a classification result of each defect classifier on the same defect, and obtain a target classification output by the target classifier by using a plurality of classification results as input of the target classifier, where the target classifier stores target classification rules.
In embodiments, the defect features include defect area, defect perimeter, defect flatness, defect roundness, defect concavity, defect background gray scale difference, defect tightness, defect rectangularity, defect length, and defect width, and the extraction module is further configured to extract feature values of each defect feature according to a feature attribute of each defect feature.
Fig. 7 shows an internal structure diagram of a computer device, which may be a terminal, in embodiments, as shown in fig. 7, wherein the computer device includes a processor, a memory, and a network interface connected through a system bus, the memory includes a nonvolatile storage medium and an internal memory, the nonvolatile storage medium of the computer device stores an operating system and may further store a computer program, which when executed by the processor, causes the processor to implement a method of defect classification, the internal memory may also store a computer program, which when executed by the processor, causes the processor to perform a method of defect classification, the network interface is used to communicate with the outside, it will be understood by those skilled in the art that the structure shown in fig. 7 is a block diagram of only a portion of the structure related to the present application and does not constitute a limitation of the computer device to which the present application is applied, and a specific computer device may include more or fewer components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
In embodiments, the method of defect classification provided herein may be implemented in the form of computer programs that may be executed on a computer device such as that shown in FIG. 7.
computer equipment comprises a memory and a processor, wherein the memory stores computer programs, and when the computer programs are executed by the processor, the processor executes the following steps of obtaining defect images corresponding to defects obtained by shooting of each camera, wherein conditions of the defects obtained by shooting of different cameras are different, extracting characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image, classifying the defects by using a defect classifier corresponding to the corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier, and determining target classification of the defects according to the classification result corresponding to each defect classifier.
In embodiments, the defect feature values include a plurality of defect features and a feature value of each defect feature, and the defect classifier stores defect classification rules, which are preset according to the feature values of the defect features, and the defect classification rules in different defect classifiers are different.
In embodiments, the defect classification rules in the defect classifier are obtained through deep learning, each camera corresponds to defect classifiers, the defect classifiers are obtained through the following methods of obtaining a training sample set, the training sample set comprises training defect characteristic values and corresponding defect types, the training defect characteristic values are obtained through characteristic extraction of defects in training defect images, the training defect characteristic values are used as input of the defect classifiers, the defect types are used as expected output to train the defect classifiers, and the trained defect classifiers are obtained, and the trained defect classifications comprise the trained defect classification rules.
In embodiments, the classifying the defects by using the defect classifier corresponding to the corresponding camera according to the defect feature value corresponding to each defect image to obtain the classification result corresponding to each defect classifier includes taking the defect feature value corresponding to each defect image as the input of the defect classifier corresponding to the corresponding camera, and obtaining the classification result output by the defect classifier.
In embodiments, the acquiring of the defect images corresponding to defects shot by each camera, wherein each camera corresponds to defect images, includes acquiring region images of defect regions shot by each camera, wherein the region images contain at least defects, and extracting defect images corresponding to defects from the region images according to coordinates of the defects in the region images.
In embodiments, the determining the target classification of the defect according to the classification result corresponding to each defect classifier includes obtaining the classification result of each defect classifier on the defect, and obtaining the target classification output by the target classifier by using a plurality of classification results as the input of the target classifier, where the target classifier stores target classification rules.
In embodiments, the defect features include defect area, defect perimeter, defect flatness, defect roundness, defect concavity, defect background gray difference, defect tightness, defect rectangularity, defect length, and defect width, and the feature extraction of the defect in each defect image to obtain a defect feature value corresponding to each defect image includes extracting a feature value of each defect feature according to a feature attribute of each defect feature.
computer readable storage media storing computer programs, wherein when the computer programs are executed by a processor, the processor executes the steps of obtaining a defect image corresponding to defects obtained by each camera, wherein the conditions for shooting the same defects by different cameras are different, extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image, classifying the defects by a defect classifier corresponding to the corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier, and determining the target classification of the defects according to the classification result corresponding to each defect classifier.
In embodiments, the defect feature values include a plurality of defect features and a feature value of each defect feature, and the defect classifier stores defect classification rules, which are preset according to the feature values of the defect features, and the defect classification rules in different defect classifiers are different.
In embodiments, the defect classification rules in the defect classifier are obtained through deep learning, each camera corresponds to defect classifiers, the defect classifiers are obtained through the following methods of obtaining a training sample set, the training sample set comprises training defect characteristic values and corresponding defect types, the training defect characteristic values are obtained through characteristic extraction of defects in training defect images, the training defect characteristic values are used as input of the defect classifiers, the defect types are used as expected output to train the defect classifiers, and the trained defect classifiers are obtained, and the trained defect classifications comprise the trained defect classification rules.
In embodiments, the classifying the defects by using the defect classifier corresponding to the corresponding camera according to the defect feature value corresponding to each defect image to obtain the classification result corresponding to each defect classifier includes taking the defect feature value corresponding to each defect image as the input of the defect classifier corresponding to the corresponding camera, and obtaining the classification result output by the defect classifier.
In embodiments, the acquiring of the defect images corresponding to defects shot by each camera, wherein each camera corresponds to defect images, includes acquiring region images of defect regions shot by each camera, wherein the region images contain at least defects, and extracting defect images corresponding to defects from the region images according to coordinates of the defects in the region images.
In embodiments, the determining the target classification of the defect according to the classification result corresponding to each defect classifier includes obtaining the classification result of each defect classifier on the defect, and obtaining the target classification output by the target classifier by using a plurality of classification results as the input of the target classifier, where the target classifier stores target classification rules.
In embodiments, the defect features include defect area, defect perimeter, defect flatness, defect roundness, defect concavity, defect background gray difference, defect tightness, defect rectangularity, defect length, and defect width, and the feature extraction of the defect in each defect image to obtain a defect feature value corresponding to each defect image includes extracting a feature value of each defect feature according to a feature attribute of each defect feature.
Those of ordinary skill in the art will appreciate that all or a portion of the processes in the methods of the above embodiments may be implemented by a computer program that may be stored in a non-volatile computer readable storage medium that, when executed, may include the processes of the embodiments of the methods described above, wherein any reference to memory, storage, database or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, non-volatile memory may include read-only memory (ROM), programmable ROM (prom), electrically programmable ROM (eprom), electrically erasable programmable ROM (eeprom), or flash memory, volatile memory may include Random Access Memory (RAM) or external cache memory, RAM is available in a variety of forms, such as static RAM (sram), dynamic RAM (dram), synchronous dram (sdram), double data rate sdram (ddr sdram), sdram (sdram), synchronous sdram (sdram), and dynamic RAM (rdram), such as dynamic RAM (sdram), direct memory (dram), and dynamic RAM (rdram) bus (rdram).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1, A method of defect classification, the method comprising:
acquiring a defect image corresponding to defects shot by each camera, wherein the conditions for shooting the same defect by different cameras are different;
extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image;
classifying the defects by adopting a defect classifier corresponding to a corresponding camera according to the defect characteristic value corresponding to each defect image to obtain a classification result corresponding to each defect classifier;
and determining the target classification of the defects according to the classification result corresponding to each defect classifier.
2. The method of claim 1, wherein the defect feature values comprise: a plurality of defect features and a feature value for each defect feature; and storing defect classification rules in the defect classifier, wherein the defect classification rules are preset according to the characteristic value of each defect characteristic, and the defect classification rules in different defect classifiers are different.
3. The method of claim 2, wherein the defect classification rules in the defect classifier are obtained by deep learning, and each camera corresponds to defect classifiers;
the defect classifier is obtained by adopting the following method:
acquiring a training sample set, wherein the training sample set comprises training defect characteristic values and corresponding defect types, and the training defect characteristic values are obtained by performing characteristic extraction on defects in training defect images;
and taking the training defect characteristic value as the input of the defect classifier, taking the defect type as the expected output to train the defect classifier, and obtaining the trained defect classifier, wherein the trained defect classification comprises the trained defect classification rule.
4. The method according to claim 3, wherein the classifying the defects according to the defect feature value corresponding to each defect image by using the defect classifier corresponding to the corresponding camera to obtain the classification result corresponding to each defect classifier comprises:
taking the defect characteristic value corresponding to each defect image as the input of a defect classifier corresponding to the corresponding camera;
and acquiring a classification result output by the defect classifier.
5. The method of claim 1, wherein the acquiring defect images corresponding to defects captured by each camera, each camera corresponding to defect images, comprises:
acquiring an area image of an defect area shot by each camera, wherein the area image contains at least defects;
and extracting a defect image corresponding to defects from each area image according to the coordinates of the defects in the area images.
6. The method of claim 1, wherein determining the target classification of the defect according to the classification result corresponding to each defect classifier comprises:
obtaining the classification result of each defect classifier on the same defects;
and taking a plurality of classification results as input of a target classifier, and acquiring a target classification output by the target classifier, wherein a target classification rule is stored in the target classifier.
7. The method of claim 2, wherein the plurality of defect features comprises: defect area, defect perimeter, defect flatness, defect roundness, defect concavity, defect background gray difference, defect tightness, defect rectangularity, defect length and defect width;
the feature extraction of the defects in each defect image to obtain a defect feature value corresponding to each defect image includes: and extracting the characteristic value of each defect characteristic according to the characteristic attribute of each defect characteristic.
An apparatus for classifying defects of the type 8, , said apparatus comprising:
the acquisition module is used for acquiring defect images corresponding to defects shot by each camera, and the conditions for shooting the same defect by different cameras are different;
the extraction module is used for extracting the characteristics of the defects in each defect image to obtain a defect characteristic value corresponding to each defect image;
the classification module is used for classifying the defects by adopting defect classifiers corresponding to the corresponding cameras according to the defect characteristic values corresponding to the defect images to obtain classification results corresponding to the defect classifiers;
and the determining module is used for determining the target classification of the defects according to the classification result corresponding to each defect classifier.
Computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any of claims 1 to 7, .
A computer-readable storage medium , storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method according to any of claims 1 to 7 .
CN201910871937.9A 2019-09-16 2019-09-16 Defect classification method and device, computer equipment and storage medium Pending CN110738237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910871937.9A CN110738237A (en) 2019-09-16 2019-09-16 Defect classification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910871937.9A CN110738237A (en) 2019-09-16 2019-09-16 Defect classification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110738237A true CN110738237A (en) 2020-01-31

Family

ID=69268006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910871937.9A Pending CN110738237A (en) 2019-09-16 2019-09-16 Defect classification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110738237A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111337512A (en) * 2020-05-22 2020-06-26 深圳新视智科技术有限公司 Defect extraction method for AOI defect detection
CN111389741A (en) * 2020-04-16 2020-07-10 长春光华学院 Automatic sorting system for detecting surface defects of automobile brake pads based on machine vision
CN113537414A (en) * 2021-09-15 2021-10-22 深圳新视智科技术有限公司 Lithium battery defect detection method, device, equipment and storage medium
CN114119472A (en) * 2021-10-21 2022-03-01 东方晶源微电子科技(北京)有限公司 Defect classification method and device, equipment and storage medium
CN114581723A (en) * 2022-05-06 2022-06-03 成都数之联科技股份有限公司 Defect classification method, device, storage medium, equipment and computer program product
CN114723651A (en) * 2020-12-22 2022-07-08 东方晶源微电子科技(北京)有限公司 Defect detection model training method, defect detection method, device and equipment
CN114723647A (en) * 2020-12-18 2022-07-08 东方晶源微电子科技(北京)有限公司 Defect classification method and device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060002604A1 (en) * 2004-05-07 2006-01-05 Kaoru Sakai Method and apparatus for pattern inspection
CN104794491A (en) * 2015-04-28 2015-07-22 重庆大学 Fuzzy clustering steel plate surface defect detection method based on pre classification
CN106503724A (en) * 2015-09-04 2017-03-15 佳能株式会社 Grader generating means, defective/zero defect determining device and method
CN107533012A (en) * 2015-03-31 2018-01-02 日新制钢株式会社 Melt the surface defect inspection apparatus and surface defect inspection method of coated steel sheet
CN108020564A (en) * 2016-11-04 2018-05-11 山东天和绿色包装科技有限公司 Pulp goods detection method of surface flaw
CN108564104A (en) * 2018-01-09 2018-09-21 北京百度网讯科技有限公司 Product defects detection method, device, system, server and storage medium
CN108805208A (en) * 2018-06-13 2018-11-13 哈尔滨工业大学 A kind of coorinated training method based on unlabeled exemplars consistency checking
CN109829883A (en) * 2018-12-19 2019-05-31 歌尔股份有限公司 Product quality detection method and device
CN110068578A (en) * 2019-05-17 2019-07-30 苏州图迈蓝舸智能科技有限公司 A kind of visual defects detection method, device and the terminal device of PVC floor
CN110161045A (en) * 2019-05-17 2019-08-23 深圳新视智科技术有限公司 Surface defects detection system and method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060002604A1 (en) * 2004-05-07 2006-01-05 Kaoru Sakai Method and apparatus for pattern inspection
CN107533012A (en) * 2015-03-31 2018-01-02 日新制钢株式会社 Melt the surface defect inspection apparatus and surface defect inspection method of coated steel sheet
CN104794491A (en) * 2015-04-28 2015-07-22 重庆大学 Fuzzy clustering steel plate surface defect detection method based on pre classification
CN106503724A (en) * 2015-09-04 2017-03-15 佳能株式会社 Grader generating means, defective/zero defect determining device and method
CN108020564A (en) * 2016-11-04 2018-05-11 山东天和绿色包装科技有限公司 Pulp goods detection method of surface flaw
CN108564104A (en) * 2018-01-09 2018-09-21 北京百度网讯科技有限公司 Product defects detection method, device, system, server and storage medium
CN108805208A (en) * 2018-06-13 2018-11-13 哈尔滨工业大学 A kind of coorinated training method based on unlabeled exemplars consistency checking
CN109829883A (en) * 2018-12-19 2019-05-31 歌尔股份有限公司 Product quality detection method and device
CN110068578A (en) * 2019-05-17 2019-07-30 苏州图迈蓝舸智能科技有限公司 A kind of visual defects detection method, device and the terminal device of PVC floor
CN110161045A (en) * 2019-05-17 2019-08-23 深圳新视智科技术有限公司 Surface defects detection system and method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111389741A (en) * 2020-04-16 2020-07-10 长春光华学院 Automatic sorting system for detecting surface defects of automobile brake pads based on machine vision
CN111337512A (en) * 2020-05-22 2020-06-26 深圳新视智科技术有限公司 Defect extraction method for AOI defect detection
CN111337512B (en) * 2020-05-22 2020-09-08 深圳新视智科技术有限公司 Defect extraction method for AOI defect detection
CN114723647A (en) * 2020-12-18 2022-07-08 东方晶源微电子科技(北京)有限公司 Defect classification method and device, equipment and storage medium
CN114723651A (en) * 2020-12-22 2022-07-08 东方晶源微电子科技(北京)有限公司 Defect detection model training method, defect detection method, device and equipment
CN113537414A (en) * 2021-09-15 2021-10-22 深圳新视智科技术有限公司 Lithium battery defect detection method, device, equipment and storage medium
CN113537414B (en) * 2021-09-15 2022-01-11 深圳新视智科技术有限公司 Lithium battery defect detection method, device, equipment and storage medium
CN114119472A (en) * 2021-10-21 2022-03-01 东方晶源微电子科技(北京)有限公司 Defect classification method and device, equipment and storage medium
WO2023065548A1 (en) * 2021-10-21 2023-04-27 东方晶源微电子科技(北京)有限公司 Defect classification method, apparatus and device, and storage medium
CN114581723A (en) * 2022-05-06 2022-06-03 成都数之联科技股份有限公司 Defect classification method, device, storage medium, equipment and computer program product

Similar Documents

Publication Publication Date Title
CN110738237A (en) Defect classification method and device, computer equipment and storage medium
CN109508638B (en) Face emotion recognition method and device, computer equipment and storage medium
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN109447169B (en) Image processing method, training method and device of model thereof and electronic system
CN110163842B (en) Building crack detection method and device, computer equipment and storage medium
CN109034078B (en) Training method of age identification model, age identification method and related equipment
CN106355188B (en) Image detection method and device
EP3579148A1 (en) Method and apparatus for training, classification model, mobile terminal, and readable storage medium
CN111368758B (en) Face ambiguity detection method, face ambiguity detection device, computer equipment and storage medium
CN110795976A (en) Method, device and equipment for training object detection model
CN110033481A (en) Method and apparatus for carrying out image procossing
CN111242128B (en) Object detection method, device, computer readable storage medium and computer equipment
CN109300127B (en) Defect detection method, defect detection device, computer equipment and storage medium
CN111191568A (en) Method, device, equipment and medium for identifying copied image
CN113487607A (en) Defect detection method and device based on multi-view-field image
CN110728659A (en) Defect merging method and device, computer equipment and storage medium
CN110942456B (en) Tamper image detection method, device, equipment and storage medium
CN114897806A (en) Defect detection method, electronic device and computer readable storage medium
US11605210B2 (en) Method for optical character recognition in document subject to shadows, and device employing method
CN112668462B (en) Vehicle damage detection model training, vehicle damage detection method, device, equipment and medium
CN106529437B (en) Face detection method and device
CN109829510A (en) A kind of method, apparatus and equipment of product quality classification
CN111159150A (en) Data expansion method and device
CN112465807A (en) License plate image authenticity identification method, device, equipment and medium
WO2018121414A1 (en) Electronic device, and target image recognition method and apparatus

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: 20200131