Image recognition-based printed matter quality defect detection method and system
Patent Information
- Application Number
- CN202611420987.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-30
AI Technical Summary
[0007]本申请公开了一种基于图像识别的印刷品质量缺陷检测方法及系统,旨在解决针对复杂基材的印刷品检测中,基材固有特征易被误判为缺陷(误判率高),而优化后又易漏检细微缺陷(漏检率上升)的两难问题
[0010]本申请公开了一种基于图像识别的印刷品质量缺陷检测方法及系统,旨在解决基材固有特征与缺陷混淆导致的误判漏检。通过构建无缺陷基材的本底统计模型,捕捉正常纹理、颜色及形态;采集工艺与环境参数,映射至视觉特征空间,实现模型批次自适应更新。更新采用双策略:在线学习率与离线重建率比值≤0.1,保证稳定性;当联合偏离量持续低于触发阈值时主动离线重建。判定采用双层偏离机制,区分局部微观缺陷与批次性统计缺陷,按阈值输出剔除信号。该系统有效克服了对基材背景的过度适应问题,显著提升检测准确性与鲁棒性,降低误检漏检率,提高自动化生产效能。
Smart Images

Figure CN123015526A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and more specifically, to a method and system for detecting quality defects in printed materials based on image recognition. Background Technology
[0002] In modern high-speed printing, traditional quality inspection (manual or simple sensing) is difficult to meet the requirements due to its high rate of missed defects and slow speed. Therefore, an automated inspection system based on image recognition has been introduced to achieve real-time defect identification through high-speed cameras and algorithms.
[0003] However, when faced with orders using special substrates such as recycled pulp, the inherent characteristics of the substrate itself, such as fiber particles and texture, are misjudged by the original system as "stains" or "uneven printing," with a misjudgment rate as high as 20%, resulting in material waste and manual intervention, which affects efficiency.
[0004] To address this, the technical team upgraded the software and established a "substrate feature set" to record normal textures, fiber distribution, color fluctuations, etc., and supplemented it with adaptive thresholds and background suppression, successfully reducing the false positive rate to below 2%.
[0005] However, the new system's over-adaptation to the substrate background leads to a decreased ability to identify subtle defects similar to the substrate texture (such as small ink dots, blurred edges, and minor color differences). Because these features highly overlap with the normal background of the substrate, the system mistakenly classifies them as normal, resulting in an increased false negative rate. Although these defects may not be obvious individually, when they accumulate or appear in critical areas, they still affect aesthetics and brand image, potentially leading to customer complaints.
[0006] Existing technologies urgently need improvement. Summary of the Invention
[0007] This application discloses a printing quality defect detection method and system based on image recognition, which aims to solve the dilemma in the detection of printing products on complex substrates, where the inherent features of the substrate are easily misjudged as defects (high misjudgment rate), while after optimization, subtle defects are easily missed (increased miss rate).
[0008] The technical solution of this application is as follows: This application discloses a method for detecting quality defects in printed materials based on image recognition, the method comprising: The image of the printed matter is acquired by the image recognition acquisition module, and the printed matter image is divided into multiple detection areas that correspond one-to-one with the positions on the printed matter according to the preset size. The texture, color, and morphological features of the substrate in the area to be detected are extracted by the image recognition feature extraction module to obtain visual features; The printed images are initially screened and verified to obtain defect-free substrate sample images. A substrate background statistical model is constructed based on the visual characteristics of these defect-free sample images. This model is established solely based on normal samples and reflects the microscopic surface characteristics of the current batch of printed substrates. The probability distribution in this model is a Gaussian mixture model, kernel density estimation, or multidimensional normal distribution. The mixture number of the Gaussian mixture model is determined by the Bayesian information criterion. The bandwidth of the kernel density estimation is determined by the Silverman rule. The process parameters and environmental parameters of the production site are collected, and the process parameters and environmental parameters are mapped to the same feature space as the visual feature to obtain the process parameter features and environmental features; the mapping explicitly reduces the coupling interference of the process parameters and environmental changes on the visual feature. The visual features, process parameter features, and environmental features of the current area to be detected are input into the substrate background statistical model. By comparing the visual features with the substrate background statistical model, the joint deviation between the two models is calculated. The substrate background statistical model is updated batch-wise based on the process parameter features and environmental features. Under normal circumstances, it is updated according to the online learning rate; under abnormal circumstances, it is updated according to the offline reconstruction rate. The ratio of the online learning rate to the offline reconstruction rate is not greater than 0.1. The joint deviation is calculated using Mahalanobis distance. When the joint deviation remains below the reconstruction trigger threshold for a preset period of time, the offline reconstruction of the background statistical model of the substrate is actively triggered. By combining image recognition with the background statistical model of the substrate, single-point deviation and system deviation are determined for the current area to be detected, and the single-point deviation amount and system deviation amount are obtained. The single-point deviation amount corresponds to local micro-defects, and the system deviation amount corresponds to batch statistical defects. When the deviation of a single point exceeds the single point threshold or the deviation of the system exceeds the system threshold, it is determined that there is a defect in the current area to be detected. When a defect is determined to exist in the current area to be inspected, a rejection control signal is output to the rejection mechanism.
[0009] This application also discloses a printing quality defect detection system based on image recognition, the system comprising: The image recognition and acquisition module is used to acquire images of printed materials and divide the printed materials image into multiple detection areas that correspond one-to-one with the positions on the printed materials according to a preset size. The image recognition feature extraction module is used to extract the texture features, color features, and morphological features of the substrate in the area to be detected, so as to obtain visual features; The sample screening and model building module is used to perform preliminary screening and verification of the printed image to obtain defect-free substrate sample images; and to build a substrate background statistical model based on the visual characteristics of the defect-free substrate sample images; the substrate background statistical model is established only based on normal samples and reflects the microscopic surface characteristics of the current batch of printed substrates; the probability distribution in the substrate background statistical model is a Gaussian mixture model, kernel density estimation, or multidimensional normal distribution; The process environment parameter acquisition and mapping module is used to acquire process parameters and environmental parameters from the production site, and map these parameters to the same feature space as the visual feature, thereby obtaining process parameter features and environmental features. This mapping explicitly reduces the coupling interference of process parameters and environmental changes on the visual feature. The model comparison and adaptive update module is used to input the visual features, process parameter features, and environmental features of the current detection area into the substrate background statistical model. By comparing the visual features with the substrate background statistical model, the module calculates the joint deviation between the two models. The substrate background statistical model performs batch adaptive updates based on the process parameter features and environmental features; under normal conditions, it updates according to the online learning rate, and under abnormal conditions, it updates according to the offline reconstruction rate. The ratio of the online learning rate to the offline reconstruction rate is no greater than 0.1. The joint deviation is calculated using Mahalanobis distance. The offline reconstruction triggering module is used to actively trigger the offline reconstruction of the base background statistical model when the joint deviation is continuously lower than the reconstruction triggering threshold for a preset period of time. The dual-layer deviation determination module is used to determine the single-point deviation and system deviation of the current area to be detected by image recognition and the statistical model of the substrate background, and obtain the single-point deviation amount and the system deviation amount; the single-point deviation amount corresponds to the local micro-defect, and the system deviation amount corresponds to the batch statistical defect. The defect determination and output module is used to determine that there is a defect in the current area to be detected when the deviation of a single point exceeds the single point threshold or the deviation of the system exceeds the system threshold; and when it is determined that there is a defect in the current area to be detected, it outputs a rejection control signal to the rejection mechanism.
[0010] This application discloses a method and system for detecting printing quality defects based on image recognition, aiming to solve the problem of misjudgment and missed detection caused by confusion between inherent features of the substrate and defects. By constructing a background statistical model of a defect-free substrate, normal texture, color, and shape are captured; process and environmental parameters are collected and mapped to the visual feature space to achieve batch-adaptive model updates. The update employs a dual strategy: the ratio of online learning rate to offline reconstruction rate is ≤0.1 to ensure stability; and offline reconstruction is actively performed when the joint deviation is consistently below a trigger threshold. A two-layer deviation mechanism is used for judgment, distinguishing between local microscopic defects and batch-specific statistical defects, and outputting rejection signals according to thresholds. This system effectively overcomes the problem of over-adaptation to the substrate background, significantly improves detection accuracy and robustness, reduces false positives and false negatives, and improves the efficiency of automated production. Attached Figure Description
[0011] Figure 1 This is a schematic flowchart of a printing quality defect detection method based on image recognition provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a printing quality defect detection system based on image recognition provided in an embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components 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 to illustrate 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.
[0013] 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.
[0014] Existing image recognition-based printing quality inspection systems often misidentify printed materials with special substrates (such as recycled pulp) as defects due to the inherent texture and microscopic features of the substrate itself, leading to high false positive rates and material waste. Although the false positive rate has been reduced by introducing more complex image analysis methods and substrate feature sets, this tendency to "over-adapt" to substrate features has resulted in an increased rate of missed detection of subtle defects similar to the substrate texture, impacting product quality and brand image.
[0015] In this regard, refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for detecting printing quality defects based on image recognition, provided in an embodiment of the present invention. The method includes: S11, The printed image is acquired by the image recognition acquisition module, and the printed image is divided into multiple detection areas that correspond one-to-one with the positions on the printed material according to a preset size; S12, the texture features, color features, and morphological features of the substrate in the area to be detected are extracted by the image recognition feature extraction module to obtain visual features; S13, the printed images are initially screened and verified to obtain defect-free substrate sample images; a substrate background statistical model is constructed based on the visual characteristics of the defect-free substrate sample images; the substrate background statistical model is established only based on normal samples and reflects the microscopic surface characteristics of the current batch of printed substrates; the probability distribution in the substrate background statistical model is a Gaussian mixture model, kernel density estimation, or multidimensional normal distribution; the mixture number of the Gaussian mixture model is determined by the Bayesian information criterion; the bandwidth of the kernel density estimation is determined by the Silverman rule; S14, Collect process parameters and environmental parameters from the production site, and map the process parameters and environmental parameters to the same feature space as the visual features to obtain process parameter features and environmental features; the mapping explicitly defines the coupling interference of process parameters and environmental changes on the visual features; S15, the visual features, process parameter features, and environmental features of the current area to be detected are input into the substrate background statistical model. The joint deviation between the visual features and the substrate background statistical model is calculated by comparing the visual features with the substrate background statistical model. The substrate background statistical model is updated in batches based on the process parameter features and environmental features; under normal conditions, it is updated according to the online learning rate, and under abnormal conditions, it is updated according to the offline reconstruction rate. The ratio of the online learning rate to the offline reconstruction rate is not greater than 0.1. The joint deviation is calculated using Mahalanobis distance. S16, when the joint deviation amount is continuously lower than the reconstruction trigger threshold for a preset period of time, the offline reconstruction of the base background statistical model is actively triggered; S17, by combining image recognition and the dual-layer deviation determination of the substrate background statistical model, single-point deviation and system deviation determination are performed on the current area to be detected to obtain the single-point deviation amount and the system deviation amount; the single-point deviation amount corresponds to local micro-defects, and the system deviation amount corresponds to batch statistical defects; S18, when the single-point deviation exceeds the single-point threshold or the system deviation exceeds the system threshold, it is determined that there is a defect in the current area to be detected; S19, when it is determined that there is a defect in the current area to be detected, a rejection control signal is output to the rejection mechanism.
[0016] To better understand the technical solution proposed in this application, some key terms and implementation environments involved will be explained below.
[0017] "Printed product images" refer to images of the surface of printed products captured by optical devices (such as high-speed cameras), which serve as the basis for defect detection.
[0018] "The area to be inspected" refers to each independent sub-region that needs to be analyzed for defects after the complete printed image is divided according to a preset size and grid.
[0019] "Visual features" refer to the quantitative information extracted from the area to be detected to describe the surface characteristics of the substrate, including texture features (such as roughness and directionality), color features (such as chromaticity and brightness), and morphological features (such as particle size and shape).
[0020] The "substrate background statistical model" is a core concept. It is a statistical model built based on the visual features of images of defect-free substrate samples to characterize the normal microscopic surface properties of the current batch of printed substrates. This model is built only based on normal samples and can reflect the inherent range of variation of the substrate. For example, it can be constructed using Gaussian mixture models, kernel density estimation, or multidimensional normal distributions.
[0021] "Process parameters" refer to parameters that can be adjusted and controlled during the printing production process, such as printing speed, drying temperature, ink viscosity, and tension value.
[0022] "Environmental parameters" refer to environmental factors that affect the printing process and image acquisition, such as workshop temperature, humidity, and light intensity.
[0023] "Process parameter features" and "environmental features" refer to the transformation of the original process parameters and environmental parameters into a representation in the same feature space as the visual features through a specific mapping method, so as to perform joint analysis with the visual features.
[0024] "Joint deviation" refers to the comprehensive difference between the visual features, process parameter features, and environmental features of the current area to be detected and the statistical model of the substrate background. It is usually calculated by methods such as Mahalanobis distance.
[0025] "Single-point deviation" refers to the deviation measure for local micro-defects, reflecting the difference between a local feature in the area to be detected and the background statistical model of the substrate.
[0026] "System deviation" refers to the deviation measure for batch-specific statistical defects, reflecting the difference between the overall characteristics of the current batch and the background statistical model of the base material.
[0027] "Online learning rate" and "offline reconstruction rate" are parameters used to control the update speed of the statistical model of the base material. The online learning rate is used for fine-tuning the model under normal production conditions, while the offline reconstruction rate is used for rebuilding the model when there is a large deviation.
[0028] The implementation environment of this application typically includes a high-speed printing production line, image acquisition equipment (such as industrial cameras and light sources), a high-performance computer (for image processing and model calculation), and a rejection mechanism integrated with the production line.
[0029] The core of the image recognition-based printing quality defect detection method proposed in this application lies in constructing and utilizing a substrate background statistical model, and combining it with an adaptive update mechanism for process parameters and environmental parameters to achieve accurate identification of printing defects.
[0030] Specifically, during the image acquisition stage, images of the printed material are acquired using an image recognition acquisition module. For example, a high-speed line scan camera or area scan camera can be used to continuously capture images of the printed material's surface at high frame rate and high resolution as it passes through the detection area. These images are then transmitted to a processing unit and divided into multiple detection areas according to preset dimensions (e.g., 5mm x 5mm or 10mm x 10mm). Each detection area corresponds one-to-one with a specific physical location on the printed material, ensuring the accuracy of defect localization.
[0031] During the feature extraction stage, the image recognition feature extraction module extracts visual features of the substrate from each region to be detected. For example, gray-level co-occurrence matrix (GLCM) can be used to extract texture features such as contrast, energy, entropy, and correlation; color features such as average R, G, B values, standard deviation, and skewness can be extracted using color histograms or color moments; and morphological features such as particle size, shape factor, and aspect ratio can be extracted through edge detection, connected component analysis, and other methods. These extracted visual features together constitute a multidimensional feature vector used to describe the microscopic surface properties of the substrate.
[0032] To construct a model that accurately reflects the characteristics of normal substrates, sample screening and model building are necessary. First, the collected printed images undergo preliminary screening and verification to obtain high-quality, defect-free substrate sample images. For example, experienced quality inspectors can manually screen a batch of printed materials to ensure these samples are free of any printing defects and only exhibit the inherent characteristics of the substrate. Subsequently, based on the visual characteristics of these defect-free substrate sample images, a substrate background statistical model is constructed. This model is built solely based on normal samples and aims to reflect the microscopic surface characteristics of the current batch of printed substrates. For example, a Gaussian Mixture Model (GMM) can be used to model the probability distribution of visual features, where the mixture number can be determined using the Bayesian Information Criterion (BIC) to find the optimal model complexity. Alternatively, kernel density estimation (KDE) can be used to nonparametrically estimate the probability density function, and its bandwidth can be determined using the Silverman rule. Furthermore, the multidimensional normal distribution can also be considered as an option to describe the joint probability distribution of visual features.
[0033] To address the coupling interference of process and environmental changes on visual features during production, this application introduces process and environmental parameter acquisition and mapping. Process parameters (such as printing speed, drying temperature, ink viscosity, and tension) and environmental parameters (such as workshop temperature, humidity, and light intensity) are collected in real time. For example, this data can be acquired in real time through a sensor network. Subsequently, these process and environmental parameters are mapped to the same feature space as the visual features, resulting in process parameter features and environmental features. The purpose of this mapping is to explicitly address the coupling interference of process parameters and environmental changes on visual features. For example, dimensionality reduction techniques such as principal component analysis (PCA) or autoencoders can be used to project high-dimensional process and environmental parameters into a low-dimensional space that matches the dimensions of the visual features, thereby achieving feature space unification.
[0034] During the model comparison and adaptive update phase, the visual features, process parameter features, and environmental features of the current detection area are input into the substrate background statistical model. The joint deviation between the visual features and the substrate background statistical model is calculated by comparing them. For example, Mahalanobis distance can be used to calculate the joint deviation because it considers the correlation between features and more accurately measures the distance between the sample and the distribution center. The substrate background statistical model undergoes batch adaptive updates based on process parameter features and environmental features. During normal production, the model is fine-tuned and updated according to the online learning rate to adapt to subtle drifts in the substrate; when anomalies are detected, the model is updated according to the offline reconstruction rate to quickly correct deviations. The ratio of the online learning rate to the offline reconstruction rate is no greater than 0.1, ensuring the model's stability under normal conditions and enabling rapid response in case of anomalies.
[0035] To prevent the model from gradually failing due to slow substrate drift after long-term stable operation, this application also includes an offline reconstruction triggering mechanism. When the joint deviation remains below the reconstruction trigger threshold for a preset period, the system will proactively trigger offline reconstruction of the substrate background statistical model. For example, if the detection results for several consecutive hours show that the joint deviation is very small, indicating that the current production status is very stable, it can be assumed that the substrate background statistical model may have "overfitted" to some subtle, but not defective, features, or that the substrate itself has undergone slow, batch-wise drift. In this case, proactive offline reconstruction ensures that the model always reflects the latest, true, defect-free substrate characteristics.
[0036] During the defect determination stage, a two-layer deviation assessment using image recognition and a substrate background statistical model is employed to determine single-point and systemic deviations in the current area to be inspected, yielding the single-point deviation amount and the systemic deviation amount. The single-point deviation amount corresponds to localized micro-defects, such as a tiny ink spot or scratch; the systemic deviation amount corresponds to batch-wide statistical defects, such as a generally pale color or abnormal texture across an entire batch of printed materials. When the single-point deviation amount exceeds a preset single-point threshold or the systemic deviation amount exceeds a preset systemic threshold, the system determines that a defect exists in the current area to be inspected.
[0037] Finally, when a defect is detected in the current area to be inspected, the defect detection and output module will output a rejection control signal to the rejection mechanism. For example, it can send a command to a robotic arm or pneumatic nozzle to remove the defective printed material from the production line, thereby ensuring that only qualified products enter the subsequent stages.
[0038] For example, this embodiment targets a high-speed gravure printing production line, printing food packaging bags on coated paper substrate, with a width of 1200 mm and a printing speed of 300 m / min. The entire inspection device is deployed along the production line: four linear CCD cameras follow the drying chamber, with a camera spacing of 300 mm, a resolution of 4096 pixels per line, a scanning frequency of 10 kHz, and are used in conjunction with LED strip light sources. The camera scanning trigger is synchronized with the encoder. The rejection mechanism uses a high-speed air-blowing valve array with a rewinding and slitting blade, with a response delay controlled within 5 milliseconds. Process parameters are collected in real time by encoders, temperature sensors, viscometers, and load sensors, while environmental parameters are collected in real time by temperature, humidity, and light sensors. The inspection software is deployed on an x86 industrial control server, configured with dual Xeon 4214 processors, 64GB of memory, and two RTX 3080 GPUs.
[0039] The inspection process begins with image acquisition. After obtaining a grayscale image corresponding to the substrate at a 1:1 ratio by scanning line by line with a linear CCD, it is divided into 64 column blocks and several row blocks. Each column block is 64 pixels wide and each row block is 256 pixels high, corresponding to a physical area of 4 mm × 4 mm on the substrate. The entire printed surface is divided into multiple areas to be inspected with one-to-one correspondence.
[0040] Next, visual feature extraction is performed. Three types of features are independently calculated for each region to be detected: texture features are derived from the gray-level co-occurrence matrix, containing five dimensions: energy, contrast, correlation, entropy, and inverse difference moment; color features include the RGB three-channel mean, HSV three-channel mean, and the histogram of the 8 bins of the H channel, totaling 14 dimensions; morphological features include the number of connected components, average area, edge density, and aspect ratio, totaling four dimensions. After concatenating these three types of features, each region yields a 23-dimensional visual feature vector.
[0041] A statistical model of substrate background was constructed within the first 200 meters of the new batch. The model first used a pre-trained Gaussian Mixture Model (GMM) to perform preliminary screening of all areas, removing areas with a Mahalanobis distance greater than 5 from the historical background. Quality inspectors then visually verified these areas to confirm they were defect-free, ultimately retaining approximately 120,000 defect-free substrate samples. A GMM was fitted to this sample set. The mixture number was automatically selected from a set of candidate values using a Bayesian information criterion. The criterion's input was a combination of the log-likelihood of different mixture numbers and the number of model parameters; the mixture number that minimized the criterion value was selected. In this embodiment, four Gaussian components were ultimately selected. This model was built only based on normal samples from this batch and specifically reflects the microscopic surface characteristics of the current batch of printed substrates.
[0042] Process parameters and environmental parameters are mapped to the same feature space as the visual features. This mapping is accomplished using two pre-trained multilayer perceptrons: the first maps the process parameter vector to 23-dimensional features, and the second maps the environmental parameter vector to 23-dimensional features. These two features represent "the expected level of visual features under current process conditions" and "the expected offset of visual features under current environmental conditions," respectively, thus explicitly expressing the coupled interference of process and environmental fluctuations on the visual features.
[0043] The joint deviation is calculated using Mahalanobis distance. The visual features of each region to be detected, along with the mapped process and environmental features, are concatenated into a 30-dimensional joint vector. The global mean and global covariance of the Gaussian Mixture Model (GMM) are synthesized from four Gaussian components with mixed weights. The joint deviation is the Mahalanobis distance from the joint vector to the global mean. The larger the distance, the more significant the deviation. In this embodiment, 3.5 is set as the strong deviation criterion.
[0044] The substrate baseline statistical model is updated adaptively batch-wise based on process and environmental information. During normal production, the model updates slowly using the online learning rate, with visual features of qualified areas participating in the GMM parameter re-estimation with minimal weight. In case of anomalies such as substrate or ink changes, or sudden environmental changes, the model refits by extracting a matching subset from the pure baseline feature set using the offline reconstruction rate. The ratio of the online learning rate to the offline reconstruction rate is no greater than 0.1, ensuring slow but stable online updates and fast but accurate offline reconstruction.
[0045] Offline reconstruction is actively triggered after the joint deviation remains below the reconstruction trigger threshold for a preset period of time. After triggering, the current model is marked as awaiting reconstruction, online updates are frozen, and similarity comparison between the model and the clean baseline feature set is paused. Then, a subset matching the current batch, substrate type, and environmental conditions is extracted from the set to refit the GMM, resulting in the reconstructed model. The reconstructed model and the model awaiting reconstruction are then validated in parallel on several recent regions. If the validation passes, the new model is activated; if the validation fails, the old model is retained and an alarm is issued.
[0046] The dual-layer deviation determination provides both single-point deviation and system deviation. The single-point deviation is the Mahalanobis distance corresponding to that area, reflecting local micro-defects; the system deviation is calculated by taking the Mahalanobis distance sequence of the most recent several areas and comparing it with the preset standard distribution to calculate the KL divergence, reflecting batch-specific statistical defects, such as overall substrate discoloration or overall ink lightening, which are slow drifts across the entire area.
[0047] Two sets of thresholds are set for the defect detection and rejection output: a single-point threshold corresponding to the strong deviation criterion of Mahalanobis distance, and a system threshold corresponding to the batch criterion of KL divergence. If either threshold is exceeded, the area is determined to have a defect. The defect location is calculated back through the camera-encoder-rejection mechanism synchronous link, and the corresponding air-blowing valve is activated within 5 milliseconds to sort out the defective product.
[0048] In this embodiment, approximately 120 million areas to be inspected were processed during 30 days of continuous production, with a false positive rate of 0.3%, a false negative rate of 0.05%, an average processing time of 2.1 milliseconds per area, and a single offline reconstruction taking no more than 30 seconds. Compared with the traditional solution of using a single visual feature and a fixed threshold, the false negative rate was reduced by approximately 80%, and the false positive rate caused by substrate batch drift was reduced by approximately 65%.
[0049] The image recognition-based printing quality defect detection method proposed in this application effectively solves the problems of misjudgment and missed detection in traditional detection methods when dealing with printing products on special substrates by introducing a substrate background statistical model and combining it with an adaptive update mechanism for process parameters and environmental parameters.
[0050] In some embodiments of this application, the method further includes: Record the visual features of each of the regions to be detected; The joint deviation of each of the regions to be detected is decomposed to obtain the corresponding single-point deviation and system deviation. The areas to be detected where the single-point deviation is less than the single-point threshold and the system deviation is less than the system threshold are marked as qualified areas; Based on the deviation between the visual features of the qualified region and the statistical model of the substrate background, adjust the influence weight of the visual features of the qualified region on the update of the statistical model of the substrate background. Construct and maintain a clean baseline feature set, which consists of the visual features of the defect-free substrate sample images that have been verified and confirmed when the system starts or a batch begins; The substrate background statistical model is compared with the pure benchmark feature set, and the similarity between the substrate background statistical model and the pure benchmark feature set is calculated. When the similarity is lower than a first threshold, an attention-level drift warning is issued; when the similarity is lower than a second threshold, a warning-level drift warning is issued; when the similarity is lower than a third threshold, a severe drift warning is issued; wherein the third threshold is lower than the second threshold, and the second threshold is lower than the first threshold; After each severe drift warning is issued, the substrate background statistical model is first frozen, then the pure baseline feature set is forcibly refreshed, and the substrate background statistical model is reconstructed based on the refreshed pure baseline feature set. Based on the joint deviation between the visual features of the current region to be detected and the statistical model of the substrate background, the participation weight of the visual features of the current qualified region in the update of the statistical model of the substrate background is dynamically adjusted.
[0051] Specifically, to achieve long-term effective management and drift detection of the substrate background statistical model, the visual features of each region to be detected are first recorded, providing a foundation for subsequent data analysis and model diagnosis. Specifically, the joint deviation of each region to be detected is decomposed to obtain single-point deviation and systemic deviation, which helps distinguish between local micro-defects and batch statistical defects, thus enabling a more refined understanding of the nature of the deviation.
[0052] Furthermore, when the deviation at a single point is less than the single-point threshold and the deviation at the system level is less than the system threshold, the area to be inspected is marked as a qualified area. The visual characteristics of these qualified areas are considered representative of the defect-free substrate under the current production state. Based on the deviation between the visual characteristics of these qualified areas and the substrate background statistical model, the weight of these data on the update of the substrate background statistical model can be dynamically adjusted. For example, the contribution weight of qualified areas with small deviations to model updates can be appropriately increased to ensure that the model can more accurately reflect the normal substrate characteristics of the current batch; conversely, the weight of qualified areas with large deviations can be reduced to avoid abnormal data from adversely affecting the model.
[0053] Furthermore, this application constructs and maintains a pure baseline feature set. This set consists of visual features of defect-free substrate sample images that have undergone rigorous verification and confirmation at system startup or batch start. This pure baseline feature set represents the substrate background characteristics under ideal conditions and serves as the gold standard for model drift detection. By comparing the substrate background statistical model with this pure baseline feature set, the similarity between the two can be calculated. Similarity can be understood as the distance or overlap between the two feature sets in the feature space, and can be calculated using methods such as cosine similarity or the reciprocal of Euclidean distance. The purpose is to quantify the degree of deviation between the substrate background statistical model and the ideal baseline.
[0054] Based on similarity, this application designs a multi-level drift warning mechanism. Specifically, when the similarity falls below a first threshold, the system issues an attention-level drift warning, prompting operators to pay attention to the model's status; when the similarity further falls below a second threshold, a warning-level drift warning is issued, indicating that the model may have significant drift and requires intervention; when the similarity falls below a third threshold, a severe drift warning is issued, at which point the model has seriously deviated from the purity benchmark and immediate action must be taken. The third threshold is lower than the second threshold, and the second threshold is lower than the first threshold, forming a progressively escalating warning system.
[0055] For example, at system startup, quality inspectors manually mark 100 defect-free areas to be inspected, extracting their visual features to form a clean baseline feature set. During production, the similarity between the feature distribution represented by the current substrate background statistical model and this set is calculated periodically. The similarity is divided into three levels: if it is below the first threshold, a notice-level warning is issued and maintenance is pushed; if it is below the second threshold, a warning-level warning is issued and the production line is suspended for review; if it is below the third threshold, a severe warning is issued, the substrate background statistical model is automatically frozen, the clean baseline feature set is forcibly refreshed, the GMM is reconstructed based on the refreshed set, parallel verification is passed, the primary and backup models are switched, and then the freeze is lifted.
[0056] In terms of dynamically adjusting the updated weights, the system maintains a historical time series of deviations for each visual feature dimension. For dimensions with significant changing trends, the system reduces their weight in updating the base background statistical model, while maintaining the original weights for dimensions with stable changes, thus avoiding long-term deviations in individual dimensions from polluting the base background model.
[0057] This application's solution effectively addresses the drift problem that may occur in the substrate background statistical model during long-term operation by introducing a multi-model management and drift detection mechanism. Through the above technical solution, this application can significantly improve the robustness and long-term stability of the printed matter quality defect detection method.
[0058] This application further proposes the steps of adjusting the deviation between the visual features of the qualified region and the substrate background statistical model, and adjusting the influence weight of the visual features of the qualified region on the update of the substrate background statistical model, including: Calculate the deviation of the qualified region in multiple visual feature dimensions; Record historical time-series data of the deviation amount for each of the aforementioned visual feature dimensions; Based on the historical time series data, detect the changing trend of the deviation amount of each visual feature dimension; Based on the sensitivity of the visual feature dimensions to defects, a weight adjustment factor is set for each visual feature dimension; Based on the significance of the deviation trend of the visual feature dimension, the weight adjustment factor is applied to dynamically adjust the influence weight of the visual feature of the qualified region in the update of the substrate background statistical model.
[0059] Specifically, in the processing of qualified areas, the deviation of each visual feature dimension (such as texture, color, and shape) is first calculated to obtain fine-grained deviation information rather than a single overall value, thereby more accurately locating anomalies. Subsequently, historical time-series data of the deviation of each dimension is recorded to capture its dynamic changes, providing a basis for subsequent trend analysis. The changing trend of each dimension is detected using models such as moving average and ARIMA to understand the characteristics of the dimension's evolution over time. Simultaneously, weight adjustment factors are set for each dimension based on expert experience or historical data to quantify its sensitivity to defects (for example, small color fluctuations may indicate severe color differences, while texture fluctuations may be within the normal range). Finally, based on trend significance (such as statistical tests) and sensitivity, the weight of each dimension in the update of the base material background statistical model is dynamically adjusted—if a sensitive dimension shows a significant upward trend, its weight is increased to accelerate adaptation to changes; conversely, it is decreased, achieving adaptive optimization.
[0060] In some preferred embodiments, it is assumed that the visual characteristics of the printed substrate include three main dimensions: texture features, color features, and morphological features. Once a qualified area is identified, the system calculates the deviation of its texture, color, and morphological features from the substrate baseline statistical model. For example, the deviation for texture features is 0.05, for color features it is 0.02, and for morphological features it is 0.03. The system continuously records historical data on these deviations. After a period of monitoring, the system finds that the deviation for texture features shows a slow upward trend, while the deviations for color and morphological features remain stable. Simultaneously, based on historical experience and defect analysis, texture features are set to have high sensitivity to a specific type of printing defect (such as uneven dot distribution), with a weight adjustment factor of 1.2; while color and morphological features have relatively low sensitivity, with weight adjustment factors of 0.8 and 1.0, respectively. At this point, because the deviation trend of texture features is significant and its sensitivity to defects is high, the system applies a weight adjustment factor of 1.2, giving the texture feature data of the qualified area a higher influence weight in the update of the substrate baseline statistical model. Color and morphological features, due to their insignificant deviation trends or low sensitivity, have their influence weights maintained or slightly reduced. In this way, the substrate background statistical model can focus more on learning and adapting to subtle changes in texture features in the current production batch, thereby detecting potential texture-related defects earlier, while avoiding over-adjustment of other stable features, ensuring the model's stability and detection accuracy.
[0061] This application further proposes the following steps for constructing and maintaining a pure benchmark feature set: The process parameters are acquired in real time, including at least one of printing speed, drying temperature, ink viscosity, and tension value. The process parameters are compared with preset process parameter thresholds to determine whether there are any major process adjustments in the current production line; wherein the major process adjustments are triggered by the process parameters, not by the internal performance indicators of the substrate background statistical model. When the rate of change of the process parameters exceeds the rate of change threshold within a preset time window, it is determined that there is a major process adjustment; the initial value of the rate of change threshold is determined by the substrate type. When a significant process adjustment is determined, the benchmark update process is automatically triggered to relearn the pure benchmark feature set. During the relearning process, the images of the current batch of printed materials are initially screened and reviewed. The images that have been reviewed and confirmed are used as new defect-free substrate sample images, and the visual features of the new defect-free substrate sample images are extracted. The clean baseline feature set is updated based on the visual features of the new defect-free substrate sample image.
[0062] Specifically, the system collects key process parameters (such as printing speed, drying temperature, ink viscosity, and tension) in real time through sensors or production control systems. These parameters are crucial factors affecting quality. The collected parameters are compared with preset thresholds to identify significant process adjustments that may cause substantial changes in the substrate's background properties. The judgment logic is based on changes in external parameters (such as the rate of change exceeding a threshold within a time window), rather than relying on internal model indicators, thus directly responding to environmental changes. The initial value of the rate of change threshold is set according to the substrate type to adapt to the sensitivity of different materials. Once a significant adjustment is determined, the system automatically triggers a baseline update process: the images of the current batch are screened and reviewed; after confirming that they are defect-free samples, visual features are extracted, and then the clean baseline feature set is updated to accurately reflect the substrate state under the new process conditions.
[0063] In some preferred embodiments, suppose a printing production line is undertaking a new printing task with a different substrate type than the previous batch, requiring a higher printing speed and drying temperature. After production begins, the system acquires process parameters such as printing speed, drying temperature, ink viscosity, and tension in real time. For example, if the printing speed is adjusted from 50 meters per minute to 80 meters per minute, and within a preset 10-minute time window, the rate of change exceeds the threshold set for the current substrate type (e.g., a change exceeding 10 meters per minute), the system immediately determines that a significant process adjustment has occurred. At this time, the system automatically triggers an update process for the clean baseline feature set. During the update process, the production line pauses or performs image acquisition in specific areas, filtering images of defect-free substrates in the current batch of printed materials that have been manually or algorithmically verified, and extracting their texture, color, shape, and other visual features. These new visual features are used to update the clean baseline feature set, ensuring it accurately reflects the appearance of "normal" substrates at a printing speed of 80 meters per minute and a higher drying temperature. In this way, even if the production process changes significantly, the substrate background statistical model can still perform defect detection based on the latest and most accurate benchmarks, thereby avoiding misjudgments caused by process adjustments and ensuring the accuracy and stability of the detection. The solution in this application solves the problem of lag or inaccuracy that may occur in the aforementioned pure benchmark feature set when facing major process adjustments on the production line by introducing real-time monitoring and analysis of process parameters. Through the above technical solution, this application can achieve a significant optimization of the method for detecting defects in printed materials.
[0064] This application further proposes the step of comparing the process parameters with preset process parameter thresholds to determine whether there are significant process adjustments in the current production line, including: The process parameters are compared individually to determine whether there are any process adjustments that exceed a single threshold. Perform combined parameter analysis on the process parameters to calculate the correlation strength or synergistic change trend among multiple process parameters; The correlation strength or the synergistic change trend is compared with a preset synergistic threshold to determine whether there is a process adjustment caused by the synergistic effect of multiple parameters. The synergistic threshold is determined by learning from historical data. When the result of the single parameter comparison or the result of the combined parameter analysis indicates that there is a process adjustment, it is determined that there is a major process adjustment in the current production line.
[0065] Specifically, single-parameter comparison refers to comparing each individual process parameter, such as printing speed, drying temperature, ink viscosity, or surface tension, with a preset single threshold. When any process parameter exceeds its corresponding single threshold, it is considered that a process adjustment has been triggered by that single parameter. The purpose is to capture deviations in process state caused by significant changes in a single key parameter.
[0066] Furthermore, combined parameter analysis refers to the comprehensive consideration of multiple process parameters to calculate the strength of their correlation or synergistic change trends. For example, statistical methods (such as correlation analysis and principal component analysis) or machine learning models (such as neural networks and decision trees) can be used to capture the mutual influence and linkage effects between different process parameters. Its purpose is to identify situations where individual parameter changes are not significant, but the synergistic effect of multiple parameters leads to a significant change in the overall process state.
[0067] The correlation strength or synergistic change trend can be understood as the degree of interaction or co-evolution pattern of multiple process parameters within a specific time period. For example, when the printing speed increases, the drying temperature also rises accordingly; this synchronous change may indicate a specific process adjustment. Comparing this correlation strength or synergistic change trend with a preset synergistic threshold can determine whether a process adjustment caused by the synergistic effect of multiple parameters exists. This synergistic threshold is not a fixed value but is determined through learning and analysis of historical production data, reflecting the reasonable fluctuation range of different combinations of process parameters under normal production conditions.
[0068] Therefore, when the result of a single parameter comparison indicates a process adjustment exceeding a single threshold, or when the result of combined parameter analysis indicates a process adjustment caused by the synergistic effect of multiple parameters, it can be determined that a significant process adjustment exists on the current production line. This dual determination mechanism ensures comprehensive coverage and accurate identification of process adjustments.
[0069] This application's solution overcomes the limitations of relying solely on the rate of change of a single parameter to determine process adjustments by introducing a strategy that combines single-parameter comparison with combined parameter analysis. Through this technical solution, the application can significantly improve the detection accuracy and coverage of major process adjustments on production lines.
[0070] In some preferred embodiments, it is assumed that three process parameters—printing speed, drying temperature, and ink viscosity—are monitored in real time on a printing production line.
[0071] First, a single parameter comparison is performed. For example, the preset threshold for printing speed is ±5%, drying temperature is ±3℃, and ink viscosity is ±10%. If at some point the printing speed suddenly drops from 100 m / min to 80 m / min (change rate -20%), exceeding the ±5% threshold, a major process adjustment is immediately identified, and the baseline update process is triggered.
[0072] Secondly, combined parameter analysis is performed. Even if the individual rates of change for printing speed, drying temperature, and ink viscosity do not exceed their individual thresholds—for example, a change of +3% in printing speed, +2°C in drying temperature, and -5% in ink viscosity—these changes may be within the normal range individually. However, the correlation strength or synergistic trend between these three parameters is calculated using the printing process co-analysis module. For instance, through historical data learning, it is found that a slight increase in printing speed, a slight increase in drying temperature, and a slight decrease in ink viscosity usually indicate a change in a specific substrate surface characteristic. If the currently calculated correlation strength or synergistic trend exceeds a preset synergistic threshold (determined through historical data learning, for example, when the deviation of a specific multi-parameter combination exceeds 0.7), even if a single parameter does not exceed the limit, it is determined that there is a process adjustment caused by the synergistic effect of multiple parameters, triggering the baseline update process.
[0073] Through this dual-judgment mechanism, the system can more comprehensively capture process changes in the production line. Whether it is a drastic fluctuation of a single parameter or a coordinated drift of multiple parameters, it can be identified in a timely manner, thereby ensuring the accuracy and timeliness of the pure benchmark feature set.
[0074] This application further proposes the following steps for performing combined parameter analysis on process parameters and calculating the correlation strength or synergistic change trend among multiple process parameters: The real-time acquired process parameters are preprocessed, including interpolation of missing data and correction of abnormal data. The preprocessed process parameter data is input into the printing process collaborative analysis module. This module consists of multiple processing units connected in series, adapted to the printing quality monitoring task. The number of layers in each processing unit is adaptively adjusted according to the substrate type. The nonlinear mapping function in each processing unit is a neural network with gated recurrent units. Each processing unit extracts the spatiotemporal coupling feature representation of the process parameter combination at different time scales through the neural network with gated recurrent units. This spatiotemporal coupling feature representation is used to identify potential defect precursors during changes in the process parameters. By fusing the spatiotemporal coupling characteristics of the process at different time scales, a comprehensive metric reflecting the dynamic nonlinear correlation strength or collaborative change trend among multiple process parameters is obtained. The comprehensive metric is compared with a preset dynamic threshold to determine whether there is a process adjustment trend caused by the synergistic effect of multiple parameters.
[0075] Specifically, data preprocessing for real-time acquired process parameters refers to cleaning and standardizing the raw process parameter data before using it for subsequent analysis. This includes interpolation of missing data to fill gaps that may arise during data acquisition; for example, linear interpolation, spline interpolation, or prediction models based on historical data can be used to fill these gaps, ensuring data integrity and continuity. Correction of outlier data aims to identify and correct measurements that significantly deviate from the normal range. For example, statistical methods (such as Z-score, IQR) or machine learning anomaly detection algorithms can be used to identify outliers, which can then be smoothed, replaced, or deleted to improve data accuracy and reliability.
[0076] The printing process co-analysis module is a computational unit that handles the complex relationships between printing process parameters. It consists of multiple layers of processing units connected in series. The number of layers is adaptively adjusted according to the substrate type; more layers are added for complex or sensitive substrates, and fewer layers are added for simple or stable substrates. Each layer uses a neural network with gated recurrent units as a nonlinear mapping function to process time series and capture the dynamic dependence and nonlinear characteristics of process parameters. This neural network can learn long-sequence dependencies and avoid gradient vanishing or exploding, thus accurately modeling the mutual influence of process parameters at different time points. Each layer thereby extracts spatiotemporal coupling feature representations of the process at different time scales from the combination of process parameters, including instantaneous parameter values, trends of change, interactions, and spatial correlations. The aim is to identify early precursors of potential printing defects from process changes.
[0077] In practical applications, the spatiotemporal coupling characteristics of the process at different time scales are fused to integrate feature information extracted from different time granularities (e.g., short-term fluctuations, medium-term trends, and long-term drifts) into a more comprehensive and robust metric. This metric reflects the dynamic nonlinear correlation strength or synergistic change trend among multiple process parameters, thus more accurately characterizing the overall state of the current printing process. Subsequently, the metric is compared with a preset dynamic threshold. This dynamic threshold is adjusted in real time based on historical data, current production batch characteristics, substrate type, and environmental conditions, rather than remaining fixed, to adapt to fluctuations in the production environment, thereby more accurately determining whether there is a process adjustment trend caused by the synergistic effect of multiple parameters.
[0078] In some preferred embodiments, a specific example is given below. Suppose that on a high-speed printing production line, printing speed, drying temperature, and ink viscosity are three key process parameters. When it is identified that the three parameters of "speed-temperature-viscosity" exhibit a specific non-linear synergistic downward trend over the past 5 minutes, these multi-scale features are then fused to generate a comprehensive metric that accurately reflects the strength of the dynamic non-linear correlation between these three parameters. When this comprehensive metric exceeds a preset dynamic threshold, the system can promptly determine that there is a process adjustment trend caused by the synergistic effect of multiple parameters and issue an early warning. For example, even if a single parameter does not exceed its limit, its comprehensive metric may indicate the potential risk of "orange peel" defects, thus prompting operators to intervene before the defects actually occur, such as fine-tuning the drying temperature or ink viscosity, effectively avoiding the defects and improving product quality and production efficiency.
[0079] The solution proposed in this application effectively addresses the limitations of traditional combined parameter analysis in handling complex, dynamic, and nonlinear process parameter relationships by introducing data preprocessing, multi-layer neural networks with gated recurrent units, and a multi-scale feature fusion mechanism.
[0080] Specifically, the steps described above for fusing the spatiotemporal coupling characteristics of the process at different time scales to obtain a comprehensive measure that reflects the dynamic nonlinear correlation strength or synergistic change trend among multiple process parameters can be further refined into the following process.
[0081] This step includes: Obtain the spatiotemporal coupling feature representation of the process at different time scales; Obtain information on the current production batch, substrate type, and environmental conditions; Based on the current production batch information, the substrate type information, and the environmental condition information, the degree of influence of the process spatiotemporal coupling characteristics at each time scale on the printing quality is evaluated; wherein the degree of influence is dynamically adjusted as the production batch, substrate type, and environmental conditions change; Based on the degree of influence, the fusion weights corresponding to the spatiotemporal coupling feature representation of the process at each time scale are generated by normalization. The spatiotemporal coupling features of the process at different time scales are weighted with the corresponding fusion weights to obtain the comprehensive metric.
[0082] Among these, acquiring the spatiotemporal coupling feature representations of the process at different time scales refers to receiving data from the printing process collaborative analysis module, which has been extracted by multiple processing units, reflecting the spatiotemporal coupling characteristics of process parameters at different time scales. These feature representations capture the complex correlations of process parameters in terms of short-term fluctuations, medium-term trends, and long-term drift.
[0083] Furthermore, acquiring current production batch information, substrate type information, and environmental condition information refers to the system collecting contextual data related to the current production process in real time. For example, production batch information may include batch number, production date, etc.; substrate type information may refer to the material, thickness, surface treatment, and other characteristics of different printing substrates such as paper and film; environmental condition information covers real-time monitoring data such as temperature, humidity, and light intensity in the production workshop. This information is crucial for understanding the potential impact of changes in process parameters on printing quality.
[0084] Specifically, the system dynamically assesses the impact of process spatiotemporal coupling characteristics on current printing quality at different time scales based on three types of contextual information: current production batch, substrate type, and environmental conditions. For example, ink viscosity fluctuations on a short time scale have a significant impact on one substrate, while drying temperature drift on a long time scale is more critical on another substrate. This assessment can be implemented based on models trained on historical data, expert experience rules, or adaptive learning algorithms, and the results are dynamically adjusted according to changes in production batch, substrate type, and environmental conditions. Based on this, the assessed impact is normalized, scaled to between 0 and 1, and the sum of the weights corresponding to all time scales is guaranteed to be 1, forming a fusion weight for weighted fusion. Finally, the process spatiotemporal coupling characteristics at each time scale are multiplied by the corresponding fusion weight and summed to obtain a comprehensive metric that reflects the strength of dynamic nonlinear correlations or synergistic trends among multiple process parameters.
[0085] This solution introduces contextual information to dynamically assess the influence of features at each time scale and generates adaptive fusion weights. This enables the system to flexibly adjust the importance of features at different time scales according to changes in the actual production environment, thereby capturing the dynamic nonlinear correlation of process parameters more accurately during the fusion process.
[0086] This application further proposes that the steps for updating according to the online learning rate under normal circumstances include: Acquire time-series data of environmental parameters at the production site, wherein the environmental parameters include at least one of temperature, humidity, and light intensity; Based on the time series data of the environmental parameters, the standard deviation of the difference between adjacent sampling times is calculated as the fluctuation of the environmental parameters; The fluctuation amount is compared with a preset stability threshold to determine whether the current environmental conditions are stable. Based on the stability of the environmental conditions, a confidence threshold value is generated for online updating of the background statistical model of the substrate, wherein the confidence threshold value decreases when the environmental conditions are unstable and increases when the environmental conditions are stable. Using the confidence level as a gate, the visual features, process parameter features, and environmental features of the currently collected multiple regions to be detected are used for online updates of the substrate background statistical model.
[0087] Specifically, the system continuously collects time-series data of environmental parameters (such as temperature, humidity, and light intensity) to monitor the dynamics of the production environment. To quantify the degree of fluctuation, the standard deviation of the difference between adjacent sampling times is calculated as the fluctuation measure—the difference removes trends and highlights instantaneous changes, while the standard deviation reflects the degree of dispersion and characterizes the severity of fluctuations. A confidence threshold value is generated based on environmental stability and serves as a dynamic weighting factor: the threshold is lowered when unstable to reduce the interference of noisy data on model updates; the threshold is raised when stable to allow high-quality data to fully participate in the update. Finally, this threshold value is used to adjust the influence weights of currently collected visual features, process parameter features, and environmental features in the online update of the substrate background statistical model, achieving robust learning with adaptive data quality.
[0088] The proposed solution dynamically adjusts the confidence level of the online model update by introducing fluctuations in environmental parameters, thereby effectively solving the problem that traditional fixed online learning rates may introduce noise or cause model instability when the environment fluctuates.
[0089] This application further specifies the following steps for the aforementioned offline reconstruction: Continuously record time series data of joint deviation and calculate the cumulative duration during which the joint deviation is below the reconstruction trigger threshold; When the cumulative duration reaches the preset time period, an offline reconstruction instruction is generated; In response to the offline reconstruction command, the current base background statistical model is marked as a state to be reconstructed, and the similarity comparison between its online update and drift warning is frozen; A subset matching the current production batch, substrate type, and environmental conditions is extracted from the pure baseline feature set and used as offline reconstruction samples. Based on the offline reconstructed samples, the probability distribution parameters of the substrate background statistical model are recalculated to obtain the reconstructed substrate background statistical model. The reconstructed substrate background statistical model and the substrate background statistical model to be reconstructed are validated in parallel. If the parallel validation is successful, the reconstructed substrate background statistical model is used to replace the substrate background statistical model to be reconstructed. If the parallel validation fails, the substrate background statistical model to be reconstructed is retained and a reconstruction failure alarm is issued.
[0090] Specifically, the system continuously records time-series data of the joint deviation and calculates the cumulative duration for which it remains below the reconstruction trigger threshold. This aims to ensure that the system is in a relatively stable and defect-free state when offline reconstruction is triggered, avoiding reconstruction during system fluctuations or when potential problems exist, thereby guaranteeing the effectiveness of the reconstruction. When the cumulative duration reaches a preset time period, the system will automatically generate an offline reconstruction instruction, which serves as a signal to initiate the subsequent reconstruction process.
[0091] In response to the offline reconstruction command, the current base background statistical model is marked as a state to be reconstructed, and its online update and drift warning similarity comparison are frozen. The purpose is to isolate the model to be reconstructed and prevent new online data or drift detection results from interfering with it during the reconstruction process, so as to ensure the independence and purity of the reconstruction process.
[0092] In practical applications, a subset matching the current production batch, substrate type, and environmental conditions is extracted from the pure baseline feature set as offline reconstruction samples. The purpose is to use the defect-free substrate sample data that has been rigorously screened and confirmed to ensure the quality and representativeness of the reconstruction samples, so that the reconstructed model can accurately reflect the background characteristics of the substrate under the current production conditions.
[0093] Furthermore, based on the offline reconstructed samples, the probability distribution parameters of the substrate background statistical model are recalculated to obtain the reconstructed substrate background statistical model. This is the core step of offline reconstruction. By relearning the feature distribution of the clean samples, the model can better adapt to the current production status.
[0094] Furthermore, the reconstructed substrate background statistical model and the substrate background statistical model to be reconstructed are validated in parallel. The purpose is to fully evaluate the performance of the new model before its official implementation. If the parallel validation passes, the reconstructed substrate background statistical model will replace the model to be reconstructed, achieving a smooth model switchover. If the parallel validation fails, the original substrate background statistical model to be reconstructed is retained, and a reconstruction failure alarm is issued to avoid affecting the accuracy of production testing due to poor performance of the new model, while also prompting operators to intervene.
[0095] This application's solution effectively addresses the issues of insufficient robustness and lack of risk control that may exist in the offline reconstruction process of the basic solution by introducing a series of refined offline reconstruction steps. Through the above technical solution, this application can significantly improve the reliability and security of offline reconstruction of the base background statistical model.
[0096] In some preferred embodiments, it is assumed that after a printing production line has been running stably for a period of time, its joint deviation remains below the reconstruction trigger threshold and has accumulated to a preset 24 hours. At this time, the system automatically generates an offline reconstruction instruction. In response to this instruction, the currently used substrate background statistical model is marked as pending reconstruction, and its online learning function and similarity comparison with the drift warning module are paused. The system then intelligently filters and extracts a batch of defect-free substrate samples that highly match the specific information of the current production batch (e.g., the type of paper being printed, the type of ink), substrate type (e.g., coated paper), and environmental conditions (e.g., workshop temperature 25°C, humidity 60%) from a pre-established set of clean baseline features, as a dedicated sample set for this offline reconstruction.
[0097] Based on this batch of high-quality offline reconstructed samples, the system recalculates the probability distribution parameters of the substrate background statistical model. For example, it updates the mean, covariance, and mixture weights of the Gaussian mixture model, thereby obtaining a brand-new reconstructed substrate background statistical model that is more adapted to the current production status.
[0098] Subsequently, to ensure the reliability of the new model, the system initiates a parallel verification process. For a period of time (e.g., 1 hour), the reconstructed substrate background statistical model and the original substrate background statistical model are simultaneously used to inspect printed materials on the production line. If, within this 1 hour, the reconstructed model demonstrates performance comparable to or better than the original model in key performance indicators such as detection accuracy, false alarm rate, and false negative rate, without any abnormal fluctuations, the parallel verification is considered successful. At this point, the system smoothly activates the reconstructed substrate background statistical model, replacing the original model and restoring its online update and drift warning comparison functions.
[0099] Conversely, if the reconstructed model exhibits a significant performance degradation during parallel validation, such as a significantly increased false alarm rate or a large discrepancy with the detection results of the model to be reconstructed, then the parallel validation is deemed unsuccessful. In this case, the system will retain the original baseline statistical model of the substrate to be reconstructed and immediately issue a "reconstruction failure alarm" to the operator, prompting manual intervention to check the reconstruction process or sample data, thereby avoiding the impact on production caused by the introduction of an unstable new model.
[0100] refer to Figure 2 , Figure 2 This is a schematic diagram of a printing quality defect detection system based on image recognition provided in an embodiment of the present invention. The system includes: An image recognition and acquisition module is used to acquire images of printed materials and divide the printed materials images into multiple detection areas that correspond one-to-one with the positions on the printed materials according to a preset size. The image recognition feature extraction module is used to extract the texture features, color features, and morphological features of the substrate in the area to be detected to obtain visual features; The sample screening and model building module is used to perform preliminary screening and verification of the printed images to obtain defect-free substrate sample images; and to build a substrate background statistical model based on the visual characteristics of the defect-free substrate sample images; the substrate background statistical model is established only based on normal samples and reflects the microscopic surface characteristics of the current batch of printed substrates; the probability distribution in the substrate background statistical model is a Gaussian mixture model, kernel density estimation, or multidimensional normal distribution; The process environment parameter acquisition and mapping module is used to acquire process parameters and environmental parameters from the production site, and map the process parameters and environmental parameters to the same feature space as the visual features, respectively, to obtain process parameter features and environmental features; the mapping explicitly reduces the coupling interference of process parameters and environmental changes on the visual features; The model comparison and adaptive update module is used to input the visual features, process parameter features, and environmental features of the current detection area into the substrate background statistical model. By comparing the visual features with the substrate background statistical model, the module calculates the joint deviation between the two models. The substrate background statistical model performs batch adaptive updates based on the process parameter features and environmental features, updating according to the online learning rate under normal conditions and according to the offline reconstruction rate under abnormal conditions. The ratio of the online learning rate to the offline reconstruction rate is not greater than 0.1. The joint deviation is calculated using Mahalanobis distance. The offline reconstruction triggering module is used to actively trigger the offline reconstruction of the base background statistical model when the joint deviation is continuously lower than the reconstruction triggering threshold for a preset period of time. The dual-layer deviation determination module is used to determine single-point deviation and system deviation of the current detection area through image recognition and the statistical model of the substrate background, and obtain the single-point deviation amount and the system deviation amount; the single-point deviation amount corresponds to local micro defects, and the system deviation amount corresponds to batch statistical defects. The defect determination and output module is used to determine that there is a defect in the current area to be detected when the single-point deviation exceeds the single-point threshold or the system deviation exceeds the system threshold; and to output a rejection control signal to the rejection mechanism when it is determined that there is a defect in the current area to be detected.
[0101] The image recognition-based printing quality defect detection system proposed in this application effectively solves the problems of misjudgment and missed detection in traditional detection methods when dealing with printing products on special substrates by modularizing the detection process and introducing a substrate background statistical model, coupled analysis of process environment parameters, and a two-layer deviation judgment mechanism.
[0102] 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 quality defects in printed materials based on image recognition, characterized in that, The method includes: The printed image is acquired by the image recognition acquisition module, and the printed image is divided into multiple detection areas that correspond one-to-one with the positions on the printed material according to a preset size. The texture, color, and morphological features of the substrate in the area to be detected are extracted by the image recognition feature extraction module to obtain visual features; The printed images are initially screened and verified to obtain defect-free substrate sample images. A substrate background statistical model is constructed based on the visual characteristics of the defect-free substrate sample images. This substrate background statistical model is established solely based on normal samples and reflects the microscopic surface characteristics of the current batch of printed substrates. The probability distribution in the substrate background statistical model is a Gaussian mixture model, kernel density estimation, or multidimensional normal distribution. The mixture number of the Gaussian mixture model is determined by the Bayesian information criterion. The bandwidth of the kernel density estimation is determined by the Silverman rule. The process parameters and environmental parameters of the production site are collected, and the process parameters and environmental parameters are mapped to the same feature space as the visual features to obtain process parameter features and environmental features; the mapping explicitly clarifies the coupling interference of process parameters and environmental changes on the visual features; The visual features, process parameter features, and environmental features of the current area to be detected are input into the substrate background statistical model. The joint deviation between the visual features and the substrate background statistical model is calculated by comparing the visual features with the substrate background statistical model. The substrate background statistical model is updated batch-wise based on the process parameter features and environmental features; under normal conditions, it is updated according to the online learning rate, and under abnormal conditions, it is updated according to the offline reconstruction rate. The ratio of the online learning rate to the offline reconstruction rate is not greater than 0.
1. The joint deviation is calculated using Mahalanobis distance. When the joint deviation remains below the reconstruction trigger threshold for a preset period of time, the offline reconstruction of the base background statistical model is actively triggered. By combining image recognition with the substrate background statistical model for two-layer deviation determination, single-point deviation and system deviation determination are performed on the current area to be detected to obtain the single-point deviation amount and the system deviation amount; the single-point deviation amount corresponds to local micro-defects, and the system deviation amount corresponds to batch statistical defects; When the deviation of a single point exceeds the single point threshold or the deviation of the system exceeds the system threshold, it is determined that there is a defect in the current area to be detected. When it is determined that there is a defect in the area to be detected, a rejection control signal is output to the rejection mechanism.
2. The method according to claim 1, characterized in that, The method further includes: Record the visual features of each of the regions to be detected; The joint deviation of each of the regions to be detected is decomposed to obtain the corresponding single-point deviation and system deviation. The areas to be detected where the single-point deviation is less than the single-point threshold and the system deviation is less than the system threshold are marked as qualified areas; Based on the deviation between the visual features of the qualified region and the statistical model of the substrate background, adjust the influence weight of the visual features of the qualified region on the update of the statistical model of the substrate background. Construct and maintain a clean baseline feature set, which consists of the visual features of the defect-free substrate sample images that have been verified and confirmed when the system starts or a batch begins; The substrate background statistical model is compared with the pure benchmark feature set, and the similarity between the substrate background statistical model and the pure benchmark feature set is calculated. When the similarity is lower than a first threshold, an attention-level drift warning is issued; when the similarity is lower than a second threshold, a warning-level drift warning is issued; when the similarity is lower than a third threshold, a severe drift warning is issued; wherein the third threshold is lower than the second threshold, and the second threshold is lower than the first threshold; After each severe drift warning is issued, the substrate background statistical model is first frozen, then the pure baseline feature set is forcibly refreshed, and the substrate background statistical model is reconstructed based on the refreshed pure baseline feature set. Based on the joint deviation between the visual features of the current region to be detected and the statistical model of the substrate background, the participation weight of the visual features of the current qualified region in the update of the statistical model of the substrate background is dynamically adjusted.
3. The method according to claim 2, characterized in that, The step of adjusting the influence weight of the visual features of the qualified region on the updating of the substrate background statistical model based on the deviation between the visual features of the qualified region and the substrate background statistical model includes: Calculate the deviation of the qualified region in multiple visual feature dimensions; Record historical time-series data of the deviation amount for each of the aforementioned visual feature dimensions; Based on the historical time series data, detect the changing trend of the deviation amount of each visual feature dimension; Based on the sensitivity of the visual feature dimensions to defects, a weight adjustment factor is set for each visual feature dimension; Based on the significance of the deviation trend of the visual feature dimension, the weight adjustment factor is applied to dynamically adjust the influence weight of the visual feature of the qualified region in the update of the substrate background statistical model.
4. The method according to claim 2, characterized in that, The step of constructing and maintaining a pure benchmark feature set includes: The process parameters are acquired in real time, including at least one of printing speed, drying temperature, ink viscosity, and tension value. The process parameters are compared with preset process parameter thresholds to determine whether there are any major process adjustments in the current production line; wherein the major process adjustments are triggered by the process parameters, not by the internal performance indicators of the substrate background statistical model. When the rate of change of the process parameters exceeds the rate of change threshold within a preset time window, it is determined that there is a major process adjustment; the initial value of the rate of change threshold is determined by the substrate type. When a significant process adjustment is determined, the benchmark update process is automatically triggered to relearn the pure benchmark feature set. During the relearning process, the images of the current batch of printed materials are initially screened and reviewed. The images that have been reviewed and confirmed are used as new defect-free substrate sample images, and the visual features of the new defect-free substrate sample images are extracted. The clean baseline feature set is updated based on the visual features of the new defect-free substrate sample image.
5. The method according to claim 4, characterized in that, The step of comparing the process parameters with preset process parameter thresholds to determine whether there are significant process adjustments in the current production line includes: The process parameters are compared individually to determine whether there are any process adjustments that exceed a single threshold. Perform combined parameter analysis on the process parameters to calculate the correlation strength or synergistic change trend among multiple process parameters; The correlation strength or the synergistic change trend is compared with a preset synergistic threshold to determine whether there is a process adjustment caused by the synergistic effect of multiple parameters. The synergistic threshold is determined by learning from historical data. When the result of the single parameter comparison or the result of the combined parameter analysis indicates that there is a process adjustment, it is determined that there is a major process adjustment in the current production line.
6. The method according to claim 5, characterized in that, The step of performing combined parameter analysis on the process parameters and calculating the correlation strength or synergistic change trend among multiple process parameters includes: The real-time acquired process parameters are preprocessed, including interpolation of missing data and correction of abnormal data. The preprocessed process parameter data is input into the printing process collaborative analysis module. This module consists of multiple processing units connected in series, adapted to the printing quality monitoring task. The number of layers in each processing unit is adaptively adjusted according to the substrate type. The nonlinear mapping function in each processing unit is a neural network with gated recurrent units. Each processing unit extracts the spatiotemporal coupling feature representation of the process parameter combination at different time scales through the neural network with gated recurrent units. This spatiotemporal coupling feature representation is used to identify potential defect precursors during changes in the process parameters. By fusing the spatiotemporal coupling characteristics of the process at different time scales, a comprehensive metric reflecting the dynamic nonlinear correlation strength or collaborative change trend among multiple process parameters is obtained. The comprehensive metric is compared with a preset dynamic threshold to determine whether there is a process adjustment trend caused by the synergistic effect of multiple parameters.
7. The method according to claim 6, characterized in that, The step of fusing the spatiotemporal coupling feature representations of the processes at different time scales to obtain a comprehensive metric reflecting the dynamic nonlinear correlation strength or cooperative change trend among multiple process parameters includes: Obtain the spatiotemporal coupling feature representation of the process at different time scales; Obtain information on the current production batch, substrate type, and environmental conditions; Based on the current production batch information, the substrate type information, and the environmental condition information, the degree of influence of the process spatiotemporal coupling characteristics at each time scale on the printing quality is evaluated; wherein the degree of influence is dynamically adjusted as the production batch, substrate type, and environmental conditions change; Based on the degree of influence, the fusion weights corresponding to the spatiotemporal coupling feature representation of the process at each time scale are generated by normalization. The spatiotemporal coupling features of the process at different time scales are weighted with the corresponding fusion weights to obtain the comprehensive metric.
8. The method according to claim 1, characterized in that, The update based on the online learning rate during normal operation includes: Acquire time-series data of environmental parameters at the production site, wherein the environmental parameters include at least one of temperature, humidity, and light intensity; Based on the time series data of the environmental parameters, the standard deviation of the difference between adjacent sampling times is calculated as the fluctuation of the environmental parameters; The fluctuation amount is compared with a preset stability threshold to determine whether the current environmental conditions are stable. Based on the stability of the environmental conditions, a confidence threshold value is generated for online updating of the background statistical model of the substrate, wherein the confidence threshold value decreases when the environmental conditions are unstable and increases when the environmental conditions are stable. Using the confidence level as a gate, the visual features, process parameter features, and environmental features of the currently collected multiple regions to be detected are used for online updates of the substrate background statistical model.
9. The method according to claim 2, characterized in that, The step of actively triggering offline reconstruction of the substrate background statistical model when the joint deviation remains below the reconstruction trigger threshold for a preset period includes: Continuously record the time series data of the joint deviation, and count the cumulative duration during which the joint deviation is below the reconstruction trigger threshold; When the accumulated duration reaches the preset time period, an offline reconstruction instruction is generated; In response to the offline reconstruction command, the current base background statistical model is marked as a state to be reconstructed, and its online update and similarity comparison with the drift warning are frozen; A subset matching the current production batch, the substrate type, and the environmental conditions is extracted from the pure baseline feature set and used as offline reconstruction samples; Based on the offline reconstructed samples, the probability distribution parameters of the substrate background statistical model are recalculated to obtain the reconstructed substrate background statistical model. The reconstructed substrate background statistical model and the substrate background statistical model to be reconstructed are validated in parallel. If the parallel validation passes, the reconstructed substrate background statistical model is used to replace the substrate background statistical model to be reconstructed. If the parallel validation fails, the substrate background statistical model to be reconstructed is retained, and a reconstruction failure alarm is issued.
10. A printing quality defect detection system based on image recognition, characterized in that, The system includes: An image recognition and acquisition module is used to acquire images of printed materials and divide the printed materials images into multiple detection areas that correspond one-to-one with the positions on the printed materials according to a preset size. The image recognition feature extraction module is used to extract the texture features, color features, and morphological features of the substrate in the area to be detected to obtain visual features; The sample screening and model building module is used to perform preliminary screening and verification of the printed images to obtain defect-free substrate sample images; and to build a substrate background statistical model based on the visual characteristics of the defect-free substrate sample images; the substrate background statistical model is established only based on normal samples and reflects the microscopic surface characteristics of the current batch of printed substrates; the probability distribution in the substrate background statistical model is a Gaussian mixture model, kernel density estimation, or multidimensional normal distribution; The process environment parameter acquisition and mapping module is used to acquire process parameters and environmental parameters from the production site, and map the process parameters and environmental parameters to the same feature space as the visual features, respectively, to obtain process parameter features and environmental features; the mapping explicitly reduces the coupling interference of process parameters and environmental changes on the visual features; The model comparison and adaptive update module is used to input the visual features, process parameter features, and environmental features of the current detection area into the substrate background statistical model. By comparing the visual features with the substrate background statistical model, the module calculates the joint deviation between the two models. The substrate background statistical model performs batch adaptive updates based on the process parameter features and environmental features, updating according to the online learning rate under normal conditions and according to the offline reconstruction rate under abnormal conditions. The ratio of the online learning rate to the offline reconstruction rate is not greater than 0.
1. The joint deviation is calculated using Mahalanobis distance. The offline reconstruction triggering module is used to actively trigger the offline reconstruction of the base background statistical model when the joint deviation is continuously lower than the reconstruction triggering threshold for a preset period of time. The dual-layer deviation determination module is used to determine single-point deviation and system deviation of the current detection area through image recognition and the statistical model of the substrate background, and obtain the single-point deviation amount and the system deviation amount; the single-point deviation amount corresponds to local micro defects, and the system deviation amount corresponds to batch statistical defects. The defect determination and output module is used to determine that there is a defect in the current area to be detected when the single-point deviation exceeds the single-point threshold or the system deviation exceeds the system threshold; and to output a rejection control signal to the rejection mechanism when it is determined that there is a defect in the current area to be detected.
