Efficient parameter adjusting method for industrial defect detection

By using a defect detection parameter tuning model and a CNN visual detection model and parameter correlation graph to generate product parameter formulas, the problem of long parameter tuning time in the die-cutting industry is solved, and the detection efficiency is improved.

CN121258905APending Publication Date: 2026-01-02BEIJING ZODNGOC AUTOMATIC TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511341570.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing industrial vision inspection technologies in the die-cutting industry require frequent adjustments to image and detection algorithm parameters, resulting in long parameter tuning times and impacting production efficiency.

Method used

A defect detection parameter tuning model is adopted. By using a trained CNN visual detection model and parameter correlation map, product parameter formulas are generated to assist in adjusting image and detection algorithm parameters and shorten the parameter tuning time.

Benefits of technology

It improves the implementation efficiency of visual inspection solutions, reduces parameter tuning time, and enhances inspection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121258905A_ABST
    Figure CN121258905A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial defect detection efficient parameter adjustment method which comprises the following steps: acquiring a to-be-detected product image of a to-be-detected material, inputting the to-be-detected product image into a defect detection parameter adjustment model, and outputting a to-be-detected product parameter formula; the training steps of the defect detection parameter adjustment model are as follows: obtaining a product image and a product parameter formula of a target material; obtaining image features based on the product image; constructing a parameter association map according to a product parameter formula, and encoding a parameter part in the parameter association map to obtain parameter characteristics; in a shared high-dimensional space, encoding the image features and the parameter features, and outputting a first encoding sequence and a second encoding sequence; processing the product image based on the parameter association map to generate a feature map, encoding the feature map in the shared high-dimensional space, and outputting a third encoding sequence; and carrying out remarking, high-level integration and projection processing on the three coding sequences to obtain new image features and new parameter features, and then decoding to obtain new method parameters and new numerical value parameters. According to the method, through auxiliary parameter adjustment, the detection efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial defect detection, and more particularly to an efficient parameter adjustment method for industrial defect detection. BACKGROUND

[0002] In the die-cutting industry, there are various types of products and frequent updates and iterations, which brings great challenges to surface defect detection of products. Specifically, different types, different specifications, and even different batches of die-cutting products may have subtle but critical differences in surface quality, which directly affect the final use performance of the products. Therefore, accurate and efficient surface defect detection of die-cuting products is a key link to ensure product quality and improve production efficiency.

[0003] Currently, industrial visual detection technology has become the main means of surface defect detection in the die-cutting industry. However, in the actual application process, there is an urgent problem to be solved: for defect detection of different products, image acquisition parameters (such as exposure time, light source intensity, camera resolution, etc.) and detection algorithm parameters (such as threshold setting, feature extraction method, etc.) need to be frequently adjusted to form a "parameter formula" suitable for the current product. This process not only consumes time and effort, but also highly depends on the experience and skill level of professional technicians. In some extreme cases, the parameter adjustment time may even exceed the actual detection time, which seriously restricts the landing efficiency of the visual detection solution and the overall operation efficiency of the production line.

[0004] Existing technical solutions mainly focus on the automatic adjustment of certain specific parameters in the detection algorithm, such as the invention patent application with the application number 202210622096.X and the name of an automatic parameter adjustment surface defect detection system and method. These solutions usually trigger the parameter adjustment mechanism after meeting certain conditions, trying to improve detection performance through local optimization. However, these methods have obvious limitations, i.e., they mainly adjust certain specific parameters in the detection algorithm after meeting certain conditions, without accelerating the visual detection landing time from the perspective of the entire solution.

[0005] Therefore, how to effectively shorten the parameter adjustment time and improve the detection efficiency from the perspective of the entire visual detection solution is a problem that needs to be solved by those skilled in the art. SUMMARY

[0006] In view of the above problems, the present application provides an efficient parameter adjustment method for industrial defect detection to at least solve some of the technical problems mentioned in the background.

[0007] To achieve the above purpose, the present application adopts the following technical solutions:

[0008] The application provides an efficient parameter adjustment method for industrial defect detection, comprising the following steps:

[0009] An image of a product to be detected of a material to be detected is acquired and input into a trained defect detection parameter adjustment model, and a product parameter formula corresponding to the material to be detected is output;

[0010] The defect detection parameter adjustment model is trained according to the following steps:

[0011] S1, acquiring an image of a product of a target material and a product parameter formula;

[0012] S2, inputting the image of the product into a trained CNN visual detection model, and outputting image features corresponding to the image of the product through forward propagation;

[0013] S3, constructing a parameter correlation graph according to the product parameter formula, and converting part of the parameters in the parameter correlation graph into vectors for feature coding to obtain parameter features;

[0014] S4, encoding the serialized image features and parameter features in a first shared high-dimensional space, respectively, and outputting corresponding first and second encoding sequences;

[0015] S5, processing the image of the product based on the parameter correlation graph, generating a feature map, and encoding the serialized feature map in a second shared high-dimensional space, and outputting a third encoding sequence;

[0016] S6, re-labeling, high-level integration and projection processing the first, second and third encoding sequences to obtain new image features and new parameter features;

[0017] S7, decoding the new image features and new parameter features into new method parameters and new numerical parameters.

[0018] Further, it further comprises:

[0019] Before detection, a hardware environment is built for the material to be detected, comprising fixing the visual distance of an industrial camera and the material to be detected, adjusting the definition, configuring a light source, adjusting the position of the light source, and configuring a material conveying belt.

[0020] Further, the S1 specifically comprises:

[0021] The product image corresponding to the target material is acquired by calling an industrial camera;

[0022] The appearance defects and defect parameters of the target material are detected according to a preset algorithm tool;

[0023] The category of the target material is determined according to the defect parameters; the category is a good product or a defective product.

[0024] According to the category of the target material, a corresponding product parameter formula is generated.

[0025] Further, the product parameter formula includes: a good product template of the target material, coordinate parameters of a segmented detection area, a pre-processing algorithm in each detection area, a detection algorithm in each detection area, and related parameters of the pre-processing algorithm and the detection algorithm.

[0026] Further, in the S2, it further includes: setting the background gradient to 0 according to the image feature.

[0027] Further, the S4 specifically includes:

[0028] (1) After the image feature is serialized in combination with the product image, a first encoding sequence is encoded in a first shared high-dimensional space and output; represented as:

[0029] [(F i ,A i ),E 1 i ]=v i [(F i-1 ,A i-1 ),E 1 i-1 ]i=1,2,3...,x

[0030] Wherein, [(F i ,A i ),E 1 i ] represents the first encoding sequence; F i represents the image feature corresponding to the i-th product image; F i-1 represents the image feature corresponding to the i-1-th product image; A i represents the i-th product image; A i-1 represents the i-1-th product image; E 1 i represents the position information after the serialization of F i and A i ; v i represents the information extracted from F i-1 , A i-1 and E 1 i-1

[0031] (2) After the parameter feature is serialized, a second encoding sequence is encoded in a first shared high-dimensional space and output; represented as:

[0032] [P i ,E​2 i ] = W i [P i-1 ,E 2 i-1 ]i = 1, 2, 3..., x

[0033] wherein, [P i ,E 2 i ] represents the second encoding sequence; P i represents the i-th parameter feature; P i-1 represents the i-1-th parameter feature; E 2 i represents the serialized position information of P i ; E 2 i-1 represents the serialized position information of P i-1 ; W i represents the information extracted from P i-1 and E 2 . i-1

[0034] Further, the S5 specifically comprises:

[0035] The parameter part in the parameter association graph comprises a method parameter and a numerical parameter; the relationship between the method parameter and the numerical parameter is represented as:

[0036] C k = Y k (c k ,s k )

[0037] wherein, C k represents an effect drawing obtained by the product image through the method parameter and the numerical parameter; Y k represents the k-th method parameter; c k represents the k-th numerical parameter; s k represents a characteristic drawing of the product image after the parameter association graph changes;

[0038] After the characteristic drawing is serialized, it is encoded in the second shared high-dimensional space and a third encoding sequence is output; represented as:

[0039] [s k i ,E 3 i ] = u i [s k i-1 ,E 3 i-1 ]i = 1, 2, 3..., x

[0040] wherein, [s k i ,E 3 i ] represents the third encoding sequence; s k i represents the feature map corresponding to the i-th product image; s k i-1 represents the feature map corresponding to the i-1-th product image; E 3 i represents the sequence of s k i the serialized position information; E 3 i-1 represents the sequence of s k i-1 the serialized position information; u i represents the sequence of s k i-1 and E 3 i-1 the extracted information.

[0041] Further, the S6 specifically comprises:

[0042] (1) by a mapping function, re-labeling the first encoding sequence, the second encoding sequence and the third encoding sequence to obtain the corresponding first feature representation, the second feature representation and the third feature representation; denoted as:

[0043] R v i= G v i (R1)

[0044] R w i= G w i (R1)

[0045] R u i= G u i (R2)

[0046] wherein, R v i represents the first feature representation output by the i-th layer; R w i represents the second feature representation output by the i-th layer; R u i represents the third feature representation output by the i-th layer; G v i represents the mapping function corresponding to the first encoding sequence; G v i(R1) represents re-labeling the first encoding sequence in the first shared high-dimensional space R1; G w i represents the mapping function corresponding to the second encoding sequence; G w i (R1) represents re-labeling the second encoding sequence in the first shared high-dimensional space R1; G u i represents the mapping function corresponding to the third encoding sequence; G u i (R2) represents re-labeling the third encoding sequence in the second shared high-dimensional space R2;

[0047] (2) image encoding is performed on the first feature representation and the third feature representation in a high layer by the first new label, and an image encoding sequence is output; represented as:

[0048] [n i ,(R v i ,R u i ),E 4 i ]=z i [n i-1 ,(R v i-1 ,R u i-1 ),E 4 i-1 ]i=t,2,3...,x

[0049] wherein [n i ,(R v i ,R u i ),E 4 i ] represents the image encoding sequence; n i represents the label of the i-th image feature; n i-1 represents the label of the i-1-th image feature; R v i-1 represents the first feature representation output by the i-1-th layer; R u i-1 represents the third feature representation output by the i-1-th layer; E 4 i represents re-labeling R v i and R u i the serialized position information; E 4 i-1 represents re-labeling R vi-1 and R u i-1 serialized position information; z i information extracted from n i-1 , (R v i-1 , R u i-1 ) and E 4 i-1 t represents the encoding output starting from the t layer;

[0050] (3) The third feature is represented by a second new mark for high layer integration parameter coding, and the parameter coding sequence is output, represented as:

[0051] [m i , R w i , E 5 i ] = h i [m i-1 , R w i-1 , E 5 i-1 ]i = t, 2, 3,..., x

[0052] wherein [m i , R w i , E 5 i ] represents the parameter coding sequence; m i represents the label of the i-th parameter feature; m i-1 represents the label of the i-1-th parameter feature; R w i-1 represents the second feature representation output by the i-1-th layer; E 5 i represents the information extracted from m i and R w i serialized position information; E 5 i-1 represents the information extracted from m i-1 and R w i-1 serialized position information; h i represents the information extracted from m i-1 , R w i-1 and E 5 i-1 ;

[0053] (4) The image coding sequence and the parameter coding sequence output by the last layer are projected to obtain corresponding new image features and new parameter features.

[0054] Further comprising:

[0055] S8, the image features, the first feature representation and the third feature representation are fused to obtain a fused image feature; and a loss function of the defect detection parameter tuning model is constructed according to the fused image feature.

[0056] Further, the loss function of the defect detection parameter tuning model is composed of cross-entropy loss and mean square error loss; and is represented as:

[0057] L = βL n nE + (1-β)L F nE +bL α MSE

[0058]

[0059] Wherein, L represents the loss function; β represents the weight coefficient; L n nE represents the cross-entropy loss based on the image feature projection; L F nE represents the cross-entropy loss based on the fused image feature; L α MSE represents the mean square error loss based on the parameter feature projection; b represents the opening relationship number, used to determine whether the mean square error loss needs to be calculated; i represents the i-th parameter feature; x represents the total x parameter features; f(α) represents the predicted output value of the parameter feature projection; m represents the true output value corresponding to the parameter feature projection.

[0060] Via the above technical solution, compared with the prior art, the present application provides an industrial defect detection efficient parameter tuning method, which has the following beneficial effects:

[0061] The present application helps users improve the efficiency of visual detection solution landing and improve the detection efficiency through auxiliary parameter tuning.

[0062] The technical solutions of the present application will be further described in detail below with the help of the accompanying drawings and examples. BRIEF DESCRIPTION OF DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other accompanying drawings according to the provided accompanying drawings without creating any creative labor.

[0064] Figure 1 A defect detection parameter adjustment model training process schematic diagram is provided for the embodiment of the present application.

[0065] Figure 2 An industrial defect detection efficient parameter adjustment method flowchart is provided for the embodiment of the present application. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the present application.

[0067] In view of the fact that there are various products in the die-cutting industry and the products are frequently updated and iterated, when product defect detection is performed, the image and parameter formula need to be frequently adjusted according to different needs of the products, and sometimes the parameter adjustment time is even greater than the detection time. Therefore, the embodiment of the present application proposes an industrial defect detection efficient parameter adjustment method for assisting parameter adjustment and helping users to improve the landing efficiency of visual detection solutions; the method comprises the following steps:

[0068] An image of a product to be detected of a material to be detected is obtained and input into a trained defect detection parameter adjustment model, and a parameter formula of the product to be detected corresponding to the material to be detected is output;

[0069] Referring to Figure 1 The above defect detection parameter adjustment model is trained according to the following steps:

[0070] S1, obtaining an image of a product of a target material and a parameter formula of the product;

[0071] S2, inputting the image of the product into a trained CNN visual detection model to output image features corresponding to the image of the product through forward propagation;

[0072] S3, constructing a parameter association graph according to the parameter formula of the product, and converting part of the parameters in the parameter association graph into a vector for feature coding to obtain parameter features;

[0073] S4, respectively coding the serialized image features and the parameter features in a first shared high-dimensional space to output corresponding first and second coding sequences;

[0074] S5, processing the image of the product based on the parameter association graph to generate a feature map, and coding the serialized feature map in a second shared high-dimensional space to output a third coding sequence;

[0075] S6, re-labeling, high-level integration and projection processing are performed on the first encoding sequence, the second encoding sequence and the third encoding sequence to obtain new image features and new parameter features;

[0076] S7, the new image features and the new parameter features are decoded into new method parameters and new numerical parameters.

[0077] Next, each of the above steps will be described.

[0078] In the embodiment of the application, before detecting the material to be detected, a hardware environment is built for the material to be detected, including: fixing the visual distance of the industrial camera and the material to be detected, adjusting the definition, configuring the light source, adjusting the position of the light source (i.e. adjusting the industrial camera, the material and the light source to appropriate positions), and configuring the material conveying belt to achieve the condition of batch detection.

[0079] In the above step S1, the product image and the product parameter formula of the target material are obtained; specifically:

[0080] In the embodiment of the application, an industrial visual detection software integrated with a multi-module visual algorithm is configured, which has the following functions:

[0081] (1) calling an industrial camera SDK to collect the product image A corresponding to the target material;

[0082] (2) detecting the appearance defects and defect parameters of the target material according to a preset algorithm tool;

[0083] (3) determining the category of the target material according to the defect parameters; the category is a good product or a defective product;

[0084] (4) generating a corresponding product parameter formula according to the category of the target material; the product parameter formula includes: a good product template image of the target material, coordinate parameters of a segmented detection area, a pre-processing algorithm in each detection area, a detection algorithm in each detection area, and related parameters of the pre-processing algorithm and the detection algorithm.

[0085] In the above step S2, a CNN visual detection model V with feature extraction capability is trained by selecting a product image dataset in the industry; the product image A is input into the trained CNN visual detection model V, and the image features F corresponding to the product image are output by forward propagation; the background gradient is set to 0 according to the image features F.

[0086] In the above step S3, a parameter correlation graph is constructed according to the product parameter formula, and the parameter part in the parameter correlation graph is converted into a vector for feature encoding to obtain the parameter features P;

[0087] In step S4, the image features and parameter features are encoded in the first shared high-dimensional space, and the first and second encoded sequences are outputted, respectively. Specifically:

[0088] (1) After the image features F are serialized in combination with the product image A, the first encoded sequence is outputted by encoding in the first shared high-dimensional space R1, which is represented as:

[0089] [(F i ,A i ),E 1 i ]=v i [(F i-1 ,A i-1 ),E 1 i-1 ]i=1,2,3...,x

[0090] wherein [(F i ,A i ),E 1 i ] represents the first encoded sequence; F i represents the image features corresponding to the i-th product image; F i-1 represents the image features corresponding to the i-1-th product image; A i represents the i-th product image; A i-1 represents the i-1-th product image; E 1 i represents the position information of the serialized F i and A i ; v i represents the information extracted from F i-1 , A i-1 and E 1 i-1 .

[0091] (2) After the parameter features P are serialized, the second encoded sequence is outputted by encoding in the first shared high-dimensional space R1, which is represented as:

[0092] [P i ,E 2 i ]=W i [P i-1 ,E 2 i-1 ]i=1,2,3...,x

[0093] wherein [P i ,E 2 i ] represents the second encoded sequence; P irepresents the i-th parameter feature; P i-1 represents the i-1-th parameter feature; E 2 i represents the i-th parameter feature; P i serialized position information; E 2 i-1 represents the i-th parameter feature; P i-1 serialized position information; W i represents the i-th parameter feature; P i-1 and E 2 i-1 extracted information.

[0094] In the above step S5, the product image is processed based on the parameter association graph, a feature map is generated, and the serialized feature map is encoded in the second shared high-dimensional space to output a third encoding sequence; specifically:

[0095] The parameter part in the parameter association graph includes a method parameter Y and a numerical parameter c; the method parameter Y corresponds to a preprocessing algorithm and a detection algorithm, and the numerical parameter c represents the used parameters of the preprocessing algorithm and the detection algorithm; the relationship between the method parameter Y and the numerical parameter c is represented as:

[0096] C k =Y k (c k ,s k )

[0097] Wherein, C k represents an effect map obtained by the product image through the method parameter and the numerical parameter, that is, the method parameter Y is the mapping of the numerical parameter c to the effect map C; Y k represents the k-th method parameter; c k represents the k-th numerical parameter; s k represents a feature map of the product image changed through the parameter association graph;

[0098] After the feature map s k is serialized, it is encoded in the second shared high-dimensional space R2 and a third encoding sequence is output; represented as:

[0099] [s k i ,E 3 i ]=u i [s k i-1 ,E 3 i-1 ]i=1,2,3...,x

[0100] Wherein, [s k i ,E 3i ] represents the third encoding sequence; s k i represents the feature map corresponding to the i-th product image; s k i-1 represents the feature map corresponding to the i-1-th product image; E 3 i represents the mapping function corresponding to s k i the serialized position information; E 3 i-1 represents the mapping function corresponding to s k i-1 the serialized position information; u i represents the mapping function corresponding to s k i-1 and E 3 i-1 the extracted information.

[0101] In the above step S6, the first encoding sequence, the second encoding sequence and the third encoding sequence are re-labeled, high-level integrated and projected to obtain new image features and new parameter features; specifically including:

[0102] (1) By using a mapping function, the first encoding sequence, the second encoding sequence and the third encoding sequence are re-labeled to obtain corresponding first feature representation, second feature representation and third feature representation; represented as:

[0103] R v i= G v i (R1)

[0104] R w i= G w i (R1)

[0105] R u i= G u i (R2)

[0106] wherein, R v i represents the first feature representation output by the i-th layer; R w i represents the second feature representation output by the i-th layer; R u i represents the third feature representation output by the i-th layer; G v i represents the mapping function corresponding to the first encoding sequence; G v i(R1) represents re-labeling the first encoding sequence in the first shared high-dimensional space R1; G w i represents the mapping function corresponding to the second encoding sequence; G w i (R1) represents re-labeling the second encoding sequence in the first shared high-dimensional space R1; G u i represents the mapping function corresponding to the third encoding sequence; G u i (R2) represents re-labeling the third encoding sequence in the second shared high-dimensional space R2;

[0107] (2) image coding is performed by integrating the first feature representation and the third feature representation at a high layer through the first new label, and an image coding sequence is output; represented as:

[0108] [n i ,(R v i ,R u i ),E 4 i ]=z i [n i-1 ,(R v i-1 ,R u i-1 ),E 4 i-1 ]i=t,2,3...,x

[0109] wherein [n i ,(R v i ,R u i ),E 4 i ] represents the image coding sequence; n i represents the label of the i-th image feature; n i-1 represents the label of the i-1-th image feature; R v i-1 represents the first feature representation output by the i-1-th layer; R u i-1 represents the third feature representation output by the i-1-th layer; E 4 i represents re-labeling R v i and R u i the serialized position information; E 4 i-1 represents re-labeling R vi-1 and R u i-1 serialized position information; z i indicates the information extracted from n i-1 , (R v i-1 , R u i-1 ) and E 4 i-1 t indicates the encoding output starting from the t layer;

[0110] (3) The third feature is represented by the second new mark for high layer integration parameter coding, and the parameter coding sequence is output; represented as:

[0111] [m i , R w i , E 5 i ] = h i [m i-1 , R w i-1 , E 5 i-1 ]i = t, 2, 3..., x

[0112] Where [m i , R w i , E 5 i ] represents the parameter coding sequence; m i represents the label of the i-th parameter feature; m i-1 represents the label of the i-1-th parameter feature; R w i-1 represents the second feature representation output by the i-1 layer; E 5 i represents m i and R w i serialized position information; E 5 i-1 represents m i-1 and R w i-1 serialized position information; h i represents the information extracted from m i-1 , R w i-1 and E 5 i-1 ;

[0113] (4) The image coding sequence and the parameter coding sequence output by the last layer are projected to obtain the corresponding new image feature and the new parameter feature; represented as:

[0114] λ n z =Q n z (n x )

[0115] α m h =O m h (m x )

[0116] wherein λ represents image feature projection; Q n z represents a mapping function of λ; λ n z represents new image feature; n x represents image encoding sequence output by the last layer; α represents parameter feature projection; O m h represents a mapping function of α; α m h represents new parameter feature; m x represents parameter feature sequence output by the last layer.

[0117] In the above step S7, the new image feature and the new parameter feature are decoded into method parameters and numerical parameters using an argmax method.

[0118] The embodiment of the application further comprises: S8, fusing the image feature, the first feature representation and the third feature representation to obtain a fused image feature; represented as:

[0119] £ x =R v i +R u i +F i

[0120] f i =J £ v,u (£ x )

[0121] wherein £ x represents the fused image feature, and J £ v,u is a trainable projection layer, and f i represents a new fused image feature representation.

[0122] Then, a loss function of the defect detection tuning model is constructed according to the fused image feature; the loss function comprises a cross-entropy loss and a mean square error loss; represented as:

[0123] L = βL n nE + (1-β)L F nE +bL α MSE

[0124]

[0125] wherein, L represents a loss function; β represents a weight coefficient; L n nE represents a cross-entropy loss based on image feature projection; L F nE represents a cross-entropy loss based on fused image features; L α MSE represents a mean square error loss based on parameter feature projection; b represents an opening relation number, used for judging whether the mean square error loss needs to be calculated; i represents an i-th parameter feature; x represents x common parameter features; f(α) represents a predicted output value of the parameter feature projection; and m represents a true output value corresponding to the parameter feature projection.

[0126] In the above training process, the probability that the input image feature y belongs to n categories is represented as:

[0127]

[0128] wherein, represents the probability that the input image feature F belongs to n categories; represents the probability that the input new image feature λ n z belongs to n categories; represents the probability that the input fused image feature f i belongs to n categories;

[0129] In the above training process, the probability that the input parameter feature y belongs to m categories is represented as:

[0130]

[0131] wherein, represents the probability that the input parameter feature p belongs to m categories; represents the probability that the input new feature parameter α m h belongs to m categories.

[0132] In summary, the embodiment of the present application provides an efficient parameter tuning method for industrial defect detection, which is described with reference to Figure 2As shown, the network is built through steps S1-S8, the defect detection parameter adjustment model D is trained using the formula data of multiple products as input data sources by using the industrial visual inspection software, and then the defect detection parameter adjustment model D is deployed to the industrial visual inspection software terminal. When the user inputs the product to be detected, the defect detection parameter adjustment model D receives the first image of the batch of products as input and outputs the coordinate parameters of the region to be detected, the preprocessing algorithm in the region, the detection algorithm in the region, and the parameters of the preprocessing algorithm and the detection algorithm. All output results are assigned to the options and parameter positions that the user needs to adjust, and the visual inspection software obtains the product recognition effect diagram with adjusted parameters. On this basis, the user judges whether the output parameters are suitable according to the actual situation. If further adjustment is needed, the obtained part of the parameters can be modified or directly used as input together with the image to obtain new parameters through the defect detection parameter adjustment model D. This method uses a multi-modal method, extracts the image and the debugging habit of the artificial as features, performs fusion processing in a higher dimensional space, and can use the output of the previous time as a system prompt to obtain more accurate parameters, integrate the overall industrial visual inspection software parameter adjustment process, and shorten the landing time of the visual inspection scheme.

[0133] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other.

[0134] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A highly efficient parameter tuning method for industrial defect detection, characterized in that, Includes the following steps: The image of the product to be inspected is obtained from the material to be inspected and input into the trained defect detection parameter tuning model, and the parameter formula of the product to be inspected corresponding to the material to be inspected is output. The defect detection parameter tuning model is trained according to the following steps: S1. Obtain product images and product parameter formulas for the target material; S2. Input the product image into the trained CNN visual detection model, and output the image features corresponding to the product image through forward propagation; S3. Construct a parameter association map based on the product parameter formula, and convert the parameter part in the parameter association map into a vector for feature encoding to obtain parameter features; S4. In the first shared high-dimensional space, the serialized image features and parameter features are encoded respectively, and the corresponding first encoding sequence and second encoding sequence are output. S5. Process the product image based on the parameter association map to generate a feature map, and encode the serialized feature map in the second shared high-dimensional space to output a third encoded sequence; S6. Re-label, high-level integrate, and projection process the first coding sequence, the second coding sequence, and the third coding sequence to obtain new image features and new parameter features; S7. Decode the new image features and new parameter features into new method parameters and new numerical parameters.

2. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, Also includes: Before testing, a hardware environment is set up for the material to be inspected, including: fixing the viewing distance between the industrial camera and the material to be inspected, adjusting the resolution, configuring the light source, adjusting the position of the light source, and configuring the material conveyor belt.

3. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, S1 specifically includes: Use an industrial camera to capture product images corresponding to the target material; The target material's appearance defects and defect parameters are detected using a preset algorithm tool; The category of the target material is determined based on the defect parameters; the category is either good or defective. Based on the category of the target material, generate the corresponding product parameter formula.

4. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, The product parameter formula includes: a good product template diagram of the target material, coordinate parameters of the segmented detection area, a preprocessing algorithm for each detection area, a detection algorithm for each detection area, and relevant parameters of the preprocessing algorithm and the detection algorithm.

5. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, The S2 also includes setting the background gradient to 0 based on image features.

6. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, S4 specifically includes: (1) After serializing the image features in conjunction with the product image, encoding them in a first shared high-dimensional space and outputting a first encoded sequence; represented as: [(F i ,A i ),E 1 i ]=v i [(F i-1 ,A i-1 ),E 1 i-1 ]i=1,2,3...,x Among them, [(F i A i ),E 1 i ] represents the first encoded sequence; F i F represents the image feature corresponding to the i-th product image; i-1 A represents the image feature corresponding to the (i-1)th product image; i Represents the i-th product image; A i-1 Represents the (i-1)th product image; E 1 i Indicates F i and A i Serialized position information; v i Indicates in F i-1 A i-1 and E 1 i-1 The information extracted from it; (2) After serializing the parameter features, they are encoded in the first shared high-dimensional space, and a second encoded sequence is output; expressed as: [P i ,E 2 i ]=W i [P i-1 ,E 2 i-1 ]i=1,2,3...,x Among them, [P] i E 2 i ] represents the second encoded sequence; P i P represents the feature of the i-th parameter; i-1 E represents the characteristic of the (i-1)th parameter; 2 i Indicates that for P i Serialized position information; E 2 i-1 Indicates that for P i-1 Serialized position information; W i Indicates from P i-1 and E 2 i-1 The extracted information.

7. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, S5 specifically includes: The parameter component of the parameter correlation graph includes method parameters and numerical parameters; the relationship between the method parameters and the numerical parameters is expressed as follows: C k =Y k (c k ,s k ) Among them, C k This represents the effect obtained by applying method parameters and numerical parameters to a product image; Y k c represents the k-th method parameter; k s represents the k-th numerical parameter; k A feature map representing the changes in a product image after parametric correlation mapping; After the feature map is serialized, it is encoded in the second shared high-dimensional space and a third encoded sequence is output; represented as: [s k i ,E 3 i ]=u i [s k i-1 ,E 3 i-1 ]i=1,2,3...,x Among them, [s k i E 3 i ] indicates the third encoded sequence; s k i s represents the feature map corresponding to the i-th product image; k i-1 E represents the feature map corresponding to the (i-1)th product image; 3 i Indicates s k i Serialized position information; E 3 i-1 Indicates s k i-1 Serialized position information; u i Indicates from s k i-1 and E 3 i-1 The extracted information.

8. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, S6 specifically includes: (1) By using a mapping function, the first coding sequence, the second coding sequence, and the third coding sequence are re-labeled to obtain the corresponding first feature representation, second feature representation, and third feature representation; represented as: R v i= G v i (R1) R w i= G w i (R1) R u i= G u i (R2) Among them, R v i R represents the first feature representation of the output of the i-th layer; w i R represents the second feature representation of the output of the i-th layer; u i G represents the third feature representation of the output of the i-th layer; v i G represents the mapping function corresponding to the first encoded sequence; v i (R1) indicates that the first encoded sequence in the first shared high-dimensional space R1 is relabeled; G w i G represents the mapping function corresponding to the second encoded sequence; w i (R1) indicates the relabeling of the second encoded sequence in the first shared high-dimensional space R1; G u i G represents the mapping function corresponding to the third encoded sequence; u i (R2) indicates that the third coding sequence in the second shared high-dimensional space R2 is relabeled; (2) Image encoding is performed on the first feature representation and the third feature representation at a high-level ensemble using a first new label, and the image encoding sequence is output; represented as: [n i ,(R v i ,R u i ),E 4 i ]=z i [n i-1 ,(R v i-1 ,R u i-1 ),E 4 i-1 ]i=t,2,3...,x Among them, [n i ,(R v i ,R u i ),E 4 i ] represents the image encoding sequence; n i The label representing the i-th image feature; n i-1 The label representing the (i-1)th image feature; R v i-1 R represents the first feature representation of the output of the (i-1)th layer; u i-1 E represents the third feature representation of the output of the (i-1)th layer; 4 i Indicates R v i and R u i Serialized position information; E 4 i-1 Indicates R v i-1 and R u i-1 Serialized position information; z i Indicates that in n i-1 、(R v i-1 ,R u i-1 ) and E 4 i-1 The information extracted; t indicates that the encoding output starts from layer t; (3) The third feature is represented by a second new label and parameter-encoded at a higher level, and the parameter-encoded sequence is output; represented as: [m i ,R w i ,E 5 i ]=h i [m i-1 ,R w i-1 ,E 5 i-1 ]i=t,2,3...,x Among them, [m i ,R w i E 5 i ] represents the parameter encoding sequence; m i The label representing the feature of the i-th parameter; m i-1 The label representing the feature of the (i-1)th parameter; R w i-1 E represents the second feature representation of the output of the (i-1)th layer; 5 i Indicates the relationship between m i and R w i Serialized position information; E 5 i-1 Indicates the relationship between m i-1 and R w i-1 Serialized position information; h i Indicates in m i-1 R w i-1 and E 5 i-1 The information extracted from it; (4) Project the image encoding sequence and parameter encoding sequence output from the last layer to obtain the corresponding new image features and new parameter features.

9. The efficient parameter tuning method for industrial defect detection according to claim 1, characterized in that, Also includes: S8. Perform a fusion process on the image features, the first feature representation, and the third feature representation to obtain fused image features; The loss function of the defect detection parameter tuning model is constructed based on the fused image features.

10. The efficient parameter tuning method for industrial defect detection according to claim 9, characterized in that, The loss function of the defect detection parameter tuning model consists of two parts: cross-entropy loss and mean squared error loss; expressed as: L=βL n nE +(1-β)L F nE +bL α MSE Where L represents the loss function; β represents the weight coefficient; L n nE L represents the cross-entropy loss based on image feature projection; F nE L represents the cross-entropy loss based on fused image features; α MSE denoted as mean squared error loss based on parametric feature projection; b represents the switching coefficient, used to determine whether the mean squared error loss needs to be calculated; i represents the i-th parametric feature; x represents the total number of parametric features; f(α) represents the predicted output value of the parametric feature projection; m represents the actual output value corresponding to the parametric feature projection.

Citation Information

Patent Citations

  • Surface defect detection system and method capable of automatically adjusting parameters

    CN115184359A