Movatterモバイル変換


[0]ホーム

URL:


CN113516178A - Defect detection method and defect detection device for industrial parts - Google Patents

Defect detection method and defect detection device for industrial parts
Download PDF

Info

Publication number
CN113516178A
CN113516178ACN202110688641.0ACN202110688641ACN113516178ACN 113516178 ACN113516178 ACN 113516178ACN 202110688641 ACN202110688641 ACN 202110688641ACN 113516178 ACN113516178 ACN 113516178A
Authority
CN
China
Prior art keywords
physical quantity
defect
industrial
data
industrial parts
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
CN202110688641.0A
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.)
Changzhou Weiyizhi Technology Co Ltd
Original Assignee
Changzhou Weiyizhi 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 Changzhou Weiyizhi Technology Co LtdfiledCriticalChangzhou Weiyizhi Technology Co Ltd
Priority to CN202110688641.0ApriorityCriticalpatent/CN113516178A/en
Publication of CN113516178ApublicationCriticalpatent/CN113516178A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention provides a defect detection method and a defect detection device for industrial parts, wherein the method comprises the following steps: preprocessing detection data of industrial parts; screening physical quantity characteristics of the preprocessed detection data by using a CART algorithm; sorting the screened physical quantity characteristics from big to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic to obtain a sorting result; selecting the defect physical quantity characteristics of the industrial parts according to the sorting result; and detecting the defects of the industrial parts according to the physical quantity characteristics of the defects. When the physical quantity feature selection is carried out, the CART algorithm is firstly adopted to carry out physical quantity feature screening, and then the screened physical quantity feature is further selected by combining the defect distribution condition of the industrial parts, so that the decisive feature physical quantity feature of the defect can be obtained, and the defect accurate detection and division of the multi-project and multi-defect can be completed.

Description

Defect detection method and defect detection device for industrial parts
Technical Field
The invention relates to the technical field of industrial quality inspection, in particular to a defect detection method and a defect detection device for an industrial part.
Background
At present, most of defect detection methods based on industrial quality inspection artificially select physical quantity characteristics which have large influence on defects according to historical experience to perform data analysis, but because the industrial quality inspection data have particularity, for example, in order to reduce the missing inspection of the defects as much as possible, the data of the same defect are obtained by shooting for multiple times at multiple angles; identifying the definition of the defects through images in different camera models, different illumination humidity and other environments; the defect physical quantity description is inconsistent due to reasons such as material, color and process difference of workpieces, the number of different defect characteristic physical quantities is large, and the running time of a detection model is long and the precision is poor.
In addition, the manual selection of the physical quantity characteristics according to historical experience has many limitations, and the consideration is not comprehensive enough, for example, the length and width physical quantity of the linear defect has a large weight, and the area physical quantity is not considered; the block defects are defects with larger area physical quantity weight and do not consider length and width physical quantities; stains such as lint and fingerprints may be judged as defects, so that physical quantity characteristics cannot be selected to obtain the characteristics of the decisive physical quantity, and further, the detection model may have an under-fitting result or a better result cannot be predicted.
Disclosure of Invention
In order to solve the above technical problems, a first object of the present invention is to provide a method for detecting defects of an industrial component, when the detection method is used for selecting the physical quantity characteristics, the method firstly adopts a CART (Classification And Regression Tree) algorithm to screen the physical quantity characteristics, then further selects the screened physical quantity characteristics by combining the defect distribution condition of industrial parts, thereby obtaining the characteristics of the decisive characteristic physical quantity of the defect, reducing the number of different defect characteristic physical quantities of the industrial part, therefore, the model accuracy is improved, the running time is reduced, irrelevant or redundant features can be eliminated, the adverse factors of inconsistent description of defective physical quantities caused by illumination conditions, camera angles, workpiece differences, brightness, humidity and the like are overcome, and the defect accurate detection and division of multiple defects of multiple projects are completed.
The second purpose of the invention is to provide a defect detection device for industrial parts.
The technical scheme adopted by the invention is as follows:
the embodiment of the first aspect of the invention provides a defect detection method for an industrial part, which comprises the following steps: acquiring detection data of the industrial parts; preprocessing the detection data, wherein the preprocessing comprises: data cleaning, data distribution balancing and standardization processing; taking the Gini coefficient as a feature scoring standard, and carrying out physical quantity feature screening on the preprocessed detection data by adopting a CART algorithm; sorting the screened physical quantity characteristics from big to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic to obtain a sorting result; selecting the defect physical quantity characteristics of the industrial parts according to the sorting result, wherein the previous preset physical quantity characteristics in the sorting result are selected as the defect physical quantity characteristics of the industrial parts; and detecting the defects of the industrial parts according to the defect physical quantity characteristics.
The defect detection method for the industrial parts provided by the invention can also have the following additional technical characteristics:
according to an embodiment of the present invention, sorting the screened physical quantity features from large to small according to the defect distribution of the industrial part and the screened damping coefficient of each physical quantity feature to obtain a sorting result, including: judging whether the defect distribution of the industrial parts is uniform or not; if the defects of the industrial parts are uniformly distributed, randomly scattering a screened data set of physical quantity characteristics, sampling at equal intervals, and dividing a sampling sample into M parts, wherein M is a positive integer; if the defect distribution of the industrial parts is not uniform, randomly and hierarchically sampling the data set of the screened physical quantity characteristics according to the proportion of each region data of the industrial parts in the data set of the screened physical quantity characteristics, and averagely dividing the sampled sample into M parts; 1/4 sampling samples are used as a test set, 3/4 sampling samples are used as a training set, and the training set is input into a CART model for training; acquiring a kini coefficient of the physical quantity characteristic of the training set according to the training result of the CART model until each sampling sample is used as a test set to be trained; adding 1 to the count value of a counter, wherein the initial value of the count value of the counter is 0; judging whether the count value of the counter reaches a preset value, wherein the preset value is a positive integer greater than or equal to 2; if the count value of the counter does not reach the preset value, returning to the step of judging whether the defect distribution of the industrial parts is uniform; if the count value of the counter reaches the preset value, calculating the average value of the kini coefficients of each physical quantity characteristic of all the sampling samples; and sorting the average value of the Keyny coefficient of each physical quantity characteristic from large to small to obtain the sorting result.
According to one embodiment of the invention, judging whether the defect distribution of the industrial part is uniform comprises the following steps: calculating the defect distribution Index of the industrial part according to the following formula,
Figure 16722DEST_PATH_IMAGE001
wherein
Figure 765016DEST_PATH_IMAGE002
is the number of samples of the test data,
Figure 17006DEST_PATH_IMAGE003
is the area of the industrial part and component,
Figure 471821DEST_PATH_IMAGE004
i is the distance between each defect and the nearest defect in the sample of the detection data, and is a positive integer; if the defect distribution Index is less than 1 and the data set has a defect high incidence area, judging that the data set has the defect high incidence areaThe defect distribution of the broken industrial parts is not uniform; and if the defect distribution Index is more than or equal to 1, judging that the defect distribution of the industrial part is uniform.
According to one embodiment of the invention, the preset value is 5.
According to one embodiment of the invention, the data cleansing comprises: data consistency check, missing value processing and abnormal value processing.
An embodiment of the second aspect of the present invention provides a defect detecting apparatus for an industrial component, including: the acquisition module is used for acquiring the detection data of the industrial parts; a preprocessing module for preprocessing the detection data, the preprocessing comprising: data cleaning, data distribution balancing and standardization processing; the screening module is used for screening the physical quantity characteristics of the preprocessed detection data by using the Gini coefficient as a characteristic scoring standard and adopting a CART algorithm; the sorting module is used for sorting the screened physical quantity characteristics from big to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic so as to obtain a sorting result; the selection module is used for selecting the defect physical quantity characteristics of the industrial parts according to the sorting result, wherein the previous preset physical quantity characteristics in the sorting result are selected as the defect physical quantity characteristics of the industrial parts; and the detection module is used for detecting the defects of the industrial parts according to the physical quantity characteristics of the defects.
The defect detection device for the industrial parts provided by the invention can also have the following additional technical characteristics:
according to an embodiment of the present invention, the sorting module is specifically configured to: judging whether the defect distribution of the industrial parts is uniform or not; if the defects of the industrial parts are uniformly distributed, randomly scattering a screened data set of physical quantity characteristics, sampling at equal intervals, and dividing a sampling sample into M parts, wherein M is a positive integer; if the defect distribution of the industrial parts is not uniform, randomly and hierarchically sampling the data set of the screened physical quantity characteristics according to the proportion of each region data of the industrial parts in the data set of the screened physical quantity characteristics, and averagely dividing the sampled sample into M parts; 1/4 sampling samples are used as a test set, 3/4 sampling samples are used as a training set, and the training set is input into a CART model for training; acquiring a kini coefficient of the physical quantity characteristic of the training set according to the training result of the CART model until each sampling sample is used as a test set to be trained; adding 1 to the count value of a counter, wherein the initial value of the count value of the counter is 0; judging whether the count value of the counter reaches a preset value, wherein the preset value is a positive integer greater than or equal to 2; if the count value of the counter does not reach the preset value, returning to the step of judging whether the defect distribution of the industrial parts is uniform; if the count value of the counter reaches the preset value, calculating the average value of the kini coefficients of each physical quantity characteristic of all the sampling samples; and sorting the average value of the Keyny coefficient of each physical quantity characteristic from large to small to obtain the sorting result.
According to an embodiment of the invention, the sorting module is further configured to: calculating the defect distribution Index of the industrial part according to the following formula,
Figure 224883DEST_PATH_IMAGE005
wherein
Figure 149720DEST_PATH_IMAGE006
is the number of samples of the test data,
Figure 60694DEST_PATH_IMAGE007
is the area of the industrial part and component,
Figure 212644DEST_PATH_IMAGE008
i is the distance between each defect and the nearest defect in the sample of the detection data, and is a positive integer; if the defect distribution Index is less than 1 and the data set has a defect high-incidence area, judging the work stateThe defect distribution of the industrial parts is not uniform; and if the defect distribution Index is more than or equal to 1, judging that the defect distribution of the industrial part is uniform.
According to one embodiment of the invention, the preset value is 5.
According to one embodiment of the invention, the data cleansing comprises: data consistency check, missing value processing and abnormal value processing.
The invention has the beneficial effects that:
when physical quantity characteristics are selected, the CART algorithm is adopted to screen the physical quantity characteristics, and then the screened physical quantity characteristics are further selected by combining the defect distribution conditions of the industrial parts, so that the decisive characteristic physical quantity characteristics of the defects can be obtained, the number of different defect characteristic physical quantities of the industrial parts is reduced, the model accuracy is improved, the running time is reduced, irrelevant or redundant characteristics can be eliminated, the adverse factors of inconsistent description of the defect physical quantities caused by illumination conditions, camera angles, workpiece differences, brightness humidity and the like are overcome, and the defect accurate detection and division of multiple defects of multiple projects are completed.
Drawings
FIG. 1 is a flow diagram of a method for defect detection of an industrial component according to one embodiment of the present invention;
FIG. 2 is a flow chart of a method of defect detection of an industrial component according to another embodiment of the present invention;
FIG. 3 is a block diagram of a defect detection apparatus for industrial components according to one embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a flow chart of a method for defect detection of an industrial component according to one embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
and S1, acquiring detection data of the industrial parts.
Specifically, the detection data of the industrial part is a data set, and the data can be an image.
S2, preprocessing the detection data, wherein the preprocessing comprises: data cleaning, data distribution balancing and standardization processing.
Specifically, the data cleansing includes: data consistency check, missing value processing and abnormal value processing.
Because the variable data type distribution is unbalanced (the number of positive samples is small, the number of negative samples is large), the detection data needs to be balanced, the particularity of the detection data of industrial parts is considered (the data acquired by repeated measurement for many times of a certain defect is very similar to the data acquired by the detection data), if the number of the positive sample data is larger than 30% of the number of the negative sample data, an undersampling method is adopted for balancing, the negative sample data is randomly extracted and deleted until the number of the negative samples is the same as that of the positive samples, if the number of the positive sample data is not larger than 30% of the number of the negative sample data, an oversampling method is adopted for balancing to prevent model undersetting, and the randomly extracted positive sample data which is returned is copied until the number of the positive samples is the same as that of the negative samples.
The standardization processing is to perform central standardization processing on the data, remove unit limitation among physical quantities, and convert the detection data into dimensionless pure numerical data so as to compare and weight different physical quantities. For a physical quantity sequence
Figure 336108DEST_PATH_IMAGE009
Figure 849873DEST_PATH_IMAGE010
Figure 828019DEST_PATH_IMAGE011
、……、
Figure 997706DEST_PATH_IMAGE012
The normalization conversion is performed, and the normalization calculation formula can be as follows:
Figure 295833DEST_PATH_IMAGE013
wherein
Figure 810908DEST_PATH_IMAGE014
Figure 339717DEST_PATH_IMAGE015
Figure 889645DEST_PATH_IMAGE016
To normalize the converted physical quantity, i is a positive integer, and n is a positive integer.
Thus, the sequence of normalized physical quantities is
Figure 162101DEST_PATH_IMAGE017
Figure 157782DEST_PATH_IMAGE018
Figure 919808DEST_PATH_IMAGE019
、……、
Figure 995912DEST_PATH_IMAGE020
And S3, taking the Gini coefficient as a feature scoring standard, and carrying out physical quantity feature screening on the preprocessed detection data by adopting a CART algorithm.
Specifically, the feature selection idea of the CART algorithm in the classification decision tree is used for carrying out physical quantity feature screening on the preprocessed detection data, and the kini coefficient is used as a feature scoring standard (the smaller the kini coefficient of the physical quantity feature is, the greater the contribution degree of the feature to distinguishing samples is, and the value range of the kini coefficient is [0, 1 ]). The equation for the calculation of the kini coefficient may be as follows:
Figure 806480DEST_PATH_IMAGE021
wherein
Figure 296148DEST_PATH_IMAGE022
in order to be the coefficient of the kini,
Figure 668224DEST_PATH_IMAGE023
is the number of categories of the sample,piis the probability of the ith category, i being a positive integer;
a certain characteristic physical quantity A has a damping coefficient of
Figure 424434DEST_PATH_IMAGE024
And S4, sorting the screened physical quantity characteristics from large to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic to obtain a sorting result.
Further, as shown in fig. 2, sorting the screened physical quantity features from large to small according to the defect distribution of the industrial component and the damping coefficient of each screened physical quantity feature to obtain a sorting result, including:
and S41, judging whether the defect distribution of the industrial parts is uniform or not.
S42, if the defects of the industrial parts are distributed uniformly, scattering the screened data set of the physical quantity characteristics randomly and sampling equidistantly, and dividing the sampled sample into M parts, wherein M is a positive integer.
And S43, if the defect distribution of the industrial parts is not uniform, randomly and hierarchically sampling the data set of the screened physical quantity characteristics according to the proportion of each region data of the industrial parts in the data set of the screened physical quantity characteristics, and averagely dividing the sampled sample into M parts.
Specifically, the regions of the industrial parts can be divided in advance, if the defects are distributed uniformly, the data set is randomly scattered and then equally sampled into M parts, and the probability that each region of the optical surface is extracted is ensured to be equal by equally sampling after the data is scattered. If a defect high-occurrence area exists in a certain optical surface, the data set is divided according to the defect high-occurrence area, namely the defect distribution is uneven, and an obvious defect gathering area appears, the data in each area is randomly and hierarchically sampled according to the proportion of the data in the total data set and is averagely divided into M parts, and the sampling mode can avoid the condition that the proportion of samples in single parts is unbalanced due to defect gathering. The sampling sample is divided into M parts evenly, which means that after random layered sampling or equidistant sampling, the sampling is divided into M parts according to proportion, for example: the detection data are 80 pieces, and the data proportion among all the areas is 1: 2: 5, respectively randomly extracting the hierarchical samples by 10: 20: 50 (the order of the extracted data is random), and if the extracted data is divided into 5 parts on average, the ratio of each part is 2: 4: and 10, ensuring that the proportion of the data among the areas in each sample is the same as the proportion of the data among the total areas.
S44, 1/4 sample samples are used as a test set, 3/4 sample samples are used as a training set, and the training set is input into the CART model for training.
And S45, acquiring the kini coefficient of the physical quantity characteristic of the training set according to the training result of the CART model until each sampling sample is used as a test set to finish training.
In the present invention, the sampling method of steps S41-S45 is named as Gathert cycle sampling algorithm.
S46, adding 1 to the count value of the counter, wherein the initial value of the count value of the counter is 0;
and S47, judging whether the count value of the counter reaches a preset value, if so, executing the step S48, and if not, returning to the step S41. The preset value is a positive integer greater than or equal to 2, for example, 5.
S48, an average value of the kini coefficients of each physical quantity characteristic of all the sample samples is calculated.
Specifically, the average value here refers to an average value of the kini coefficients of the physical quantity characteristics of each sample obtained after a preset value (for example, 5) cycles, and then the average value of the kini coefficients of each physical quantity characteristic of all the sample samples is calculated from the average value of the kini coefficients of the physical quantity characteristics of each sample.
And S49, sorting the average value of the Keyny coefficients of each physical quantity characteristic from large to small to obtain a sorting result.
For example, a sampling sample is divided into 4 parts which are respectively named as A, B, C, D, A is selected as a test set, and the rest is a training set to carry out CART model training to obtain a Gini coefficient A1 of the physical quantity characteristic (the Gini coefficient A1 comprises the Gini coefficient of the physical characteristic 1, the Gini coefficient of the physical characteristic 2 and the Gini coefficient … … of the physical characteristic 3 in A); b is selected as a test set, and the rest is a training set to carry out CART model training to obtain a Gini coefficient B1 of the physical quantity characteristic (the Gini coefficient B1 comprises the Gini coefficient of the physical characteristic 1, the Gini coefficient of the physical characteristic 2 and the Gini coefficient of the physical characteristic 3 in B … …); b is put back, C is selected as a test set, and the rest is a training set to carry out CART model training to obtain a Gini coefficient C1 of the physical quantity characteristic (the Gini coefficient C1 comprises the Gini coefficient of the physical characteristic 1, the Gini coefficient of the physical characteristic 2 and the Gini coefficient of the physical characteristic 3 in C … …); and so on until A-D are all selected as the test set to obtain the Keyny coefficients A1-D1 of the physical quantity characteristics. And repeating the sampling method for 5 times to obtain the Gini coefficients A1-A5, B1-B5, C1-C5 and D1-D5 of the physical quantity characteristics after the first cycle sampling is completed.
Then, the average of the damping coefficient of the physical quantity characteristic of each portion, that is, the average of A1-A5 was calculated
Figure 682369DEST_PATH_IMAGE025
Average values of B1-B5
Figure 709100DEST_PATH_IMAGE026
Average value of C1-C5
Figure 812929DEST_PATH_IMAGE027
Average values of D1-D5
Figure 970284DEST_PATH_IMAGE028
And then calculate
Figure 716129DEST_PATH_IMAGE029
Figure 269470DEST_PATH_IMAGE030
Figure 413707DEST_PATH_IMAGE031
And
Figure 645974DEST_PATH_IMAGE028
average value of (2)
Figure 607895DEST_PATH_IMAGE032
Figure 717540DEST_PATH_IMAGE032
The method comprises the following steps: the average value of the kini coefficients of thephysical characteristics 1, the average value of the kini coefficients of thephysical characteristics 2, and the average value … … of the kini coefficients of the physical characteristics 3), whereby the average value of the kini coefficients of each physical quantity characteristic of all the sample samples can be obtained
Figure 992533DEST_PATH_IMAGE033
. Then to
Figure 713362DEST_PATH_IMAGE033
The average values of the kini coefficients of all the physical quantity characteristics in the sequence table are sorted from large to small, and then a sorting result can be obtained.
And S5, selecting the defect physical quantity characteristics of the industrial parts according to the sorting result, wherein the previous preset physical quantity characteristics in the sorting result are selected as the defect physical quantity characteristics of the industrial parts.
And S6, detecting the defects of the industrial parts according to the defect physical quantity characteristics.
Specifically, after detection data of industrial parts are obtained, the detection data are preprocessed, and then physical quantity feature screening is performed on the preprocessed detection data by using a CART algorithm with a Gini coefficient as a feature scoring standard. And then repeating the Gathers cycle sampling algorithm for 5 times to sort the screened physical quantity characteristics from large to small, and selecting the first K characteristics with the largest contribution degree as important physical quantities (defect physical quantity characteristics) for judging certain defects of the industrial parts. And finally, detecting the defects according to the selected physical quantity characteristics of the defects and actual requirements.
When the physical quantity characteristics are selected, the CART algorithm is adopted to screen the physical quantity characteristics, and then the screened physical quantity characteristics are further selected by combining the defect distribution conditions of the industrial parts, so that the decisive characteristic physical quantity characteristics of the defects can be obtained, the number of different defect characteristic physical quantities of the industrial parts is reduced, the model accuracy is improved, the running time is reduced, irrelevant or redundant characteristics can be eliminated, the adverse factors of inconsistent description of the defect physical quantities caused by illumination conditions, camera angles, workpiece differences, brightness humidity and the like are overcome, and the defect accurate detection and division of multiple defects of multiple projects are completed.
According to an embodiment of the present invention, determining whether the defect distribution of the industrial part is uniform may include: the defect distribution Index of the industrial parts is calculated according to the following formula,
Figure 161530DEST_PATH_IMAGE034
wherein,
Figure 131541DEST_PATH_IMAGE035
in order to detect the number of samples of data,
Figure 13653DEST_PATH_IMAGE036
is the area of the industrial part and component,
Figure 892616DEST_PATH_IMAGE037
to detect the distance between each defect and its nearest defect in a sample of data, i is a positive integer.
Then judging the defect distribution Index, and if the defect distribution Index is less than 1 and the data set has a defect high occurrence area, judging that the defect distribution of the industrial parts is not uniform; and if the defect distribution Index is more than or equal to 1, judging that the defect distribution of the industrial part is uniform.
In summary, according to the defect detection method for the industrial component of the embodiment of the invention, when the physical quantity feature is selected, the CART algorithm is firstly adopted to screen the physical quantity feature, and then the screened physical quantity feature is further selected according to the defect distribution condition of the industrial component, so that the characteristic physical quantity feature of the defect can be obtained, the number of different defect characteristic physical quantities of the industrial component is reduced, the model accuracy is improved, the running time is reduced, irrelevant or redundant features can be eliminated, the adverse factors of inconsistent description of the defect physical quantity caused by illumination conditions, camera angles, workpiece differences, brightness and humidity are overcome, and the defect accurate detection and division of multiple items and multiple defects are completed.
Corresponding to the above-mentioned defect detection method for industrial parts, the present invention further provides a defect detection apparatus for industrial parts, and since the apparatus embodiment of the present invention corresponds to the above-mentioned method embodiment, details that are not disclosed in the apparatus embodiment can refer to the above-mentioned method embodiment, and are not described again in the present invention.
Fig. 3 is a block schematic diagram of a defect detection apparatus for industrial parts according to an embodiment of the present invention, as shown in fig. 3, the apparatus comprising: anacquisition module 1, apretreatment module 2, ascreening module 3, a sorting module 4, aselection module 5 and adetection module 6, wherein,
theacquisition module 1 is used for acquiring detection data of industrial parts; thepreprocessing module 2 is used for preprocessing the detection data, and the preprocessing comprises: data cleaning, data distribution balancing and standardization processing; thescreening module 3 is used for screening physical quantity characteristics of the preprocessed detection data by using a Chart algorithm with the Gini coefficient as a characteristic scoring standard; the sorting module 4 is used for sorting the screened physical quantity characteristics from large to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic so as to obtain a sorting result; theselection module 5 is used for selecting the defect physical quantity characteristics of the industrial parts according to the sorting result, wherein the front preset physical quantity characteristics in the sorting result are selected as the defect physical quantity characteristics of the industrial parts; thedetection module 6 is used for detecting the defects of the industrial parts according to the physical quantity characteristics of the defects.
According to an embodiment of the present invention, the sorting module 4 is specifically configured to: judging whether the defect distribution of the industrial parts is uniform or not; if the defects of the industrial parts are uniformly distributed, scattering the screened data set of the physical quantity characteristics randomly, sampling at equal intervals, and dividing the sampled sample into M parts, wherein M is a positive integer; if the defects of the industrial parts are not uniformly distributed, randomly sampling the data set of the screened physical quantity characteristics layer by layer according to the proportion of each region data of the industrial parts in the data set of the screened physical quantity characteristics, and averagely dividing the sampled sample into M parts; 1/4 sampling samples are used as a test set, 3/4 sampling samples are used as a training set, and the training set is input into a CART model for training; acquiring a kini coefficient of the physical quantity characteristic of a training set according to a training result of the CART model until each sampling sample is used as a test set to finish training; adding 1 to the count value of a counter, wherein the initial value of the count value of the counter is 0; judging whether the count value of the counter reaches a preset value, wherein the preset value is a positive integer greater than or equal to 2; if the count value of the counter does not reach the preset value, returning to the step of judging whether the defect distribution of the industrial parts is uniform; if the count value of the counter reaches the preset value, calculating the average value of the kini coefficients of each physical quantity characteristic of all the sampling samples; and sorting the average value of the kini coefficients of each physical quantity characteristic from large to small to obtain a sorting result.
According to an embodiment of the invention, the sorting module 4 is further configured to: the defect distribution Index of the industrial parts is calculated according to the following formula,
Figure 810719DEST_PATH_IMAGE038
wherein,
Figure 957273DEST_PATH_IMAGE039
in order to detect the number of samples of data,
Figure 829195DEST_PATH_IMAGE040
is the area of the industrial part and component,
Figure 54509DEST_PATH_IMAGE041
i is a positive integer for detecting the distance between each defect and its nearest defect in the sample of data;
if the defect distribution Index is less than 1 and the data set has a defect high-incidence area, judging that the defect distribution of the industrial parts is not uniform; and if the defect distribution Index is more than or equal to 1, judging that the defect distribution of the industrial part is uniform.
According to one embodiment of the invention, the preset value is 5.
According to one embodiment of the invention, data cleansing comprises: data consistency check, missing value processing and abnormal value processing.
In summary, according to the defect detection apparatus for industrial parts according to the embodiments of the present invention, when selecting physical quantity features, the CART algorithm is first used to perform physical quantity feature screening, and then the screened physical quantity features are further selected according to the defect distribution condition of the industrial parts, so that the deterministic feature physical quantity features of the defects can be obtained, the number of different defect feature physical quantities of the industrial parts is reduced, the model accuracy is improved, the running time is reduced, irrelevant or redundant features can be eliminated, adverse factors of inconsistent description of the defect physical quantities due to illumination conditions, camera angles, workpiece differences, brightness and humidity are overcome, and the defect accurate detection and division of multiple items and multiple defects are completed.
In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The meaning of "plurality" is two or more unless specifically limited otherwise.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1. A defect detection method for industrial parts is characterized by comprising the following steps:
acquiring detection data of the industrial parts;
preprocessing the detection data, wherein the preprocessing comprises: data cleaning, data distribution balancing and standardization processing;
taking the Gini coefficient as a feature scoring standard, and carrying out physical quantity feature screening on the preprocessed detection data by adopting a CART algorithm;
sorting the screened physical quantity characteristics from big to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic to obtain a sorting result;
selecting the defect physical quantity characteristics of the industrial parts according to the sorting result, wherein the previous preset physical quantity characteristics in the sorting result are selected as the defect physical quantity characteristics of the industrial parts;
and detecting the defects of the industrial parts according to the defect physical quantity characteristics.
2. The method for detecting the defects of the industrial part according to claim 1, wherein the step of sorting the screened physical quantity features from large to small according to the defect distribution condition of the industrial part and the Keyny coefficient of each screened physical quantity feature to obtain a sorting result comprises the steps of:
judging whether the defect distribution of the industrial parts is uniform or not;
if the defects of the industrial parts are uniformly distributed, randomly scattering a screened data set of physical quantity characteristics, sampling at equal intervals, and dividing a sampling sample into M parts, wherein M is a positive integer;
if the defect distribution of the industrial parts is not uniform, randomly and hierarchically sampling the data set of the screened physical quantity characteristics according to the proportion of each region data of the industrial parts in the data set of the screened physical quantity characteristics, and averagely dividing the sampled sample into M parts;
1/4 sampling samples are used as a test set, 3/4 sampling samples are used as a training set, and the training set is input into a CART model for training;
acquiring a kini coefficient of the physical quantity characteristic of the training set according to the training result of the CART model until each sampling sample is used as a test set to be trained;
adding 1 to the count value of a counter, wherein the initial value of the count value of the counter is 0;
judging whether the count value of the counter reaches a preset value, wherein the preset value is a positive integer greater than or equal to 2;
if the count value of the counter does not reach the preset value, returning to the step of judging whether the defect distribution of the industrial parts is uniform;
if the count value of the counter reaches the preset value, calculating the average value of the kini coefficients of each physical quantity characteristic of all the sampling samples;
and sorting the average value of the Keyny coefficient of each physical quantity characteristic from large to small to obtain the sorting result.
3. The method of claim 2, wherein determining whether the industrial component has a uniform defect distribution comprises:
calculating the defect distribution Index of the industrial part according to the following formula,
Figure 603540DEST_PATH_IMAGE001
wherein,
Figure 636962DEST_PATH_IMAGE002
is the number of samples of the test data,
Figure 691024DEST_PATH_IMAGE003
is the area of the industrial part and component,
Figure 866789DEST_PATH_IMAGE004
i is the distance between each defect and the nearest defect in the sample of the detection data, and is a positive integer;
if the defect distribution Index is less than 1 and the data set has a defect high-incidence area, judging that the defect distribution of the industrial parts is not uniform;
and if the defect distribution Index is more than or equal to 1, judging that the defect distribution of the industrial part is uniform.
4. The method of claim 2, wherein the predetermined value is 5.
5. The method of claim 1, wherein the data cleaning comprises: data consistency check, missing value processing and abnormal value processing.
6. A defect detecting apparatus for industrial parts, comprising:
the acquisition module is used for acquiring the detection data of the industrial parts;
a preprocessing module for preprocessing the detection data, the preprocessing comprising: data cleaning, data distribution balancing and standardization processing;
the screening module is used for screening the physical quantity characteristics of the preprocessed detection data by using the Gini coefficient as a characteristic scoring standard and adopting a CART algorithm;
the sorting module is used for sorting the screened physical quantity characteristics from big to small according to the defect distribution condition of the industrial parts and the screened damping coefficient of each physical quantity characteristic so as to obtain a sorting result;
the selection module is used for selecting the defect physical quantity characteristics of the industrial parts according to the sorting result, wherein the previous preset physical quantity characteristics in the sorting result are selected as the defect physical quantity characteristics of the industrial parts;
and the detection module is used for detecting the defects of the industrial parts according to the physical quantity characteristics of the defects.
7. The apparatus of claim 6, wherein the sorting module is specifically configured to:
judging whether the defect distribution of the industrial parts is uniform or not;
if the defects of the industrial parts are uniformly distributed, randomly scattering a screened data set of physical quantity characteristics, sampling at equal intervals, and dividing a sampling sample into M parts, wherein M is a positive integer;
if the defect distribution of the industrial parts is not uniform, randomly and hierarchically sampling the data set of the screened physical quantity characteristics according to the proportion of each region data of the industrial parts in the data set of the screened physical quantity characteristics, and averagely dividing the sampled sample into M parts;
1/4 sampling samples are used as a test set, 3/4 sampling samples are used as a training set, and the training set is input into a CART model for training;
acquiring a kini coefficient of the physical quantity characteristic of the training set according to the training result of the CART model until each sampling sample is used as a test set to be trained;
adding 1 to the count value of a counter, wherein the initial value of the count value of the counter is 0;
judging whether the count value of the counter reaches a preset value, wherein the preset value is a positive integer greater than or equal to 2;
if the count value of the counter does not reach the preset value, returning to the step of judging whether the defect distribution of the industrial parts is uniform;
if the count value of the counter reaches the preset value, calculating the average value of the kini coefficients of each physical quantity characteristic of all the sampling samples;
and sorting the average value of the Keyny coefficient of each physical quantity characteristic from large to small to obtain the sorting result.
8. The industrial component defect detection apparatus of claim 7, wherein the sequencing module is further configured to:
calculating the defect distribution Index of the industrial part according to the following formula,
Figure 278048DEST_PATH_IMAGE005
wherein,
Figure 171835DEST_PATH_IMAGE006
is the number of samples of the test data,
Figure 315241DEST_PATH_IMAGE007
is the area of the industrial part and component,
Figure 350936DEST_PATH_IMAGE008
i is the distance between each defect and the nearest defect in the sample of the detection data, and is a positive integer;
if the defect distribution Index is less than 1 and the data set has a defect high-incidence area, judging that the defect distribution of the industrial parts is not uniform;
and if the defect distribution Index is more than or equal to 1, judging that the defect distribution of the industrial part is uniform.
9. The apparatus of claim 7, wherein the predetermined value is 5.
10. The industrial component defect detection apparatus of claim 6, wherein the data cleaning comprises: data consistency check, missing value processing and abnormal value processing.
CN202110688641.0A2021-06-222021-06-22Defect detection method and defect detection device for industrial partsPendingCN113516178A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110688641.0ACN113516178A (en)2021-06-222021-06-22Defect detection method and defect detection device for industrial parts

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110688641.0ACN113516178A (en)2021-06-222021-06-22Defect detection method and defect detection device for industrial parts

Publications (1)

Publication NumberPublication Date
CN113516178Atrue CN113516178A (en)2021-10-19

Family

ID=78065775

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110688641.0APendingCN113516178A (en)2021-06-222021-06-22Defect detection method and defect detection device for industrial parts

Country Status (1)

CountryLink
CN (1)CN113516178A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119723219A (en)*2025-02-272025-03-28北京弥天科技有限公司 Visual identification method, device, equipment and storage medium based on steel surface defect classification

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103984951A (en)*2014-04-252014-08-13西南科技大学Automatic defect recognition method and system for magnetic particle testing
CN107292186A (en)*2016-03-312017-10-24阿里巴巴集团控股有限公司A kind of model training method and device based on random forest
CN110264116A (en)*2019-07-312019-09-20三峡大学A kind of Electrical Power System Dynamic safety evaluation method explored based on relationship with regression tree
CN110287552A (en)*2019-06-102019-09-27合肥工业大学 Method and system for fault diagnosis of motor bearing based on improved random forest algorithm
CN111260201A (en)*2020-01-132020-06-09北京科技大学Variable importance analysis method based on hierarchical random forest
CN113178264A (en)*2021-05-042021-07-27温州医科大学附属第一医院Deep muscle layer infiltration data prediction method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103984951A (en)*2014-04-252014-08-13西南科技大学Automatic defect recognition method and system for magnetic particle testing
CN107292186A (en)*2016-03-312017-10-24阿里巴巴集团控股有限公司A kind of model training method and device based on random forest
CN110287552A (en)*2019-06-102019-09-27合肥工业大学 Method and system for fault diagnosis of motor bearing based on improved random forest algorithm
CN110264116A (en)*2019-07-312019-09-20三峡大学A kind of Electrical Power System Dynamic safety evaluation method explored based on relationship with regression tree
CN111260201A (en)*2020-01-132020-06-09北京科技大学Variable importance analysis method based on hierarchical random forest
CN113178264A (en)*2021-05-042021-07-27温州医科大学附属第一医院Deep muscle layer infiltration data prediction method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦昆: "《GIS空间分布理论与方法》", 31 March 2010*

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119723219A (en)*2025-02-272025-03-28北京弥天科技有限公司 Visual identification method, device, equipment and storage medium based on steel surface defect classification

Similar Documents

PublicationPublication DateTitle
TWI576708B (en)Classifier readiness and maintenance in automatic defect classification
CN112540912B (en) A software quality evaluation method and system
CN117217476B (en)Automatic configuration method for production line test resources
CN116881530B (en)Device surface defect detection system based on deep learning
CN111860698A (en)Method and device for determining stability of learning model
CN102842131B (en)Method and equipment for monitoring defects of target object
CN111986195A (en)Appearance defect detection method and system
CN112202630A (en)Network quality abnormity detection method and device based on unsupervised model
CN117630800A (en)Fault diagnosis method and system for automatic calibrating device of electric energy meter
CN116067671B (en) A method, system and medium for testing vehicle paint quality
CN113516178A (en)Defect detection method and defect detection device for industrial parts
CN120142605A (en) Tinned copper wire defect detection method, system and device
CN117636046A (en)Steel surface defect detection method, device, detection platform and storage medium
Buschmann et al.Data-driven decision support for process quality improvements
JP6872829B1 (en) Foreign matter generation cause estimation system and foreign matter generation cause estimation method
CN119884666A (en)High-low voltage distribution box fault diagnosis method and system based on Internet of things
Filz et al.Data-driven analysis of product property propagation to support process-integrated quality management in manufacturing systems
CN114881998A (en)Workpiece surface defect detection method and system based on deep learning
CN117523324B (en) Image processing method, image sample classification method, device and storage medium
CN113420772A (en)Defect detection method and device based on multi-classifier and SVDD (singular value decomposition and direct decomposition) cooperative algorithm
Yoon et al.Improved modified pressure imaging and software for egg micro-crack detection and egg quality grading
JPH07318508A (en)Apparatus and method for deciding image
CN111258894B (en)Method and device for evaluating software risk, storage medium and electronic equipment
CN114627058A (en)Vision and quality fused cut tobacco component detection method
CN112070710A (en)Method for detecting industrial product defect image

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20211019

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp