Printing quality detection system and method

By using a twin network model in a printing quality inspection system, combined with reconstruction and latent space anomaly score evaluation, the problem of insufficient identification of global defects in existing technologies is solved, and accurate detection of both local and global defects is achieved, improving the robustness and adaptability of the inspection system.

CN121746322APending Publication Date: 2026-03-27XINHUA NEWS AGENCY PRINTING
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing printing quality inspection technologies suffer from insufficient detection accuracy and weak generalization ability when faced with unpredictable, diverse, or inconspicuous defects. In particular, they are unable to effectively identify global defects that cause minor drifts in overall process parameters.

Method used

A printing quality inspection system is adopted, including a motion control module, an imaging module, and a processing terminal module. By using a twin network model to synchronously acquire near-infrared and visible light images, a stable mapping relationship between physical intrinsic features and commercial appearance features is established. The system combines reconstructed anomaly scores and latent space anomaly scores to evaluate differences and ultimately determine defects.

Benefits of technology

It achieves accurate identification of both local explicit and global implicit defects, improves detection accuracy and robustness, reduces dependence on defect samples, and enhances system deployment efficiency and scenario adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746322A_ABST
    Figure CN121746322A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of printing quality detection, and discloses a printing quality detection system and method.The system comprises a motion control module, an imaging module and a processing terminal module; the imaging module synchronously obtains a first image representing physical intrinsic characteristics and a second image representing commercial appearance characteristics in the same target area on the printed matter to be detected; the processing terminal module generates a theoretical second image from the first image by using a preset twin network model. Defect judgment is carried out through two-dimensional evaluation; a reconstruction anomaly score between the theoretical second image and the actual second image is calculated; and calculating a potential space anomaly score between the potential space feature of the first image and the standard good product distribution. And finally, fusing the abnormal scores of the two dimensions to form comprehensive judgment. According to the method, the physical features and the appearance features are associated, so that false alarms under a complex background are effectively reduced, the detection capability of hidden defects is improved, the detection precision is high, and the robustness is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of printing quality inspection technology, and in particular to a printing quality inspection system and method. Background Technology

[0002] In the modern printing industry, automated online quality inspection is a key step in ensuring product quality and improving production efficiency. Currently, machine vision-based inspection technology has become mainstream, replacing manual visual inspection and enabling high-speed, non-contact identification of surface defects in printed materials.

[0003] However, current mainstream print quality inspection technologies, especially those relying on supervised deep learning models, are highly dependent on large-scale and diverse defect sample databases for performance. In real-world production environments, defect occurrences are often random and sporadic, with certain types of defects being extremely rare. Therefore, constructing a sample dataset that covers all potential defect types is extremely difficult and costly. This strong dependence on defect samples causes existing technologies to exhibit reduced generalization and detection capabilities when faced with novel or unknown defects not present in the training set, making it difficult to meet increasingly complex quality control requirements.

[0004] Furthermore, existing detection methods have limitations in assessing defect features. Many technologies primarily identify anomalies through direct image comparison or single-level feature extraction, which is effective for localized defects with clear outlines and high contrast, such as ink spots and scratches. However, when defects manifest as minor shifts in overall process parameters, such as large-area gradual color differences or minor misregistration caused by variations in ink ratio or paper tension, existing technologies suffer from insufficient accuracy due to a lack of effective measurement methods, easily leading to missed detections. Simultaneously, these systems often generate numerous false alarms because they cannot effectively distinguish between normal texture fluctuations in the product material or slight changes in ambient lighting and genuine defects, indicating a need to improve system robustness.

[0005] Therefore, how to break free from the dependence on defective samples and simultaneously identify both local explicit defects and global implicit defects accurately and robustly is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] The technical problem to be solved by the present invention is that existing printing quality inspection technologies have insufficient detection accuracy and weak generalization ability when faced with non-preset, diverse or insignificant defects, especially in the case of global defects that only cause slight drift in overall process parameters.

[0007] To address the aforementioned technical problems, this invention provides a printing quality inspection system and method.

[0008] The first aspect of the present invention provides a printing quality inspection system, comprising: The system comprises a motion control module, an imaging module, and a processing terminal module. The motion control module enables a controlled and stable relative motion between the printed material to be inspected and the imaging module. The imaging module, linked to the motion control module, synchronously acquires a first image and a second image of the same target area on the printed material during this relative motion. In one specific embodiment, the first image is a near-infrared image, used to characterize the physical intrinsic features of the target area determined by materials such as ink and paper; the second image is a visible light image, used to characterize the commercial appearance features of the target area presented to the observer. To ensure the accuracy of subsequent analysis, the imaging module can be a synchronous dual-spectrum coaxial imaging module, whose function is to ensure pixel-level precise alignment between the acquired first and second images.

[0009] The processing terminal module is connected to the imaging module via data connection. A twin network model is pre-configured within the processing terminal module. The function of this processing terminal module is to process the received first and second images using the twin network model, and ultimately determine whether the printed material to be inspected has defects.

[0010] Furthermore, the Siamese network model is a deep neural network that includes an encoder and a decoder. The model's capabilities are acquired through an offline model training step. This training step optimizes the model using multiple first and second images that have been confirmed as standard good products, until it establishes a model capable of a stable mapping from the physical intrinsic features represented by the first image to the commercial appearance features represented by the second image.

[0011] In a preferred embodiment, the internal functions of the processing terminal module are implemented collaboratively by multiple units, including: a twin generation unit, a difference evaluation unit, and a fusion decision unit.

[0012] The twin generation unit is responsible for calling the twin network model, which already has mapping capabilities, to generate a theoretically perfect second image by taking the first image acquired in real time as input.

[0013] The difference assessment unit receives the theoretical second image and the real-time acquired second image, and calculates the difference between the two to output at least one anomaly score. Specifically, the anomaly score may include a reconstruction anomaly score and a latent space anomaly score.

[0014] To calculate the latent space anomaly score, the processing terminal module also presets a standard latent space distribution. This distribution is established as follows: multiple first images of the standard good products are input one by one into the encoder part of the Siamese network model to obtain latent space feature vectors corresponding to each good product. These vectors form a latent space feature vector set, and finally, statistical modeling is performed on this set to obtain the standard latent space distribution. For example, it can be assumed that this distribution follows a multivariate Gaussian distribution N(μ z ,Σ z Its parameters are calculated in the following way: Mean vector μ z : Where, μ z The mean vector of the standard latent space distribution represents the average characteristic shape of all standard good products in the latent space; N represents the total number of standard good samples used for modeling, and is a positive integer. The mathematical symbol representing the summation of all terms from i = 1 to N; z (i) This represents the feature vector obtained in the latent space after the first image of the i-th standard good product has been processed by the encoder.

[0015] Covariance matrix Σ z : Where, Σ z The covariance matrix represents the standard latent space distribution, which describes the correlation between various feature dimensions in the latent space and the dispersion of good samples.

[0016] (z (i) -μ z ) T Represents vector (z) (i) -μ z The transpose of ) is an operation that converts a column vector into a row vector, used in matrix multiplication to compute the outer product.

[0017] The specific workflow of the difference assessment unit is as follows: Calculate the reconstructed anomaly score: by calculating the theoretical second image With the second image The pixel-level residuals between the two are used to obtain the reconstruction anomaly score S. rec For example, the L1 norm can be used for calculation: in, S recThe reconstruction anomaly score is a scalar value whose magnitude reflects the degree of difference between the pixel appearance of the sample being tested and the theoretically perfect state. This refers to a second image (e.g., a visible light image) of the sample to be detected, acquired in real time by the imaging module. This indicates that the twin generation unit generates, and The corresponding theoretical second image; This refers to summing the absolute values ​​of the differences between all pixel values ​​at corresponding pixel locations in two images.

[0018] Calculate the latent space anomaly score; extract the first image of the current sample to be detected using the encoder. latent space eigenvector z test The deviation between the vector and the standard latent space distribution is calculated to obtain the latent space anomaly score S. lat For example, Mahalanobis distance can be used for calculation: in, S lat The latent space anomaly score is a scalar value that reflects the degree to which the sample deviates from the standard good product distribution at the level of abstract features. z test The first image representing the sample to be tested. The feature vector obtained in the latent space after processing by the encoder; μ z With Σ z These represent the mean vector and covariance matrix of the pre-calculated standard latent space distribution, respectively.

[0019] Represents the covariance matrix Σ z The inverse matrix; (z test -μ z ) T This represents the transpose operation of a vector.

[0020] The fusion decision unit receives the reconstructed anomaly score and the latent space anomaly score, and determines whether a defect exists based on these scores. Specifically, the unit can perform a weighted fusion of the two scores to obtain a comprehensive anomaly score S. final : Among them, S final The overall abnormality score is represented by a scalar value. w rec with w latLet w represent the preset weighting coefficients for the reconstructed anomaly score and the latent space anomaly score, respectively. Let w be non-negative real numbers and satisfy w. rec +w lat =1; and These represent the reconstructed anomaly score and the latent space anomaly score after normalization, respectively. Normalization can be achieved by methods such as linear scaling to map the original scores to the interval [0,1].

[0021] Finally, the overall anomaly score is compared with a preset threshold T. The preset threshold is a predetermined numerical boundary used to distinguish standard good products from defective products. If S... final If the value is >T, then the printed material to be inspected is determined to have a defect.

[0022] The second aspect of the present invention provides a printing quality inspection method, which uses the aforementioned system and includes the following steps: S1, acquiring a first image and a second image of the same target area on the printed matter to be inspected.

[0023] S2. Generate a theoretical second image corresponding to the first image. This step is achieved by inputting the first image into a preset Siamese network model.

[0024] S3. Determine whether the printed matter to be inspected has defects. This step is done by calculating the difference between the theoretical second image and the second image, and making a defect determination based on the difference.

[0025] In one specific implementation, step S3 can be further refined as follows: S3-1. Calculate the reconstruction anomaly score: Calculate the pixel-level residual between the theoretical second image and the second image to obtain the reconstruction anomaly score.

[0026] S3-2. Calculate the latent space anomaly score: Extract the latent space feature vector of the first image through the encoder part of the Siamese network model; and calculate the deviation between the latent space feature vector and a preset standard latent space distribution to obtain the latent space anomaly score.

[0027] S3-3, Fusion Decision: The reconstructed anomaly score and the latent space anomaly score are fused to obtain a comprehensive anomaly score, and the final defect determination is made based on the comprehensive anomaly score.

[0028] Furthermore, prior to performing step S1, the method includes a model training step. This step includes: firstly, data preparation, i.e., collecting multiple first and second images of standard good products to form a training dataset; then, model optimization, using the training dataset to train the Siamese network model until it establishes an accurate mapping capability from the physical intrinsic features represented by the first image to the commercial appearance features represented by the second image.

[0029] In summary, the present invention has at least one of the following beneficial technical effects: 1. This invention trains a Siamese network model to learn and establish a stable mapping relationship between the physical intrinsic features (first image) and commercial appearance features (second image) of a standard good product. During inspection, the system determines defects by comparing the actual appearance with the theoretical appearance generated based on the physical features, without requiring any defect samples. This fundamentally solves the technical pain points of difficult and incomplete collection of defect samples in industrial settings, significantly improving the system's deployment efficiency and scenario adaptability.

[0030] 2. This invention simultaneously calculates the reconstruction anomaly score and the latent space anomaly score through a difference evaluation unit. The reconstruction anomaly score, calculated at the pixel level, is sensitive to localized high-frequency defects such as ink spots and scratches; while the latent space anomaly score, measured within the feature space, is more sensitive to global, gradual process deviations such as large-area color differences and overprinting misalignments. This combined and complementary evaluation mechanism effectively covers different types of defects, avoiding missed detections caused by a single evaluation dimension, thereby improving the accuracy and comprehensiveness of detection.

[0031] 3. This invention utilizes a Siamese network model to learn and solidify this physical correlation. When a discrepancy is detected between the actual appearance and the theoretical appearance derived from its physical characteristics, it is determined to be a defect. Compared to black-box models that rely purely on data statistics, this detection logic based on physical correlation has stronger physical interpretability and more robust judgment criteria, making the system more robust to normal fluctuations in the production environment. Attached Figure Description

[0032] Figure 1 This is a structural block diagram of a printing quality inspection system according to an embodiment of the present invention; Figure 2 This is a structural block diagram of the internal functional units of a processing terminal module according to an embodiment of the present invention; Figure 3 This is a flowchart of a printing quality inspection method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a twin network model structure according to an embodiment of the present invention; Figure 5This is a schematic diagram of the structure of a synchronous dual-spectral coaxial imaging module according to an embodiment of the present invention.

[0033] Among them, 10 is the motion control module; 20 is the imaging module; 30 is the processing terminal module; 31 is the twin generation unit; 32 is the difference evaluation unit; 33 is the fusion decision unit; 40 is the twin network model; 41 is the encoder; and 42 is the decoder. Detailed Implementation

[0034] The following is in conjunction with the appendix Figure 1 -Appendix Figure 5 The present invention will be further described in detail below.

[0035] This invention provides a printing quality inspection system and method. like Figure 1 , Figure 4 and Figure 5 As shown, Figure 1 This is a structural block diagram of a printing quality inspection system according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a twin network model structure according to an embodiment of the present invention. Figure 5 This is a schematic diagram of the structure of a synchronous dual-spectral coaxial imaging module according to an embodiment of the present invention.

[0036] The present invention provides a printing quality inspection system, comprising: a motion control module 10, an imaging module 20, and a processing terminal module 30.

[0037] The motion control module 10 is used to carry the printed material to be inspected and to generate a controlled and stable relative motion between the printed material and the imaging module 20. The motion control module 10 is linked with the imaging module 20 to ensure that the imaging and motion states are synchronized and coordinated during the relative motion.

[0038] The imaging module 20 is positioned above or to the side of the motion path of the motion control module 10. The function of the imaging module 20 is to simultaneously acquire a first image and a second image of the same target area on the printed material being inspected while the motion control module 10 drives the material to move. The imaging module 20 is connected to the processing terminal module 30 to transmit the acquired first and second images to the processing terminal module 30 in real time.

[0039] The processing terminal module 30 has a pre-set twin network model. After receiving the first image and the second image transmitted by the imaging module 20, the processing terminal module 30 performs the following functions: inputting the first image into the twin network model to generate a theoretical second image corresponding to the first image; then, by calculating the difference between the theoretical second image and the second image, it finally determines whether there is a defect in the printed matter to be inspected.

[0040] In one specific embodiment, the motion control module 10 may include a servo motor, a conveyor belt that is driven by the servo motor, and an encoder that is linked to the conveyor belt.

[0041] The function of the servo motor is to drive the conveyor belt at a constant and controllable speed according to preset control commands. Precise control of the servo motor ensures stable speed of the printed material during movement, thus providing a prerequisite for clear imaging by the subsequent imaging module 20.

[0042] The conveyor belt carries the printed matter to be inspected and continuously passes it through the preset imaging area below the imaging module 20 in a controlled manner and at a controlled speed.

[0043] The encoder is synchronously coupled to the movement of the conveyor belt. Its function is to monitor the displacement of the conveyor belt in real time and generate a position signal that precisely corresponds to the displacement. This position signal is output to the imaging module 20 as a synchronous trigger signal to trigger the imaging module 20 to perform image acquisition. This method ensures that image acquisition is performed precisely when the printed material to be inspected moves to the predetermined position.

[0044] The imaging module 20 is fixedly installed on the conveying path of the motion control module 10. Its function is to image the target area when the printed matter to be inspected passes under it.

[0045] In one specific embodiment, the imaging module 20 is a synchronous dual-spectrum coaxial imaging module. The imaging module structure includes a beam splitter, a first camera, a second camera, and an illumination source. The first camera and the second camera share the same optical path through the beam splitter to form a coaxial optical structure. The illumination source is used to provide uniform and stable illumination to the target area of ​​the printed material to be inspected.

[0046] The first image is a near-infrared image, acquired by a first camera. Near-infrared spectra have unique absorption or reflection characteristics for different ink compositions, paper materials, and other substances. Therefore, this near-infrared image can characterize the intrinsic physical features of the target area determined by the material itself.

[0047] The second image is a visible light image, acquired by a second camera. Visible light images directly reflect the colors, patterns, and gloss of printed materials as observed by the human eye; therefore, this visible light image can characterize the commercial appearance features of the target area.

[0048] It should be particularly noted that the mapping relationship from physical intrinsic features to commercial appearance features described in this invention is based on the technical premise that the imaging module 20, through its internal illumination source and coaxial optical design, provides a highly stable, uniform, and repeatable standardized imaging environment C. Under this standardized environment C, external variables such as ambient light and observation angle are fixed as constants.

[0049] Therefore, what the Siamese network model 40 learns during offline training is a specific and stable statistical correlation between the physical intrinsic features (first image) of a standard good product and its corresponding commercial appearance (second image) under this standard environment C.

[0050] Accordingly, during online detection, the twin network model 40 uses the first input image (representing the physical features P of the test item) as a basis. test The theoretical second image generated by ) has the physical meaning of: a P test The theoretical second image represents the perfect commercial appearance that a good product should exhibit under standard environment C. This theoretical second image implicitly includes constant optical information of standard environment C. By comparing the theoretical appearance with the actual appearance (the actual second image), this invention can accurately determine defects while eliminating interference from environmental fluctuations.

[0051] The processing terminal module 30 is connected to the imaging module 20 to receive the first and second images acquired in real time, and to process and analyze them.

[0052] In one specific embodiment, the processing terminal module 30 may be an industrial computer. To meet the large-scale parallel computing required by the Siamese network model during inference, the processing terminal module 30 is internally configured with at least one graphics processor, which is used to accelerate the computation of the Siamese network model to ensure that the system can meet the real-time requirements of online high-speed detection.

[0053] The processing terminal module 30 establishes a data communication connection with the imaging module module 20 through one or more data interfaces, such as a gigabit Ethernet interface, to receive image data. In addition, the processing terminal module 30 may also be provided with an output interface for connecting to an alarm device or automatic rejection device on the production line. When a defect is detected in the printed material to be inspected, a control signal is sent through this output interface.

[0054] The pre-set twin network model 40 inside the processing terminal module 30 is a deep neural network containing an encoder 41 and a decoder 42.

[0055] Encoder 41 receives the first image as input and performs layer-by-layer feature extraction and dimensionality reduction on the first image through multiple internally configured convolutional and downsampling layers, ultimately compressing the high-dimensional image information into a low-dimensional latent space feature vector. This latent space feature vector is a compact representation of the physical intrinsic features contained in the first image.

[0056] Decoder 42, connected to encoder 41, receives the latent space feature vector output by encoder 41 as input. The internal structure of decoder 42 corresponds to that of encoder 41, containing multiple upsampling layers and convolutional layers. Its function is to decode and upsample the latent space feature vector layer by layer, ultimately reconstructing and outputting a theoretical second image of the same size as the second image. In a specific implementation, encoder 41 and decoder 42 can employ a convolutional neural network with a symmetrical structure, such as the U-Net network structure.

[0057] The mapping capability of the Siamese network model 40 is obtained through an offline model training step. This offline model training step is completed before the system is officially used for detection, and specifically includes two stages: data preparation and model optimization.

[0058] In the data preparation stage, multiple printed products that have been identified as standard good products are first collected, and the imaging module 20 is used to collect a first image and a second image for each standard good product, forming a training dataset containing multiple image pairs.

[0059] In the model optimization phase, the first images from the training dataset are input one by one into the Siamese network model 40. The decoder 42 of model 40 generates the corresponding theoretical second image. Subsequently, using a preset loss function, the pixel-level difference between the generated theoretical second image and the corresponding real second image in the training dataset is calculated. Through backpropagation, all network parameters (such as the weights and biases of the convolutional kernels) within the Siamese network model 40 are adjusted based on the pixel-level difference values. Iterative training is performed on the entire training dataset until the loss function converges to a preset minimum value. After training, the Siamese network model 40 establishes a precise and stable mapping capability from the physical intrinsic features represented by the first image to the commercial appearance features represented by the second image.

[0060] like Figure 2 As shown, Figure 2 This is a structural block diagram of the internal functional units of the processing terminal module according to an embodiment of the present invention. During system operation, the internal functions of the processing terminal module 30 can be implemented collaboratively by multiple functional units, specifically including: a twin generation unit 31, a difference evaluation unit 32, and a fusion decision unit 33.

[0061] The twin generation unit 31 is used to call the twin network model 40, which has been trained offline and has been fixed with mapping capabilities.

[0062] During the inspection process, the twin generation unit 31 receives the first image of the printed matter to be inspected, which is acquired in real time by the imaging module 20.

[0063] Subsequently, the twin generation unit 31 takes the first image as input and passes it to the twin network model 40. The twin network model 40 performs forward inference calculations on the first image and outputs a theoretical second image. The theoretical second image is a commercial appearance image that should be presented under standard good condition, derived from the physical intrinsic features represented by the first image.

[0064] Finally, the twin generation unit 31 outputs the generated theoretical second image, along with the actual second image synchronously acquired by the imaging module 20, to the difference evaluation unit 32 for subsequent difference calculation.

[0065] The function of the difference assessment unit 32 is to receive the theoretical second image output by the twin generation unit 31 and the actual second image acquired by the imaging module 20, and calculate the difference between the two. To assess the latent space features, the difference assessment unit 32 also needs to pre-establish a standard latent space distribution.

[0066] The establishment of the standard latent space distribution is completed before the system performs the online detection task. Specifically, the first images of multiple standard good products used to train the Siamese network model 40 are input one by one into the encoder 41 part of the trained Siamese network model 40.

[0067] For each input standard good first image, encoder 41 outputs a corresponding latent space feature vector. After processing all standard good first images, a latent space feature vector set consisting of multiple latent space feature vectors is obtained.

[0068] Subsequently, statistical modeling is performed on the latent space feature vector set to obtain the standard latent space distribution. In one specific implementation, the standard latent space distribution follows a multivariate Gaussian distribution N(μ z ,Σ z The parameters of the standard latent space distribution, i.e., the mean vector μ. z Parameters and covariance matrix Σ z Calculated in the following way: Mean vector μ z : Where, μ z The mean vector representing the standard latent space distribution represents the average characteristic shape of all standard good products in the latent space. N represents the total number of standard good samples used for modeling, and is a positive integer. The mathematical symbol representing the summation of all terms from i = 1 to N; z (i) This represents the latent space feature vector obtained after the first image of the i-th standard good product is processed by encoder 41.

[0069] Covariance matrix Σ z : Where, Σ z The covariance matrix represents the standard latent space distribution, which describes the correlation between various feature dimensions in the latent space and the dispersion of good samples.

[0070] (z (i) -μ z ) T Represents vector (z) (i) -μ z The transpose of ) converts a column vector into a row vector, which is used in matrix multiplication to calculate the outer product.

[0071] After the calculation is completed, the mean vector μ z With covariance matrix Σ z As the final parameter of the standard latent space distribution, it is stored in the processing terminal module 30 for the difference evaluation unit 32 to call in the subsequent online detection process.

[0072] During the online detection operation of the system, after receiving the theoretical second image and the actual second image, the difference evaluation unit 32 performs a two-dimensional anomaly score calculation.

[0073] First, the difference assessment unit 32 calculates the reconstruction anomaly score. The purpose of calculating the reconstruction anomaly score is to quantify the degree of difference between the printed matter under inspection and the theoretical perfect state in terms of pixel-level appearance.

[0074] The specific calculation steps are as follows: the difference evaluation unit 32 performs pixel-level residual calculation on the theoretical second image generated by the twin generation unit 31 and the actual second image synchronously acquired by the imaging module 20, and uses the calculation result as the reconstruction anomaly score.

[0075] In one specific implementation, the anomaly score S is reconstructed. rec Calculated using the following formula: in, S recThe reconstruction anomaly score is a scalar value whose magnitude reflects the degree of difference between the pixel appearance of the sample being tested and the theoretically perfect state. This refers to a second image (e.g., a visible light image) of the sample to be detected, acquired in real time by the imaging module. This indicates that the twin generation unit generates the same as... The corresponding theoretical second image; This refers to summing the absolute values ​​of the differences between all pixel values ​​at corresponding pixel locations in two images.

[0076] After the calculation is completed, the difference assessment unit 32 will obtain the reconstruction anomaly score S. rec Output to fusion decision unit 33.

[0077] While calculating the reconstruction anomaly score, the difference assessment unit 32 calculates the latent space anomaly score. The purpose of calculating the reconstruction anomaly score is to quantify the degree of deviation between the physical intrinsic characteristics of the printed matter to be inspected and the characteristics it should have under standard good condition.

[0078] The specific calculation steps are as follows: The difference evaluation unit 32 inputs the first image of the sample to be detected, which is acquired in real time by the imaging module 20, into the encoder 41 part of the Siamese network model 40. The encoder 41 processes the first image and outputs a corresponding latent space feature vector.

[0079] Subsequently, the difference assessment unit 32 calculates the deviation between the latent space feature vector and the pre-established standard latent space distribution, and uses the deviation value as the latent space anomaly score.

[0080] In one specific implementation, the latent space anomaly score S lat It can be obtained by calculating the Mahalanobis distance, and the calculation formula is as follows: in, S lat The latent space anomaly score is a scalar value that reflects the degree to which the sample deviates from the standard good product distribution at the level of abstract features. z test The first image representing the sample to be tested. The feature vector obtained in the latent space after encoder processing; μ z With Σ z These represent the mean vector and covariance matrix of the pre-calculated standard latent space distribution, respectively.

[0081] Σ z -1 Represents the covariance matrix Σz The inverse matrix; (z test -μ z ) T This represents the transpose operation of a vector.

[0082] After the calculation is completed, the difference assessment unit 32 will obtain the latent space anomaly score S. lat Output to fusion decision unit 33.

[0083] The fusion decision unit 33 is connected to the difference assessment unit 32 and is used to receive the reconstruction anomaly score S output by the difference assessment unit 32. rec And latent space anomaly score S lat The function of the fusion decision unit 33 is to fuse the abnormal scores of the two dimensions and make a final defect judgment based on the fusion result.

[0084] The specific processing steps are as follows: The fusion decision unit 33 first reconstructs the abnormal score S rec With latent space anomaly score S lat A weighted fusion is performed to obtain a comprehensive anomaly score S. final This weighted fusion aims to comprehensively consider direct defects in the appearance of the printed matter (by S...). rec Representation) and potential anomalies in intrinsic characteristics (by S) lat (Characteristics).

[0085] In one specific implementation, the comprehensive anomaly score S final Calculated using the following weighted summation formula: Among them, S final The overall abnormality score is represented by a scalar value. w rec with w lat Let w represent the preset weighting coefficients for the reconstructed anomaly score and the latent space anomaly score, respectively. Let w be non-negative real numbers and satisfy w. rec +w lat =1; In a physical sense, these two weighting coefficients are used to balance the system's sensitivity to detecting different types of defects. Specifically, w rec It is mainly used to adjust the detection weights of pixel-level local defects (such as ink spots, scratches, and stains) that are sensitive to the reconstructed anomaly scores; while w lat This is primarily used to adjust the detection weights of feature-level global deviations (such as large-area gradual color difference, overprinting misalignment, and process parameter drift) that are sensitive to latent space anomaly scores. In one specific implementation, these two weighting coefficients w rec with w latThe optimal value is not randomly preset, but is determined through cross-validation or grid search on a validation dataset containing standard good products and various known types of defects (preferably, including both local and global defect samples) during the offline testing phase of the system. For example, the grid search method can be used to determine the optimal weights: Prepare an independent validation dataset; set w rec A series of candidate values within the range of [0, 1] (e.g., from 0.1 to 0.9 with a step size of 0.1), and let w lat = 1 - w rec ; For each set of [w rec , w lat weight combinations, calculate S for all samples in the validation dataset lat ; Subsequently, find an optimal preset threshold T for this set of weights, such that the comprehensive detection performance metric (e.g., F1 score, Matthews correlation coefficient, or balanced accuracy rate) of the system reaches the optimum at this threshold; traverse all candidate weight combinations, and finally select the [w rec , w lat combination that maximizes this comprehensive detection performance metric, and its corresponding optimal threshold T, as the final parameters固化在系统中的最终参数。

[0086] In this way, the calculation of the comprehensive anomaly score S final has a clear optimization goal and a scientific determination basis, ensuring that the system can scientifically balance the detection capabilities for different types of defects according to the distribution of various defects in actual production, thereby achieving the best comprehensive detection effect; And respectively represent the reconstructed anomaly score and the latent space anomaly score after normalization. Normalization can be performed by means such as linear ratio transformation to map the original scores into the range of [, 1].

[0087] After obtaining the comprehensive anomaly score S final [[ID= 35]]The fusion decision unit 33 compares it with a preset threshold T. This preset threshold T is a predetermined numerical boundary for distinguishing standard good products from defective products, and its value is usually determined through statistical analysis and optimization of the comprehensive anomaly scores of a large number of good product and defective product samples during the offline testing phase.

[0088] The final defect determination logic is as follows: When S final < T, the fusion decision unit 33 determines that the printed product to be detected is a standard good product and does not give an alarm or reject it; When S finalWhen T is greater than or equal to 1, the fusion decision unit 33 determines that the printed matter to be inspected has a defect and outputs the corresponding alarm or rejection signal to the external control device.

[0089] Through this dual-dimensional anomaly score fusion mechanism, the system can effectively reduce false defect alarms caused by factors such as complex printing backgrounds or changes in lighting, while improving the detection rate of small and hidden defects.

[0090] like Figure 3 As shown, Figure 3 A flowchart of a printing quality inspection method according to an embodiment of the present invention. The present invention provides a printing quality inspection method that requires pre-completing model training steps and establishing a standard latent space distribution before performing online inspection.

[0091] Model training steps: Before the system is officially deployed for online detection, a model training process needs to be performed. The model training process includes the following steps: The first step is data preparation: using the imaging module 20, multiple printed samples that have been confirmed as standard good products are collected, and a first image (near-infrared image) and a second image (visible light image) of the same target area of ​​each sample are obtained to form an image pair dataset for training.

[0092] The model optimization process then proceeds: the acquired first image is input into the Siamese network model 40 to generate the corresponding theoretical second image. The loss value between the theoretical second image and the real second image is calculated, and the parameters of the Siamese network model 40 are iteratively adjusted using the backpropagation algorithm until the model establishes an accurate mapping capability from physical intrinsic features to commercial appearance features.

[0093] Steps for establishing a standard latent space distribution: After model training is completed, the difference evaluation unit 32 of the processing terminal module 30 performs the establishment of the standard latent space distribution. Specifically, the first images of multiple standard good products are input into the encoder 41 of the Siamese network model 40 to extract the corresponding latent space feature vector set, and statistical modeling is performed on the latent space feature vector set to obtain the mean vector μ. z With covariance matrix Σ z This allows us to determine the standard latent space distribution.

[0094] Online testing steps: When the system is put into online inspection, the printing quality inspection method includes the following core steps: S1. Acquire the first and second images of the same target area on the printed material to be inspected.

[0095] The motion control module 10 drives the printed material to be inspected to pass stably and uniformly through the field of view of the imaging module 20. The imaging module 20 receives the synchronization trigger signal provided by the motion control module 10, images the target area at the same time, and simultaneously acquires a first image frame (characterizing physical intrinsic features) and a second image frame (characterizing commercial appearance features). The acquired image data is transmitted to the processing terminal module 30.

[0096] S2. Generate a theoretical second image corresponding to the first image.

[0097] The twin generation unit 31 of the processing terminal module 30 takes the first image as input and passes it to the preset twin network model 40. The twin network model 40 performs forward inference calculations on the first image through its encoder 41 and decoder 42, and outputs a theoretical second image.

[0098] S3. Determine whether the printed material to be inspected has defects.

[0099] The difference evaluation unit 32 and the fusion decision unit 33 of the processing terminal module 30 work together to calculate the theoretical second image. With the second image The difference between them is used to determine the defect. Step S3 is further divided into the following sub-steps: S3-1. Calculate the reconstructed anomaly score: Difference assessment unit 32 calculates the second image of the theory. With the actual second image The pixel-level residuals between them are used as the reconstruction anomaly score S. rec The calculation formula can use the L1 norm: in, S rec The reconstruction anomaly score is a scalar value whose magnitude reflects the degree of difference between the pixel appearance of the sample being tested and the theoretically perfect state. This refers to a second image (e.g., a visible light image) of the sample to be detected, acquired in real time by the imaging module. This indicates that the twin generation unit generates the same as... The corresponding theoretical second image; This refers to summing the absolute values ​​of the differences between all pixel values ​​at corresponding pixel locations in two images.

[0100] S3-2, Calculate the latent space anomaly score: The difference evaluation unit 32 inputs the first image into the encoder 41 of the Siamese network model 40 to extract the latent space feature vector z. test Subsequently, the difference assessment unit 32 calculates the latent space eigenvector z. test Compared with the preset standard latent space distribution (by μ) z With Σ z The deviation between the representations is used as the latent space anomaly score S. lat The calculation formula can use Mahalanobis distance: in, S lat The latent space anomaly score is a scalar value that reflects the degree to which the sample deviates from the standard good product distribution at the level of abstract features. z test The first image representing the sample to be tested. The feature vector obtained in the latent space after encoder processing; μ z With Σ z These represent the mean vector and covariance matrix of the pre-calculated standard latent space distribution, respectively.

[0101] Represents the covariance matrix Σ z The inverse matrix; (z test -μ z ) T This represents the transpose operation of a vector.

[0102] The S lat The value measures the physical intrinsic characteristics (z) of the current sample being tested. test The degree to which the statistical deviation from the standard good product specification cluster is measured.

[0103] Identify global, gradual defects caused by drift in overall process parameters (such as ink ratio imbalance, paper tension variation, uneven coating thickness, etc.). These process deviations directly cause systematic, though weak at the pixel level, statistical changes in the physical intrinsic features represented by the first image, affecting the z-axis output of encoder 41. test Systematic deviation from μ z and Σ z The defined standard family. Therefore, S lat This establishes a direct correlation with global process deviations. A higher S lat A large Mahalanobis distance value clearly indicates that the physical characteristics of the sample are statistically different from the norm, thus efficiently identifying global process deviation defects that are difficult to detect by traditional methods.

[0104] After the calculation is completed, the difference assessment unit 32 will obtain the latent space anomaly score S. lat Output to fusion decision unit 33.

[0105] S3-3, Fusion Decision-Making: Fusion decision unit 33 receives S rec With S lat The anomaly score S is obtained by weighted fusion of the results. final : Among them, S final The overall abnormality score is represented by a scalar value. w rec with w lat Let w represent the preset weighting coefficients for the reconstructed anomaly score and the latent space anomaly score, respectively. Let w be non-negative real numbers and satisfy w. rec +w lat =1; and These represent the reconstructed anomaly score and the latent space anomaly score after normalization, respectively. Normalization can be achieved by methods such as linear scaling to map the original scores to the interval [0,1].

[0106] In obtaining the comprehensive anomaly score S final The fusion decision unit 33 then compares it with a preset threshold T. This preset threshold T is a predetermined numerical boundary line that distinguishes standard good products from defective products. Its value is usually determined by statistical analysis and optimization of the comprehensive anomaly scores of a large number of good and defective product samples during the offline testing phase.

[0107] Finally, the fusion decision unit 33 will integrate the anomaly score S final Compare with a preset threshold T, if S final If the value is greater than or equal to T, the printed material to be inspected is determined to have a defect, and a corresponding processing signal is issued.

Claims

1. A printing quality inspection system, characterized in that, include: The motion control module is used to generate controlled relative motion between the printed material to be inspected and the imaging module; An imaging module is used to simultaneously acquire a first image and a second image of the same target area on the printed matter to be inspected during the relative motion. The processing terminal module has a pre-set twin network model. The first image generates a theoretical second image corresponding to the first image through the twin network model. By calculating the difference between the theoretical second image and the second image, it is determined whether the printed matter to be detected has defects.

2. The printing quality inspection system according to claim 1, characterized in that, The first image is a near-infrared image, which characterizes the physical intrinsic features of the target region; The second image is a visible light image, which represents the commercial appearance features of the target area; The imaging module is a synchronous dual-spectral coaxial imaging module, which is used to ensure pixel-level alignment between the first image and the second image.

3. The printing quality inspection system according to claim 2, characterized in that, The twin network model is a deep neural network that includes an encoder and a decoder; Furthermore, the twin network model establishes a mapping capability from the physical intrinsic features to the commercial appearance features by learning from the first and second images of multiple standard good products.

4. The printing quality inspection system according to claim 3, characterized in that, The processing terminal module includes: The twin generation unit generates the theoretical second image by calling the twin network model with mapping capabilities; A difference assessment unit is used to calculate the difference between the theoretical second image and the second image, and output at least one anomaly score, wherein the anomaly score includes a reconstruction anomaly score and a latent space anomaly score; The fusion decision unit is used to determine whether a defect exists based on the abnormal score.

5. A printing quality inspection system according to claim 3, characterized in that, The processing terminal module also has a pre-defined standard latent space distribution; specifically: The first images of multiple standard good products are input into the encoder to extract the latent space feature vector set of multiple standard good products, and the latent space feature vector set is statistically modeled to obtain the standard latent space distribution.

6. A printing quality inspection system according to claim 4, characterized in that, The difference assessment unit is specifically used for: Calculate the pixel-level residual between the theoretical second image and the second image to obtain the reconstruction anomaly score; The encoder extracts the latent space feature vector of the first image and calculates the deviation between the latent space feature vector and the standard latent space distribution to obtain the latent space anomaly score.

7. A printing quality inspection system according to claim 4, characterized in that, The fusion decision unit is specifically used for: The reconstructed anomaly score and the latent space anomaly score are weighted and fused to obtain a comprehensive anomaly score; The comprehensive anomaly score is compared with a preset threshold to determine whether the printed matter to be inspected has defects. The preset threshold is a predetermined numerical boundary line for distinguishing between standard good products and defective products.

8. A method for printing quality inspection, characterized in that, Includes the following steps: S1. Acquire a first image and a second image of the same target area on the printed matter to be detected, wherein the first image represents the physical intrinsic features of the target area and the second image represents the commercial appearance features of the target area. S2. Generate a theoretical second image corresponding to the first image, and input the first image into a preset Siamese network model to obtain the theoretical second image; S3. Determine whether the printed matter to be inspected has defects by calculating the difference between the theoretical second image and the second image, and make a defect determination based on the difference.

9. A printing quality inspection method according to claim 8, characterized in that, The S3 step specifically includes: S3-1. Calculate the reconstruction anomaly score: Calculate the pixel-level residual between the theoretical second image and the second image to obtain the reconstruction anomaly score; S3-2. Calculate the latent space anomaly score: Extract the latent space feature vector of the first image through the encoder of the Siamese network model; and calculate the deviation between the latent space feature vector and the preset standard latent space distribution as the latent space anomaly score. S3-3, Fusion Decision: The reconstructed anomaly score and the latent space anomaly score are fused to obtain a comprehensive anomaly score, and a defect determination is made based on the comprehensive anomaly score.

10. A printing quality inspection method according to claim 8, characterized in that, Prior to performing step S1, a model training step is included, which includes: Data preparation: Collect first and second images of multiple standard good products to form a training dataset; Model optimization: The Siamese network model is trained using the training dataset to establish an accurate mapping capability from the physical intrinsic features represented by the first image to the business appearance features represented by the second image.