A machine learning-based printing quality detection method and device

CN120765567BActive Publication Date: 2026-08-07HUAINAN UNITED UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAINAN UNITED UNIVERSITY
Filing Date
2025-06-24
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

在现有的印刷质量检测技术中,虽然已广泛应用图像处理算法对印刷品进行缺陷识别与质量评估,但仍对于边缘模糊、微小色差或轻微重影等难以通过传统规则提取手段识别的细微缺陷,检测准确率较低,容易造成误判或漏判

Benefits of technology

[0049]This invention significantly improves the stability and clarity of the original image under complex lighting conditions by introducing an image region equalization strategy and a light interference shielding mechanism, providing high-quality input for subsequent feature extraction. It employs a deep convolutional model based on residual attention and a feature coupling structure, balancing the fine-grained detection requirements for minute defects in printed images with the global perception capability for large-area texture regions, effectively improving detection sensitivity and robustness. By constructing a structure alignment consistency loss function, it enhances the network's response focusing ability in low-contrast regions, avoiding the missed detection of blurred boundary regions in traditional methods. The introduction of image background perturbation simulation and local artifact inversion mechanisms automatically identifies false detection regions without increasing manual annotation costs, significantly improving the reliability of defect identification results. Combining the complexity of the printed layout structure and the frequency of historical defects for multi-dimensional level evaluation, it achieves an intelligent leap from the presence of defects to defect quality levels. It possesses advantages such as strong scalability, wide applicability, and convenient deployment, making it suitable for multiple key aspects of quality control, defect tracking, and equipment feedback in the printing industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765567B_ABST
    Figure CN120765567B_ABST
Patent Text Reader

Abstract

The application relates to the field of machine learning, and discloses a printing quality detection method and device based on machine learning, which comprises the following steps: acquiring original image data of printed matter under the conditions of multiple batches, heterogeneous illumination and multi-angle imaging, combining an image area balancing strategy and a light interference shielding mechanism to construct a printed image training set; performing fine-grained division on the printed image training set at an image block level, adopting a deep convolution model based on a residual attention mechanism to perform multi-channel feature extraction on each image block, and generating a composite feature map through a feature coupling structure; based on the composite feature map, constructing a defect positioning network to identify a potential defect response area; combining an initial defect candidate set, introducing an image background disturbance simulation mechanism and a local artifact inversion model, establishing a defect false detection correction framework, and eliminating interference areas caused by non-printing errors. The application has the advantage of improving the accuracy of defect identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning, specifically to a method and apparatus for printing quality inspection based on machine learning. Background Technology

[0002] In recent years, machine learning technology has been gradually introduced into the field of print quality inspection, possessing the advantage of learning defect features through data-driven methods. While image processing algorithms are widely used in existing print quality inspection technologies for defect identification and quality assessment, they still suffer from low accuracy in detecting subtle defects such as blurred edges, minor color differences, or slight ghosting, which are difficult to identify using traditional rule-based extraction methods, easily leading to false positives or false negatives. Traditional methods typically rely on fixed thresholds, template matching, or edge recognition algorithms. When dealing with complex printing scenarios, they lack adaptive learning capabilities for blurred areas or local disturbances, resulting in insensitivity to slight deviations during the printing process and affecting overall detection performance. Existing solutions primarily focus on improving classification accuracy, failing to construct high-resolution, multi-scale feature representation mechanisms for fine-grained defect identification, and lacking methods for modeling contextual information from the printing process, leading to insufficient model response to minor but critical quality issues. Therefore, designing a machine learning-based print quality inspection method and device to improve defect identification accuracy is essential. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides a machine learning-based printing quality inspection method and apparatus, which has the advantage of improving the accuracy of defect identification and solves the problems mentioned in the background technology.

[0004] To achieve the aforementioned goal of improving the accuracy of defect identification, this invention provides the following technical solution: a machine learning-based printing quality inspection method, comprising the following steps:

[0005] We acquire raw image data of printed materials under multiple batches, heterogeneous lighting, and multi-angle imaging conditions, and construct a training set of printed images by combining image region equalization strategies and light interference shielding mechanisms.

[0006] The training set of printed images is divided into fine-grained image blocks, and a deep convolutional model based on residual attention mechanism is used to extract multi-channel features from each image block. A composite feature map is generated through a feature coupling structure.

[0007] Based on composite feature maps, a defect localization network is constructed, and a structural alignment consistency loss function is introduced to constrain the network's response in low-contrast regions, identify potential defect response regions, and form an initial defect candidate set.

[0008] By combining the initial defect candidate set, an image background perturbation simulation mechanism and a local artifact inversion model are introduced to establish a defect false detection correction framework, and the candidate set is dynamically updated to generate high-confidence defect annotation results.

[0009] Based on the high-confidence defect labeling results, combined with the complexity of the printed page structure, the evolution characteristics of defect morphology, and the frequency of historical defects, a multi-dimensional quality level assessment report is output.

[0010] Preferably, the process of constructing the printed image training set is as follows:

[0011] The acquired batches of printed image data were processed to unify the format and standardize the color space, and the contrast distribution of the image at the local and global scales was adjusted using the image region equalization strategy.

[0012] Under the action of the light interference shielding mechanism, the reflection enhancement compensation algorithm is applied to identify and correct local false spots or shadow stripes in the image caused by changes in the light source;

[0013] By combining printing batch information and machine parameters, a cross-batch printing image mapping index is established, and a printing image training set with temporal characteristics and equipment correlation is constructed.

[0014] Preferably, the process of performing fine-grained image block-level partitioning on the printed image training set is as follows:

[0015] Each image in the training set is sliced ​​using a non-overlapping sliding window at a preset size, and an overlap compensation area is introduced at the slice edges.

[0016] A pixel-based dynamic region subdivision method is adopted, which uses different division scales for texture abrupt regions and low-texture regions within image blocks.

[0017] The texture level of each image patch is evaluated by the image content complexity index, and a representative subset of image patches that meet the requirements of heterogeneous difference coverage is selected.

[0018] Preferably, the process of using a deep convolutional model based on residual attention to extract multi-channel features from each image patch is as follows:

[0019] An improved residual network that integrates a subset of image blocks with a fusion channel attention module and a spatial attention module is used to extract local texture and overall edge information of the printing area at multiple scales.

[0020] During feature extraction, a dynamic perception window is set to adjust the feature weights between different image block channels;

[0021] A soft gating mechanism is introduced to strengthen the weakly activated regions in the residual path.

[0022] Preferably, the process of generating a composite feature map through a feature coupling structure is as follows:

[0023] The local feature vectors extracted from multiple channels are fused with the global context information of the image patch, and a multi-scale attention mechanism is used to reweight the key response regions.

[0024] A feature alignment module is introduced during the fusion process to perform scale normalization and channel reconstruction on feature maps generated under different receptive fields.

[0025] Finally, by modeling the association between feature maps and semantic hierarchy, a composite feature map containing texture details, edge continuity, and background perturbation factors is output.

[0026] Preferably, the process of introducing a structural alignment consistency loss function to constrain the network's response in the low-contrast region is as follows:

[0027] The low-contrast regions marked in the composite feature map are normalized for feature response, and their structural similarity with the standard template region is calculated.

[0028] A structural consistency evaluation function based on the difference between position offset and gradient direction is constructed to constrain the boundary difference between defect response and background response;

[0029] By jointly optimizing the structural consistency loss term and the main classification loss function, the network can form a stable focusing response to low-contrast defect regions during the training phase.

[0030] Preferably, the process of establishing a defect false detection correction framework is as follows:

[0031] For the initial defect candidate region, a background perturbation map simulating various typical errors is constructed;

[0032] By introducing a local artifact inversion model, the response patterns belonging to background perturbations in the candidate region are inverted and their confidence is reassessed.

[0033] Regions with a false impact probability higher than the threshold are removed, and the remaining regions are structurally re-segmented to dynamically update the defect candidate set.

[0034] Preferably, the process for generating high-confidence defect annotation results is as follows:

[0035] The response feature vector of each defect region in the corrected candidate set is input into the confidence discrimination network, and the defect credibility index is constructed by fusing the context.

[0036] A time backtracking mechanism based on response stability is introduced to statistically weight the frequency of defect regions in multiple repeated detections.

[0037] The final result is a high-confidence defect annotation result with confidence score, defect type label and spatial boundary attribute.

[0038] Preferably, the process for outputting a multi-dimensional quality level assessment report is as follows:

[0039] Based on the high-confidence defect annotation results, a defect type distribution map and a spatial heat map are constructed for each printed image to extract the defect concentration trend within the page.

[0040] By combining the complexity index of the printed page structure with the trend curve of defect morphology evolution, a quality grade judgment model is established, and printed materials are quantitatively graded according to the preset grading standards.

[0041] By integrating historical defect records, printing equipment parameters, and current test results, a multi-dimensional quality level assessment report with diagnostic interpretability and trend prediction capabilities is generated.

[0042] A machine learning-based printing quality inspection device includes:

[0043] Image acquisition module: Acquires printing images from multiple batches, angles, and heterogeneous lighting conditions, and constructs a representative training image dataset through regional equalization and light interference shielding strategies.

[0044] Image segmentation module: Performs block-level fine-grained segmentation on the image and extracts multi-channel texture and structural features through residual attention mechanism to generate composite feature maps for defect modeling;

[0045] Defect localization module: A defect localization network is constructed based on composite feature maps, and the structure alignment consistency loss function is used to enhance the recognition effect of low-contrast regions, forming preliminary defect candidate regions;

[0046] Defect correction module: Eliminates false detection areas through image perturbation simulation and artifact inversion mechanism, dynamically updates the defect candidate set and outputs high-confidence defect annotation results;

[0047] Quality assessment module: Combining the complexity of the page layout, the characteristics of defect evolution, and historical frequency, it performs printing quality grading and outputs a test report with multi-dimensional analysis indicators.

[0048] Compared with existing technologies, the present invention provides a printing quality inspection method and apparatus based on machine learning, which has the following beneficial effects:

[0049] This invention significantly improves the stability and clarity of the original image under complex lighting conditions by introducing an image region equalization strategy and a light interference shielding mechanism, providing high-quality input for subsequent feature extraction. It employs a deep convolutional model based on residual attention and a feature coupling structure, balancing the fine-grained detection requirements for minute defects in printed images with the global perception capability for large-area texture regions, effectively improving detection sensitivity and robustness. By constructing a structure alignment consistency loss function, it enhances the network's response focusing ability in low-contrast regions, avoiding the missed detection of blurred boundary regions in traditional methods. The introduction of image background perturbation simulation and local artifact inversion mechanisms automatically identifies false detection regions without increasing manual annotation costs, significantly improving the reliability of defect identification results. Combining the complexity of the printed layout structure and the frequency of historical defects for multi-dimensional level evaluation, it achieves an intelligent leap from the presence of defects to defect quality levels. It possesses advantages such as strong scalability, wide applicability, and convenient deployment, making it suitable for multiple key aspects of quality control, defect tracking, and equipment feedback in the printing industry. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of the method of the present invention;

[0051] Figure 2 This is a schematic diagram of the structure of the present invention. Detailed Implementation

[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0053] Example 1: Please refer to Figure 1 As shown in the embodiment of the present invention, a machine learning-based printing quality inspection method includes the following steps:

[0054] S1: Obtain original image data of printed materials under multiple batches, heterogeneous lighting and multi-angle imaging conditions, and construct a training set of printed images containing the characteristics of multiple types of typical defects by combining image region equalization strategy and light interference shielding mechanism.

[0055] The process of constructing the printed image training set in S1 is as follows:

[0056] The acquired batches of printed image data underwent format unification and color space standardization. Image region equalization strategies were used to adjust the contrast distribution of images at local and global scales. Raw image data from different printing batches and equipment were collected, and image resolution, file format, and bit depth parameters were unified to ensure input data consistency. RGB images were converted to standard color spaces more suitable for color analysis, such as Lab or HSV, and image colors were unified using a normalization method based on channel mean and standard deviation. Based on standardization, histogram matching algorithms were used to correct tonal shifts between different images, reducing the impact of color drift caused by equipment or time. An adaptive histogram equalization method was used to enhance the contrast of local image regions to improve the visibility of low-brightness or highly occluded areas. Combining the global grayscale distribution characteristics of the image, a brightness redistribution function was used to compress or expand the contrast range of the overall image, resulting in a more even distribution of bright and dark areas. Contrast uniformity was evaluated on the images before and after equalization, and the local enhancement intensity was automatically adjusted based on the uniformity index to achieve contrast optimization at multiple scales.

[0057] Under the action of the light interference shielding mechanism, the reflection enhancement compensation algorithm is applied to identify and correct local false light spots or shadow stripes in the image caused by changes in the light source; based on the brightness channel change trend of the image, abnormal reflection boundaries and shadow gradient regions formed by uneven illumination in the region are identified; for suspected light spot regions, a joint discrimination method based on Laplacian edge detection and smoothness analysis is used to determine the location of the real false light interference; within the identified interference region, a local texture compensation model is constructed, and the pixel values ​​of the region are reconstructed using neighborhood interpolation and guided filtering algorithms to restore the natural texture features of the image;

[0058] By combining printing batch information and machine parameters, a cross-batch printing image mapping index is established, and a printing image training set with temporal characteristics and equipment correlation is constructed. Metadata such as printing batch number, machine model, ink type and paper type corresponding to each image is extracted as the basic descriptive attributes of the image.

[0059] Images with the same or similar parameters are grouped into the same sub-index unit to construct a multi-dimensional mapping table, realizing the correspondence between images and the production environment; repeating patterns in images across batches are template-aligned, and a unified alignment index is generated through feature point matching and geometric transformation matrix to enhance the temporal consistency of the training set; the standardized, illumination-compensated, parameter-classified, and index-aligned images are sorted according to the acquisition time to form an image sequence with temporal continuity; device parameters, batch information, and image files are multi-labeled and bound as auxiliary input features in the machine learning training stage; the entire training set is divided into three parts: training set, validation set, and test set, ensuring that each subset contains representative samples from different devices and batches.

[0060] S2: The training set of printed images is divided into fine-grained image blocks, and a deep convolutional model based on residual attention mechanism is used to extract multi-channel features from each image block. A composite feature map that integrates printing texture, color drift and edge blur information is generated through feature coupling structure.

[0061] The process of performing fine-grained image block-level partitioning of the printed image training set in S2 is as follows:

[0062] Each image in the training set is sliced ​​using a non-overlapping sliding window at a preset size, and an overlap compensation area is introduced at the slice edges to enhance the continuity of defect edges. On the preprocessed printed image, the sliding window size and step size are set, and the image is sliced ​​using a non-overlapping method along the horizontal and vertical directions. Considering that some defects may be located at the slice edges, an edge overlap compensation area is set to avoid the loss of boundary information, usually 10% to 20% of the sliding window width, so that adjacent image blocks can share pixels in the edge area. The coordinate index information of each generated image block in the original image is recorded to support the accurate re-projection and merging of subsequent defect location results.

[0063] A pixel-based dynamic region subdivision method is adopted, using different division scales for texture abrupt change regions and low-texture regions within image blocks. Gray-level gradient analysis is performed on the sliced ​​image blocks to extract edge distribution and texture density indices within the blocks, which are used to determine the texture complexity within the blocks. The image blocks are input into a pixel clustering model based on K-Means or SLI C algorithms to initially divide the pixel regions into several sub-regions. For regions with high texture abrupt change, a smaller division scale is used to preserve local information, while for regions with uniform texture, a larger scale is used to reduce redundant computation. Through a scale adaptation strategy, each image block can be dynamically divided according to its own texture features, improving the targeting and discriminative power of subsequent feature extraction.

[0064] The texture level of each image patch is evaluated by the image content complexity index, and a representative subset of image patches that meet the requirements of heterogeneous difference coverage is selected. The texture complexity index of each image patch is calculated, and the index is composed of weighted features such as edge density, gray-level co-occurrence matrix texture entropy, and local binary mode response. Based on the complexity index, the image patches are divided into three categories: high complexity, medium complexity, and low complexity, to ensure that samples of different complexity levels are evenly distributed in the training set. Using the maximum inter-class difference criterion, the patches with the greatest structural differences in each category are selected to construct a representative subset of image patches containing differences in materials, printing deviations, and structural backgrounds. Finally, a training image patch set that covers the diversity of defects and has the representativeness of structural heterogeneity is formed.

[0065] The process of multi-channel feature extraction for each image patch using a deep convolutional model based on residual attention mechanism in S2 is as follows:

[0066] A subset of image patches is input into an improved residual network that integrates channel attention and spatial attention modules to extract local texture and overall edge information of the printing area at multiple scales. A selected representative subset of image patches is then fed into an improved ResNet backbone network that integrates channel attention and spatial attention. In the channel attention module, global average pooling and max pooling are used to describe the features of each channel. The dependencies between channels are learned through an MLP structure, and channel weight coefficients are output to adjust the importance of feature representation. In the spatial attention module, convolutional operations are used to evaluate the activation intensity at each location, based on the spatial distribution of the feature map. A spatial weight map is generated using a sigmoid mapping to enhance edge and texture abrupt change regions. After fusing the two attention mechanisms with the residual unit, multi-scale convolutional operations are performed, simultaneously extracting local detail features and global contour information of the printing image to construct a deep feature representation.

[0067] During feature extraction, a dynamic perception window is set to adjust the feature weights between different image patch channels, thereby improving the model's ability to respond to subtle defects in complex textured backgrounds. Based on the texture complexity index of the image patch at input, the receptive field size and convolutional kernel combination of the intermediate layers of the network are dynamically adjusted to achieve adaptive adjustment of the perception window.

[0068] Statistical analysis is performed on the feature maps of different channels to determine their significant contribution to the target defect. The statistical features are then input into a lightweight weight adjustment subnetwork to generate inter-channel weight adjustment vectors, which are then fused with the original channel attention coefficients to form the final feature modulation factor. This factor is used to reweight the intermediate feature maps, making the model pay more attention to potential defect areas with weak contrast or low-frequency features in complex textures.

[0069] A soft gating mechanism is introduced to enhance weakly activated regions in the residual path. A gating unit is added to the residual structure to dynamically adjust the residual signal between input and output. The gating unit uses the Sigmoid activation function to construct a soft gating function, with the input being the local response map of the current residual block output. Parameter learning enables accurate identification of weakly activated regions. For regions identified as weakly activated, the difference between their state and historical features is calculated. If the change exceeds a preset threshold, the channel activation value is increased to prevent information flow attenuation during propagation. The enhanced feature map is then residually fused with the main path to improve the network's sensitivity and discrimination ability to weak structural defects, while suppressing background noise interference.

[0070] The process of generating composite feature maps through the feature coupling structure in S2 is as follows:

[0071] The system fuses local feature vectors extracted from multiple channels with global context information of image patches, and reweights key response regions using a multi-scale attention mechanism. For the extracted multi-channel local feature vectors, a location-aware global context extraction module is used to obtain the global semantic background of the image patches. Local features are then fused with context vectors using feature-level weighted fusion or attention-guided fusion strategies, combining location-dependent information with local texture responses to improve structural consistency. A multi-scale attention mechanism is embedded in the fused feature map, introducing convolutional kernels or spatial pyramid structures of different scales to identify key response regions at each scale. An attention weight map is calculated using a Softmax normalization strategy, applying it to different regions such as local texture, edges, and background to strengthen responses in easily overlooked or weakly salient defective regions.

[0072] In the fusion process, a feature alignment module is introduced to perform scale normalization and channel reconstruction on feature maps generated under different receptive fields to prevent cross-scale distortion of features. Feature maps extracted from multi-scale receptive fields are upsampled or downsampled to be unified to a reference size, achieving spatial scale normalization. A cross-scale channel mapping matrix is ​​used to reconstruct and arrange feature channels, so that features at different scales have consistent representation capabilities in the semantic space. Deformable Convolution or Attention-based Offset Matching mechanisms in the feature alignment module are introduced to perform non-linear alignment of positional information of the same region at different scales. The aligned feature maps are then concatenated through a weighted fusion method and standardized and non-linearly mapped using BatchNorm and ReLU activation to form a multi-dimensional feature fusion representation at a unified scale.

[0073] Finally, through feature map concatenation and semantic hierarchical association modeling, a composite feature map containing texture details, edge continuity, and background perturbation factors is output. The aligned and reconstructed multi-scale feature maps are concatenated according to semantic hierarchy, including edge feature layer, texture response layer, and context background layer, to construct a unified multi-layer nested structure. On the concatenated feature map, a semantic hierarchical association modeling mechanism is introduced to construct a context dependency graph between each feature layer and extract the logical dependencies between features at different levels. This association model is used to enhance cross-level semantic consistency, avoid misjudged regions caused by feature isolation, and strengthen the composite feature map's ability to distinguish low-contrast defects and background artifacts. The final output is a composite feature map containing three feature dimensions: texture details, edge continuity, and background perturbation factors.

[0074] S3: Based on the composite feature map, a defect localization network is constructed, and a structural alignment consistency loss function is introduced to constrain the network's response in low-contrast regions, identify potential defect response regions, and form an initial defect candidate set.

[0075] The process of introducing the structural alignment consistency loss function in S3 to constrain the network's response in the low-contrast region is as follows:

[0076] The low-contrast regions marked in the composite feature map are normalized in terms of feature response, and their structural similarity with the standard template region is calculated. Using the original image patch annotation information and brightness histogram analysis results, low-contrast regions in the composite feature map whose brightness contrast distribution is below a preset threshold are identified. Multi-channel feature response maps are extracted from these regions, and the activation scale between different channels is unified through local normalization. The standard template region is selected as a reference, and its features in terms of structural gradient, edge direction, and texture distribution are statistically analyzed. A structural similarity metric is used to compare the normalized target region with the standard template, and the structural similarity coefficient is calculated.

[0077] A structural consistency evaluation function based on positional offset and gradient direction difference is constructed to impose significant constraints on the boundary difference between the defect response and the background response. Boundary features of each low-contrast candidate region are extracted from the composite feature map, and the directional difference Δθ between the dominant gradient direction vector within that region and its neighboring regions is calculated. Simultaneously, the geometric offset Δx between the center point of the response region and the labeled true defect center point in the composite feature map is calculated as a positional offset index. The directional difference Δθ and the positional offset Δx are input into two weighted factor functions, respectively. Combined with a dual-channel saliency mask, a structural consistency evaluation function is constructed, with the following formula:

[0078] L struct =α*mean(|Δx|)+β*mean(1-cos(Δθ))

[0079] In the formula, α and β are the weighting parameters for positional offset loss and orientation difference loss, respectively, representing the relative importance of spatial offset and orientation difference;

[0080] The structural consistency loss term and the main classification loss function are jointly optimized to enable the network to form a stable focused response to low-contrast defect regions during the training phase. The main classification loss function uses cross-entropy or focus loss to improve the ability to distinguish defects of a minority of categories. The structural consistency loss term and the main loss function are linearly combined to construct a joint optimization objective function, as shown in the formula:

[0081] L total =λ1*L cls +λ2*L struct

[0082] In the formula, λ1 and λ2 are the weighting coefficients of classification loss and structural loss, respectively, and L cls L struct These are classification loss and structural loss, respectively.

[0083] During network training, an adaptive weighting strategy is introduced to increase the weight of the structural loss term for samples with high structural inconsistency, thereby further enhancing the model's ability to respond to low-contrast regions.

[0084] Through a joint optimization strategy, the model not only has accurate classification capabilities in high-contrast regions, but also maintains robust defect focusing performance in complex backgrounds and blurred boundaries.

[0085] Example 2: As Figure 1 As shown, a machine learning-based print quality inspection method further includes the following steps:

[0086] S4: Combining the initial defect candidate set, an image background perturbation simulation mechanism and a local artifact inversion model are introduced to establish a defect false detection correction framework, eliminate interference areas caused by non-printing errors, and dynamically update the candidate set to generate high-confidence defect annotation results.

[0087] The process of establishing the defect false detection correction framework in S4 is as follows:

[0088] For the initial defect candidate region, a background perturbation map simulating various typical errors is constructed. Background analysis is performed on image patches in the initial defect candidate set to identify common printing error sources, such as ink trailing, ink splatter, paper texture interference, and residual light reflection, etc., which are pseudo-defect features. Based on the above features, statistical attributes are extracted from multiple real background images, including color mean, directional gradient distribution, structural texture spectrum, and local contrast. The extraction results are used to construct a perturbation template library, and a data augmentation strategy is employed to generate a perturbation map set.

[0089] By introducing a local artifact inversion model, the response patterns in candidate regions that may belong to background perturbations are inverted and their confidence is reassessed. For candidate defect regions, three feature indices are extracted: edge continuity, local texture stability, and gray-level fluctuation, and similarity matching is performed with templates in the background perturbation map. A local artifact inversion model is used, which is based on a combination structure of a shallow residual convolutional network and a morphological separation module, to reconstruct the expected image response of the region under defect-free conditions. The activation residual distribution between the original feature map and the reconstructed map is compared to calculate the local artifact intensity score, forming an artifact confidence map. A positional correlation factor is introduced to measure the overlap between the current candidate region's position in the image and the background perturbation-prone areas. Combining the above scores, the probability distribution of each candidate region belonging to real defects and artifact perturbations is calculated through a confidence reassessment function.

[0090] Regions with artifact response probabilities exceeding a threshold are removed, and the remaining regions are structurally re-segmented to dynamically update the defect candidate set. An artifact exclusion threshold is set to filter each region in the candidate set, removing regions with low confidence or suspected false detections. For the retained high-confidence regions, boundary analysis and morphological correction are performed again, and a structure-guided segmentation model is used to structurally re-segment the candidate regions. During the re-segmentation process, image context information and neighborhood feature connectivity indices are introduced to enhance the closure and consistency of the defect structure and reduce miscutting and breakage. The feature response values ​​and spatial location indices of the newly segmented defect regions are recalculated and used to replace the corresponding entries in the original candidate set, generating a dynamically updated defect candidate set.

[0091] The process of generating high-confidence defect annotation results in S4 is as follows:

[0092] The response feature vector of each defect region in the corrected candidate set is input into the confidence discriminant network, and the context is fused to construct a defect credibility index. For each dynamically updated defect region, its response feature vector in the composite feature map is extracted, including indicators such as multi-channel activation intensity, edge integrity score, and texture consistency within the region. A confidence discriminant network, a lightweight multi-branch attention fusion structure, is introduced, receiving the above feature vectors as input. A context-aware channel is set in the network, and semantic integration of the local and global structural relationships of the candidate region is performed through position embedding encoding and neighborhood texture modeling. After feature fusion, a one-dimensional confidence prediction value is output, representing the credibility of the candidate region as a true defect. This value is normalized and weighted with the region's original detection score to generate the defect credibility index.

[0093] A time-backtracking mechanism based on response stability is introduced to statistically weight the frequency of defect regions in multiple repeated detections. During model training and inference, the defect responses of the same printed image at different angles and in different batches are recorded in a time-series manner. For each candidate defect region, its spatial location, morphological boundary, and structural features are matched with historical detection records, and its frequency of occurrence and mean response intensity across detection rounds are calculated. A time stability function is constructed, with the following formula:

[0094] S t =γ1*F r +γ2*A m

[0095] In the formula, F r A represents the frequency of the region's appearance in different detections. m The mean response amplitude is γ1 and γ2 are empirical weighting coefficients.

[0096] The final result is a high-confidence defect annotation result with confidence score, defect type label and spatial boundary attribute.

[0097] S5: Based on the high-confidence defect annotation results, combined with the complexity of the printed page structure, the evolution characteristics of defect morphology, and the frequency information of historical defects, output a multi-dimensional quality level assessment report.

[0098] The process of outputting a multi-dimensional quality level assessment report in S5 is as follows:

[0099] Based on the high-confidence defect annotation results, a defect type distribution map and a spatial heat map are constructed for each printed image to extract the defect concentration trend within the page.

[0100] By combining the complexity index of the printed page structure with the trend curve of defect morphology evolution, a quality grade judgment model is established, and printed materials are quantitatively graded according to the preset grading standards.

[0101] By integrating historical defect records, printing equipment parameters, and current test results, a multi-dimensional quality level assessment report with diagnostic interpretability and trend prediction capabilities is generated.

[0102] Example 3: Please refer to Figure 2 As shown, a machine learning-based printing quality inspection device includes:

[0103] Image acquisition module: Acquires printing images from multiple batches, angles, and heterogeneous lighting conditions, and constructs a representative training image dataset through regional equalization and light interference shielding strategies.

[0104] Image segmentation module: Performs block-level fine-grained segmentation on the image and extracts multi-channel texture and structural features through residual attention mechanism to generate composite feature maps for defect modeling;

[0105] Defect localization module: A defect localization network is constructed based on composite feature maps, and the structure alignment consistency loss function is used to enhance the recognition effect of low-contrast regions, forming preliminary defect candidate regions;

[0106] Defect correction module: Eliminates false detection areas through image perturbation simulation and artifact inversion mechanism, dynamically updates the defect candidate set and outputs high-confidence defect annotation results;

[0107] Quality assessment module: Combining the complexity of the page layout, the characteristics of defect evolution, and historical frequency, it performs printing quality grading and outputs a test report with multi-dimensional analysis indicators.

[0108] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0109] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A machine learning-based method for printing quality inspection, characterized in that, Includes the following steps: We acquire raw image data of printed materials under multiple batches, heterogeneous lighting, and multi-angle imaging conditions, and construct a training set of printed images by combining image region equalization strategies and light interference shielding mechanisms. The training set of printed images is divided into fine-grained image blocks, and a deep convolutional model based on residual attention mechanism is used to extract multi-channel features from each image block. A composite feature map is generated through a feature coupling structure. Based on composite feature maps, a defect localization network is constructed, and a structural alignment consistency loss function is introduced to constrain the network's response in low-contrast regions, identify potential defect response regions, and form an initial defect candidate set. The process of introducing the structural alignment consistency loss function to constrain the network's response in the low-contrast region is as follows: The low-contrast regions marked in the composite feature map are normalized for feature response, and their structural similarity with the standard template region is calculated. A structural consistency evaluation function based on the difference between position offset and gradient direction is constructed to constrain the boundary difference between defect response and background response; The structural consistency loss term is jointly optimized with the main classification loss function, enabling the network to form a stable focusing response to low-contrast defect regions during the training phase. By combining the initial defect candidate set, an image background perturbation simulation mechanism and a local artifact inversion model are introduced to establish a defect false detection correction framework, and the candidate set is dynamically updated to generate high-confidence defect annotation results. The process of establishing a defect false detection correction framework is as follows: For the initial defect candidate region, a background perturbation map simulating various typical errors is constructed; By introducing a local artifact inversion model, the response patterns belonging to background perturbations in the candidate region are inverted and their confidence is reassessed. Regions with a false impact probability higher than the threshold are removed, and the remaining regions are structurally re-segmented to dynamically update the defect candidate set. The process of generating high-confidence defect annotation results is as follows: The response feature vector of each defect region in the corrected candidate set is input into the confidence discrimination network, and the defect credibility index is constructed by fusing the context. A time backtracking mechanism based on response stability is introduced to statistically weight the frequency of defect regions in multiple repeated detections. The final result is a high-confidence defect annotation with confidence score, defect type label and spatial boundary attribute; Based on the high-confidence defect labeling results, combined with the complexity of the printed page structure, the evolution characteristics of defect morphology, and the frequency of historical defects, a multi-dimensional quality level assessment report is output.

2. The machine learning-based printing quality inspection method according to claim 1, characterized in that, The process of constructing the printed image training set is as follows: The acquired batches of printed image data were processed to unify the format and standardize the color space, and the contrast distribution of the image at the local and global scales was adjusted using the image region equalization strategy. Under the action of the light interference shielding mechanism, the reflection enhancement compensation algorithm is applied to identify and correct local false spots or shadow stripes in the image caused by changes in the light source; By combining printing batch information and machine parameters, a cross-batch printing image mapping index is established, and a printing image training set with temporal characteristics and equipment correlation is constructed.

3. The machine learning-based printing quality inspection method according to claim 2, characterized in that, The process of performing fine-grained block-level image partitioning on the printed image training set is as follows: Each image in the training set is sliced ​​using a non-overlapping sliding window at a preset size, and an overlap compensation area is introduced at the slice edges. A pixel-based dynamic region subdivision method is adopted, which uses different division scales for texture abrupt regions and low-texture regions within image blocks. The texture level of each image patch is evaluated by the image content complexity index, and a representative subset of image patches that meet the requirements of heterogeneous difference coverage is selected.

4. The machine learning-based printing quality inspection method according to claim 3, characterized in that, The process of multi-channel feature extraction for each image patch using a deep convolutional model based on residual attention mechanism is as follows: An improved residual network that integrates a subset of image blocks with a fusion channel attention module and a spatial attention module is used to extract local texture and overall edge information of the printing area at multiple scales. During feature extraction, a dynamic perception window is set to adjust the feature weights between different image block channels; A soft gating mechanism is introduced to strengthen the weakly activated regions in the residual path.

5. The machine learning-based printing quality inspection method according to claim 4, characterized in that, The process of generating a composite feature map through a feature coupling structure is as follows: The local feature vectors extracted from multiple channels are fused with the global context information of the image patch, and a multi-scale attention mechanism is used to reweight the key response regions. A feature alignment module is introduced during the fusion process to perform scale normalization and channel reconstruction on feature maps generated under different receptive fields. Finally, by modeling the association between feature maps and semantic hierarchy, a composite feature map containing texture details, edge continuity, and background perturbation factors is output.

6. The machine learning-based printing quality inspection method according to claim 5, characterized in that, The process of generating a multi-dimensional quality level assessment report is as follows: Based on the high-confidence defect annotation results, a defect type distribution map and a spatial heat map are constructed for each printed image to extract the defect concentration trend within the page. By combining the complexity index of the printed page structure with the trend curve of defect morphology evolution, a quality grade judgment model is established, and printed materials are quantitatively graded according to the preset grading standards. By integrating historical defect records, printing equipment parameters, and current test results, a multi-dimensional quality level assessment report with diagnostic interpretability and trend prediction capabilities is generated.

7. A machine learning-based printing quality inspection device, applied to the method described in any one of claims 1-6, characterized in that, include: Image acquisition module: Acquires printing images from multiple batches, angles, and heterogeneous lighting conditions, and constructs a representative training image dataset through regional equalization and light interference shielding strategies. Image segmentation module: Performs block-level fine-grained segmentation on the image and extracts multi-channel texture and structural features through residual attention mechanism to generate composite feature maps for defect modeling; Defect localization module: A defect localization network is constructed based on composite feature maps, and the structure alignment consistency loss function is used to enhance the recognition effect of low-contrast regions, forming preliminary defect candidate regions; Defect correction module: Eliminates false detection areas through image perturbation simulation and artifact inversion mechanism, dynamically updates the defect candidate set and outputs high-confidence defect annotation results; Quality assessment module: Combining the complexity of the page layout, the characteristics of defect evolution, and historical frequency, it performs printing quality grading and outputs a test report with multi-dimensional analysis indicators.

Citation Information

Patent Citations

  • Methods and a system for verifying the identity of a printed item

    CN106415608A

  • Defect detection method for printing error of layout on surface of cloth

    CN118537335A