A product appearance defect detection system and method based on artificial intelligence

Through the product appearance defect detection system based on artificial intelligence, the problems of low efficiency and susceptibility to human factors are solved, and efficient and accurate bearing appearance detection and abnormal production line early warning are achieved.

CN119090867BActive Publication Date: 2025-04-15JIANGSU SHUJIAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411548972.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-04-15
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

Traditional bearing appearance inspection relies on manual visual inspection, which is inefficient and susceptible to human factors, resulting in missed or mis-checked, and the existing component defect detection system cannot provide early warning of abnormal production lines.

Method used

Using an artificial intelligence-based product appearance defect detection system, we use the production line in the detection area to number the production line, obtain image data, perform image similarity analysis, generate product appearance reports, calculate defect impact evaluation values, judge product quality, and judge the operation of the production line through defective pixel matrix analysis, and send an alarm signal.

Benefits of technology

It improves detection efficiency, reduces the influence of human factors, realizes accurate detection of product appearance defects and early warning of abnormal production lines, and reduces system operation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090867B_ABST
    Figure CN119090867B_ABST
Patent Text Reader

Abstract

The present invention discloses a product appearance defect detection system and method based on artificial intelligence, and relates to the technical field of product appearance detection. The present invention obtains detection data according to the production line number, extracts the image data of the product in the detection data, performs image similarity analysis on the image data of the product, and selects the target detection image of the product; calculates the defect impact assessment value of the target detection image according to the product appearance report, and judges the quality of the product; analyzes the period qualified image set to form a comparison pixel matrix; compares the detection pixel matrix with the comparison pixel matrix to generate a defect pixel matrix; analyzes the correlation of the defect pixel matrix group to judge the operation of the production line; sends an alarm signal to the administrator according to the operation of the production line, and visualizes the abnormal situation. It can effectively reduce data storage space and reduce system operation costs; and realizes the automation of product appearance defect inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product appearance detection, and in particular to a product appearance defect detection system and method based on artificial intelligence. Background Art

[0002] Bearings are an important component in modern mechanical equipment. Their main function is to support the mechanical rotating body, reduce the friction coefficient during its movement, and ensure its rotation accuracy. In order to ensure the reliability and stability of the bearing during use, appearance inspection is a very important step.

[0003] Traditional detection methods mostly rely on manual visual inspection, but this method is not only inefficient, but also easily affected by human factors, resulting in missed or false detections. On the other hand, the personnel management cost is high, and it is impossible to achieve cost reduction and efficiency improvement for the enterprise. In the existing defect detection systems for other parts, there is no further analysis of defective parts, and it is impossible to provide early warning prompts for abnormal production lines.

[0004] Therefore, the present invention discloses a product appearance defect detection system and method based on artificial intelligence to solve the above problems. Summary of the invention

[0005] The purpose of the present invention is to provide a product appearance defect detection system and method based on artificial intelligence to solve the problems raised in the prior art.

[0006] To achieve the above object, the present invention provides the following technical solution: a product appearance defect detection method based on artificial intelligence, the method comprising the following steps:

[0007] S1: uniformly number the production lines in the inspection area, obtain inspection data according to the production line numbers, extract product image data from the inspection data, perform image similarity analysis on the product image data, and select the target inspection image of the product according to the image similarity analysis results;

[0008] S2: Use image recognition technology to process the target detection image of the product and generate a product appearance report; calculate the defect impact assessment value of the target detection image according to the product appearance report, and judge the quality of the product according to the defect impact assessment value;

[0009] S3: According to the judgment result of product quality, the target detection images of the product are classified and formed into a set, and the period qualified image set is analyzed to form a control pixel matrix; the detection pixel matrix corresponding to the target detection image in the period risk image set is compared with the control pixel matrix to generate a defect pixel matrix;

[0010] S4: analyzing the correlation of defective pixel matrix groups composed of defective pixel matrices, and judging the operation status of the production line according to the correlation of the defective pixel matrix groups; sending an alarm signal to the administrator according to the operation status of the production line, and visually displaying the abnormal situation.

[0011] According to the above scheme, S1 includes the following contents:

[0012] S101: Uniformly number the production lines in the monitoring area, and record the i-th production line as PL i ; where i∈[1,I], I represents the total number of production lines in the monitoring area; obtain the detection data according to the production line number, extract the image data of the product in the detection data, and convert the production line PL i The image data of the product is composed of a set, denoted as DPP i ={DPP (i,1) , DPP (i,2) , …, DPP (i,J)}, the image data of the jth product is recorded as DPP (i,j) ; where j∈[1,J], J represents the production line PL i The total number of defective products;

[0013] S102: The number of product images in each image data is not less than A, where A is a constant preset by the system; extracting image data DPP (i,j) The product images in the image are grayed out, and any two grayed-out product images are combined into a product image group. The image similarity of the two product images in the product image group is calculated by the image pixel similarity algorithm. Any product image in the product image group with the highest image similarity is extracted and recorded as the target detection image. The product images of the same product except the target detection image are deleted.

[0014] By taking multiple product images of the same product and calculating the similarity between any two product images, shooting errors caused by environmental influences can be effectively avoided and the accuracy of system operation can be improved; deleting product images of the same product except for target detection images can effectively reduce data storage space and reduce system operating costs.

[0015] According to the above solution, the shooting angle, the distance between the camera and the product, and the camera parameters corresponding to the product image are the same; the camera parameters include resolution, frame rate, white balance, ISO, aperture, shutter speed, and focal length.

[0016] According to the above scheme, in S2, one target detection image corresponds to one product appearance report, and the product appearance report includes an image grayscale feature value and a grayscale feature deviation value;

[0017] The image grayscale feature value represents the average value of the grayscale values ​​corresponding to each pixel in the target detection image;

[0018] The target detection image is evenly divided into B equal parts, where B is a constant preset by the system; the image generated by segmenting the target detection image is recorded as the target detection sub-image; the grayscale feature deviation value is equal to max{GR max -GR min , G.R. max -GRV}, where max{} represents the operation of finding the maximum value; GR max Indicates the maximum value of the average grayscale value corresponding to each pixel in the target detection sub-image; GR min It represents the minimum value of the average grayscale value corresponding to each pixel in the target detection sub-image; GRV represents the image grayscale feature value of the target detection image corresponding to the target detection sub-image.

[0019] According to the above scheme, in S2, the method for judging the quality of the product includes the following steps:

[0020] S201: Calculate the defect impact assessment value corresponding to each product appearance report, recorded as FL;

[0021] FL=[1+e -(c×(P1-P1V)+d×P2) ] -1 ;

[0022] Where e is a natural constant, c and d are evaluation parameters, and the evaluation parameters are system preset constants; P1 represents the image grayscale feature value in the corresponding product appearance report; P1V represents the average value of the image grayscale feature values ​​of other product appearance reports in the image data composition set corresponding to the product; P2 represents the grayscale feature deviation value in the corresponding product appearance report;

[0023] S202: Setting a threshold for the defect impact assessment value, recording products with a defect impact assessment value less than or equal to the threshold as qualified products, and recording products with a defect impact assessment value greater than the threshold as risky products.

[0024] The product appearance report can be quantified from two aspects: image grayscale feature value and grayscale feature deviation value. The defect impact assessment value can be calculated based on the product appearance report. Qualified products and risky products can be divided according to the defect impact assessment value, which can effectively provide data support for subsequent analysis.

[0025] According to the above scheme, S3 includes the following:

[0026] S301: setting an inspection cycle for the production line, extracting target inspection images of qualified products in the same inspection cycle to form a set of qualified images for the cycle; extracting target inspection images of risky products in the same inspection cycle to form a set of risky images for the cycle;

[0027] S302: Extracting a target detection image from the period-qualified image set, and constructing a detection pixel matrix using the target detection image, specifically:

[0028] ;

[0029] In the matrix, P represents each pixel in the target detection image, x represents the number of rows of pixels in each target detection image, and y represents the number of columns of pixels in the target detection image; P xy (i,m) Indicates production line PL i The grayscale value of the pixel point at the xth row and yth column of the mth target detection image in the periodic qualified image set, m∈[1,M], M represents the number of target detection images in the periodic qualified image set;

[0030] Calculate the gray value of each pixel of the control detection image to form a control pixel matrix;

[0031] ;

[0032] Where P xy i Indicates production line PL i The gray value of the pixel at the xth row and yth column in the comparison detection image;

[0033] S303: Calculate pixel differences between each pixel point in the detection pixel matrix corresponding to the target detection image in the periodic risk image set and each pixel point in the control pixel matrix formed by the control detection image, and mark the pixel points whose pixel differences in the detection pixel matrix are greater than the pixel difference threshold preset by the system as defective pixel points; mark the pixel points whose pixel differences in the detection pixel matrix are less than or equal to the pixel difference threshold preset by the system as normal pixel points;

[0034] S304: Reset the grayscale values ​​of normal pixels in the detection pixel matrix formed by the target detection image of the risky product, generate a defective pixel matrix based on the reset detection pixel matrix, wherein the defective pixel matrix includes all defective pixels and has the least number of pixels, mark the defective pixel matrix, and the defective pixel matrix marking content includes the positions of the first pixel and the last pixel in the defective pixel matrix in the original detection pixel matrix; and form all defective pixel matrices into a defective pixel matrix set.

[0035] By resetting the grayscale value of normal pixels, the data carrying capacity and storage space can be effectively reduced. By generating a defective pixel matrix and using the smallest pixel matrix to cover all defective pixels, the storage space required by the defective pixel matrix is ​​further reduced, thereby improving the system's operating efficiency and reducing system operating costs. The automation of product appearance defect inspection is realized, and the efficiency of appearance defect inspection is improved.

[0036] According to the above solution, the grayscale value of the normal pixel after reset in S304 is 255 or 0.

[0037] According to the above scheme, S4 includes the following contents:

[0038] S401: extracting a defective pixel matrix set corresponding to a periodic risk image set, extracting any two defective pixel matrices to form a defective pixel matrix group, and expanding the two defective pixel matrices in the defective pixel matrix group into a comparison pixel matrix in which the number of columns and the number of rows of the two matrices are equal, and the positions of the first pixel point and the last pixel point in the original detection pixel matrix are the same; the grayscale value of the expanded pixel point is the same as the grayscale value of the normal pixel point after reset;

[0039] S402: Calculate the similarity of two contrast pixel matrices by using a pixel matrix similarity algorithm, record the defective pixel matrix group whose similarity of the contrast pixel matrix is ​​greater than the similarity threshold as a correlation matrix group, divide the number of correlation matrix groups by the number of defective pixel matrix groups, and if the ratio is greater than the ratio threshold, determine that the production line is an abnormal production line; if the ratio is less than or equal to the ratio threshold, determine that the production line is a normal production line;

[0040] S403: Send an alarm signal and the abnormal production line number to the administrator, and visualize the defect pixel matrix corresponding to the association matrix group of the abnormal production line.

[0041] Analyzing the defective pixel matrix group can effectively find abnormal products with abnormal associations. When the number of abnormal products is abnormal, it means that there is an abnormal risk in the production line and the production line needs to be repaired. Visualizing the defective pixel matrix corresponding to the association matrix group of the abnormal production line can help administrators find the corresponding abnormal nodes as soon as possible and improve the safety of system operation.

[0042] Another aspect of the present application provides a product appearance defect detection system based on artificial intelligence, the system is implemented by applying the above-mentioned product appearance defect detection method based on artificial intelligence, the system includes a detection image screening module, a product quality analysis module, a product defect analysis module and a correlation warning module;

[0043] The detection image screening module is used to uniformly number the production lines within the detection area, obtain detection data according to the production line numbers, extract image data of products in the detection data, perform image similarity analysis on the image data of the products, and select target detection images of products according to the image similarity analysis results;

[0044] The product quality analysis module is used to process the target detection image of the product using image recognition technology and generate a product appearance report; calculate the defect impact assessment value of the target detection image according to the product appearance report, and judge the quality of the product according to the defect impact assessment value;

[0045] The product defect analysis module is used to classify and group the target detection images of the product according to the judgment result of the product quality, analyze the period qualified image set to form a control pixel matrix; compare the detection pixel matrix corresponding to the target detection image in the period risk image set with the control pixel matrix to generate a defect pixel matrix;

[0046] The correlation warning module is used to analyze the correlation of the defective pixel matrix group composed of the defective pixel matrix, and judge the operation status of the production line according to the correlation of the defective pixel matrix group; send an alarm signal to the administrator according to the operation status of the production line, and visualize the abnormal situation.

[0047] The detection image screening module includes a number data extraction unit and an image screening unit;

[0048] The numbering data extraction unit is used to uniformly number the production lines in the monitoring area, obtain the detection data according to the production line number, extract the image data of the products in the detection data, and group the image data of the products of the same production line into a set;

[0049] The image screening unit is used to perform grayscale processing on all product images, combine any two grayscale processed product images into a product image group, calculate the image similarity of two product images in the product image group through an image pixel similarity algorithm, extract any product image in the product image group with the highest image similarity as a target detection image, and delete product images of the same product except the target detection image.

[0050] The product quality analysis module includes a product appearance report generation unit and a defect impact assessment and judgment unit;

[0051] The product appearance report generating unit processes the target detection image of the product using image recognition technology and generates a product appearance report; one target detection image corresponds to one product appearance report, and the product appearance report includes an image grayscale feature value and a grayscale feature deviation value;

[0052] The defect impact assessment judgment unit calculates the defect impact assessment value corresponding to each product appearance report according to the product appearance report, and classifies the products according to the defect impact assessment value;

[0053] The product defect analysis module includes a comparison detection image generation unit and a defect pixel matrix generation unit;

[0054] The control detection image generation unit is used to generate a set of qualified cycle images by classifying the products of the same detection cycle of the same production line according to the detection cycle, construct a detection pixel matrix using the target detection image in the set of qualified cycle images, and calculate the gray value of each pixel point of the control detection image to form a control pixel matrix;

[0055] The defective pixel matrix generating unit is used to calculate the pixel difference between each pixel point of the detection pixel matrix corresponding to the target detection image in the periodic risk image set and each pixel point in the control pixel matrix formed by the control detection image, and further process the pixel points according to the pixel point classification to generate the defective pixel matrix;

[0056] The association warning module includes a pre-association unit and an association warning unit;

[0057] The pre-association unit is used to extract a defective pixel matrix set corresponding to a periodic risk image set, extract any two defective pixel matrices to form a defective pixel matrix group, and expand the two defective pixel matrices in the defective pixel matrix group into a comparison pixel matrix in which the number of columns and the number of rows of the two matrices are equal, and the positions of the first pixel point and the last pixel point in the original detection pixel matrix are the same; the grayscale value of the expanded pixel point is the same as the grayscale value of the normal pixel point after reset;

[0058] The association warning unit is used to calculate the similarity of two comparison pixel matrices through a pixel matrix similarity algorithm, record the defective pixel matrix group whose similarity of the comparison pixel matrix is ​​greater than the similarity threshold as an association matrix group, divide the number of association matrix groups by the number of defective pixel matrix groups, and if the ratio is greater than the ratio threshold, the production line is determined to be an abnormal production line; if the ratio is less than or equal to the ratio threshold, the production line is determined to be a normal production line; an alarm signal and the abnormal production line number are sent to the administrator, and the defective pixel matrix corresponding to the association matrix group of the abnormal production line is visually displayed.

[0059] Compared with the prior art, the beneficial effects of the present invention are as follows: by taking multiple product images of the same product and calculating the similarity between any two product images, shooting errors caused by environmental influences can be effectively avoided, thereby improving the accuracy of system operation; deleting product images of the same product other than the target detection image can effectively reduce data storage space and reduce system operation costs; quantifying the product appearance report from two aspects, namely, the image grayscale feature value and the grayscale feature deviation value, calculating the defect impact assessment value based on the product appearance report, and dividing qualified products and risky products according to the defect impact assessment value, can effectively provide data support for subsequent analysis; by performing the grayscale value analysis on the normal pixel points Resetting can effectively reduce data carrying capacity and storage space, and by generating a defective pixel matrix, using the smallest pixel matrix to cover all defective pixels, further reducing the storage space required by the defective pixel matrix, improving the system's operating efficiency and reducing system operating costs; it realizes the automation of product appearance defect inspection; by analyzing the defective pixel matrix group, it can effectively find abnormal products with abnormal associations. When the number of abnormal products is abnormal, it means that there is an abnormal risk in the production line and the production line needs to be repaired. The defective pixel matrix corresponding to the association matrix group of the abnormal production line is visualized, which can help administrators find the corresponding abnormal nodes as soon as possible and improve the safety of system operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0061] Figure 1 A schematic diagram of a process of a product appearance defect detection method based on artificial intelligence according to the present invention;

[0062] Figure 2 The present invention is a structural schematic diagram of a product appearance defect detection system based on artificial intelligence. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] See also Figure 1 The present invention provides a technical solution: a product appearance defect detection method based on artificial intelligence, the method comprising the following steps:

[0065] S1: uniformly number the production lines in the inspection area, obtain inspection data according to the production line numbers, extract product image data from the inspection data, perform image similarity analysis on the product image data, and select the target inspection image of the product according to the image similarity analysis results;

[0066] S2: Use image recognition technology to process the target detection image of the product and generate a product appearance report; calculate the defect impact assessment value of the target detection image according to the product appearance report, and judge the quality of the product according to the defect impact assessment value;

[0067] S3: According to the judgment result of product quality, the target detection images of the product are classified and formed into a set, and the period qualified image set is analyzed to form a control pixel matrix; the detection pixel matrix corresponding to the target detection image in the period risk image set is compared with the control pixel matrix to generate a defect pixel matrix;

[0068] S4: analyzing the correlation of defective pixel matrix groups composed of defective pixel matrices, and judging the operation status of the production line according to the correlation of the defective pixel matrix groups; sending an alarm signal to the administrator according to the operation status of the production line, and visually displaying the abnormal situation.

[0069] According to the above scheme, S1 includes the following contents:

[0070] S101: Uniformly number the production lines in the monitoring area, and record the i-th production line as PL i ; where i∈[1,I], I represents the total number of production lines in the monitoring area; obtain the detection data according to the production line number, extract the image data of the product in the detection data, and convert the production line PL i The image data of the product is composed of a set, denoted as DPP i ={DPP (i,1) , DPP (i,2) , …, DPP (i,J)}, the image data of the jth product is recorded as DPP (i,j) ; where j∈[1,J], J represents the production line PL i The total number of defective products;

[0071] S102: The number of product images in each image data is not less than A, where A is a constant preset by the system; extracting image data DPP (i,j)The product images in the image are processed in grayscale, and any two product images after grayscale processing are combined into a product image group. The image similarity of the two product images in the product image group is calculated by the image pixel similarity algorithm. Any product image in the product image group with the highest image similarity is extracted and recorded as the target detection image. The product images of the same product except the target detection image are deleted.

[0072] According to the above scheme, the shooting angle, the distance between the camera and the product, and the camera parameters corresponding to the product image are the same; the camera parameters include resolution, frame rate, white balance, ISO, aperture, shutter speed, and focal length.

[0073] According to the above scheme, in S2, one target detection image corresponds to one product appearance report, and the product appearance report includes an image grayscale feature value and a grayscale feature deviation value;

[0074] The image grayscale feature value represents the average value of the grayscale values ​​corresponding to each pixel in the target detection image;

[0075] The target detection image is evenly divided into B equal parts, where B is a constant preset by the system; the image generated by the target detection image segmentation is recorded as the target detection sub-image; the gray feature deviation value is equal to max{GR max -GR min , G.R. max -GRV}, where max{} represents the operation of finding the maximum value; GR max Indicates the maximum value of the average grayscale value corresponding to each pixel in the target detection sub-image; GR min It represents the minimum value of the average grayscale value corresponding to each pixel in the target detection sub-image; GRV represents the image grayscale feature value of the target detection image corresponding to the target detection sub-image.

[0076] According to the above scheme, in S2, the method for judging the quality of the product includes the following steps:

[0077] S201: Calculate the defect impact assessment value corresponding to each product appearance report, recorded as FL;

[0078] FL=[1+e -(c×(P1-P1V)+d×P2) ] -1 ;

[0079] Where e is a natural constant, c and d are evaluation parameters, and the evaluation parameters are system preset constants; P1 represents the image grayscale feature value in the corresponding product appearance report; P1V represents the average value of the image grayscale feature values ​​of other product appearance reports in the image data composition set corresponding to the product; P2 represents the grayscale feature deviation value in the corresponding product appearance report;

[0080] S202: Setting a threshold for the defect impact assessment value, recording products with a defect impact assessment value less than or equal to the threshold as qualified products, and recording products with a defect impact assessment value greater than the threshold as risky products.

[0081] According to the above scheme, S3 includes the following:

[0082] S301: Setting an inspection cycle for the production line, extracting target inspection images of qualified products in the same inspection cycle to form a set of qualified images for the cycle; extracting target inspection images of risky products in the same inspection cycle to form a set of risky images for the cycle;

[0083] S302: Extracting a target detection image from the period-qualified image set, and constructing a detection pixel matrix using the target detection image, specifically:

[0084] ;

[0085] In the matrix, P represents each pixel in the target detection image, x represents the number of rows of pixels in each target detection image, and y represents the number of columns of pixels in the target detection image; P xy (i,m) Indicates production line PL i The grayscale value of the pixel point at the xth row and yth column of the mth target detection image in the periodic qualified image set, m∈[1,M], M represents the number of target detection images in the periodic qualified image set;

[0086] Calculate the gray value of each pixel of the control detection image to form a control pixel matrix;

[0087] P xy i =∑\s\do 4(m=1)MP xy (i,m) ;

[0088] Where P xy i Indicates production line PL i The gray value of the pixel at the xth row and yth column in the comparison detection image;

[0089] S303: Calculate pixel differences between each pixel point in the detection pixel matrix corresponding to the target detection image in the periodic risk image set and each pixel point in the control pixel matrix formed by the control detection image, and mark the pixel points whose pixel differences in the detection pixel matrix are greater than the pixel difference threshold preset by the system as defective pixel points; mark the pixel points whose pixel differences in the detection pixel matrix are less than or equal to the pixel difference threshold preset by the system as normal pixel points;

[0090] S304: Reset the grayscale values ​​of normal pixels in the detection pixel matrix formed by the target detection image of the risky product, generate a defective pixel matrix based on the reset detection pixel matrix, the defective pixel matrix includes all defective pixels and has the least number of pixels, mark the defective pixel matrix, and the defective pixel matrix marking content includes the positions of the first pixel and the last pixel in the defective pixel matrix in the original detection pixel matrix; all defective pixel matrices are combined into a defective pixel matrix set.

[0091] According to the above solution, the grayscale value of the normal pixel after reset in S304 is 255 or 0.

[0092] Embodiment 1: In this embodiment, the reference pixel matrix is ​​specifically:

[0093] ;

[0094] In this embodiment, the detection pixel matrix is ​​specifically:

[0095] ;

[0096] The pixel difference threshold is 10, so in this embodiment, the pixel point P 11 , P 12 , P 13 and P 21 is a normal pixel; pixel P 22 , P 23 , P 31 , P 32 and P 33 is a defective pixel; in this embodiment, the grayscale value of the normal pixel after reset is 255, so the detection pixel matrix is ​​converted to:

[0097] ;

[0098] Furthermore, a defective pixel matrix is ​​generated, specifically:

[0099] .

[0100] According to the above scheme, S4 includes the following contents:

[0101] S401: extracting a defective pixel matrix set corresponding to a periodic risk image set, extracting any two defective pixel matrices to form a defective pixel matrix group, and expanding the two defective pixel matrices in the defective pixel matrix group into a comparison pixel matrix in which the number of columns and the number of rows of the two matrices are equal, and the positions of the first pixel point and the last pixel point in the original detection pixel matrix are the same; the grayscale value of the expanded pixel point is the same as the grayscale value of the normal pixel point after reset;

[0102] S402: Calculate the similarity of two contrast pixel matrices by using a pixel matrix similarity algorithm, record the defective pixel matrix group whose similarity of the contrast pixel matrix is ​​greater than the similarity threshold as a correlation matrix group, divide the number of correlation matrix groups by the number of defective pixel matrix groups, and if the ratio is greater than the ratio threshold, determine that the production line is an abnormal production line; if the ratio is less than or equal to the ratio threshold, determine that the production line is a normal production line;

[0103] S403: Send an alarm signal and the abnormal production line number to the administrator, and visualize the defect pixel matrix corresponding to the association matrix group of the abnormal production line.

[0104] See also Figure 2 , the present invention provides a technical solution: a product appearance defect detection system based on artificial intelligence, the system includes a detection image screening module, a product quality analysis module, a product defect analysis module and a correlation warning module;

[0105] The detection image screening module is used to uniformly number the production lines in the detection area, obtain the detection data according to the production line number, extract the image data of the product in the detection data, perform image similarity analysis on the image data of the product, and select the target detection image of the product according to the image similarity analysis result;

[0106] The product quality analysis module is used to process the target detection image of the product using image recognition technology and generate a product appearance report; calculate the defect impact assessment value of the target detection image according to the product appearance report, and judge the quality of the product according to the defect impact assessment value;

[0107] The product defect analysis module is used to classify and group the target detection images of the product according to the judgment result of the product quality, analyze the period qualified image set to form a control pixel matrix; compare the detection pixel matrix corresponding to the target detection image in the period risk image set with the control pixel matrix to generate a defect pixel matrix;

[0108] The correlation warning module is used to analyze the correlation of the defective pixel matrix group composed of the defective pixel matrix, and judge the operation status of the production line according to the correlation of the defective pixel matrix group; send an alarm signal to the administrator according to the operation status of the production line, and visualize the abnormal situation.

[0109] The detection image screening module includes a number data extraction unit and an image screening unit;

[0110] The numbering data extraction unit is used to uniformly number the production lines in the monitoring area, obtain the detection data according to the production line number, extract the image data of the products in the detection data, and group the image data of the products of the same production line into a set;

[0111] The image screening unit is used to perform grayscale processing on all product images, combine any two grayscale processed product images into a product image group, calculate the image similarity of two product images in the product image group through an image pixel similarity algorithm, extract any product image in the product image group with the highest image similarity as a target detection image, and delete product images of the same product except the target detection image.

[0112] The product quality analysis module includes a product appearance report generation unit and a defect impact assessment and judgment unit;

[0113] The product appearance report generation unit processes the target detection image of the product using image recognition technology and generates a product appearance report; one target detection image corresponds to one product appearance report, and the product appearance report includes an image grayscale feature value and a grayscale feature deviation value;

[0114] The defect impact assessment judgment unit calculates a defect impact assessment value corresponding to each product appearance report according to the product appearance report, and classifies the products according to the defect impact assessment value;

[0115] The product defect analysis module includes a comparison detection image generation unit and a defect pixel matrix generation unit;

[0116] The comparison detection image generation unit is used to generate a set of qualified cycle images by classifying the products of the same detection cycle of the same production line according to the detection cycle, construct a detection pixel matrix using the target detection image in the set of qualified cycle images, calculate the gray value of each pixel point of the comparison detection image, and form a comparison pixel matrix;

[0117] The defect pixel matrix generating unit is used to calculate the pixel difference between each pixel point of the detection pixel matrix corresponding to the target detection image in the periodic risk image set and each pixel point in the control pixel matrix formed by the control detection image, and further process the pixel points according to the pixel point classification to generate the defect pixel matrix;

[0118] The association warning module includes a pre-association unit and an association warning unit;

[0119] The pre-association unit is used to extract a defective pixel matrix set corresponding to a periodic risk image set, extract any two defective pixel matrices to form a defective pixel matrix group, and expand the two defective pixel matrices in the defective pixel matrix group into a comparison pixel matrix in which the number of columns and the number of rows of the two matrices are equal, and the positions of the first pixel point and the last pixel point in the original detection pixel matrix are the same; the grayscale value of the expanded pixel point is the same as the grayscale value of the normal pixel point after reset;

[0120] The correlation warning unit is used to calculate the similarity of two contrasting pixel matrices through a pixel matrix similarity algorithm, record the defective pixel matrix group whose similarity of the contrasting pixel matrices is greater than the similarity threshold as a correlation matrix group, divide the number of correlation matrix groups by the number of defective pixel matrix groups, and if the ratio is greater than the ratio threshold, the production line is determined to be an abnormal production line; if the ratio is less than or equal to the ratio threshold, the production line is determined to be a normal production line; an alarm signal and the abnormal production line number are sent to the administrator, and the defective pixel matrix corresponding to the correlation matrix group of the abnormal production line is visually displayed.

[0121] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0122] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A product appearance defect detection method based on artificial intelligence, characterized in that: The method comprises the following steps: S1: uniformly number the production lines in the inspection area, obtain inspection data according to the production line numbers, extract product image data from the inspection data, perform image similarity analysis on the product image data, and select the target inspection image of the product according to the image similarity analysis results; S2: Use image recognition technology to process the target detection image of the product and generate a product appearance report; calculate the defect impact assessment value of the target detection image according to the product appearance report, and judge the quality of the product according to the defect impact assessment value; S3: According to the judgment result of product quality, the target detection images of the product are classified and formed into a set, and the period qualified image set is analyzed to form a control pixel matrix; the detection pixel matrix corresponding to the target detection image in the period risk image set is compared with the control pixel matrix to generate a defect pixel matrix; S4: analyzing the correlation of the defective pixel matrix group composed of the defective pixel matrix, and judging the operation status of the production line according to the correlation of the defective pixel matrix group; sending an alarm signal to the administrator according to the operation status of the production line, and visually displaying the abnormal situation; In S2, the method for judging the quality of the product includes the following steps: S201: Calculate the defect impact assessment value corresponding to each product appearance report, recorded as FL; FL=[1+e -(c×(P1-P1V)+d×P2) ] -1 ; Where e is a natural constant, c and d are evaluation parameters, and the evaluation parameters are system preset constants; P1 represents the image grayscale feature value in the corresponding product appearance report; P1V represents the average value of the image grayscale feature values ​​of other product appearance reports in the image data composition set corresponding to the product; P2 represents the grayscale feature deviation value in the corresponding product appearance report; S202: Setting a threshold for the defect impact assessment value, recording products with a defect impact assessment value less than or equal to the threshold as qualified products, and recording products with a defect impact assessment value greater than the threshold as risky products; Include the following in S3: S301: setting an inspection cycle for the production line, extracting target inspection images of qualified products in the same inspection cycle to form a set of qualified images for the cycle; extracting target inspection images of risky products in the same inspection cycle to form a set of risky images for the cycle; S302: Extracting a target detection image from the period-qualified image set, and constructing a detection pixel matrix using the target detection image, specifically: ; In the matrix, P represents each pixel in the target detection image, x represents the number of rows of pixels in each target detection image, and y represents the number of columns of pixels in the target detection image; P xy (i,m) Indicates production line PL i The grayscale value of the pixel point at the xth row and yth column of the mth target detection image in the periodic qualified image set, m∈[1,M], M represents the number of target detection images in the periodic qualified image set; Calculate the gray value of each pixel of the control detection image to form a control pixel matrix; ; Where P xy i Indicates production line PL i The gray value of the pixel at the xth row and yth column in the comparison detection image; S303: Calculate pixel differences between each pixel point in the detection pixel matrix corresponding to the target detection image in the periodic risk image set and each pixel point in the control pixel matrix formed by the control detection image, and mark the pixel points whose pixel differences in the detection pixel matrix are greater than the pixel difference threshold preset by the system as defective pixel points; mark the pixel points whose pixel differences in the detection pixel matrix are less than or equal to the pixel difference threshold preset by the system as normal pixel points; S304: resetting the grayscale values ​​of normal pixels in the detection pixel matrix formed by the target detection image of the risky product, generating a defective pixel matrix according to the reset detection pixel matrix, wherein the defective pixel matrix includes all defective pixels and has the least number of pixels, marking the defective pixel matrix, wherein the marking content of the defective pixel matrix includes the positions of the first pixel and the last pixel in the defective pixel matrix in the original detection pixel matrix; and forming all defective pixel matrices into a defective pixel matrix set; In S4, the following are included: S401: extracting a defective pixel matrix set corresponding to a periodic risk image set, extracting any two defective pixel matrices to form a defective pixel matrix group, and expanding the two defective pixel matrices in the defective pixel matrix group into a comparison pixel matrix in which the number of columns and the number of rows of the two matrices are equal, and the positions of the first pixel point and the last pixel point in the original detection pixel matrix are the same; the grayscale value of the expanded pixel point is the same as the grayscale value of the normal pixel point after reset; S402: Calculate the similarity of two contrast pixel matrices by using a pixel matrix similarity algorithm, record the defective pixel matrix group whose similarity of the contrast pixel matrix is ​​greater than the similarity threshold as a correlation matrix group, divide the number of correlation matrix groups by the number of defective pixel matrix groups, and if the ratio is greater than the ratio threshold, determine that the production line is an abnormal production line; if the ratio is less than or equal to the ratio threshold, determine that the production line is a normal production line; S403: Send an alarm signal and the abnormal production line number to the administrator, and visualize the defect pixel matrix corresponding to the association matrix group of the abnormal production line.

2. The method for detecting product appearance defects based on artificial intelligence according to claim 1, characterized in that: In S1, the following are included: S101: Uniformly number the production lines in the monitoring area, and record the i-th production line as PL i ; Where i∈[1,I], I represents the total number of production lines in the monitoring area; Acquire the inspection data according to the production line number, extract the image data of the product in the inspection data, and convert the production line PL i The image data of the product is composed of a set, denoted as DPP i ={DPP (i,1) , DPP (i,2) , …, DPP (i,J) }, the image data of the jth product is recorded as DPP (i,j) ; where j∈[1,J], J represents the production line PL i The total number of defective products; S102: The number of product images in each image data is not less than A, where A is a constant preset by the system; extracting image data DPP (i,j) The product images in the image are grayed out, and any two grayed-out product images are combined into a product image group. The image similarity of the two product images in the product image group is calculated by the image pixel similarity algorithm. Any product image in the product image group with the highest image similarity is extracted and recorded as the target detection image. The product images of the same product except the target detection image are deleted.

3. The method for detecting product appearance defects based on artificial intelligence according to claim 2, characterized in that: The shooting angle, the distance between the camera and the product, and the camera parameters corresponding to the product image are the same; the camera parameters include resolution, frame rate, white balance, ISO, aperture, shutter speed, and focal length.

4. The method for detecting product appearance defects based on artificial intelligence according to claim 2, characterized in that: In S2, one target detection image corresponds to one product appearance report, and the product appearance report includes an image grayscale feature value and a grayscale feature deviation value; The image grayscale feature value represents the average value of the grayscale values ​​corresponding to each pixel in the target detection image; The target detection image is evenly divided into B equal parts, where B is a constant preset by the system; the image generated by segmenting the target detection image is recorded as the target detection sub-image; the grayscale feature deviation value is equal to max{GR max -GR min , G.R. max -GRV}, where max{} represents the operation of finding the maximum value; GR max Indicates the maximum value of the average grayscale value corresponding to each pixel in the target detection sub-image; GR min It represents the minimum value of the average grayscale value corresponding to each pixel in the target detection sub-image; GRV represents the image grayscale feature value of the target detection image corresponding to the target detection sub-image.

5. The method for detecting product appearance defects based on artificial intelligence according to claim 1, characterized in that: The grayscale value of the normal pixel after reset in S304 is 255 or 0.

6. A product appearance defect detection system based on artificial intelligence, the system is applied to the product appearance defect detection method based on artificial intelligence as described in any one of claims 1 to 5, characterized in that: The system includes a detection image screening module, a product quality analysis module, a product defect analysis module and a correlation warning module; The detection image screening module is used to uniformly number the production lines within the detection area, obtain detection data according to the production line numbers, extract image data of products in the detection data, perform image similarity analysis on the image data of the products, and select target detection images of products according to the image similarity analysis results; The product quality analysis module is used to process the target detection image of the product using image recognition technology and generate a product appearance report; calculate the defect impact assessment value of the target detection image according to the product appearance report, and judge the quality of the product according to the defect impact assessment value; The product defect analysis module is used to classify and group the target detection images of the product according to the judgment result of the product quality, analyze the period qualified image set to form a control pixel matrix; compare the detection pixel matrix corresponding to the target detection image in the period risk image set with the control pixel matrix to generate a defect pixel matrix; The correlation warning module is used to analyze the correlation of the defective pixel matrix group composed of the defective pixel matrix, and judge the operation status of the production line according to the correlation of the defective pixel matrix group; send an alarm signal to the administrator according to the operation status of the production line, and visualize the abnormal situation.

Citation Information

Patent Citations

  • Panel missing process defect detection method, system and equipment and storage medium

    CN116309574A