A die-cutting defect detection method and system
Patent Information
- Application Number
- CN202510814341.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2045-06-18
AI Technical Summary
[0003]传统检测手段多采用单一光源的线阵相机进行明场成像,通过阈值分割或边缘检测算法识别明显破损,但在高速动态场景下,易因材料反光干扰、透射光晕效应导致缺陷漏检,尤其对偏振特性敏感的应力缺陷(如内部分层)几乎无法检出
分析模块,用于定期或实时对所述缺陷数据库中的缺陷信息进行统计分析以及对所述缺陷信息与所述生产参数信息进行相关性分析,以生成分析结果。
Smart Images

Figure CN120672726B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of die-cutting machine technology, and more specifically, to a method and system for detecting die-cutting defects. Background Technology
[0002] In high-end manufacturing fields such as precision electronic devices, flexible circuit boards, and optical films, high-speed thin film die-cutting technology uses molds to cut and shape multilayer composite films with high precision. Due to the characteristics of thin film materials such as high light transmittance, strong surface reflectivity, and sensitivity to interlayer stress, defects such as edge burrs, delamination warping, and microcracks are easily generated during the production process due to factors such as mold wear, tension fluctuations, and temperature changes.
[0003] Traditional inspection methods often employ linear scan cameras with a single light source for bright-field imaging, using threshold segmentation or edge detection algorithms to identify obvious damage. However, in high-speed dynamic scenes, defects are easily missed due to material reflection interference and transmission halo effects, especially stress defects sensitive to polarization characteristics (such as internal delamination), which are almost impossible to detect. Furthermore, existing technologies lack real-time correlation analysis between defect characteristics and process parameters, leading to defect tracing relying on human experience, making it difficult to locate process anomalies, and hindering production yield improvement and process iteration efficiency.
[0004] There is currently no effective technical solution to the above problems. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for detecting die-cutting defects, which can extract and analyze defects through multimodal image data, and combine production parameters for data correlation and analysis, so as to provide data support for production process optimization.
[0006] In a first aspect, this application provides a method for detecting die-cutting defects, applied in a high-speed film die-cutting production line, the method comprising the following steps: S1. Acquire the bright-field image and polarization image of the thin film to be tested; S2. Correct, register and integrate the bright-field image and the polarization image to obtain multi-channel image input information; S3. Using a pre-trained defect localization model, analyze and obtain the defect region based on the multi-channel image input information, and locate the coordinates of the defect region; S4. Extract defect characteristic information from the defect area; S5. Associate the defect characteristic information with the production parameter information of the film to be tested, and store it in the defect database; S6. Periodically or in real time, perform statistical analysis on the defect information in the defect database and perform correlation analysis on the defect information and the production parameter information to generate analysis results.
[0007] The die-cutting defect detection method of this application acquires bright field and polarization multi-channel images, performs calibration and registration, inputs them into a defect location model, extracts defect features, and correlates them with production parameters. This overcomes the influence of the diversity of material optical properties, effectively integrates multimodal imaging information, and performs in-depth correlation analysis between defect features and production parameters, providing data support for production process optimization.
[0008] The die-cutting defect detection method, wherein step S2 includes: S21. Calculate the displacement deviation and angle deviation values of the bright field image and the polarization image using the phase correlation method; S22. Based on the displacement deviation value and the angle deviation value, a bilinear interpolation algorithm is used to perform geometric correction on the bright field image and the polarization image to obtain the corrected bright field image and the corrected polarization image. S23. Based on the phase correlation method of Fourier transform, image registration is performed on the corrected bright field image and the corrected polarization image, and the sub-pixel level offset is calculated and obtained. S24. Using the corrected bright-field image as the reference image, resample the corrected polarization image according to the offset, so that the corrected polarization image and the corrected bright-field image are registered and aligned in spatial position. S25. Merge the registered and aligned bright-field and polarization images into channels to construct the multi-channel image input information.
[0009] The above processing method effectively solves the image distortion and spatial position deviation that may exist in bright field images and polarized images during the acquisition process, so that the information of different imaging modes can be accurately integrated, providing reliable input data for subsequent defect localization and analysis, and improving the accuracy of defect detection.
[0010] The die-cutting defect detection method, wherein step S23 includes: S231. Perform Fourier transform on the corrected bright-field image and the corrected polarization image respectively to obtain the corresponding bright-field image spectrum and polarization image spectrum. S232. Calculate the cross power spectrum of the bright field image spectrum and the polarization image spectrum, and normalize the cross power spectrum to obtain the normalized cross power spectrum. S233. Perform an inverse Fourier transform on the normalized cross-power spectrum to obtain the phase correlation function; S234. Search for a peak value in the phase correlation function and obtain a sub-pixel level offset based on the coordinate position corresponding to the peak value.
[0011] The die-cutting defect detection method, wherein the step of normalizing the cross-power spectrum to obtain the normalized cross-power spectrum includes: S2321. Calculate the amplitude spectrum of the bright field image spectrum and the amplitude spectrum of the polarization image spectrum; S2322. The normalized cross-power spectrum is obtained by dividing the cross-power spectrum by the product of the amplitude spectrum of the bright field image spectrum and the amplitude spectrum of the polarization image spectrum.
[0012] The die-cutting defect detection method, wherein step S3 includes: S31. Input the multi-channel image input information into the pre-trained defect localization model, and output the predicted probability map and predicted bounding box of the defect region; S32. Based on the predicted probability map, an adaptive threshold non-maximum suppression algorithm is used to filter overlapping predicted bounding boxes, retain the predicted bounding box with the highest confidence as the final defect region, and extract the coordinates of the defect region.
[0013] The die-cutting defect detection method, wherein the step of using an adaptive threshold non-maximum suppression algorithm to filter overlapping predicted bounding boxes based on the predicted probability map and retaining the predicted bounding box with the highest confidence as the final defect region includes: S321. For the predicted probability map, determine the initial threshold according to the thin film material type; S322. Adjust the initial threshold according to the defect size to obtain an adaptive threshold, wherein the defect size is determined by analyzing the area and aspect ratio of the predicted bounding box; S323. Based on the adaptive threshold, filter the predicted bounding boxes in the predicted probability map whose confidence scores are greater than the adaptive threshold to obtain candidate defect regions; S324. For the candidate defect region, calculate the overlap between each predicted bounding box and its adjacent predicted bounding boxes. If the overlap is greater than a preset overlap threshold, retain the predicted bounding box with the highest confidence and suppress other overlapping predicted bounding boxes to obtain the final defect region.
[0014] The die-cutting defect detection method, wherein the defect characteristic information includes multiple aspects such as defect boundary, area, aspect ratio, direction, texture features, edge sharpness, and contrast difference and / or polarization response difference in bright field image and polarized image.
[0015] The die-cutting defect detection method, wherein step S5 includes: S51. Obtain the material batch, equipment operating status, die-cutting process parameters, and ambient temperature and humidity of the film to be tested from the management system of the high-speed film die-cutting production line, and construct a production parameter information set; S52. Based on the coordinates of the defect area, extract the physical location information of the film corresponding to the image acquisition time, and construct an associated dataset by combining the defect characteristic information, physical location information and production parameter information of the defect area. S53. Store the associated dataset in the defect database according to the preset data format.
[0016] The die-cutting defect detection method, wherein step S6 includes: S61. Periodically perform statistical analysis, spatial distribution analysis, time trend analysis, and correlation analysis between the defect information and the production parameter information in the defect database to generate analysis results, and present the analysis results through the interface.
[0017] Secondly, this application also provides a die-cutting defect detection system for use in a high-speed film die-cutting production line, the system comprising: The image acquisition module is used to acquire bright-field and polarization images of the thin film to be tested. The preprocessing module is used to correct, register, and integrate the brightfield image and the polarization image to obtain multi-channel image input information; The defect localization module is used to analyze and obtain the defect region based on the multi-channel image input information using a pre-trained defect localization model, and to locate the coordinates of the defect region; The feature extraction module is used to extract defect feature information from the defect area; A storage module is used to associate the defect characteristic information with the production parameter information of the film to be inspected and store it in the defect database; The analysis module is used to perform statistical analysis on defect information in the defect database periodically or in real time, and to perform correlation analysis on the defect information and the production parameter information to generate analysis results.
[0018] The die-cutting defect detection system of this application acquires bright field and polarization multi-channel images, performs calibration and registration, inputs them into the defect location model, extracts defect features and correlates them with production parameters, overcomes the influence of the diversity of material optical properties, effectively integrates multimodal imaging information, and performs in-depth correlation analysis between defect features and production parameters, providing data support for production process optimization.
[0019] As can be seen from the above, this application provides a die-cutting defect detection method and system. The die-cutting defect detection method of this application acquires bright field and polarization multi-channel images, performs correction and registration, inputs them into a defect location model, extracts defect features and correlates them with production parameters, overcomes the influence of the diversity of material optical properties, effectively integrates multimodal imaging information, and performs in-depth correlation analysis between defect features and production parameters, providing data support for production process optimization. Through multimodal imaging, image processing, model location, feature extraction, data correlation and analysis, it forms a complete defect detection, analysis and feedback closed loop, which improves the accuracy and robustness of defect detection and supports the tracing of defect root causes. Attached Figure Description
[0020] Figure 1 This is a flowchart of a die-cutting defect detection method provided in an embodiment of this application.
[0021] Figure 2 This is a schematic diagram of the structure of the die-cutting defect detection system provided in the embodiments of this application.
[0022] Reference numerals: 201, Image acquisition module; 202, Preprocessing module; 203, Defect localization module; 204, Feature extraction module; 205, Storage module; 206, Analysis module. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0024] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0025] Firstly, please refer to Figure 1 This application provides a die-cutting defect detection method in some embodiments, applied in a high-speed film die-cutting production line. The method includes the following steps: S1. Acquire the bright-field image and polarization image of the thin film to be tested; S2. Correct, register and integrate the bright-field image and polarization image to obtain multi-channel image input information; S3. Utilize a pre-trained defect localization model to analyze and obtain the defect region based on multi-channel image input information, and locate the coordinates of the defect region; S4. Extract defect characteristic information from the defect area; S5. Associate the defect characteristic information with the production parameter information of the film to be inspected and store it in the defect database; S6. Perform statistical analysis on defect information in the defect database periodically or in real time, and perform correlation analysis on defect information and production parameter information to generate analysis results.
[0026] Specifically, step S1 involves acquiring images of the high-speed moving thin film by configuring at least two sets of high-speed cameras and matching light sources. One set of cameras and light sources is used to acquire bright-field images, while the other set of cameras and light sources is configured with polarizing optical elements to acquire polarized images. The high-speed cameras ensure clear images are acquired at production line speeds. The matching light sources provide stable illumination conditions.
[0027] More specifically, step S2 preprocesses the acquired brightfield and polarization images. Correction processing eliminates geometric distortions introduced by the image acquisition system. Registration processing ensures precise spatial alignment of the brightfield and polarization images. Integration processing merges the aligned images of different modalities into a single multi-channel data structure (i.e., multi-channel image input information), which serves as input for subsequent analysis.
[0028] More specifically, step S3 utilizes a pre-trained defect localization model to process the multi-channel image input information. This model analyzes the fused image features of the multi-channel image input information, identifies potential defect regions, and outputs the precise coordinates of these regions in the image.
[0029] More specifically, step S4 extracts information that quantitatively describes the nature of the defect from the defect region located in step S3. This information may include various attributes such as the size, shape, texture, and optical response of the defect.
[0030] More specifically, step S5 correlates the extracted defect characteristic information with the production parameter information corresponding to the thin film under inspection at the time of image acquisition. The production parameter information can be obtained from the production line control system and may include material type, equipment status, process settings, etc. The correlated data is then structured and stored in the defect database.
[0031] More specifically, step S6 analyzes the defect data accumulated in the defect database and the associated production parameters. Statistical analysis can reveal the frequency, type distribution, etc., of defects. Correlation analysis aims to discover which production parameters a specific defect is associated with, thereby identifying the potential causes of the defect. The analysis results are visualized through a user interface.
[0032] The die-cutting defect detection method of this application embodiment acquires bright-field and polarized images of the thin film simultaneously in step S1. The bright-field image provides general surface information, while the polarized image is sensitive to internal material stress, surface microstructure, or contaminants. Combining the two provides a more comprehensive description of the thin film's state, helping to distinguish real defects from background texture. In step S2, the method performs geometric correction on the acquired bright-field and polarized images to eliminate distortion, then performs precise spatial registration to ensure pixel-level alignment of different modal images. Finally, the aligned images are integrated into multi-channel input data. In step S3, the method inputs the multi-channel data into a pre-trained defect localization model. The model analyzes the fusion features, identifies and locates defect regions in the images, and outputs the precise coordinates of the defects. In steps S4 and S5, the method extracts various defect characteristic information from the located defect regions, then obtains production parameter information corresponding to the defect location and time, including material batch, equipment operating status, and process parameters. The extracted defect characteristic information is associated with the corresponding production parameter information to form structured data and stored in a defect database. This method, through step S6, periodically or in real-time performs statistical and correlation analyses on the data in the database. For example, it analyzes whether a specific defect is highly correlated with the operating parameters of a certain piece of equipment or a certain batch of materials. The analysis results are presented through an interface, providing data support for process adjustment and production optimization, and enabling root cause control and prevention of defects.
[0033] As can be seen from the above, the die-cutting defect detection method of this application acquires bright-field and polarization multi-channel images, performs calibration and registration, inputs them into the defect location model, extracts defect features and correlates them with production parameters, overcomes the influence of the diversity of material optical properties, effectively integrates multimodal imaging information, and performs in-depth correlation analysis between defect features and production parameters, providing data support for production process optimization. Through multimodal imaging, image processing, model location, feature extraction, data correlation and analysis, it forms a complete defect detection, analysis and feedback closed loop, which improves the accuracy and robustness of defect detection and supports the tracing of defect root causes.
[0034] In some preferred embodiments, step S2 includes: S21. Calculate the displacement and angle deviation values of the bright field image and polarization image using the phase correlation method; S22. Based on the displacement deviation value and the angle deviation value, the bilinear interpolation algorithm is used to perform geometric correction on the bright field image and the polarization image to obtain the corrected bright field image and the corrected polarization image. S23. Based on the phase correlation method of Fourier transform, image registration is performed on the corrected bright field image and the corrected polarization image, and the sub-pixel level offset is calculated and obtained. S24. Using the corrected bright-field image as the reference image, resample the corrected polarization image according to the offset to make the corrected polarization image and the corrected bright-field image spatially registered and aligned. S25. Merge the registered and aligned bright-field and polarization images into channels to construct multi-channel image input information.
[0035] Specifically, the displacement and angle deviation values obtained in step S21 represent the initial global alignment information between the images. Step S22 corrects image distortion and achieves preliminary alignment. Steps S23 and S24 calculate sub-pixel-level offsets representing the spatial offset between the images, and resample and correct the polarization image based on these offsets, thereby aligning the two images in spatial position and further improving registration accuracy. Step S25 merges the registered and aligned bright-field and polarization images to construct multi-channel image input information, where the corrected bright-field image serves as the first channel and the registered polarization image serves as the second channel, thus integrating information from different imaging modes.
[0036] More specifically, the above processing method effectively solves the image distortion and spatial position deviation that may exist in bright-field images and polarized images during the acquisition process, so that the information of different imaging modes is accurately integrated, providing reliable input data for subsequent defect localization and analysis, and improving the accuracy of defect detection.
[0037] In some preferred embodiments, step S23 includes: S231. Perform Fourier transform on the corrected bright-field image and the corrected polarization image respectively to obtain the corresponding bright-field image spectrum and polarization image spectrum. S232. Calculate the cross power spectrum of the bright field image spectrum and the polarization image spectrum, and normalize the cross power spectrum to obtain the normalized cross power spectrum. S233. Perform an inverse Fourier transform on the normalized cross-power spectrum to obtain the phase correlation function; S234. Search for the peak value in the phase correlation function and obtain the sub-pixel level offset based on the coordinate position corresponding to the peak value.
[0038] Specifically, in practical applications, images may contain noise or exhibit contrast variations. Directly calculating the phase correlation function and searching for peaks can be interfered with, affecting the accuracy and stability of sub-pixel offset calculations. To address this issue, the aforementioned processing method employs a phase correlation method based on Fourier transform for image registration. First, Fourier transforms are performed on both the corrected brightfield image and the corrected polarization image, transforming the images from the spatial domain to the frequency domain. In the frequency domain, the cross-power spectrum of the two images is calculated. The cross-power spectrum highlights the common translation information in the two images and suppresses the influence of noise. Furthermore, normalizing the cross-power spectrum enhances the sharpness of the correlation peak, reduces the impact of image content differences on the correlation, and improves the stability of registration. Then, an inverse Fourier transform is performed on the normalized cross-power spectrum to obtain the phase correlation function. The phase correlation function produces a peak in the spatial domain, and the position coordinates of this peak correspond to the translation amount between the two images. Finally, the peak is searched within the phase correlation function. The position coordinates of the peak represent the pixel-level offset. To obtain subpixel-level offset, interpolation and other techniques can be used to refine the region near the peak, thereby determining more precise peak location coordinates. This subpixel-level offset is crucial information for subsequent image registration and alignment, ensuring accurate superposition of the brightfield and polarization images and providing accurate multi-channel input for subsequent defect detection.
[0039] More specifically, the cross-power spectrum reflects the phase difference between two signals in the frequency domain, while the inverse Fourier transform converts the phase information from the frequency domain back to the spatial domain. This phase information is reflected in the peak position of the phase correlation function. Therefore, the coordinate position of the peak actually corresponds to the sub-pixel level offset between the two images in the spatial domain, where the horizontal and vertical coordinates of the peak position represent the magnitude of the image offset in the horizontal and vertical directions, respectively.
[0040] In some preferred embodiments, the step of normalizing the cross-power spectrum to obtain a normalized cross-power spectrum includes: S2321. Calculate the amplitude spectrum of the bright field image spectrum and the amplitude spectrum of the polarization image spectrum; S2322. The normalized cross power spectrum is obtained by dividing the cross power spectrum by the product of the amplitude spectrum of the bright field image spectrum and the amplitude spectrum of the polarization image spectrum.
[0041] Specifically, step S2321 is used to obtain the amplitude information of the two images in the frequency domain. Then, step S2322 divides the cross power spectrum by the product of the amplitude spectrum of the bright field image and the amplitude spectrum of the polarization image, thereby achieving cross power spectrum normalization. This effectively removes the influence of amplitude changes on the cross power spectrum and highlights the phase difference information. The phase difference information directly reflects the translation amount of the image.
[0042] More specifically, the normalized cross-power spectrum obtained after this normalization process will produce a sharp peak in the phase correlation function obtained by its inverse Fourier transform at the corresponding image offset position. This normalization method enhances the signal-to-noise ratio of the phase correlation function peak, making the peak search and sub-pixel level offset extraction in subsequent steps more accurate and reliable. The above processing method solves the problem of peaks not being prominent or being affected by noise that may occur if a specific normalization method is not used, thus improving the accuracy of image registration.
[0043] In some preferred embodiments, step S3 includes: S31. Input the multi-channel image input information into the pre-trained defect localization model, and output the predicted probability map and predicted bounding box of the defect area; S32. Based on the predicted probability map, the non-maximum suppression algorithm with adaptive threshold is used to filter overlapping predicted bounding boxes, retain the predicted bounding box with the highest confidence as the final defect region, and extract the coordinates of the defect region.
[0044] Specifically, in step S31, the defect localization model is a deep learning model, preferably comprising multiple convolutional layers, pooling layers, and fully connected layers. The convolutional layers extract features at different levels from the input image, capturing local and global patterns of defects. The pooling layers reduce the spatial size of the feature map, lower computational complexity, and enhance the model's robustness to positional changes. The fully connected layers perform classification and regression tasks based on the extracted features. The classification part outputs a predicted probability map, representing the probability that each pixel or region in the image belongs to a defect. The regression part outputs a predicted bounding box corresponding to the predicted probability map, defining the possible location and extent of the defect. Thus, the model can identify potential defect regions in the image and provide preliminary location information.
[0045] More specifically, the adaptive threshold is preferably dynamically adjusted based on the type of thin film material and the size of the defect. For example, a base threshold can be set for a specific material; for defects with larger predicted sizes, the threshold can be appropriately lowered to avoid mistaking real defects for background noise; for defects with smaller predicted sizes, the threshold can be appropriately increased to reduce false detections.
[0046] More specifically, the defect localization model may generate multiple overlapping predicted bounding boxes for the same defect, and these bounding boxes have different confidence levels (usually related to the probability values in the predicted probability map). Therefore, step S32 employs the Non-Maximum Suppression (NMS) algorithm to process these overlapping bounding boxes. The NMS algorithm, based on the predicted probability map and the predicted bounding boxes, iteratively selects the optimal bounding boxes. Specifically, the algorithm selects a series of bounding boxes with the highest current confidence based on an adaptive threshold, and then suppresses (removes) all other bounding boxes whose overlap exceeds a certain threshold. This process is repeated until all bounding boxes have been processed. The adaptive threshold is dynamically set according to the material type of the film to be detected and the defect size indicated by the predicted bounding boxes. Different material types (e.g., polyester, polyimide, polypropylene) may have different optical properties and background textures, affecting the model's predicted probability distribution; defects of different sizes may also require different screening criteria. By adjusting the NMS threshold according to the material type and defect size, bounding boxes representing true defects can be screened more accurately, reducing false positives and false negatives. The remaining bounding box is determined as the final defect area, and its corresponding coordinate information is extracted.
[0047] More specifically, the above processing method solves the problem that the general defect location model may have insufficient location accuracy or limited recognition ability when facing different materials and defect types, and improves the accuracy and robustness of defect location.
[0048] In some preferred embodiments, the step of filtering overlapping predicted bounding boxes using an adaptive threshold non-maximum suppression algorithm based on the predicted probability map, and retaining the predicted bounding box with the highest confidence as the final defect region, includes: S321. For the predicted probability map, determine the initial threshold according to the thin film material type; S322. Adjust the initial threshold according to the defect size to obtain an adaptive threshold, wherein the defect size is determined by analyzing the area and aspect ratio of the predicted bounding box; S323. Based on the adaptive threshold, filter the predicted bounding boxes in the predicted probability map whose confidence scores are greater than the adaptive threshold to obtain candidate defect regions. S324. For the candidate defect region, calculate the overlap between each predicted bounding box and its adjacent predicted bounding boxes. If the overlap is greater than the preset overlap threshold, retain the predicted bounding box with the highest confidence and suppress other overlapping predicted bounding boxes to obtain the final defect region.
[0049] Specifically, step S321 determines an initial threshold based on the material type of the film to be tested. Different material types, such as polyester film, polyimide film, or polypropylene film, have different optical properties and background noise levels, thus requiring different initial sensitivities. This initial threshold can be pre-stored in a lookup table or obtained through model parameters associated with the material type.
[0050] More specifically, step S322 adjusts the initial threshold based on the defect size obtained from the predicted bounding box analysis to generate an adaptive threshold. The defect size is determined by calculating the area and aspect ratio of the predicted bounding box. Generally, larger defects are more noticeable in the image and have a relatively lower threshold requirement; therefore, the larger the defect, the smaller the adaptive threshold should be. This adjustment can be achieved through a preset function or mapping relationship, which takes the defect size as input and outputs the threshold adjustment amount.
[0051] More specifically, the adaptive threshold is actually a confidence score threshold. Step S323 uses the generated adaptive threshold to perform preliminary screening of the predicted probability map. Predicted bounding boxes with confidence scores greater than the adaptive threshold in all predicted probability maps are retained, forming candidate defect regions. This step effectively eliminates a large number of low-confidence background regions, reducing the computational load of subsequent processing.
[0052] More specifically, step S324 applies a non-maximum suppression algorithm to the candidate defect region. This algorithm calculates the overlap between any two overlapping predicted bounding boxes within the candidate region, for example, using the intersection-union ratio (IUU) as a metric. If the overlap between two bounding boxes exceeds a preset overlap threshold, their confidence scores are compared, retaining the bounding box with the highest confidence score and suppressing other overlapping bounding boxes. By iterating this process, a set of non-overlapping or low-overlapping predicted bounding boxes is finally obtained, with each bounding box corresponding to an independent defect instance, thus obtaining the final defect region.
[0053] By combining adaptive thresholding and non-maximum suppression based on material type and defect size, this scheme can more robustly extract accurate defect regions from the prediction results, effectively solving the problem of screening difficulties under different materials and defect sizes, and improving the accuracy of defect localization.
[0054] In some preferred embodiments, the defect characteristic information includes various factors such as defect boundary, area, aspect ratio, orientation, texture features, edge sharpness, and differences in contrast and polarization response in bright-field and polarized images.
[0055] Specifically, the defect boundary can be determined based on the predicted bounding box of the defect region, or it can be determined by image recognition based on the location of the defect region.
[0056] More specifically, among the aforementioned defect characteristic information, the defect boundary defines the extent of the defect, the area quantifies the size of the defect, the aspect ratio and direction describe the shape characteristics of the defect, the texture characteristics reflect the gray-scale change pattern within the defect area, the edge sharpness characterizes the clarity of the defect boundary, the contrast difference measures the difference between the brightness or gray-scale of the defect and the background in a bright-field image, and the polarization response difference measures the difference between the defect's ability to change polarized light and the background in a polarized image. Among these, the contrast difference and polarization response difference indicate the differences in sensitivity of different imaging modes to defects.
[0057] More specifically, this multi-dimensional and multi-modal characteristic information provides richer and more discriminative input data for defect correlation analysis and statistical analysis. This improves the effective correlation between defect information and production parameters, supports accurate judgment and tracing of defect causes, and solves the problem that general defect information is insufficient to comprehensively characterize defects.
[0058] In some preferred embodiments, step S4 includes: S41. Extract the predicted bounding box of the defect region as the defect boundary; S42. Use a polygon approximation algorithm to fit the defect boundary, and calculate the area of the region enclosed by the fitted defect boundary and the aspect ratio of the minimum bounding rectangle. S43. Based on the gray-level co-occurrence matrix method, extract four texture feature parameters of energy, contrast, correlation and entropy of the defect region in bright field image and polarization image respectively; S44. Calculate the gradient magnitude of the edge pixels of the defect region, and count the proportion of the number of pixels with gradient magnitude greater than the preset sharpness threshold to the total number of edge pixels, as the sharpness of the defect edge. S45. Calculate the difference between the average gray values of the defect region in the bright field image and the polarized image as the contrast difference. At the same time, calculate the difference between the maximum and minimum polarization angles of the defect region in the polarized image as the polarization response difference.
[0059] Specifically, in step S41, the predicted bounding box is output by the defect localization model.
[0060] More specifically, in step S42, the polygon approximation algorithm can be implemented using the Ramer-Douglas-Peucker algorithm, with the approximation accuracy controlled by setting an epsilon parameter; the area of the fitted region can be obtained by calculating the vertex coordinates of the approximating polygon using the Shoelace formula; the minimum bounding rectangle can be calculated by analyzing the vertex set of the fitted polygon. The defect boundary can be either a predicted bounding box or the fitted defect boundary.
[0061] More specifically, in step S43, the calculation of the gray-level co-occurrence matrix (GLCM) requires setting the number of gray levels, spatial distance, and angle (e.g., 0 degrees, 45 degrees, 90 degrees, 135 degrees); energy, contrast, correlation, and entropy are standard statistics based on the calculated GLCM matrix.
[0062] More specifically, in step S44, the gradient magnitude can be calculated using the Sobel, Prewitt, or Roberts operators; edge pixels can be determined using an edge detection algorithm (such as Canny edge detection) or based on a gradient magnitude threshold; and the sharpness ratio is calculated by counting the number of edge pixels whose gradient magnitude exceeds a preset threshold and dividing by the total number of edge pixels. These four texture feature parameters can be directly used as texture features.
[0063] More specifically, in step S45, the average gray value is obtained by summing the gray values of all pixels in the defect area and dividing by the number of pixels; the calculation of the polarization angle depends on the specific configuration of the polarization imaging system, for example, by analyzing the intensity of images in different polarization directions or calculating the Stokes parameters; the maximum and minimum polarization angles are obtained by searching within the defect area.
[0064] More specifically, in the above processing method, step S41 uses the predicted bounding box output by the localization model to quickly obtain the basic geometric information of the defect, which serves as the base area for subsequent analysis. Step S42 uses a polygon approximation algorithm to more accurately fit the boundary, calculating the fitted area and aspect ratio, thereby obtaining more accurate shape and size information than a simple bounding box, which helps to distinguish defects of different shapes. Step S43 uses the gray-level co-occurrence matrix method to extract texture features from bright-field and polarized images respectively, quantifying the spatial relationship of pixels within the defect region, capturing the microstructure and surface characteristics of the defect, especially the texture performance under different imaging modes, which is crucial for distinguishing real defects from background textures or different types of defects. Step S44 quantifies the sharpness of the defect edge by calculating the gradient magnitude of edge pixels and statistically analyzing the proportion exceeding a threshold, which helps to assess the formation mode of the defect and provides information about the physical morphology of the defect. Finally, step S45 calculates the average grayscale difference of the defect region in the bright-field and polarized images, as well as the polarization response difference in the polarized image. This directly quantifies the difference in defect performance under two different imaging modes, fully utilizing multi-channel image information. This is crucial for identifying defects that are not obvious or easily confused in a single mode. Thus, the above processing method obtains various key information, including geometric, texture, edge, and multimodal response data, providing a data foundation for subsequent defect classification, root cause tracing, and production parameter correlation analysis, thereby improving the performance and practicality of the defect detection method.
[0065] In some preferred embodiments, a further step is included between step S43 and step S44: S4A: Calculate the difference between the two sets of texture feature parameters corresponding to the defect area, and use them as the texture feature of the defect area.
[0066] Specifically, this implementation uses the difference in texture feature parameters as the texture feature, which directly quantifies the difference in texture representation of the defect region under different imaging modes. This difference information helps distinguish real defects from background texture or changes in the optical properties of the material itself. By calculating the difference, the differences between modes can be highlighted, enhancing the discriminative power of defect features. Using this difference as the texture feature of the defect region provides more discriminative information for subsequent defect analysis and correlation, helping to improve the accuracy and robustness of defect detection.
[0067] In some preferred embodiments, step S5 includes: S51. Obtain the material batch, equipment operating status, die-cutting process parameters, and ambient temperature and humidity of the film to be tested from the management system of the high-speed film die-cutting production line, and construct a production parameter information set; S52. Based on the coordinates of the defect area, extract the physical location information of the film corresponding to the image acquisition time, and construct an associated dataset by combining the defect characteristic information, physical location information and production parameter information of the defect area. S53. Store the associated dataset in the defect database according to the preset data format.
[0068] Specifically, step S51 involves acquiring information such as material batches, equipment operating status, die-cutting process parameters, and environmental temperature and humidity from the production line management system to construct a comprehensive set of production parameter information. Step S52 uses the coordinates of the defect area to determine the physical location of the defect on the film, accurately associating the characteristic information of a specific defect with the production parameter information set corresponding to that physical location, thus constructing a correlated dataset containing defects, locations, and production parameters. Step S53 stores the constructed correlated dataset in a defect database according to a preset data format, providing a structured and traceable data foundation for subsequent statistical and correlation analyses. Through these steps, it is ensured that the defect data not only includes the characteristics of the defect itself but also information on the production environment and process conditions at the time of the defect, enabling in-depth analysis of the causes of defects and achieving optimization and improvement of the production process.
[0069] In some preferred embodiments, step S6 includes: S61. Regularly perform statistical analysis, spatial distribution analysis, time trend analysis, and correlation analysis between defect information and production parameter information in the defect database to generate analysis results, and present the analysis results through the interface.
[0070] Specifically, statistical analysis can provide basic information such as the number and type distribution of defects. Spatial distribution analysis can identify areas of defect aggregation on the film surface, helping to pinpoint specific locations or equipment where problems may exist during production. Time trend analysis can reveal the changing patterns of defect numbers over time, helping to identify periodic fluctuations or anomalies in the production process. Correlation analysis between defect information and production parameter information can quantify the impact of different production parameters on defects, providing data support for process optimization. These analytical results are integrated to generate reports, which are presented through an interface, allowing users to intuitively understand the defect status, identify key influencing factors, and thus guide adjustments to the production process to reduce defect occurrence.
[0071] More specifically, the above processing method involves periodically processing the data in the defect database, performing statistical analysis, spatial distribution analysis, temporal trend analysis, and correlation analysis between defect information and production parameter information. First, basic statistics are performed on the defect data in the database to obtain information such as the total number of defects and the distribution of different types of defects. Next, spatial distribution analysis methods, such as kernel density estimation, are used to analyze the location distribution of defects on the film surface, generating a heat map. The color intensity of the heat map represents the defect density, thereby identifying defect clustering areas. Simultaneously, the number of defects is statistically analyzed according to production batches or time periods, and a trend graph of defect quantity changes over time is plotted. A moving average method can be used to smooth the trend graph, thereby identifying time points of abnormal fluctuations in the number of defects. Further, correlation analysis methods, such as Spearman's rank correlation analysis, are used to calculate the correlation coefficient between defect characteristics (such as area, aspect ratio, texture features, etc.) and production parameters (such as die-cutting speed, pressure, temperature, etc.). Production parameters with absolute correlation coefficients greater than a preset threshold are selected, thereby analyzing their impact on defects. Finally, the statistical analysis results, spatial distribution heat map, time trend map, correlation coefficient, and impact degree analysis results are integrated to generate an analysis report, which is presented in the form of charts and text through the user interface, thereby providing data support for production process monitoring, problem diagnosis, and process improvement.
[0072] In some preferred embodiments, step S61 includes: S611. For the defect database, determine the range of defect data to be analyzed based on the time period or real-time analysis command. S612. Based on the defect data range, the kernel density estimation method is used to analyze the spatial distribution of defects on the thin film surface and generate a heat map. The color intensity of the heat map represents the defect density. Based on the heat map, defect clustering areas are identified. S613. For the defect data range, the number of defects is counted according to production batch or time period, and a trend chart of the number of defects changing over time is drawn. The trend chart is smoothed by the moving average method to identify the time points of abnormal fluctuations in the number of defects. S614. Based on the defect data range, Spearman's rank correlation analysis method is used to calculate the correlation coefficient between defect characteristics and production parameters, screen out production parameters whose absolute value of correlation coefficient is greater than a preset threshold, and analyze their degree of influence on defects. S615. Integrate the heat map, trend chart, correlation coefficient, and influence analysis results to generate an analysis report, which is presented in the form of charts and text through the user interface.
[0073] Specifically, the above scheme refines the execution process of step S61, providing analysis methods and result presentation: First, the range of defect data to be analyzed is determined based on the time period or real-time instructions, limiting the data set for analysis. Next, the kernel density estimation method is used to process the defect location data on the film surface, generating a heatmap. The heatmap uses color changes to display the spatial density of defects, identifying areas where defects are likely to occur, which helps locate potentially problematic production equipment or process steps. Simultaneously, the number of defects is statistically analyzed by time (production batch or time period), and a trend chart is plotted. The trend chart shows the change in the number of defects over time; by smoothing the trend using a moving average method, the changing trend of the number of defects can be observed, and the time points of defect fluctuation can be identified. These time points may correspond to adjustments in process parameters, changes in raw materials, or changes in equipment status. Furthermore, Spearman's rank correlation analysis is used to calculate the correlation between defect characteristics (such as size, shape, texture, etc.) and production parameters (such as speed, temperature, pressure, etc.). Spearman's rank correlation analysis is a nonparametric method suitable for analyzing nonlinear relationships or non-normally distributed data. By calculating correlation coefficients and setting thresholds for screening, production parameters strongly correlated with defect characteristics can be identified, and their impact can be quantified. This provides data support for tracing the causes of defects. Finally, the spatial distribution heatmap, time trend chart, and correlation analysis results between defect characteristics and production parameters are integrated to generate an analysis report. The report is presented on the user interface in the form of charts and text, enabling operators or engineers to understand the patterns of defect occurrence and their correlation with the production process, thereby guiding the improvement and optimization of production processes and reducing defect generation.
[0074] Secondly, please refer to Figure 2 Some embodiments of this application also provide a die-cutting defect detection system, applied in a high-speed film die-cutting production line, the system comprising: Image acquisition module 201 is used to acquire bright-field image and polarization image of the thin film to be detected; Preprocessing module 202 is used to correct, register and integrate brightfield and polarization images to obtain multi-channel image input information; The defect localization module 203 is used to analyze and obtain the defect area based on the multi-channel image input information using a pre-trained defect localization model, and to locate the coordinates of the defect area. Feature extraction module 204 is used to extract defect feature information in the defect area; Storage module 205 is used to associate defect characteristic information with the production parameter information of the film to be inspected and store it in the defect database; The analysis module 206 is used to perform statistical analysis on defect information in the defect database periodically or in real time, and to perform correlation analysis on defect information and production parameter information to generate analysis results.
[0075] The die-cutting defect detection system of this application acquires bright field and polarization multi-channel images, performs calibration and registration, inputs them into the defect location model, extracts defect features, and correlates them with production parameters. This overcomes the influence of the diversity of material optical properties, effectively integrates multimodal imaging information, and performs in-depth correlation analysis between defect features and production parameters, providing data support for production process optimization.
[0076] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0077] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0078] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0079] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting die-cutting defects, applied in a high-speed film die-cutting production line, characterized in that, The method includes the following steps: S1. Acquire the bright-field image and polarization image of the thin film to be tested; S2. Correct, register and integrate the bright-field image and the polarization image to obtain multi-channel image input information; S3. Using a pre-trained defect localization model, analyze and obtain the defect region based on the multi-channel image input information, and locate the coordinates of the defect region; S4. Extract defect characteristic information from the defect area; S5. Associate the defect characteristic information with the production parameter information of the film to be tested, and store it in the defect database; S6. Periodically or in real time, perform statistical analysis on the defect information in the defect database and perform correlation analysis on the defect information and the production parameter information to generate analysis results; Step S4 includes: S41. Extract the predicted bounding box of the defect region as the defect boundary; S42. Use a polygon approximation algorithm to fit the defect boundary, and calculate the area of the region enclosed by the fitted defect boundary and the aspect ratio of the minimum bounding rectangle. S43. Based on the gray-level co-occurrence matrix method, extract four texture feature parameters of energy, contrast, correlation and entropy of the defect region in bright field image and polarization image respectively; S44. Calculate the gradient magnitude of the edge pixels of the defect region, and count the proportion of the number of pixels with gradient magnitude greater than the preset sharpness threshold to the total number of edge pixels, as the sharpness of the defect edge. S45. Calculate the difference between the average gray values of the defect region in the bright field image and the polarized image as the contrast difference. At the same time, calculate the difference between the maximum polarization angle and the minimum polarization angle of the defect region in the polarized image as the polarization response difference. The steps between step S43 and step S44 include: S4A: Calculate the difference between the two sets of texture feature parameters corresponding to the defect area, and use them as the texture feature of the defect area. Step S3 includes: S31. Input the multi-channel image input information into the pre-trained defect localization model, and output the predicted probability map and predicted bounding box of the defect region; S32. Based on the predicted probability map, an adaptive threshold non-maximum suppression algorithm is used to filter overlapping predicted bounding boxes, retain the predicted bounding box with the highest confidence as the final defect region, and extract the coordinates of the defect region. The step of using an adaptive threshold non-maximum suppression algorithm to filter overlapping predicted bounding boxes based on the predicted probability map, and retaining the predicted bounding box with the highest confidence as the final defect region, includes: S321. For the predicted probability map, determine the initial threshold according to the thin film material type; S322. Adjust the initial threshold according to the defect size to obtain an adaptive threshold, wherein the defect size is determined by analyzing the area and aspect ratio of the predicted bounding box; S323. Based on the adaptive threshold, filter the predicted bounding boxes in the predicted probability map whose confidence scores are greater than the adaptive threshold to obtain candidate defect regions; S324. For the candidate defect region, calculate the overlap between each predicted bounding box and its adjacent predicted bounding boxes. If the overlap is greater than a preset overlap threshold, retain the predicted bounding box with the highest confidence and suppress other overlapping predicted bounding boxes to obtain the final defect region.
2. The die-cutting defect detection method according to claim 1, characterized in that, Step S2 includes: S21. Calculate the displacement deviation and angle deviation values of the bright field image and the polarization image using the phase correlation method; S22. Based on the displacement deviation value and the angle deviation value, a bilinear interpolation algorithm is used to perform geometric correction on the bright field image and the polarization image to obtain the corrected bright field image and the corrected polarization image. S23. Based on the phase correlation method of Fourier transform, image registration is performed on the corrected bright field image and the corrected polarization image, and the sub-pixel level offset is calculated and obtained. S24. Using the corrected bright-field image as the reference image, resample the corrected polarization image according to the offset, so that the corrected polarization image and the corrected bright-field image are registered and aligned in spatial position. S25. Merge the registered and aligned bright-field image and polarization image into channels to construct the multi-channel image input information.
3. The die-cutting defect detection method according to claim 2, characterized in that, Step S23 includes: S231. Perform Fourier transform on the corrected bright-field image and the corrected polarization image respectively to obtain the corresponding bright-field image spectrum and polarization image spectrum. S232. Calculate the cross power spectrum of the bright field image spectrum and the polarization image spectrum, and normalize the cross power spectrum to obtain the normalized cross power spectrum. S233. Perform an inverse Fourier transform on the normalized cross-power spectrum to obtain the phase correlation function; S234. Search for a peak value in the phase correlation function and obtain a sub-pixel level offset based on the coordinate position corresponding to the peak value.
4. The die-cutting defect detection method according to claim 3, characterized in that, The steps for normalizing the cross-power spectrum to obtain the normalized cross-power spectrum include: S2321. Calculate the amplitude spectrum of the bright field image spectrum and the amplitude spectrum of the polarization image spectrum; S2322. The normalized cross-power spectrum is obtained by dividing the cross-power spectrum by the product of the amplitude spectrum of the bright field image spectrum and the amplitude spectrum of the polarization image spectrum.
5. The die-cutting defect detection method according to claim 1, characterized in that, The defect characteristic information includes multiple aspects such as defect boundary, area, aspect ratio, orientation, texture features, edge sharpness, and contrast and / or polarization response differences in bright-field and polarized images.
6. The die-cutting defect detection method according to claim 1, characterized in that, Step S5 includes: S51. Obtain the material batch, equipment operating status, die-cutting process parameters, and ambient temperature and humidity of the film to be tested from the management system of the high-speed film die-cutting production line, and construct a production parameter information set; S52. Based on the coordinates of the defect area, extract the physical location information of the film corresponding to the image acquisition time, and construct an associated dataset by combining the defect characteristic information, physical location information and production parameter information of the defect area. S53. Store the associated dataset in the defect database according to the preset data format.
7. The die-cutting defect detection method according to claim 1, characterized in that, Step S6 includes: S61. Periodically perform statistical analysis, spatial distribution analysis, time trend analysis, and correlation analysis between the defect information and the production parameter information in the defect database to generate analysis results, and present the analysis results through the interface.
8. A die-cutting defect detection system, applied in a high-speed film die-cutting production line, characterized in that, The system includes: The image acquisition module is used to acquire bright-field and polarization images of the thin film to be tested. The preprocessing module is used to correct, register, and integrate the brightfield image and the polarization image to obtain multi-channel image input information; The defect localization module is used to analyze and obtain the defect region based on the multi-channel image input information using a pre-trained defect localization model, and to locate the coordinates of the defect region; The feature extraction module is used to extract defect feature information from the defect area; A storage module is used to associate the defect characteristic information with the production parameter information of the film to be inspected and store it in the defect database; The analysis module is used to perform statistical analysis on defect information in the defect database periodically or in real time, and to perform correlation analysis on the defect information and the production parameter information to generate analysis results. The steps for extracting defect characteristic information from the defect region include: S41. Extract the predicted bounding box of the defect region as the defect boundary; S42. Use a polygon approximation algorithm to fit the defect boundary, and calculate the area of the region enclosed by the fitted defect boundary and the aspect ratio of the minimum bounding rectangle. S43. Based on the gray-level co-occurrence matrix method, extract four texture feature parameters of energy, contrast, correlation and entropy of the defect region in bright field image and polarization image respectively; S44. Calculate the gradient magnitude of the edge pixels of the defect region, and count the proportion of the number of pixels with gradient magnitude greater than the preset sharpness threshold to the total number of edge pixels, as the sharpness of the defect edge. S45. Calculate the difference between the average gray values of the defect region in the bright field image and the polarized image as the contrast difference. At the same time, calculate the difference between the maximum polarization angle and the minimum polarization angle of the defect region in the polarized image as the polarization response difference. The steps between step S43 and step S44 include: S4A: Calculate the difference between the two sets of texture feature parameters corresponding to the defect area, and use them as the texture feature of the defect area. The steps of using a pre-trained defect localization model to analyze and obtain the defect region based on the multi-channel image input information, and locating the coordinates of the defect region, include: S31. Input the multi-channel image input information into the pre-trained defect localization model, and output the predicted probability map and predicted bounding box of the defect region; S32. Based on the predicted probability map, an adaptive threshold non-maximum suppression algorithm is used to filter overlapping predicted bounding boxes, retain the predicted bounding box with the highest confidence as the final defect region, and extract the coordinates of the defect region. The step of using an adaptive threshold non-maximum suppression algorithm to filter overlapping predicted bounding boxes based on the predicted probability map, and retaining the predicted bounding box with the highest confidence as the final defect region, includes: S321. For the predicted probability map, determine the initial threshold according to the thin film material type; S322. Adjust the initial threshold according to the defect size to obtain an adaptive threshold, wherein the defect size is determined by analyzing the area and aspect ratio of the predicted bounding box; S323. Based on the adaptive threshold, filter the predicted bounding boxes in the predicted probability map whose confidence scores are greater than the adaptive threshold to obtain candidate defect regions; S324. For the candidate defect region, calculate the overlap between each predicted bounding box and its adjacent predicted bounding boxes. If the overlap is greater than a preset overlap threshold, retain the predicted bounding box with the highest confidence and suppress other overlapping predicted bounding boxes to obtain the final defect region.
Citation Information
Patent Citations
Die cutting defect detection method
CN116500044A
Visual identification method and device based on computer processing
CN119180988A
Automatic control method and system for battery film production based on visual inspection
CN119229372A
Optical lens surface defect detection method and system based on image processing
CN119880946A