Automatic detection and evaluation method and system for insulating sheet
Through automated detection methods, image acquisition and grayscale conversion curves are used to accurately evaluate the thickness and defects of the insulating sheet, solving the problem of limited efficiency and accuracy of traditional detection methods, and improving the accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202510173557.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Traditional insulating sheet detection methods rely on manual or simple mechanized testing, resulting in limited inspection efficiency and accuracy in large-scale production and large-scale quality fluctuations, and problems cannot be discovered in time, affecting production quality and inspection efficiency.
It provides an automated detection and evaluation method for insulating sheets. By receiving detection instructions, it starts the image acquisition device, sets the thickness range, constructs a grayscale conversion curve, conducts thickness detection and object detection on the detected images, calculates the defect ratio, and judges the evaluation level.
It improves the accuracy and efficiency of insulating sheet quality inspection, can promptly detect problems, ensure production quality and inspection efficiency, and achieves accurate evaluation of insulating sheet thickness and defects.
Smart Images

Figure CN119648701A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an automatic detection and evaluation method and system for an insulating sheet. Background Art
[0002] With the continuous development of the manufacturing industry, automated testing technology has become an important part of modern industrial production, especially in the quality inspection process of insulating sheets. The automated inspection of insulating sheets plays an important role in production efficiency and product consistency. Through high-precision inspection and evaluation, the quality and accuracy of insulating sheets are ensured. Especially in the mass production and precision processing of insulating sheets, automated inspection plays a decisive role.
[0003] Traditional testing methods for insulation sheets rely on manual inspection or simple mechanized testing. Although these methods can ensure the basic quality of the product, in the case of large-scale production and large quality fluctuations, manual inspection and simple mechanized testing will be limited in efficiency and accuracy, resulting in the inability to detect problems in a timely manner, affecting the overall production quality and testing efficiency. Therefore, how to improve the accuracy of insulation sheet quality testing is an important issue that needs to be solved urgently. Summary of the invention
[0004] The present invention provides an automatic detection and evaluation method and system for an insulating sheet, the main purpose of which is to improve the accuracy of quality detection of the insulating sheet.
[0005] To achieve the above object, the present invention provides an automatic detection and evaluation method for an insulating sheet, comprising: receiving an insulation sheet detection instruction, and starting a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; Extracting insulating sheet samples from the insulating sheet sample set in sequence, and using the started image acquisition device to acquire images of the extracted insulating sheet samples to obtain sample images, and summarizing the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; Constructing a grayscale conversion curve based on the sample image set, obtaining an insulating sheet to be detected, and using the image acquisition device to acquire a detection image of the insulating sheet to be detected to obtain a detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; Calculate the difference in thickness based on the maximum thickness and the minimum thickness, and determine the evaluation level based on the difference in thickness and a preset uniform thickness threshold, wherein the evaluation levels include: qualified level and eliminated level; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
[0006] Optionally, constructing a grayscale conversion curve based on the sample image set includes: Extracting sample images from the sample image set in sequence, performing grayscale operations on the extracted sample images to obtain sample grayscale images, and collecting the sample grayscale images to obtain a sample grayscale image set; Extracting sample grayscale images in the sample grayscale image set in sequence, and performing grayscale measurement operations on the extracted sample grayscale images based on preset measurement parameters to obtain a plurality of measured grayscale values, performing mean calculation on the plurality of measured grayscale values to obtain grayscale means, and collecting the grayscale means to obtain a grayscale mean set, wherein the grayscale means in the grayscale mean set correspond one-to-one to the extracted thicknesses in the extracted thickness set; A grayscale conversion curve is constructed according to the grayscale mean value set.
[0007] Optionally, constructing a grayscale conversion curve according to the grayscale mean value set includes: Performing a grayscale normalization operation on all grayscale means in the grayscale mean value set to obtain a normalized grayscale value set, and performing a thickness normalization operation on all extracted thicknesses in the extracted thickness set to obtain a normalized thickness value set, wherein the normalized grayscale values in the normalized grayscale value set correspond one-to-one to the normalized thickness values in the normalized thickness value set; A conversion horizontal axis and a conversion vertical axis are constructed according to the normalized grayscale value and the normalized thickness value, a conversion coordinate system is constructed based on the conversion horizontal axis and the conversion vertical axis, and a grayscale conversion curve is constructed according to the normalized grayscale value set, the normalized thickness value set and the conversion coordinate system.
[0008] Optionally, the using the grayscale conversion curve to perform thickness detection on the detection image to obtain the maximum detection thickness and the minimum detection thickness includes: Performing a grayscale operation on the detection image to obtain a detection grayscale image; The detection grayscale image is divided into blocks based on a preset block area to obtain a block image set, the block grayscale mean of each block image in the block image set is calculated, and the block grayscale means are summarized to obtain a block grayscale mean set; Extracting the maximum grayscale mean and the minimum grayscale mean from the grayscale mean set, and using the maximum grayscale mean and the minimum grayscale mean to perform grayscale normalization operation on all block grayscale means in the block grayscale mean set to obtain a normalized block mean set; Based on the grayscale conversion curve, all normalized block means in the normalized block mean set are subjected to thickness retrieval to obtain a normalized block thickness set; The maximum and minimum thicknesses detected are obtained from the normalized block thickness set.
[0009] Optionally, the determining of the optimized detection model includes: Based on the pre-trained target detection model, the target detection operation is performed on the preset optimized image to obtain the target detection frame, where there are cracks and real detection frames in the optimized image. The target detection frame is: in, refers to the target detection box, Refers to the horizontal coordinate of the prediction center, Refers to the vertical coordinate of the prediction center, Refers to the width of the target detection box. Refers to the height of the target detection box; The real detection box is: in, refers to the real detection frame, refers to the true center horizontal coordinate, refers to the true center ordinate, Refers to the real detection frame width, Refers to the real detection frame height; Calculate the region overlap based on the target detection frame and the real detection frame; Get the target coordinates and target matrix of the target detection frame, and get the real coordinates and real matrix of the real detection frame; Calculate the distribution distance based on the target coordinates, the target matrix, the real coordinates and the real matrix; The target detection model is optimized according to the area overlap and distribution distance to obtain an optimized detection model.
[0010] Optionally, the calculating the region overlap based on the target detection frame and the real detection frame includes: The total detection area is calculated based on the target detection frame and the true detection frame, and the total overlapping area is calculated based on the target detection frame and the true detection frame; Calculate the area overlap based on the total detection area and the total overlapping area: in, Refers to the regional overlap, Refers to the total overlapping area, Refers to the total area of the inspection.
[0011] Optionally, the acquiring the target coordinates and the target matrix of the target detection frame and acquiring the real coordinates and the real matrix of the real detection frame include: Get the target coordinates based on the target detection frame, where the target coordinates are: in, Refers to the target coordinates; Get the target horizontal expansion value and the target vertical expansion value, and build the target matrix based on the target horizontal expansion value and the target vertical expansion value: in, refers to the target matrix, refers to the target horizontal expansion value, Refers to the preset adjustment factor, Refers to the target vertical expansion value; Get the real coordinates based on the real detection frame, where the real coordinates are: in, Refers to the real coordinates; Get the real horizontal expansion value and the real vertical expansion value, and construct the real matrix based on the real horizontal expansion value and the real vertical expansion value: in, refers to the real matrix, Refers to the true horizontal expansion value, Refers to the true vertical expansion value.
[0012] Optionally, the distribution distance is calculated based on the target coordinates, the target matrix, the real coordinates and the real matrix, and the calculation formula is as follows: in, Refers to the distribution distance, Refers to calculating the Euclidean distance, Refers to computing the trace of a matrix.
[0013] Optionally, optimizing the target detection model according to the region overlap and distribution distance to obtain an optimized detection model includes: A comprehensive optimization function is constructed based on the regional overlap and distribution distance: in, Refers to the comprehensive optimization function, Refers to the preset balance parameters; Calculating a comprehensive optimization value of the target detection frame based on a comprehensive optimization function; Compare the comprehensive optimization value with the preset comprehensive optimization threshold; If it is confirmed that the comprehensive optimization value is not greater than the comprehensive optimization threshold, the target coordinates, the target detection frame width and the target detection frame height are adjusted, and the updated overlap and the updated distribution distance are calculated using the adjusted target coordinates, the adjusted target detection frame width and the adjusted target detection frame height, with the updated overlap being the regional overlap and the updated distribution distance being the distribution distance, and returning to the above step of constructing a comprehensive optimization function based on the regional overlap and the distribution distance until the comprehensive optimization value is greater than the comprehensive optimization threshold to obtain an optimized detection model.
[0014] To achieve the above object, the present invention also provides an automatic detection and evaluation system for an insulating sheet, comprising: A thickness extraction module, used for receiving an insulation sheet detection instruction and starting a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; A sample image acquisition module is used to sequentially extract insulating sheet samples from the insulating sheet sample set, and use the started image acquisition device to perform image acquisition on the extracted insulating sheet samples to obtain sample images, and summarize the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; A thickness detection module, used to construct a grayscale conversion curve based on the sample image set, obtain the insulating sheet to be detected, and use the image acquisition device to collect detection images of the insulating sheet to be detected to obtain a detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; A grade evaluation module, used for calculating the difference in detected thickness based on the maximum detected thickness and the minimum detected thickness, and judging the evaluation grade based on the difference in detected thickness and a preset uniform thickness threshold, wherein the evaluation grades include: qualified grade and eliminated grade; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
[0015] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising: A memory storing at least one instruction; The processor executes the instructions stored in the memory to implement the above-mentioned automatic detection and evaluation method of the insulating sheet.
[0016] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned automatic detection and evaluation method of the insulating sheet.
[0017] The present invention solves the problem described in the background technology. First, a thickness range is set, and the thickness range is uniformly extracted based on the thickness spacing to obtain an extracted thickness set. By reasonably setting the thickness spacing, the sample selection bias can be reduced. The uniform extraction of insulating sheet samples of different thicknesses can cover the entire thickness range, ensuring the comprehensiveness and diversity of the data of the insulating sheet samples, which is helpful to improve the reliability of automatic detection of insulating sheets. The extracted thickness in the extracted thickness set corresponds to the insulating sheet samples in the insulating sheet sample set one by one. Each extracted thickness in the extracted thickness set has a corresponding insulating sheet sample, which makes it easy to systematically analyze subsequent detection results and ensures the coherence and consistency of the evaluation. Secondly, a grayscale conversion curve is constructed based on the sample image set. The grayscale conversion curve can obtain the thickness of the insulating sheet corresponding to the detection image according to the grayscale value of the detection image, and provide accurate data for the subsequent comparison of uniform thickness thresholds. Afterwards, the grayscale conversion curve is used to perform thickness detection on the detection image to obtain the maximum detection thickness and the minimum detection thickness. The relationship between the gray value in the gray conversion curve and the thickness value of the insulating sheet is used to detect the thickness of the detection image, and the maximum thickness and the minimum thickness of the insulating sheet corresponding to the detection image can be accurately obtained, thereby improving the accuracy of the comparison of the thickness threshold; then, the uniform thickness threshold and the detection thickness difference are used to judge the evaluation level, thereby improving the efficiency of the automatic detection of the insulating sheet. If the detection thickness difference is not greater than the uniform thickness threshold, the target detection model is optimized to obtain the optimized detection model. By optimizing the target detection model, the accuracy of the target detection model can be improved, and the accuracy of the automatic detection of the insulating sheet can be improved; finally, the detection image is subjected to target detection using the optimized detection model to obtain an optimized detection frame, and the defect area is obtained based on the optimized detection frame. The defect ratio is calculated based on the defect area. By performing target detection on the detection image using the optimized detection model, the defect area on the detection image can be accurately obtained. The defect ratio calculated based on the defect area can ensure that the division of the qualified level and the eliminated level is more scientific and reasonable. Therefore, the present invention can improve the accuracy of the quality detection of the insulating sheet. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic flow chart of an automated detection and evaluation method for an insulating sheet provided by an embodiment of the present invention; Figure 2 A functional module diagram of an automatic detection and evaluation system for an insulating sheet provided by an embodiment of the present invention; Figure 3 A schematic structural diagram of an electronic device for implementing the automated detection and evaluation method of the insulating sheet provided in one embodiment of the present invention.
[0019] Description of reference numerals: 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.
[0020] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0022] The embodiment of the present application provides an automated detection and evaluation method for an insulating sheet. The execution subject of the automated detection and evaluation method for the insulating sheet includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the automated detection and evaluation method for the insulating sheet can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0023] Reference Figure 1 FIG. 1 is a flow chart of an automatic detection and evaluation method for an insulating sheet provided by an embodiment of the present invention. In this embodiment, the automatic detection and evaluation method for an insulating sheet includes: S1. Receive an insulation sheet detection instruction, start a pre-built image acquisition instrument based on the insulation sheet detection instruction, set a thickness range, uniformly extract the thickness range based on a preset thickness interval, obtain an extracted thickness set, and obtain an insulation sheet sample set based on the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set.
[0024] Explainably, the insulation sheet detection instruction refers to an instruction issued manually for evaluating the insulation sheet. For example, Xiao Zhang is a staff member of an insulation material company. One day, Xiao Zhang needs to evaluate the insulation sheet, so Xiao Zhang issued an insulation sheet detection instruction. The image acquisition device refers to an instrument for capturing images of the insulation sheet. Optionally, the image acquisition device is a Basler industrial camera. The thickness range refers to the thickness range of the insulation sheet. The thickness range is , the thickness spacing refers to the artificial spacing used to obtain insulating sheets of different thicknesses. Optional, the thickness spacing is Uniformly extracting the thickness range based on the preset thickness spacing means extracting the thickness range using the thickness spacing. For example, the thickness spacing is , from the thickness range Start, every interval Perform an extraction until the maximum thickness in the thickness range is extracted, and obtain , a total of 296 extracted thicknesses, the maximum thickness is , the extracted thickness set refers to the set composed of extracted thicknesses, and the extracted thickness refers to the thickness of the insulating sheet extracted from the thickness range using the thickness interval. That is, the extracted thickness. Obtaining the insulating sheet sample set according to the extracted thickness set means obtaining insulating sheets of corresponding thickness according to the extracted thickness in the extracted thickness set, and then summarizing the obtained insulating sheets to obtain the insulating sheet sample set. The insulating sheet sample set refers to a set of insulating sheet samples, and the insulating sheet sample refers to the insulating sheet of corresponding thickness obtained according to the extracted thickness in the extracted thickness set. For example, is the extracted thickness in the extracted thickness set, the insulating sheet sample is the insulating sheet with the corresponding extracted thickness, and the extracted thickness is , then the insulating sheet sample is Thickness of insulation sheet.
[0025] S2. Extract insulating sheet samples from the insulating sheet sample set in sequence, and use the started image acquisition device to acquire images of the extracted insulating sheet samples to obtain sample images, summarize the sample images, and obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images.
[0026] It can be explained that the sample image refers to the image obtained after using an image acquisition device to collect images of the insulating sheet sample, the sample image set refers to the set composed of sample images, and the RGB image refers to a color image represented by a combination of the three basic colors of red (R), green (G) and blue (B). RGB images are existing technologies and will not be described in detail here.
[0027] S3. Construct a grayscale conversion curve based on the sample image set, obtain the insulating sheet to be detected, use the image acquisition device to collect the detection image of the insulating sheet to be detected, obtain the detection image, use the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness.
[0028] It can be explained that the grayscale conversion curve refers to the curve for obtaining the thickness of the insulating sheet based on the grayscale value, the insulating sheet to be detected refers to the insulating sheet that needs to be automatically detected, the detection image refers to the image obtained after image acquisition of the insulating sheet to be detected by an image acquisition device, the maximum detection thickness refers to the maximum thickness of the insulating sheet to be detected obtained by using the grayscale conversion curve, and the minimum detection thickness refers to the minimum thickness of the insulating sheet to be detected obtained by using the grayscale conversion curve.
[0029] In detail, constructing a grayscale conversion curve based on the sample image set includes: Extracting sample images from the sample image set in sequence, performing grayscale operations on the extracted sample images to obtain sample grayscale images, and collecting the sample grayscale images to obtain a sample grayscale image set; Extracting sample grayscale images in the sample grayscale image set in sequence, and performing grayscale measurement operations on the extracted sample grayscale images based on preset measurement parameters to obtain a plurality of measured grayscale values, performing mean calculation on the plurality of measured grayscale values to obtain grayscale means, and collecting the grayscale means to obtain a grayscale mean set, wherein the grayscale means in the grayscale mean set correspond one-to-one to the extracted thicknesses in the extracted thickness set; A grayscale conversion curve is constructed according to the grayscale mean value set.
[0030] It can be explained that performing a grayscale operation on the extracted sample image refers to converting the extracted sample image into a grayscale image. The specific method of converting the sample image into a grayscale image is to use Python and the image processing library OpenCV to convert the sample image into a grayscale image. This is a prior art and will not be described in detail here. The sample grayscale image refers to the grayscale image obtained after the extracted sample image is grayscaled. The sample grayscale image set refers to the set of sample grayscale images. The measurement parameter refers to an artificially set parameter. The number of grayscale measurement operations performed on the sample grayscale image is equal to the value of the measurement parameter. Optionally, if the measurement parameter is 10, the number of grayscale measurement operations performed on the sample grayscale image is also 10. Performing a grayscale measurement operation on the extracted sample grayscale image refers to measuring the grayscale value of the sample grayscale image. The specific grayscale value measurement operation is to use Python and the image processing library OpenCV to extract the grayscale value of the sample grayscale image. This is a prior art and will not be described in detail here. Multiple measured grayscale values refer to the overall grayscale value of the sample grayscale image obtained after the grayscale measurement of the sample grayscale image is performed based on the measurement parameters. For example, there are three pixels in the sample grayscale image, and the grayscale values of the three pixels are 10, 11, and 10 respectively. The grayscale values of the three pixels are averaged to obtain the grayscale value mean, and the grayscale value mean is used as the overall grayscale value of the sample grayscale image. The number of multiple measured grayscale values depends on the measurement parameters, and the numerical value of the measurement parameter is consistent with the number of multiple measured grayscale values. For example, the measurement parameter is 10, and 10 grayscale measurement operations are performed on the sample grayscale image to obtain 10 grayscale values. The grayscale mean refers to the mean of multiple measured grayscale values, and the grayscale mean set refers to the set composed of grayscale means. The one-to-one correspondence between the grayscale means in the grayscale mean set and the extracted thickness in the extracted thickness set means that the grayscale means in the grayscale mean set and the extracted thickness in the extracted thickness set correspond to each other. For example, the extracted thickness is , based on the extracted thickness, obtain an insulating sheet sample, collect an image of the insulating sheet sample, obtain a sample image, perform a grayscale operation on the sample image, obtain a sample grayscale image, the measurement parameter is 10, perform 10 grayscale measurement operations on the sample grayscale image, obtain 10 grayscale values, calculate the average of the 10 grayscale values, and obtain the grayscale mean. The grayscale mean is the same as the extracted thickness set The extracted thicknesses correspond to each other.
[0031] In detail, constructing a grayscale conversion curve according to the grayscale mean value set includes: Performing a grayscale normalization operation on all grayscale means in the grayscale mean value set to obtain a normalized grayscale value set, and performing a thickness normalization operation on all extracted thicknesses in the extracted thickness set to obtain a normalized thickness value set, wherein the normalized grayscale values in the normalized grayscale value set correspond one-to-one to the normalized thickness values in the normalized thickness value set; A conversion horizontal axis and a conversion vertical axis are constructed according to the normalized grayscale value and the normalized thickness value, a conversion coordinate system is constructed based on the conversion horizontal axis and the conversion vertical axis, and a grayscale conversion curve is constructed according to the normalized grayscale value set, the normalized thickness value set and the conversion coordinate system.
[0032] It can be explained that performing a grayscale normalization operation on all grayscale means in the grayscale mean set means performing a grayscale normalization operation on all grayscale means in the grayscale mean set using a grayscale normalization formula, and the grayscale normalization formula is as follows: in, Refers to the normalized gray value, Refers to the grayscale mean value of the current grayscale normalization. Refers to the smallest gray mean in the gray mean set, Refers to the maximum grayscale mean in the grayscale mean set.
[0033] It can be understood that the normalized grayscale value refers to the grayscale value obtained after grayscale normalization is performed on the grayscale mean in the grayscale mean set, the normalized grayscale value set refers to the set composed of normalized grayscale values, and performing thickness normalization on all extracted thicknesses in the extracted thickness set refers to performing thickness normalization on all extracted thicknesses in the extracted thickness set using the thickness normalization formula. The thickness normalization formula is as follows: in, Refers to the normalized thickness value, Refers to the extracted thickness currently being normalized. Refers to the minimum extraction thickness in the extraction thickness set. Refers to the maximum extraction thickness in the extraction thickness set.
[0034] It can be understood that the normalized thickness value refers to the thickness of the insulating sheet obtained after thickness normalization is performed on the extracted thickness in the extracted thickness set, the normalized thickness value set refers to the set composed of normalized thickness values, the conversion horizontal axis is the horizontal axis of the conversion coordinate system, the conversion horizontal axis is used to represent the normalized grayscale value, the conversion vertical axis is the vertical axis of the conversion coordinate system, the conversion vertical axis is used to represent the normalized thickness value, and constructing a grayscale conversion curve according to the normalized grayscale value set, the normalized thickness value set and the conversion coordinate system refers to using a linear regression model to fit the relationship between the normalized grayscale value and the normalized thickness value, and then drawing a grayscale conversion curve according to the relationship between the normalized grayscale value and the normalized thickness value, and using a linear regression model to fit the relationship between the normalized grayscale value and the normalized thickness value refers to using Python to call a linear regression model to fit the relationship between the normalized grayscale value and the normalized thickness value, and obtaining the slope and intercept after fitting, which is a prior art and will not be repeated here. The slope is used to represent the relationship between the normalized grayscale value and the normalized thickness value. When the slope is a negative value, it means that as the normalized grayscale value increases, the normalized thickness value will decrease. When the slope is a positive value, it means that as the normalized grayscale value increases, the normalized thickness value will increase. The intercept refers to the normalized thickness value when the normalized grayscale value is 0. Drawing a grayscale conversion curve based on the relationship between the normalized grayscale value and the normalized thickness value means constructing a linear equation based on the fitted slope and intercept, and then drawing a grayscale conversion curve based on the linear equation and the conversion coordinate system. The linear equation is as follows: in, Refers to the normalized thickness parameter, Refers to the slope, Refers to the normalized grayscale parameter, Refers to the intercept.
[0035] It can be explained that the normalized thickness parameter refers to the parameter used to output the normalized thickness value, and the normalized grayscale parameter refers to the parameter used to input the normalized grayscale value. For example, if the normalized grayscale value is 0.2, the normalized grayscale parameter is used to represent 0.2, and the normalized thickness parameter is used to represent the output of the normalized thickness value obtained after inputting 0.2 into the linear equation.
[0036] In detail, the grayscale conversion curve is used to perform thickness detection on the detection image to obtain the maximum detection thickness and the minimum detection thickness, including: Performing a grayscale operation on the detection image to obtain a detection grayscale image; The detection grayscale image is divided into blocks based on a preset block area to obtain a block image set, the block grayscale mean of each block image in the block image set is calculated, and the block grayscale means are summarized to obtain a block grayscale mean set; Extracting the maximum grayscale mean and the minimum grayscale mean from the grayscale mean set, and using the maximum grayscale mean and the minimum grayscale mean to perform grayscale normalization operation on all block grayscale means in the block grayscale mean set to obtain a normalized block mean set; Based on the grayscale conversion curve, all normalized block means in the normalized block mean set are subjected to thickness retrieval to obtain a normalized block thickness set; The maximum and minimum thicknesses detected are obtained from the normalized block thickness set.
[0037] It can be explained that the grayscale operation performed on the detection image is the same as the grayscale operation performed on the extracted sample image. The detection grayscale image refers to the grayscale image obtained after the detection image is grayscaled. The block area refers to the area set manually for performing the block operation on the detection grayscale image. Optionally, the block area is , the block image set refers to the set of block images, and the block image refers to the image obtained by dividing the detection grayscale image into blocks using the block area. For example, the block area is , the area of the detected grayscale image is , then the detection grayscale image is divided into 5 images, and these 5 images are the block images. The block grayscale mean refers to the mean of the grayscale values of the block image, the block grayscale mean set refers to the set composed of the block grayscale means, the maximum grayscale mean refers to the largest block grayscale mean in the grayscale mean set, the minimum grayscale mean refers to the smallest block grayscale mean in the grayscale mean set, and the grayscale normalization operation is performed on all the block grayscale means in the block grayscale mean set using the above grayscale normalization formula. The grayscale normalization operation is performed on all the block grayscale means in the block grayscale mean set using the above grayscale normalization formula, and the grayscale normalization formula in the grayscale normalization formula is is the minimum grayscale mean, and the grayscale normalization formula is the maximum grayscale mean, the normalized block mean set refers to the set composed of normalized block means, the normalized block mean refers to the normalized grayscale obtained after performing grayscale normalization operation on the block grayscale mean. Based on the grayscale conversion curve, all normalized block means in the normalized block mean set are subjected to thickness retrieval, which refers to using the normalized block mean to retrieve the corresponding conversion horizontal axis value in the grayscale conversion curve, and then matching the corresponding conversion vertical axis value according to the retrieved corresponding conversion horizontal axis value, and confirming the corresponding conversion vertical axis value as the normalized block thickness, and the normalized block thickness set refers to the set composed of normalized block thicknesses.
[0038] S4. Calculate the difference in detected thickness based on the maximum detected thickness and the minimum detected thickness, and determine the evaluation level based on the difference in detected thickness and a preset uniform thickness threshold, wherein the evaluation levels include: qualified level and eliminated level, and compare the difference in detected thickness with the uniform thickness threshold. If the difference in detected thickness is greater than the uniform thickness threshold, the evaluation level is confirmed to be the eliminated level.
[0039] It can be explained that the evaluation level is used to evaluate the insulating sheet to be tested. The evaluation levels include: qualified level and eliminated level. The qualified level means that the difference in the detected thickness of the insulating sheet to be tested is less than the uniform thickness threshold, and the defect ratio of the detected insulating sheet is less than the ratio threshold. The qualified level is used to indicate that the insulating sheet to be tested meets the use requirements. The eliminated level means that the difference in the detected thickness of the insulating sheet to be tested is greater than the uniform thickness threshold or the defect ratio of the detected insulating sheet is greater than the ratio threshold. The eliminated level is used to indicate that the insulating sheet to be tested does not meet the use requirements. When the difference in the detected thickness is not greater than the uniform thickness threshold and the defect ratio is less than the ratio threshold, the evaluation level of the insulating sheet to be tested is confirmed to be the qualified level. When the difference in the detected thickness is greater than the uniform thickness threshold or the difference in the detected thickness is not greater than the uniform thickness threshold but the defect ratio is greater than the ratio threshold, the evaluation level of the insulating sheet to be tested is confirmed to be the eliminated level. The difference in the detected thickness refers to the difference between the maximum detected thickness and the minimum detected thickness. The uniform thickness threshold refers to the threshold set manually for judging the difference in the detected thickness.
[0040] S5. If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed.
[0041] Explainably, the target detection model refers to a model that performs defect detection on the detection image and generates a detection frame, which is a prior art and will not be described in detail here. Optionally, the target detection model is a YOLOv5 model. The detection frame refers to a rectangular frame output by the target detection model after performing defect detection on the detection image. The detection frame is used to completely represent the cracks in the detection image.
[0042] In detail, the step of determining the optimized detection model includes: Based on the pre-trained target detection model, the target detection operation is performed on the preset optimized image to obtain the target detection frame, where there are cracks and real detection frames in the optimized image. The target detection frame is: in, refers to the target detection box, Refers to the horizontal coordinate of the prediction center, Refers to the vertical coordinate of the prediction center, Refers to the width of the target detection box. Refers to the height of the target detection box; The real detection box is: in, refers to the real detection frame, refers to the true center horizontal coordinate, refers to the true center ordinate, Refers to the real detection frame width, Refers to the real detection frame height; Calculate the region overlap based on the target detection frame and the real detection frame; Get the target coordinates and target matrix of the target detection frame, and get the real coordinates and real matrix of the real detection frame; Calculate the distribution distance based on the target coordinates, the target matrix, the real coordinates and the real matrix; The target detection model is optimized according to the area overlap and distribution distance to obtain an optimized detection model.
[0043] Explainable, optimized image refers to the image of the insulating sheet set artificially, which is used to optimize the target detection model. There are cracks and real detection frames in the optimized image. Cracks refer to cracks on the insulating sheet corresponding to the optimized image. The real detection frame refers to the detection frame generated after artificial detection of the optimized image. The real detection frame completely surrounds the cracks in the optimized image and is used to optimize the target detection model. The target detection frame refers to the detection frame generated after the target detection model detects the optimized image. The predicted center horizontal coordinate refers to the horizontal coordinate of the geometric center of the target detection frame in the optimized coordinate system, the predicted center vertical coordinate refers to the vertical coordinate of the geometric center of the target detection frame in the optimized coordinate system, the optimized coordinate system refers to the coordinate system in the optimized image, with the vertex in the upper left corner of the optimized image as the origin, the positive direction of the vertical axis of the optimized coordinate system points to the bottom of the origin of the optimized coordinate system, and the positive direction of the horizontal axis of the optimized coordinate system points to the right of the origin of the optimized coordinate system. The width of the target detection frame refers to the length from the leftmost edge to the rightmost edge of the target detection frame, and the height of the target detection frame refers to the length from the topmost edge to the bottommost edge of the target detection frame. The horizontal coordinate of the real center refers to the horizontal coordinate of the geometric center of the real detection frame in the optimized coordinate system, and the vertical coordinate of the real center refers to the vertical coordinate of the geometric center of the real detection frame in the optimized coordinate system. The width of the real detection frame refers to the length from the leftmost edge to the rightmost edge of the real detection frame, and the height of the real detection frame refers to the length from the topmost edge to the bottommost edge of the real detection frame.
[0044] In detail, the calculating of the region overlap based on the target detection frame and the real detection frame includes: The total detection area is calculated based on the target detection frame and the true detection frame, and the total overlapping area is calculated based on the target detection frame and the true detection frame; Calculate the area overlap based on the total detection area and the total overlapping area: in, Refers to the regional overlap, Refers to the total overlapping area, Refers to the total area of the inspection.
[0045] Explainably, the total detection area refers to the area covered by the target detection frame and the true detection frame, which is obtained by subtracting the total overlapping area of the target detection frame and the true detection frame from the sum of the areas of the target detection frame and the true detection frame. The total overlapping area refers to the area of intersection between the target detection frame and the true detection frame. The area coincidence refers to the ratio of the total overlapping area to the total detection area, which is used to measure the degree of intersection between the target detection frame and the true detection frame. The greater the area coincidence, the greater the degree of intersection between the target detection frame and the true detection frame, and the closer the target detection frame is to the true detection frame.
[0046] In detail, the step of obtaining the target coordinates and target matrix of the target detection frame and obtaining the real coordinates and real matrix of the real detection frame includes: Get the target coordinates based on the target detection frame, where the target coordinates are: in, Refers to the target coordinates; Get the target horizontal expansion value and the target vertical expansion value, and build the target matrix based on the target horizontal expansion value and the target vertical expansion value: in, refers to the target matrix, refers to the target horizontal expansion value, Refers to the preset adjustment factor, Refers to the target vertical expansion value; Get the real coordinates based on the real detection frame, where the real coordinates are: in, Refers to the real coordinates; Get the real horizontal expansion value and the real vertical expansion value, and construct the real matrix based on the real horizontal expansion value and the real vertical expansion value: in, refers to the real matrix, Refers to the true horizontal expansion value, Refers to the true vertical expansion value.
[0047] Explanation: The target coordinates refer to the coordinates of the geometric center of the target detection frame, and the target horizontal expansion value refers to the variance of the target detection frame width in the horizontal direction of the target detection frame, which describes the range of change of the target detection frame width in the horizontal direction under different environmental conditions. The larger the target horizontal expansion value, the larger the range of change of the target detection frame width in the horizontal direction. The environmental condition refers to the condition of the surrounding environment when the insulation sheet is automatically detected. Optionally, the environmental condition is the temperature of the environment. The target vertical expansion value refers to the variance of the target detection frame height in the vertical direction of the target detection frame, which describes the range of change of the target detection frame height in the vertical direction under different environmental conditions. The larger the target vertical expansion value, the larger the range of change of the target detection frame height in the vertical direction. For example, the measured values of the target detection frame width under different environmental conditions are: 98, 100, 102, 101 and 99, in pixels. Based on this set of measured values, the variance is calculated to obtain 2.4, and the target horizontal expansion value is 2.4. The calculation method of the target vertical expansion value is the same as the calculation method of the target horizontal expansion value, which will not be repeated here. The adjustment factor refers to the artificially set parameter used to adjust the relationship between the width and height of the detection frame. The range of the adjustment factor is -1 to 1. It is optional. When the adjustment factor is 0, it means that there is no linear relationship between the width and height of the detection frame, that is, the width and height of the detection frame are independent. When the adjustment factor is 1, it means that the width and height of the detection frame will change in proportion, and the detection frame will maintain a fixed aspect ratio. The aspect ratio refers to the ratio of the height of the detection frame to the width of the detection frame. The target matrix refers to the matrix representing the target horizontal expansion value and the target vertical expansion value. For example, the target horizontal expansion value is 150, the target vertical expansion value is 50, and the adjustment factor is 0.8, then the target matrix is: It can be understood that the real coordinates refer to the coordinates of the geometric center of the real detection frame, the real horizontal expansion value refers to the variance of the real detection frame width of the real detection frame in the horizontal direction, and describes the range of change of the real detection frame width of the real detection frame in the horizontal direction under different environmental conditions. The larger the real horizontal expansion value, the larger the range of change of the real detection frame width in the horizontal direction, and the method for obtaining the real horizontal expansion value is consistent with the method for obtaining the target horizontal expansion value, which will not be repeated here. The real vertical expansion value refers to the variance of the real detection frame height of the real detection frame in the vertical direction, and describes the range of change of the real detection frame height of the real detection frame in the vertical direction under different environmental conditions. The larger the real vertical expansion value, the larger the range of change of the real detection frame height in the vertical direction, and the method for obtaining the real vertical expansion value is consistent with the method for obtaining the target vertical expansion value, which will not be repeated here. The real matrix refers to the matrix representing the real horizontal expansion value and the real vertical expansion value.
[0048] In detail, the distribution distance is calculated based on the target coordinates, target matrix, real coordinates and real matrix, and the calculation formula is as follows: in, Refers to the distribution distance, Refers to calculating the Euclidean distance, Refers to computing the trace of a matrix.
[0049] Explainably, the distribution distance refers to the parameter that measures the difference between the target detection box and the true detection box. The smaller the distribution distance, the smaller the difference between the target detection box and the true detection box, and the more similar the target detection box is to the true detection box.
[0050] In detail, the target detection model is optimized according to the area overlap and distribution distance to obtain an optimized detection model, including: A comprehensive optimization function is constructed based on the regional overlap and distribution distance: in, Refers to the comprehensive optimization function, Refers to the preset balance parameters; Calculating a comprehensive optimization value of the target detection frame based on a comprehensive optimization function; Compare the comprehensive optimization value with the preset comprehensive optimization threshold; If it is confirmed that the comprehensive optimization value is not greater than the comprehensive optimization threshold, the target coordinates, the target detection frame width and the target detection frame height are adjusted, and the updated overlap and the updated distribution distance are calculated using the adjusted target coordinates, the adjusted target detection frame width and the adjusted target detection frame height, with the updated overlap being the regional overlap and the updated distribution distance being the distribution distance, and returning to the above step of constructing a comprehensive optimization function based on the regional overlap and the distribution distance until the comprehensive optimization value is greater than the comprehensive optimization threshold to obtain an optimized detection model.
[0051] Explainable, comprehensive optimization function refers to a function that combines regional overlap and distribution distance, which can more comprehensively evaluate the difference between the target detection frame and the real detection frame, comprehensive optimization value refers to the output of the comprehensive optimization function, the larger the comprehensive optimization value, the smaller the difference between the target detection frame and the real detection frame, the more similar the target detection frame and the real detection frame, the balance parameter refers to the parameter that adjusts the influence of regional overlap on the comprehensive optimization function, the larger the balance parameter, the greater the influence of regional overlap on the comprehensive optimization function. Comprehensive optimization threshold refers to the threshold set manually for evaluating the target detection frame, when the comprehensive optimization value is greater than the comprehensive optimization threshold, it is confirmed that the target detection frame is consistent with the real detection frame. Adjusting the target coordinates refers to adjusting the geometric center of the target detection frame. The method for adjusting the target coordinates, the target detection frame width, and the target detection frame height is as follows: first, construct the target coordinate loss function, the detection frame width loss function, and the detection frame height loss function. Then, minimize the loss of the target coordinate loss function, minimize the loss of the detection frame width loss function, and minimize the loss of the detection frame height loss function. Then, adjust the target coordinates, the target detection frame width, and the target detection frame height according to the minimized loss of the target coordinate loss function, the minimized loss of the detection frame width loss function, and the minimized loss of the detection frame height loss function. This is a prior art and will not be described in detail here. The target coordinate loss function refers to a function that uses the Euclidean distance between the target coordinates and the true coordinates as the loss. The detection frame width loss function refers to a function that uses the absolute value of the difference between the target detection frame width and the true detection frame width as the loss. The detection frame height loss function refers to a function that uses the absolute value of the difference between the target detection frame height and the true detection frame height as the loss. This is a prior art and will not be described in detail here. For example, the target coordinate loss function is , the detection box width loss function is: , the detection box height loss function is: , the comprehensive optimization value is 0.5, the comprehensive optimization threshold is 0.6, and the target coordinates, target detection frame width and target detection frame height are adjusted based on the target coordinate loss function, the detection frame width loss function and the detection frame height loss function, respectively. The comprehensive optimization value is 0.65, which is greater than the comprehensive optimization threshold, and the adjustment of the target coordinates, target detection frame width and target detection frame height is completed. Updated coincidence refers to the regional coincidence calculated using the adjusted target coordinates, the adjusted target detection frame width and the adjusted target detection frame height. Updated distribution distance refers to the distribution distance calculated using the adjusted target coordinates, the adjusted target detection frame width and the adjusted target detection frame height.
[0052] S6. Use the optimized detection model to perform target detection on the detection image to obtain an optimized detection frame, obtain the defect area based on the optimized detection frame, and calculate the defect ratio based on the defect area. When the defect ratio is greater than a preset ratio threshold, confirm that the evaluation level is an elimination level; when the defect ratio is less than the ratio threshold, confirm that the evaluation level is a qualified level, thereby completing the automated detection and evaluation of the insulating sheet.
[0053] It can be explained that the optimized detection frame refers to the detection frame generated after the optimized detection model performs target detection on the detection image, the defect area refers to the area of the optimized detection frame, the defect ratio refers to the ratio of the defect area to the area of the detection image, and the ratio threshold refers to the artificially set threshold for evaluating the defect ratio.
[0054] The present invention solves the problem described in the background technology. First, a thickness range is set, and the thickness range is uniformly extracted based on the thickness spacing to obtain an extracted thickness set. By reasonably setting the thickness spacing, the sample selection bias can be reduced. The uniform extraction of insulating sheet samples of different thicknesses can cover the entire thickness range, ensuring the comprehensiveness and diversity of the data of the insulating sheet samples, which is helpful to improve the reliability of automatic detection of insulating sheets. The extracted thickness in the extracted thickness set corresponds to the insulating sheet samples in the insulating sheet sample set one by one. Each extracted thickness in the extracted thickness set has a corresponding insulating sheet sample, which makes it easy to systematically analyze subsequent detection results and ensures the coherence and consistency of the evaluation. Secondly, a grayscale conversion curve is constructed based on the sample image set. The grayscale conversion curve can obtain the thickness of the insulating sheet corresponding to the detection image according to the grayscale value of the detection image, and provide accurate data for the subsequent comparison of uniform thickness thresholds. Afterwards, the grayscale conversion curve is used to perform thickness detection on the detection image to obtain the maximum detection thickness and the minimum detection thickness. The relationship between the gray value in the gray conversion curve and the thickness value of the insulating sheet is used to detect the thickness of the detection image, and the maximum thickness and the minimum thickness of the insulating sheet corresponding to the detection image can be accurately obtained, thereby improving the accuracy of the comparison of the thickness threshold; then, the uniform thickness threshold and the detection thickness difference are used to judge the evaluation level, thereby improving the efficiency of the automatic detection of the insulating sheet. If the detection thickness difference is not greater than the uniform thickness threshold, the target detection model is optimized to obtain the optimized detection model. By optimizing the target detection model, the accuracy of the target detection model can be improved, and the accuracy of the automatic detection of the insulating sheet can be improved; finally, the detection image is subjected to target detection using the optimized detection model to obtain an optimized detection frame, and the defect area is obtained based on the optimized detection frame. The defect ratio is calculated based on the defect area. By performing target detection on the detection image using the optimized detection model, the defect area on the detection image can be accurately obtained. The defect ratio calculated based on the defect area can ensure that the division of the qualified level and the eliminated level is more scientific and reasonable. Therefore, the present invention can improve the accuracy of the quality detection of the insulating sheet.
[0055] like Figure 2 , which is a functional module diagram of an automatic detection and evaluation system for insulating sheets provided in one embodiment of the present invention.
[0056] The automatic detection and evaluation system 100 of the insulating sheet of the present invention can be installed in an electronic device. According to the functions to be implemented, the automatic detection and evaluation system 100 of the insulating sheet can include a thickness extraction module 101, a sample image acquisition module 102, a thickness detection module 103 and a grade evaluation module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.
[0057] The thickness extraction module 101 is used to receive an insulation sheet detection instruction and start a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; The sample image acquisition module 102 is used to sequentially extract insulating sheet samples from the insulating sheet sample set, and use the started image acquisition device to perform image acquisition on the extracted insulating sheet samples to obtain sample images, and summarize the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; The thickness detection module 103 is used to construct a grayscale conversion curve based on the sample image set, obtain the insulating sheet to be detected, and use the image acquisition device to collect the detection image of the insulating sheet to be detected to obtain the detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; The grade evaluation module 104 is used to calculate the difference in detected thickness based on the maximum detected thickness and the minimum detected thickness, and to determine the evaluation grade based on the difference in detected thickness and a preset uniform thickness threshold, wherein the evaluation grades include: qualified grade and eliminated grade; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
[0058] In detail, each module in the automatic detection and evaluation system 100 of the insulating sheet in the embodiment of the present invention is used in the same manner as described above. Figure 1 The same technical means as the automated detection and evaluation method of the insulating sheet described in the text and the like can produce the same technical effects, which will not be repeated here.
[0059] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing an automatic detection and evaluation method of an insulating sheet provided by an embodiment of the present invention.
[0060] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an automated detection and evaluation method program for insulating sheets.
[0061] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the program of the automated detection and evaluation method of the insulating sheet, but also can be used to temporarily store data that has been output or is to be output.
[0062] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as the program of the automated detection and evaluation method of the insulating sheet, etc.) stored in the memory 11, and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0063] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0064] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0065] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0066] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0067] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0068] The program of the method for automatic detection and evaluation of insulating sheets stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, the following can be achieved: receiving an insulation sheet detection instruction, and starting a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; Extracting insulating sheet samples from the insulating sheet sample set in sequence, and using the started image acquisition device to acquire images of the extracted insulating sheet samples to obtain sample images, and summarizing the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; Constructing a grayscale conversion curve based on the sample image set, obtaining an insulating sheet to be detected, and using the image acquisition device to acquire a detection image of the insulating sheet to be detected to obtain a detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; Calculate the difference in thickness based on the maximum thickness and the minimum thickness, and determine the evaluation level based on the difference in thickness and a preset uniform thickness threshold, wherein the evaluation levels include: qualified level and eliminated level; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
[0069] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0070] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0071] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement: receiving an insulation sheet detection instruction, and starting a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; Extracting insulating sheet samples from the insulating sheet sample set in sequence, and using the started image acquisition device to acquire images of the extracted insulating sheet samples to obtain sample images, and summarizing the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; Constructing a grayscale conversion curve based on the sample image set, obtaining an insulating sheet to be detected, and using the image acquisition device to acquire a detection image of the insulating sheet to be detected to obtain a detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; Calculate the difference in thickness based on the maximum thickness and the minimum thickness, and determine the evaluation level based on the difference in thickness and a preset uniform thickness threshold, wherein the evaluation levels include: qualified level and eliminated level; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
[0072] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.
[0073] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0075] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An automated detection and evaluation method for an insulating sheet, characterized in that: The method comprises: receiving an insulation sheet detection instruction, and starting a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; Extracting insulating sheet samples from the insulating sheet sample set in sequence, and using the started image acquisition device to acquire images of the extracted insulating sheet samples to obtain sample images, and summarizing the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; Constructing a grayscale conversion curve based on the sample image set, obtaining an insulating sheet to be detected, and using the image acquisition device to acquire a detection image of the insulating sheet to be detected to obtain a detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; Calculate the difference in thickness based on the maximum thickness and the minimum thickness, and determine the evaluation level based on the difference in thickness and a preset uniform thickness threshold, wherein the evaluation levels include: qualified level and eliminated level; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
2. The automated detection and evaluation method for insulating sheets according to claim 1, characterized in that: The step of constructing a grayscale conversion curve based on the sample image set includes: Extracting sample images from the sample image set in sequence, performing grayscale operations on the extracted sample images to obtain sample grayscale images, and collecting the sample grayscale images to obtain a sample grayscale image set; Extracting sample grayscale images in the sample grayscale image set in sequence, and performing grayscale measurement operations on the extracted sample grayscale images based on preset measurement parameters to obtain a plurality of measured grayscale values, performing mean calculation on the plurality of measured grayscale values to obtain grayscale means, and collecting the grayscale means to obtain a grayscale mean set, wherein the grayscale means in the grayscale mean set correspond one-to-one to the extracted thicknesses in the extracted thickness set; A grayscale conversion curve is constructed according to the grayscale mean value set.
3. The automated detection and evaluation method for insulating sheets according to claim 2, characterized in that: The step of constructing a grayscale conversion curve according to the grayscale mean value set includes: Performing a grayscale normalization operation on all grayscale means in the grayscale mean value set to obtain a normalized grayscale value set, and performing a thickness normalization operation on all extracted thicknesses in the extracted thickness set to obtain a normalized thickness value set, wherein the normalized grayscale values in the normalized grayscale value set correspond one-to-one to the normalized thickness values in the normalized thickness value set; A conversion horizontal axis and a conversion vertical axis are constructed according to the normalized grayscale value and the normalized thickness value, a conversion coordinate system is constructed based on the conversion horizontal axis and the conversion vertical axis, and a grayscale conversion curve is constructed according to the normalized grayscale value set, the normalized thickness value set and the conversion coordinate system.
4. The automated detection and evaluation method for insulating sheets according to claim 3, characterized in that: The method of using the grayscale conversion curve to perform thickness detection on the detection image to obtain the maximum detection thickness and the minimum detection thickness includes: Performing a grayscale operation on the detection image to obtain a detection grayscale image; The detection grayscale image is divided into blocks based on a preset block area to obtain a block image set, the block grayscale mean of each block image in the block image set is calculated, and the block grayscale means are summarized to obtain a block grayscale mean set; Extracting the maximum grayscale mean and the minimum grayscale mean from the grayscale mean set, and using the maximum grayscale mean and the minimum grayscale mean to perform grayscale normalization operation on all block grayscale means in the block grayscale mean set to obtain a normalized block mean set; Based on the grayscale conversion curve, all normalized block means in the normalized block mean set are subjected to thickness retrieval to obtain a normalized block thickness set; The maximum and minimum thicknesses detected are obtained from the normalized block thickness set.
5. The automated detection and evaluation method for insulating sheets according to claim 4, characterized in that: The step of determining the optimized detection model includes: Based on the pre-trained target detection model, the target detection operation is performed on the preset optimized image to obtain the target detection frame, where there are cracks and real detection frames in the optimized image. The target detection frame is: in, refers to the target detection box, Refers to the horizontal coordinate of the prediction center, Refers to the vertical coordinate of the prediction center, Refers to the width of the target detection box. Refers to the height of the target detection box; The real detection box is: in, refers to the real detection frame, refers to the true center horizontal coordinate, refers to the true center ordinate, Refers to the real detection frame width, Refers to the real detection frame height; Calculate the region overlap based on the target detection frame and the real detection frame; Get the target coordinates and target matrix of the target detection frame, and get the real coordinates and real matrix of the real detection frame; Calculate the distribution distance based on the target coordinates, the target matrix, the real coordinates and the real matrix; The target detection model is optimized according to the area overlap and distribution distance to obtain an optimized detection model.
6. The automated detection and evaluation method for insulating sheets according to claim 5, characterized in that: The calculating the region overlap based on the target detection frame and the real detection frame includes: The total detection area is calculated based on the target detection frame and the true detection frame, and the total overlapping area is calculated based on the target detection frame and the true detection frame; Calculate the area overlap based on the total detection area and the total overlapping area: in, Refers to the regional overlap, Refers to the total overlapping area, Refers to the total area of the inspection.
7. The automated detection and evaluation method for insulating sheets according to claim 6, characterized in that: The step of obtaining the target coordinates and the target matrix of the target detection frame and obtaining the real coordinates and the real matrix of the real detection frame includes: Get the target coordinates based on the target detection frame, where the target coordinates are: in, Refers to the target coordinates; Get the target horizontal expansion value and the target vertical expansion value, and build the target matrix based on the target horizontal expansion value and the target vertical expansion value: in, refers to the target matrix, refers to the target horizontal expansion value, Refers to the preset adjustment factor, Refers to the target vertical expansion value; Get the real coordinates based on the real detection frame, where the real coordinates are: in, Refers to the real coordinates; Get the real horizontal expansion value and the real vertical expansion value, and construct the real matrix based on the real horizontal expansion value and the real vertical expansion value: in, refers to the real matrix, Refers to the true horizontal expansion value, Refers to the true vertical expansion value.
8. The automated detection and evaluation method for insulating sheets according to claim 7, characterized in that: The distribution distance is calculated based on the target coordinates, target matrix, real coordinates and real matrix, and the calculation formula is as follows: in, Refers to the distribution distance, Refers to calculating the Euclidean distance, Refers to computing the trace of a matrix.
9. The automated detection and evaluation method for insulating sheets according to claim 8, characterized in that: The target detection model is optimized according to the area overlap and distribution distance to obtain an optimized detection model, including: A comprehensive optimization function is constructed based on the regional overlap and distribution distance: in, Refers to the comprehensive optimization function, Refers to the preset balance parameters; Calculating a comprehensive optimization value of the target detection frame based on a comprehensive optimization function; Compare the comprehensive optimization value with the preset comprehensive optimization threshold; If it is confirmed that the comprehensive optimization value is not greater than the comprehensive optimization threshold, the target coordinates, the target detection frame width and the target detection frame height are adjusted, and the updated overlap and the updated distribution distance are calculated using the adjusted target coordinates, the adjusted target detection frame width and the adjusted target detection frame height, with the updated overlap being the regional overlap and the updated distribution distance being the distribution distance, and returning to the above step of constructing a comprehensive optimization function based on the regional overlap and the distribution distance until the comprehensive optimization value is greater than the comprehensive optimization threshold to obtain an optimized detection model.
10. An automated detection and evaluation system for insulating sheets, characterized in that: The system comprises: A thickness extraction module, used for receiving an insulation sheet detection instruction and starting a pre-built image acquisition device based on the insulation sheet detection instruction; Set the thickness range, extract the thickness range evenly based on the preset thickness interval, obtain the extracted thickness set, and obtain the insulation sheet sample set according to the extracted thickness set, where the thickness range is , the extracted thicknesses in the extracted thickness set correspond one-to-one to the insulating sheet samples in the insulating sheet sample set; A sample image acquisition module is used to sequentially extract insulating sheet samples from the insulating sheet sample set, and use the started image acquisition device to perform image acquisition on the extracted insulating sheet samples to obtain sample images, and summarize the sample images to obtain a sample image set, wherein the image acquisition device is located directly above the insulating sheet samples, and the sample images are RGB images; A thickness detection module, used to construct a grayscale conversion curve based on the sample image set, obtain the insulating sheet to be detected, and use the image acquisition device to collect detection images of the insulating sheet to be detected to obtain a detection image; Using the grayscale conversion curve to perform thickness detection on the detection image, and obtain the maximum detection thickness and the minimum detection thickness; A grade evaluation module, used for calculating the difference in detected thickness based on the maximum detected thickness and the minimum detected thickness, and judging the evaluation grade based on the difference in detected thickness and a preset uniform thickness threshold, wherein the evaluation grades include: qualified grade and eliminated grade; Compare the detected thickness difference with the uniform thickness threshold; If the detected thickness difference is greater than the uniform thickness threshold, the evaluation level is confirmed to be the elimination level; If the detected thickness difference is not greater than the uniform thickness threshold, the optimized detection model is confirmed; Performing target detection on the detection image by using an optimized detection model to obtain an optimized detection frame, obtaining a defect area based on the optimized detection frame, calculating a defect ratio based on the defect area, and confirming that the evaluation level is an elimination level when the defect ratio is greater than a preset ratio threshold; When the defect ratio is less than the ratio threshold, the evaluation level is confirmed to be a qualified level, and the automated inspection and evaluation of the insulating sheet is completed.
Citation Information
Patent Citations
A method for detecting defects of a piston blank with a complex inner structure
CN109584231A
Defect detection evaluation method and device, electronic equipment and storage medium
CN112037214A
System for measuring and correcting printing ink thickness through camera gray scale and measurement and correction method
CN116258723A
AR glasses fitting uniformity detection method
CN116428991A
3D printing bridge prefabricated box girder construction quality monitoring system based on deep learning
CN116630282A
Cited By
Corrugated carton production quality detection method and system based on intelligent analysis
CN120495277A