Printing quality detection method and device based on machine learning
Through a machine learning-based printing quality inspection method, using multi-angle image data and deep convolution models, combined with light interference shielding and structural alignment consistency loss functions, the problem of inaccurate recognition of subtle defects in existing technologies is solved, and efficient printing quality inspection is achieved.
Patent Information
- Application Number
- CN202510853489.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Existing printing quality inspection technologies have difficulty identifying subtle defects such as blurred edges, slight color differences or slight ghosting, have low detection accuracy, and lack the ability to adaptively learn complex printing scenarios, resulting in poor detection results.
A machine learning-based method is used to obtain image data under multiple batches, heterogeneous lighting and multi-angle imaging conditions. The image area equalization strategy and light interference shielding mechanism are combined to construct a printed image training set. The deep convolutional model with residual attention mechanism is used for feature extraction. The structural alignment consistency loss function and image background perturbation simulation are introduced to dynamically update the defect candidate set, and finally generate high-confidence defect annotation results.
It significantly improves the sensitivity and robustness of printing quality detection, increases the accuracy of identifying minor defects, reduces false detections, and has the advantages of strong scalability and a wide range of applications. It is suitable for quality control and equipment feedback in the printing industry.
Smart Images

Figure CN120765567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning, and in particular to a printing quality detection method and device based on machine learning. Background Art
[0002] In recent years, machine learning technology has been gradually introduced into the field of print quality inspection, offering the advantage of learning defect features in a data-driven manner. While image processing algorithms have been widely used in existing print quality inspection technologies for defect identification and quality assessment of printed products, the detection accuracy is still low for subtle defects such as blurred edges, slight color differences, or slight ghosting that are difficult to identify using traditional rule extraction methods, which can easily lead to misjudgments or missed detections. Traditional methods typically rely on fixed thresholds, template matching, or edge recognition algorithms. When dealing with complex printing scenarios, they lack the ability to adaptively learn blurred areas or local disturbances, resulting in the system being insensitive to slight deviations in the printing process, affecting the overall inspection effect. Existing solutions mostly focus on improving classification accuracy, but have yet to construct a high-resolution multi-scale feature representation mechanism for fine-grained defect identification. They also lack a means of modeling contextual information from the printing process, resulting in the model's inadequate response to minor but critical quality issues. Therefore, it is necessary to design a machine learning-based print quality inspection method and device that improves the accuracy of defect identification. Summary of the Invention
[0003] In response to the shortcomings of the existing technology, the present invention provides a printing quality detection method and device based on machine learning, which has the advantage of improving the accuracy of defect identification and solves the problems in the above-mentioned background technology.
[0004] To achieve the above-mentioned purpose of improving the accuracy of defect recognition, the present invention provides the following technical solution: a printing quality detection method based on machine learning, comprising the following steps:
[0005] Obtain original image data of printed products under multiple batches, heterogeneous lighting, and multi-angle imaging conditions, and construct a printed image training set by combining image area balancing strategies and light interference shielding mechanisms;
[0006] The printed image training set is divided into fine-grained image blocks, and a deep convolutional model based on the residual attention mechanism is used to extract multi-channel features from each image block, generating a composite feature map through a feature coupling structure.
[0007] 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 areas, identify potential defect response areas, and form an initial defect candidate set.
[0008] Combined with the initial defect candidate set, the image background perturbation simulation mechanism and the 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 high-confidence defect annotation results, combined with the structural complexity of the printing layout, the evolution characteristics of defect morphology and historical defect frequency information, a multi-dimensional quality grade assessment report is output.
[0010] Preferably, the process of constructing the printed image training set is:
[0011] The acquired batches of printing image data are formatted and color space standardized, and the image contrast distribution at local and global scales is adjusted using image region equalization strategies.
[0012] Under the action of light interference shielding mechanism, the reflection enhancement compensation algorithm is applied to identify and correct local false light spots or shadow stripes caused by light source changes in the image;
[0013] Combining printing batch information with machine model parameters, a cross-batch printing image mapping index is established, and a printing image training set with temporal characteristics and device correlation is constructed.
[0014] Preferably, the process of performing fine-grained image block division on the printed image training set is as follows:
[0015] Each image in the training set is sliced into non-overlapping sliding windows according to a preset size, and an overlapping compensation area is introduced at the edge of the slice;
[0016] A pixel clustering-based region dynamic subdivision method is used, and different division scales are used for texture mutation areas and low texture areas within image blocks.
[0017] The texture level of each image block is evaluated by the image content complexity index, and a representative subset of image blocks that meets the heterogeneous difference coverage requirements is screened out.
[0018] Preferably, the process of performing multi-channel feature extraction on each image block using a deep convolutional model based on the residual attention mechanism is as follows:
[0019] The image patch subset is input into the improved residual network that integrates the channel attention module and the spatial attention module to extract the local texture and global edge information of the printed area at multiple scales.
[0020] During the feature extraction process, a dynamic perception window is set to adjust the feature weights between channels of different image blocks;
[0021] A soft gating mechanism is introduced to strengthen the weakly activated areas in the residual pathway.
[0022] Preferably, the process for generating a composite feature map by a feature coupling structure is:
[0023] The multi-channel extracted local feature vector is fused with the global context information of the image block, and a multi-scale attention mechanism is used to reweight the key response area;
[0024] In the fusion process, a feature alignment module is introduced to normalize the scale and reconstruct the channels of the feature maps generated under different receptive fields;
[0025] Finally, the composite feature map containing texture details, edge continuity and background disturbance factors is output by feature map splicing and semantic level association modeling.
[0026] Preferably, the process for introducing a structure alignment consistency loss function to constrain the response of the network in the low contrast area is:
[0027] The feature response normalization processing is performed on the low contrast area labeled in the composite feature map, and the structural similarity between the low contrast area and the standard template area is calculated;
[0028] A structure consistency evaluation function based on position offset and gradient direction difference is constructed to constrain the boundary difference between the defect response and the background response;
[0029] The structure consistency loss term and the main classification loss function are jointly optimized to make the network form a stable focusing response to the low contrast defect area in the training stage.
[0030] Preferably, the process for establishing a defect false detection correction framework is:
[0031] For the initial defect candidate area, a background disturbance atlas simulating multiple typical errors is constructed;
[0032] By introducing a local artifact inversion model, the response mode of the background disturbance in the candidate area is inversely inferred and confidence reevaluated;
[0033] The area with a pseudo-impact probability higher than the threshold is removed, and the remaining area is structurally resegmented to dynamically update the defect candidate set.
[0034] Preferably, the process for generating a high-confidence defect labeling result is:
[0035] The response feature vector of each defect area 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 the defect area in multiple repeated detections;
[0037] Finally, a high-confidence defect annotation result with confidence score, defect type label and spatial boundary attributes is generated.
[0038] Preferably, the process of outputting a multi-dimensional quality rating assessment report is:
[0039] Based on high-confidence defect annotation results, a defect type distribution map and spatial heat map are constructed for each printed image to extract the defect concentration trend within the layout;
[0040] By combining the printing layout structure complexity index and the defect morphology evolution trend curve, a quality grade determination model is established to quantitatively grade printed products according to the preset grading standards;
[0041] Integrate historical defect records, printing equipment parameters and current test results to generate a multi-dimensional quality grade assessment report with diagnostic interpretation and trend prediction capabilities.
[0042] A printing quality detection device based on machine learning, comprising:
[0043] Image acquisition module: This module collects printed images from multiple batches, multiple angles, and heterogeneous lighting conditions, and constructs a representative training image dataset through regional balancing and light interference shielding strategies.
[0044] Image segmentation module: It performs block-level fine-grained segmentation on the image and extracts multi-channel texture and structural features through the residual attention mechanism to generate a composite feature map for defect modeling;
[0045] Defect localization module: Builds a defect localization network based on the composite feature map and uses the structural alignment consistency loss function to enhance the recognition effect of low-contrast areas to form preliminary defect candidate areas;
[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: Combines layout structure complexity, defect evolution characteristics and historical frequency to make printing quality grading judgments and outputs a test report with multi-dimensional analysis indicators.
[0048] Compared with the existing technology, the present invention provides a printing quality detection method and device based on machine learning, which has the following beneficial effects:
[0049] The present invention significantly improves the stability and clarity of the original image in complex lighting environments by introducing an image area balancing strategy and a light interference shielding mechanism, providing high-quality input for subsequent feature extraction; adopts a deep convolutional model and feature coupling structure based on a residual attention mechanism, taking into account the fine-grained detection requirements of tiny defects in printed images and the global perception ability of large-area texture areas, effectively improving the detection sensitivity and robustness; by constructing a structural alignment consistency loss function, the network's response focusing ability in low-contrast areas is enhanced, avoiding the omission of fuzzy boundary areas in traditional methods; introduces image background perturbation simulation and local artifact inversion mechanism, automatically identifies false detection areas without increasing the cost of manual labeling, and significantly improves the credibility of defect recognition results; combines the structural complexity of the printing layout with the historical defect frequency for multi-dimensional grade evaluation, realizing an intelligent transition from whether there are defects to the defect quality level, with the advantages of strong scalability, wide applicability and convenient deployment, and is suitable for multiple key links in printing industry production, such as quality control, defect tracking and equipment feedback. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Schematic diagram of the method of the present invention;
[0051] Figure 2 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0052] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0053] Example 1: Please refer to Figure 1 As shown, a printing quality detection method based on machine learning according to an embodiment of the present invention includes the following steps:
[0054] S1: Obtain raw image data of printed products under multiple batches, heterogeneous lighting, and multi-angle imaging conditions. Combine the image area balancing strategy with the light interference shielding mechanism to construct a printed image training set containing multiple types of typical defect features.
[0055] The process of constructing the printed image training set in S1 is as follows:
[0056] The acquired multi-batch printing image data is formatted and color space standardized, and the image area equalization strategy is used to adjust the contrast distribution of the image at local and global scales; original image data from different printing batches and printing equipment is collected, and the image resolution, file format and bit depth parameters are unified to ensure the consistency of the input data; RGB images are converted to standard color spaces such as Lab or HSV, which are more suitable for color analysis, and the image colors are unified using a normalization method based on channel mean and standard deviation; on the basis of standardization, the hue shift between different images is corrected in combination with the histogram matching algorithm to reduce the impact of color drift caused by equipment or time; the adaptive histogram equalization method is used to enhance the contrast of local areas of the image to improve the visibility of low-brightness or highly occluded areas; combined with the global grayscale distribution characteristics of the image, the brightness redistribution function is used to compress or expand the contrast range of the overall image to achieve a balanced distribution of bright and dark areas; the contrast uniformity of the images before and after equalization is evaluated, and the local enhancement intensity is automatically adjusted according to the uniformity index to achieve contrast optimization at multiple scales;
[0057] Under the action of the light interference shielding mechanism, a reflection enhancement compensation algorithm is applied to identify and correct local false light spots or shadow stripes caused by light source changes in the image. Based on the change trend of the image's brightness channel, abnormal reflection boundaries and shadow gradient areas caused by uneven illumination in the area are identified. For suspected light spot areas, a joint discrimination method based on Laplace edge detection and smoothness analysis is used to determine the true location of the false light interference. Within the identified interference area, a local texture compensation model is constructed, and the regional pixel values are reconstructed using neighborhood interpolation and guided filtering algorithms to restore the natural texture characteristics of the image.
[0058] Combining print batch information with machine model parameters, we establish a cross-batch printing image mapping index and build a training set of printed images with temporal characteristics and device relevance. We also extract metadata such as the print batch number, machine model, ink type, and paper type corresponding to each image as the basic descriptive attributes of the image.
[0059] Images with the same or similar parameter conditions are grouped into the same sub-index unit, and a multidimensional mapping table is constructed to achieve the corresponding association between images and production environments; template alignment is performed on repeated patterns in images across batches, and a unified alignment index is generated through feature point matching and geometric transformation matrix to enhance the temporal consistency of the training set; images that have been standardized, illumination compensated, parameter classified, and index aligned are sorted according to acquisition time to form an image sequence with temporal continuity; device parameters, batch information, and image files are multi-label 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: performing image block level fine-grained division on the training set of printed images, and using a deep convolution model based on residual attention mechanism to extract multi-channel features of each image block, and generating a composite feature map that fuses printed texture, color drift and edge blur information through a feature coupling structure.
[0061] The image block level fine-grained division process in S2 is as follows:
[0062] Each image in the training set is subjected to non-overlapping sliding window slicing operation according to a preset size, and an overlapping compensation area is introduced at the edge of the slice to enhance the continuity of the defect edge. On the preprocessed printed image, the sliding window size and step are set, and the image is sliced in a non-overlapping manner along the horizontal and vertical directions. Considering that part of the defects may be located at the edge of the slice, in order to avoid the loss of boundary information, an edge overlapping compensation area is set, which is usually 10% to 20% of the width of the sliding window, so that adjacent image blocks 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 back projection and merging of the subsequent defect positioning results.
[0063] A region dynamic subdivision method based on pixel clustering is used to divide the texture mutation area and low texture area in the image block with different division scales. The edge distribution and texture density index in the block are extracted by gray level gradient analysis of the sliced image block, which is used to judge the texture complexity in the block. The image block is input into the pixel clustering model based on K-Means or SLIC algorithm to preliminarily divide the pixel region and form several sub-regions. For high texture mutation area, a smaller division scale is used for subdivision to retain local information. For texture uniform area, a larger scale is used to reduce redundant calculation. Through the scale self-adaptive strategy, each image block can be dynamically divided according to its texture characteristics, improving the pertinence and discriminability of subsequent feature extraction.
[0064] The texture level of each image block is evaluated by image content complexity index, and a representative image block subset meeting the heterogeneous difference coverage requirement is selected. The texture complexity index of each image block is calculated, which is composed of edge density, gray level co-occurrence matrix texture entropy, local binary pattern response and other features. According to the complexity index, the image blocks 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. The maximum inter-class variance criterion is used to select the blocks with the largest structural difference in each category of image blocks to construct a representative image block subset containing different materials, different printing deviations and structural background differences. Finally, a training image block set is formed which covers the diversity of defects and has structural heterogeneity.
[0065] The process of extracting multi-channel features from each image block using a deep convolutional model based on the residual attention mechanism in S2 is as follows:
[0066] The image patch subset is input into an improved residual network that integrates a channel attention module and a spatial attention module to perform multi-scale extraction of local texture and overall edge information of the printed area. A representative subset of the screened image patches is selected as input and sent to the improved ResNet backbone network that integrates channel attention and spatial attention. In the channel attention module, global average pooling and maximum pooling are used to describe the features of each channel. The dependency between channels is learned through the MLP structure, and channel weight coefficients are output to adjust the importance of feature expression. In the spatial attention module, the activation strength of each position is evaluated by convolution operation based on the spatial distribution of the feature map, and a spatial weight map is generated through sigmoid mapping to enhance the edge and texture mutation areas. After fusing the two attention mechanisms with the residual unit, a multi-scale convolution operation is performed to simultaneously extract local detail features and global contour information of the printed image, constructing a deep feature representation.
[0067] During feature extraction, a dynamic perception window is set to adjust the feature weights between channels of different image blocks, improving the model's ability to respond to subtle defects in complex texture backgrounds. Based on the texture complexity index of the image block at input, the receptive field size and convolution kernel combination of the network's middle layer 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 input into a lightweight weight adjustment subnetwork to generate inter-channel weight adjustment vectors, which are fused with the original channel attention coefficients to form the final feature modulation factor. This factor is used to reweight the intermediate feature maps, allowing the model to 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 strengthen the weakly activated areas in the residual path; in the residual structure, a gating unit is added to dynamically adjust the residual signal between the input and output; the gating unit uses the Sigmoid activation function to construct a soft gating function, and the input is the local response map output by the current residual block, and accurate identification of weak response areas is achieved through parameter learning; for areas judged to be weakly activated, their difference from the historical feature state is calculated. If the change exceeds the preset threshold, their channel activation value is increased to avoid the attenuation of information flow during the propagation process; the strengthened 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 the interference of noise background.
[0070] The process of generating a composite feature map through the feature coupling structure in S2 is as follows:
[0071] The multi-channel extracted local feature vector is fused with the global context information of the image block, and a multi-scale attention mechanism is used to re-weight the key response area; for the extracted multi-channel local feature vector, a position-aware global context extraction module is used to obtain the global semantic background of the image block; the local feature and the context vector are fused, and a feature-level weighted fusion or attention-guided fusion strategy is used to combine the position-dependent information with the local texture response to improve the structural consistency; on the fused feature map, a multi-scale attention mechanism is embedded, and different scale convolution kernels or spatial pyramid structures are introduced to identify the key response area under each scale; the attention weight map is calculated by the Softmax normalization strategy, which is applied to different areas such as local texture, edge, background, etc., to strengthen the response of defect areas that are easily missed or weakly significant;
[0072] In the fusion process, a feature alignment module is introduced to normalize the scale and reconstruct the channels of the feature maps generated under different receptive fields, to prevent feature distortion across scales; the feature maps extracted under multi-scale receptive fields are upsampled or downsampled to unify the spatial scale and realize spatial scale normalization; cross-scale channel mapping matrices are used to reconstruct and arrange the feature channels, so that features of different scales have consistent representation ability in the semantic space; Deformable Convolution or Attention-based Offset Matching mechanism in the feature alignment module is introduced to nonlinearly align the position information of the same area under different scales; the aligned feature maps are channel-spliced by weighted fusion, and standardized and nonlinearly mapped by BatchNorm and ReLU activation, forming a multi-dimensional feature fusion representation under a unified scale;
[0073] Finally, the feature map is spliced and the semantic level correlation model is built to output a composite feature map containing texture details, edge continuity and background disturbance factors; the multi-scale feature maps after alignment and reconstruction are spliced according to the semantic level, including the edge feature layer, the texture response layer and the context background layer, to build a unified multi-layer nested structure; on the spliced feature map, a semantic level correlation modeling mechanism is introduced to build a context dependency graph between the feature layers and extract the logical dependency relationship between different level features; the correlation model is used to enhance the cross-level semantic consistency, avoid misjudgment areas caused by feature isolation, and strengthen the discriminant ability of the composite feature map for low-contrast defects and background artifacts; finally, a composite feature map containing texture details, edge continuity and background disturbance factors is output.
[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 areas, identify potential defect response areas, and form an initial defect candidate set.
[0075] The structural alignment consistency loss function introduced in S3 constrains the response of the network in low-contrast areas as follows:
[0076] The low-contrast regions marked in the composite feature map are normalized to calculate their structural similarity with the standard template region. The original annotation information of the image block and the brightness histogram analysis results are used to identify low-contrast regions in the composite feature map where the brightness contrast distribution is below a preset threshold. Multi-channel feature response maps are extracted from these regions, and the activation scales between different channels are unified through local normalization operations. 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. The structural similarity metric is used to compare the normalized target region with the standard template to calculate the structural similarity coefficient.
[0077] A structural consistency evaluation function based on position offset and gradient direction difference is constructed to impose saliency constraints on the boundary difference between the defect response and the background response. The boundary features of each low-contrast candidate region are extracted in the composite feature map, and the direction difference Δθ between the dominant gradient direction vector within the region and its neighboring regions is calculated. The geometric offset Δx between the center point of the response region and the center point of the marked true defect in the composite feature map is simultaneously calculated as the position offset indicator. The direction difference Δθ and the position offset Δx are respectively input into two weighting factor functions and combined with the dual-channel saliency mask map to construct a structural consistency evaluation function. The formula is:
[0078] L struct =α*mean(|Δx|)+β*mean(1-cos(Δθ))
[0079] Where α and β are the weighted parameters of position offset loss and direction difference loss, respectively, indicating the relative importance of spatial offset and direction difference;
[0080] The structural consistency loss term and the main classification loss function are jointly optimized to enable the network to form a stable focus response to low-contrast defect areas during the training phase. The main classification loss function uses cross entropy or focal loss to improve the ability to distinguish defects in a minority of categories. The structural consistency loss term and the main loss function are linearly combined to construct a joint optimization objective function, which is formulated as follows:
[0081] L total =λ1*L cls +λ2*L struct
[0082] wherein λ1, λ2 are weight coefficients of the classification loss and the structure loss respectively, L cls , L struct are the classification loss and the structure loss respectively;
[0083] In the network training process, an adaptive weight strategy is introduced to increase the proportion of the structure loss term for high structure inconsistency samples, and to further strengthen the response ability of the model to low contrast regions;
[0084] Through the joint optimization strategy, the model not only has accurate classification ability in high contrast regions, but also can maintain robust defect focusing effect in complex background and fuzzy boundary.
[0085] Embodiment 2: As shown in Figure 1 , a machine learning-based printing quality detection method further comprises the following steps:
[0086] S4: In combination with the initial defect candidate set, a background disturbance simulation mechanism and a local artifact inversion model are introduced to establish a defect false detection correction framework, to eliminate interference regions caused by non-printing errors, and to dynamically update the candidate set to generate high-confidence defect labeling results.
[0087] The process of establishing a defect false detection correction framework in S4 is:
[0088] For the initial defect candidate region, a background disturbance atlas simulating multiple typical errors is constructed; the image blocks in the initial defect candidate set are analyzed to identify common printing error sources such as ink smearing, ink splashing, paper texture interference, and light reflection residues; based on the above features, their statistical properties are extracted from multiple real background images, including color mean, directional gradient distribution, structure texture spectrum, and local contrast; the extraction results are constructed into a disturbance template library, and a disturbance atlas set is generated using a data enhancement strategy;
[0089] By introducing a local artifact inversion model, the response mode of the candidate region that may belong to background disturbance is inversely inferred and confidence re-evaluated; for the candidate defect region, three types of feature indicators, including edge continuity, local texture stability, and gray level fluctuation, are extracted and matched with the templates in the background disturbance atlas; 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 inversely reconstruct the expected image response of the region under the condition of no defects; the activation residual distribution between the original feature map and the reconstructed image is compared to calculate the local artifact intensity score and form an artifact confidence mapping; a position correlation factor is introduced to measure the overlap between the current candidate region and the background disturbance prone area in the image; based on the above scores, the probability distribution of each candidate region belonging to real defects and artifacts is calculated through a confidence re-evaluation function;
[0090] Areas with a probability of false impact higher than a threshold are eliminated, and the remaining areas are structurally re-segmented to dynamically update the defect candidate set; an artifact exclusion threshold is set, and each area in the candidate set is screened to eliminate areas with low confidence or suspected false detection; for the retained high-confidence areas, boundary analysis and morphological correction are re-performed, and the candidate areas are structurally re-segmented using a structure-guided segmentation model; image context information and neighborhood feature connectivity indicators are introduced during the re-segmentation process to enhance the closure and consistency of the defect structure and reduce mis-segmentation and fractures; the feature response value and spatial position index of the new defect area after re-segmentation are recalculated, and the corresponding entries in the original candidate set are replaced to generate 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 area in the corrected candidate set is input into the confidence discrimination network, and the context is integrated to construct a defect credibility index. The response feature vector of each defect area in the dynamically updated composite feature map is extracted, including indicators such as multi-channel activation intensity, edge integrity score, and texture consistency within the region. The confidence discrimination network is introduced, which is a lightweight multi-branch attention fusion structure and receives the above feature vector as input. A context-aware channel is set in the network, and the relationship between the local and full-image structures of the candidate area is semantically integrated through position embedding coding and neighborhood texture modeling. After feature fusion, a one-dimensional confidence prediction value is output, representing the credibility of the candidate area as a real defect. This value is normalized and weighted with the original detection score of the area to generate a defect credibility index.
[0093] A time-retrospective mechanism based on response stability is introduced to statistically weight the frequency of defective areas in repeated inspections. During model training and inference, the defect responses of the same printed layout image at different angles and in different batches are recorded in a time series format. For each candidate defective area, its spatial position, morphological boundary, and structural features are matched in historical inspection records, and its occurrence frequency and response intensity mean across inspection rounds are calculated. A temporal stability function is constructed, and the formula is:
[0094] S t =γ1*F r +γ2*A m
[0095] Where, F r is the frequency of the region appearing in different detections, A m is the mean of the response amplitude, γ1 and γ2 are the empirical weighting coefficients;
[0096] Finally, a high-confidence defect annotation result with confidence score, defect type label and spatial boundary attributes is generated.
[0097] S5: Based on high-confidence defect annotation results, combined with the structural complexity of the printed layout, the evolution characteristics of the defect morphology and historical defect frequency information, a multi-dimensional quality grade assessment report is output.
[0098] The process of outputting the multi-dimensional quality level assessment report in S5 is as follows:
[0099] Based on high-confidence defect annotation results, a defect type distribution map and spatial heat map are constructed for each printed image to extract the defect concentration trend within the layout;
[0100] By combining the printing layout structure complexity index and the defect morphology evolution trend curve, a quality grade determination model is established to quantitatively grade printed products according to the preset grading standards;
[0101] Integrate historical defect records, printing equipment parameters and current test results to generate a multi-dimensional quality grade assessment report with diagnostic interpretation and trend prediction capabilities.
[0102] Example 3: Please refer to Figure 2 As shown, a printing quality detection device based on machine learning includes:
[0103] Image acquisition module: This module collects printed images from multiple batches, multiple angles, and heterogeneous lighting conditions, and constructs a representative training image dataset through regional balancing and light interference shielding strategies.
[0104] Image segmentation module: It performs block-level fine-grained segmentation on the image and extracts multi-channel texture and structural features through the residual attention mechanism to generate a composite feature map for defect modeling;
[0105] Defect localization module: Builds a defect localization network based on the composite feature map and uses the structural alignment consistency loss function to enhance the recognition effect of low-contrast areas to form preliminary defect candidate areas;
[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: Combines layout structure complexity, defect evolution characteristics and historical frequency to make printing quality grading judgments 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, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0109] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A printing quality detection method based on machine learning, characterized in that: The following steps are involved: Obtain original image data of printed products under multiple batches, heterogeneous lighting, and multi-angle imaging conditions, and construct a printed image training set by combining image area balancing strategies and light interference shielding mechanisms; The printed image training set is divided into fine-grained image blocks, and a deep convolutional model based on the residual attention mechanism is used to extract multi-channel features from each image block, generating a composite feature map through a feature coupling structure. 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 areas, identify potential defect response areas, and form an initial defect candidate set. Combined with the initial defect candidate set, the image background perturbation simulation mechanism and the 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; Based on high-confidence defect annotation results, combined with the structural complexity of the printing layout, the evolution characteristics of defect morphology and historical defect frequency information, a multi-dimensional quality grade assessment report is output.
2. The printing quality detection method based on machine learning according to claim 1, characterized in that: The process of constructing a printed image training set is: The acquired batches of printing image data are formatted and color space standardized, and the image contrast distribution at local and global scales is adjusted using image region equalization strategies. Under the action of light interference shielding mechanism, the reflection enhancement compensation algorithm is applied to identify and correct local false light spots or shadow stripes caused by light source changes in the image; Combining printing batch information with machine model parameters, a cross-batch printing image mapping index is established, and a printing image training set with temporal characteristics and device correlation is constructed.
3. The printing quality detection method based on machine learning according to claim 2, characterized in that: The process of fine-grained image block division for the printed image training set is as follows: Each image in the training set is sliced into non-overlapping sliding windows according to a preset size, and an overlapping compensation area is introduced at the edge of the slice; A pixel clustering-based region dynamic subdivision method is used, and different division scales are used for texture mutation areas and low texture areas within image blocks. The texture level of each image block is evaluated by the image content complexity index, and a representative subset of image blocks that meets the heterogeneous difference coverage requirements is screened out.
4. The printing quality detection method based on machine learning according to claim 3, characterized in that: The process of multi-channel feature extraction for each image block using a deep convolutional model based on the residual attention mechanism is as follows: The image patch subset is input into the improved residual network that integrates the channel attention module and the spatial attention module to extract the local texture and global edge information of the printed area at multiple scales. During the feature extraction process, a dynamic perception window is set to adjust the feature weights between channels of different image blocks; A soft gating mechanism is introduced to strengthen the weakly activated areas in the residual pathway.
5. The printing quality detection method based on machine learning 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 vector extracted by multiple channels is fused with the global context information of the image patch, and a multi-scale attention mechanism is used to reweight the key response areas; A feature alignment module is introduced during the fusion process to normalize the scale and reconstruct the channels of feature maps generated under different receptive fields. Finally, through feature map splicing and semantic hierarchical association modeling, a composite feature map containing texture details, edge continuity and background disturbance factors is output.
6. The printing quality detection method based on machine learning according to claim 5, characterized in that: The process of introducing the structural alignment consistency loss function to constrain the network's response in low-contrast areas is: Perform feature response normalization on the low-contrast areas marked in the composite feature map and calculate their structural similarity with the standard template area; A structural consistency evaluation function based on position offset and gradient direction difference 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, so that the network can form a stable focus response to low-contrast defect areas during the training stage.
7. The printing quality detection method based on machine learning according to claim 6, characterized in that: The process of establishing a defect false detection and correction framework is as follows: For the initial defect candidate area, construct a background disturbance map that simulates multiple typical errors; By introducing a local artifact inversion model, the response pattern belonging to the background disturbance in the candidate area is reversely inferred and the confidence is re-evaluated; The areas with the probability of false impact higher than the threshold are removed, and the remaining areas are structurally re-segmented to dynamically update the defect candidate set.
8. The printing quality detection method based on machine learning according to claim 7, characterized in that: The process of generating high-confidence defect annotation results is as follows: The response feature vector of each defect area in the corrected candidate set is input into the confidence discrimination network, and the context is integrated to construct the defect credibility index; A time backtracking mechanism based on response stability is introduced to statistically weight the frequency of defective areas in repeated inspections. Finally, a high-confidence defect annotation result with confidence score, defect type label and spatial boundary attributes is generated.
9. The printing quality detection method based on machine learning according to claim 8, characterized in that: The process of outputting a multi-dimensional quality rating assessment report is as follows: Based on high-confidence defect annotation results, a defect type distribution map and spatial heat map are constructed for each printed image to extract the defect concentration trend within the layout; By combining the printing layout structure complexity index and the defect morphology evolution trend curve, a quality grade determination model is established to quantitatively grade printed products according to the preset grading standards; Integrate historical defect records, printing equipment parameters and current test results to generate a multi-dimensional quality grade assessment report with diagnostic interpretation and trend prediction capabilities.
10. A printing quality detection device based on machine learning, applied to the method according to any one of claims 1 to 9, characterized in that: include: Image acquisition module: This module collects printed images from multiple batches, multiple angles, and heterogeneous lighting conditions, and constructs a representative training image dataset through regional balancing and light interference shielding strategies. Image segmentation module: It performs block-level fine-grained segmentation on the image and extracts multi-channel texture and structural features through the residual attention mechanism to generate a composite feature map for defect modeling; Defect localization module: Builds a defect localization network based on the composite feature map and uses the structural alignment consistency loss function to enhance the recognition effect of low-contrast areas to form preliminary defect candidate areas; 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: Combines layout structure complexity, defect evolution characteristics and historical frequency to make printing quality grading judgments 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
Printed matter quality detection method based on artificial intelligence
CN119722615A
Water supply network inspection and defect identification method based on image processing technology
CN119964012A
Methods and a system for verifying the identity of a printed item
EP3111376A1
Cited By
Cluster type whole mine AI video analysis and linkage method
CN120932160A
Glass fiber board production quality detection method and system
CN121304617A
Medical instrument intelligent defect detection method and system based on image processing
CN121481986A
An online visual inspection method and system for printing patterns on a color photovoltaic backsheet
CN122156149B