A method and system for print defect identification for offline image analysis
By combining adaptive image preprocessing and a printing process knowledge graph with a lightweight convolutional neural network, the problem of misjudgment and missed detection caused by scale differences in traditional printing defect identification methods is solved. This achieves full coverage identification and high-precision classification of micron- and centimeter-level defects, improving the adaptability and accuracy of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU RAILWAY ERJU WING KING TONG PRINTING LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-23
Smart Images

Figure CN122265183A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printing engineering technology, and more specifically to a method and system for identifying printing defects using offline image analysis. Background Technology
[0002] Printing refers to the process of copying text, images, graphics, and other information onto substrates such as paper, plastic, and metal using certain technical means. Its core purpose is to achieve the mass reproduction and dissemination of information, and it is widely used in books, packaging, advertising, signage, and other fields.
[0003] Traditional printing defect identification methods rely solely on shallow visual features such as pixel grayscale and edges, lacking a deep integration of printing process rules and defect formation mechanisms. This leads to misjudgments or missed detections when dealing with easily confused defects, such as blurred feature boundaries between different types of defects or difficulty in distinguishing similar defect patterns. Consequently, they cannot accurately identify the essence of defects, affecting the accuracy and reliability of defect classification. Printing defects exhibit significant scale differences at the micrometer and centimeter levels. Traditional defect identification methods require separate model design for defects of different scales, resulting in poor flexibility and difficulty in balancing the identification needs of micrometer-level fine defects with centimeter-level macroscopic defects. Scale mismatch can easily lead to missed or false detections, making it impossible to achieve full coverage detection of defects at different scales. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for identifying printing defects through offline image analysis.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A method for identifying printing defects for offline image analysis, comprising the following steps: S1: Printing-specific image preprocessing: Adaptive algorithms are used to denoise the printing texture, identify uneven lighting areas in the image, combine the type of printing substrate to construct a dynamic compensation model, and perform super-resolution reconstruction on low-resolution images; S2: Semantic feature extraction integrating printing process knowledge: Load a pre-built industry knowledge graph of printing defects, extract multi-scale image features of process-aware printing processes, and separate the background features of patterns, text, and background color of printed materials from defect features through semantic segmentation algorithms. S3: Lightweight and high-precision defect detection and classification: It calls a lightweight convolutional neural network optimized by pruning, quantization and knowledge distillation to perform parallel reasoning on defect candidate regions. It combines data augmentation with defect simulation generation technology based on printing process to improve the classification accuracy of small sample defects. For printed materials with multiple defects superimposed, it uses a multi-label classification network for detection. S4: Offline Dedicated Quality Analysis: Performs statistical analysis and source tracing of the quality of printing batches, and marks defects.
[0006] In a preferred embodiment, in step S1, the input offline printing image is segmented into a grid, and the inherent printing texture features of dot density, line spacing and edge direction in each grid are extracted. Based on these features, a printing texture mask is constructed to mark the normal printing texture area and the suspected defect area in the image. For the suspected defect area, an adaptive median filter is used for targeted noise reduction to preserve the edge and detail features of the defect. For the normal printing texture area, only slight smoothing is performed. By using global grayscale histogram analysis and local variance calculation, the system automatically identifies uneven areas of light and dark in an image caused by differences in scanning angle and light source intensity. It outputs the location coordinates and grayscale deviation values of the uneven lighting areas, imports the substrate type and printing process information of the printed matter, matches the predefined substrate and process lighting compensation parameter library, obtains the lighting compensation benchmark value in this scene, and combines the grayscale deviation value of the uneven lighting areas with the substrate and process compensation benchmark to construct a pixel-level dynamic compensation model. This model dynamically adjusts the grayscale value of each pixel in the image to eliminate the false defect interference caused by uneven lighting. If the resolution of the input image is lower than the preset minimum resolution threshold for defect identification, the super-resolution reconstruction process is triggered. A lightweight generative super-resolution network optimized for printed images is used to reconstruct the low-resolution image. Printed texture constraints are introduced during the reconstruction process. The sharpness of the super-resolution image is evaluated. If the resolution requirements for defect identification are met, the subsequent feature extraction stage is entered. Otherwise, the super-resolution parameters are readjusted and reconstruction is performed again.
[0007] In a preferred embodiment, in step S2, a pre-constructed knowledge graph of the printing defect industry is loaded. The knowledge graph contains typical defect information under different printing processes and different substrates. The knowledge graph covers the formation mechanism, spatial distribution pattern, pixel grayscale features and typical case samples of defects. The qualitative description in the knowledge graph is transformed into quantifiable feature constraints. The process parameters of the current printed product are input, including the printing size, dot density and ink type. According to the process parameters, the defect scale distribution pattern under the corresponding scenario is matched from the knowledge graph. Based on the defect scale distribution pattern, the scale window size of feature extraction is dynamically adjusted to generate a multi-scale feature extraction template. Multi-scale convolution operation is performed on the image to extract visual features of texture, edge and grayscale at different scales. Combined with the feature constraints of the knowledge graph, the multi-scale features are filtered and fused to retain effective features strongly related to defects and remove redundant background features. A semantic segmentation model optimized for printed materials is loaded. The semantic segmentation model has been trained using background samples of printed patterns, text, and background colors. Semantic segmentation is performed on the preprocessed image to automatically identify and mark the background regions of the printed pattern regions, text regions, and background color regions. The mask image of the background region is output to clearly distinguish the background from potential defect regions. The multi-scale feature map and the background mask are processed pixel by pixel to remove the features corresponding to the background regions and retain only the features of the potential defect regions. The purified defect features are normalized to generate the final semantic defect feature map.
[0008] In a preferred embodiment, in step S3, a pre-trained lightweight convolutional neural network is invoked, which has been optimized through pruning, quantization, and knowledge distillation. Pruning: Remove redundant convolutional kernels and neurons to reduce the number of model parameters; Quantization: Converts several floating-point weights into preset integer values, reducing computational load and memory usage; Knowledge distillation: Using soft labels from teacher models to guide the training of lightweight student models while preserving accuracy; The output semantic defect feature maps are batch-input into a lightweight convolutional neural network, enabling multi-threaded parallel inference mode to process defect candidate regions from multiple images simultaneously. The network outputs a defect probability value for each candidate region, filtering out regions with probabilities higher than the defect judgment confidence threshold as suspected defects. By comparing the defect sample size in the knowledge graph, small-sample defect scenarios are identified. Combined with printing process parameters, virtual defect samples are generated through a defect simulation algorithm. Suspected defect regions are detected using a multi-label classification network, which supports the simultaneous identification of multiple superimposed defects. For each detected defect, a corresponding confidence value is output. By integrating all defect type, location, and confidence information, a structured defect detection result is generated.
[0009] In a preferred embodiment, in step S4, defect detection results of offline printed images of the same batch or across batches are collected, including defect type, location, confidence level and unique identification information of the corresponding printed matter, a batch defect database is established, the production process parameters corresponding to the batch are associated, and multi-dimensional statistical reports are automatically generated based on the batch defect database, including: defect type distribution report, defect location pattern report and batch pass rate report. Defect Type Distribution Report: Statistics on the frequency and percentage of each defect type to pinpoint core quality issues; Defect Location Pattern Report: Analyzes the distribution characteristics of defects on the printing surface and identifies systematic deviations in equipment and processes; Batch pass rate report: Calculates the defect rate and pass rate of each batch to generate a quality trend analysis curve; By using data mining algorithms, the system analyzes the correlation between defect types and production process parameters. For suspected defects with a confidence level lower than the defect judgment confidence threshold in the detection results, as well as newly identified defect types, the system automatically triggers a manual annotation process. The annotation interface supports defect type confirmation, location selection, and filling in remarks, and associates them with the corresponding printing process parameters.
[0010] In a preferred embodiment, in S1, the inherent printing texture features of dot density, line spacing, and edge direction within each grid are extracted, specifically: dot density extraction, line spacing extraction, and edge direction extraction. Dot density extraction: Traverse the pixels in a single grid row by row and column by column to identify the pixel features of the printed dots, count the number of effective dots in the grid, and then combine the actual size of the grid to calculate the number of dots per unit area, which is the dot density of the grid. Line spacing extraction: First, identify the pixel contours of the printed lines within the grid, mark the core contour lines of two adjacent lines, calculate the pixel distance between the contour lines, and take the average value of the spacing between all adjacent lines within the grid as the line spacing of the grid. Edge direction extraction: Perform edge detection on the pixels within the grid, identify all pixels at the texture edges, count the extension direction of each edge, and determine the edge direction with the highest proportion as the core edge direction of the grid. If it is an irregular texture, mark it as having no fixed direction.
[0011] In a preferred embodiment, in step S1, constructing a pixel-level dynamic compensation model specifically involves: dividing the entire printed image into a normal illumination area and several independent uneven illumination sub-regions based on the identified and output coordinates of the uneven illumination areas; uniquely identifying each uneven illumination sub-region to ensure the targeted nature of pixel compensation; matching each uneven illumination sub-region with a predefined substrate and process illumination compensation parameter library; assigning corresponding illumination compensation benchmark values to different sub-regions; establishing a one-to-one mapping rule between the grayscale deviation value and the compensation amount for each pixel within the region, based on the average grayscale deviation value of each uneven illumination sub-region; the larger the pixel's own grayscale deviation, the more closely the matched compensation amount matches the substrate and process compensation benchmark, realizing the dynamic change of the compensation amount with the pixel deviation; setting a constraint rule of zero compensation amount for the normal illumination area to preserve the original grayscale features of the image; integrating the pixel mapping rules of all uneven illumination sub-regions and the compensation constraints of the normal illumination area to form a pixel-level dynamic compensation model covering the entire region; the model can directly call the coordinates and grayscale deviation value of each pixel and automatically output the corresponding grayscale adjustment amount for that pixel.
[0012] In a preferred embodiment, in step S2, the qualitative descriptions in the knowledge graph are transformed into quantifiable feature constraints. Specifically, the qualitative descriptions of the formation mechanism, spatial distribution, and pixel grayscale of various defects in the knowledge graph are decomposed into core determinable feature dimensions such as grayscale difference, shape, spatial distribution, and edge features. Machine-calcifiable quantitative indicators are defined for each dimension. Combining printing process characteristics, industry quality standards, and graph case samples, the threshold range for defect judgment is calibrated for each quantitative indicator, clarifying the quantitative boundary between normal features and defect features. For each type of defect, all its quantitative indicators and corresponding ranges are combined through logical association rules to form a set of exclusive feature constraint rules for that type of defect. All defect rule sets are integrated to construct a quantitative feature constraint library associated with the process and substrate scenario, which is transformed into numerical comparison and condition judgment logic that can be directly called by the machine, thus completing the transformation from qualitative to quantitative.
[0013] In a preferred embodiment, in step S4, establishing a batch defect database specifically involves: constructing a core data table, setting the batch number and the unique identifier of the printed product as global associated primary keys, and establishing three core tables: a basic information table for printed products, a defect detection information table, and a production process parameter table, to achieve multi-table linkage and matching, and classifying and entering the collected information according to the tables: Basic Information Table: Contains the unique identifier of the printed matter, batch number, and substrate type; Defect Detection Information Table: Stores the defect type, location, and confidence level of each printed item, and associates it with the corresponding printed item through a unique identifier; Production process parameter table: stores batch-level printing width, dot density, ink type and printing pressure parameters, which are linked to the corresponding batch through batch number; Based on the primary key setting automatic association logic, the defect data of a single printed product is bound to its basic information through a unique identifier. The basic information and defect data of all printed products in the same batch are uniformly bound to the corresponding production process parameters through the batch number, realizing the full-domain data association of single products, batches and process parameters. The format and integrity of the data entering the database are checked, the naming of defect types, the format of location coordinates and the confidence level range are unified, invalid data is removed, and the standardization and statisticalness of the data in the database are guaranteed, thus completing the establishment of the batch defect database.
[0014] This invention also provides a printing defect identification system for offline image analysis, comprising: A dedicated image preprocessing module for printed materials: adaptive noise reduction of printing texture, identification of uneven lighting areas in the image, construction of a pixel-level dynamic compensation model based on the type of printing substrate, and super-resolution reconstruction of low-resolution images; The semantic feature extraction module integrates printing process knowledge: it loads a pre-built industry knowledge graph of printing defects, extracts multi-scale features of process perception, and separates the background features of patterns, text, and background color of printed materials from defect features through semantic segmentation algorithms. Lightweight and high-precision defect detection and classification module: It calls a lightweight convolutional neural network optimized by pruning, quantization and knowledge distillation to perform parallel reasoning on defect candidate regions. It combines defect simulation generation technology based on printing process for data augmentation to improve the classification accuracy of small sample defects. For printed materials with multiple defects superimposed, it uses a multi-label classification network for detection. Offline dedicated quality analysis module: performs statistical analysis and source tracing of printing batch quality, and marks defects.
[0015] The beneficial effects of this invention are as follows: Traditional defect identification relies solely on shallow visual features such as pixel grayscale and edges, which easily leads to misjudgment of easily confused defects. This method integrates printing process rules and defect formation mechanisms into feature extraction. Through the dual-dimensional fusion of visual features and industry knowledge, it solves the identification confusion problem of traditional methods, improving the accuracy of defect classification. Printing defects exhibit significant scale differences at the micrometer and centimeter levels. Traditional methods often require separate model design for defects of different scales, resulting in poor flexibility. This method, through a process-aware multi-scale feature fusion module, dynamically adjusts the scale window of feature extraction based on process parameters such as printing area and dot density, enabling it to capture defects at micrometer and centimeter scales. It can identify fine defects at the micrometer level and macroscopic defects at the centimeter level, achieving full coverage of defects at different scales and avoiding missed or false detections due to scale mismatch. Addressing the pain point of limited sample sizes for rare defects in the printing industry, it combines transfer learning and process-driven defect simulation generation technology. By expanding the sample library through data augmentation, it achieves high-precision classification in small-sample scenarios, solving the problem of missed detection of rare defects in offline inspection and improving the completeness of defect identification. It supports manual annotation and automatic integration of new defects into the training set, solving the pain point of needing to retrain the model after process updates and product redesigns. This enables self-optimization of the defect identification model, significantly reducing manual maintenance costs and improving the long-term adaptability of the model. Attached Figure Description
[0016] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0019] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0020] like Figure 1 This embodiment provides a method for identifying printing defects using offline image analysis, comprising the following steps: S1: Printing-specific image preprocessing: Adaptive algorithms are used to denoise the printing texture, identify uneven lighting areas in the image, combine the type of printing substrate to construct a dynamic compensation model, and perform super-resolution reconstruction on low-resolution images; S2: Semantic feature extraction integrating printing process knowledge: Load a pre-built industry knowledge graph of printing defects, extract multi-scale image features of process-aware printing processes, and separate the background features of patterns, text, and background color of printed materials from defect features through semantic segmentation algorithms. S3: Lightweight and high-precision defect detection and classification: It calls a lightweight convolutional neural network optimized by pruning, quantization and knowledge distillation to perform parallel reasoning on defect candidate regions. It combines data augmentation with defect simulation generation technology based on printing process to improve the classification accuracy of small sample defects. For printed materials with multiple defects superimposed, it uses a multi-label classification network for detection. S4: Offline Dedicated Quality Analysis: Performs statistical analysis and source tracing of the quality of printing batches, and marks defects.
[0021] In S1, the input offline printing image is segmented into a grid, and the inherent printing texture features of dot density, line spacing and edge direction in each grid are extracted. Based on these features, a printing texture mask is constructed to mark the normal printing texture area and the suspected defect area in the image. For the suspected defect area, an adaptive median filter is used for targeted noise reduction to preserve the edge and detail features of the defect. For the normal printing texture area, only slight smoothing is performed. By using global grayscale histogram analysis and local variance calculation, the system automatically identifies uneven areas of light and dark in an image caused by differences in scanning angle and light source intensity. It outputs the location coordinates and grayscale deviation values of the uneven lighting areas, imports the substrate type and printing process information of the printed matter, matches the predefined substrate and process lighting compensation parameter library, obtains the lighting compensation benchmark value in this scene, and combines the grayscale deviation value of the uneven lighting areas with the substrate and process compensation benchmark to construct a pixel-level dynamic compensation model. This model dynamically adjusts the grayscale value of each pixel in the image to eliminate the false defect interference caused by uneven lighting. If the resolution of the input image is lower than the preset minimum resolution threshold for defect recognition, the super-resolution reconstruction process is triggered. A lightweight generative super-resolution network optimized for printed images is used to reconstruct the low-resolution image. Printed texture constraints are introduced during the reconstruction process. The sharpness of the super-resolution image is evaluated. If the resolution requirements for defect recognition are met, the subsequent feature extraction stage is entered. Otherwise, the super-resolution parameters are readjusted and the image is reconstructed again. Specifically, if the resolution is lower than the preset minimum resolution threshold for defect identification, the following steps are taken: extract the actual resolution parameters of the input offline printed image, obtain the correspondence between the image's pixel size and physical size, compare the actual resolution threshold numerically, and if the actual resolution value is lower than the preset threshold, it is determined that the clarity requirement for defect identification is not met, triggering the super-resolution reconstruction process. If the actual resolution is not lower than the threshold, the super-resolution reconstruction is skipped, and the subsequent feature extraction stage is entered.
[0022] In step S2, a pre-constructed knowledge graph of the printing defect industry is loaded. This knowledge graph contains typical defect information under different printing processes and substrates. It covers the formation mechanism, spatial distribution pattern, pixel grayscale features, and typical case samples of defects. The qualitative descriptions in the knowledge graph are transformed into quantifiable feature constraints. The process parameters of the current printed product are input, including the printing size, dot density, and ink type. Based on the process parameters, the defect scale distribution pattern under the corresponding scenario is matched from the knowledge graph. Based on the defect scale distribution pattern, the scale window size of the feature extraction is dynamically adjusted to generate a multi-scale feature extraction template. Multi-scale convolution operations are performed on the image to extract visual features of texture, edge, and grayscale at different scales. Combined with the feature constraints of the knowledge graph, the multi-scale features are filtered and fused, retaining effective features strongly correlated with defects and removing redundant background features. Among them, the screening and fusion of multi-scale features specifically includes: multi-scale feature screening and multi-scale feature fusion. Multi-scale feature screening: The printing defect quantification feature constraint library that has been converted in the previous stage is retrieved. The printing defect quantification feature constraint library is accurately matched with the current printing process and substrate scene. The texture, edge and grayscale visual features extracted by multi-scale convolution operation are matched with the defect type according to the feature type. Each feature is checked to see if it meets the corresponding threshold rules in the constraint library. Valid features that meet the feature constraints and are strongly correlated with defects are retained, and redundant background features that do not meet the constraints are directly removed to complete the initial feature screening. Multi-scale feature fusion: After screening, the effective features are classified according to the feature extraction scale. Features of different scales of the same defect type are grouped together. Feature weights are assigned to the multi-scale features within each group. Based on the distribution law of defect scales, higher weights are assigned to the features of the corresponding main defect scale. The effective features of different scales and weights are integrated across the entire domain using a feature splicing method to generate a unified defect feature set after fusion. The fused feature set is normalized to eliminate the dimensional differences of features at different scales, ensuring the consistency and computability of features, and forming the final fused features that can be used for subsequent defect detection. Load a semantic segmentation model optimized for printed materials. The semantic segmentation model has been trained using background samples of printed patterns, text, and background colors. Perform semantic segmentation on the preprocessed image, automatically identify and mark the background regions of the pattern, text, and background regions of the printed material, and output a mask image of the background region. Clearly distinguish between the background and potential defect regions. Perform pixel-by-pixel operations on the multi-scale feature map and the background mask, remove the features corresponding to the background region, and retain only the features of the potential defect region. Normalize the purified defect features to generate the final semantic defect feature map. Specifically, the process involves loading a semantic segmentation model optimized for printed materials. This includes selecting images of printed materials corresponding to typical substrates and processes in the printing industry, marking three types of background areas: patterns, text, and background color. A dedicated training set for printed material backgrounds is then constructed. A lightweight optimization of the classic semantic segmentation network for printing scenarios is performed, redundant computation modules are removed, and the texture and color features of printed images are adapted. The optimized network is iteratively trained using the training set to enhance the model's ability to recognize printed material background areas and weaken the feature responses of non-printed backgrounds. After training, the model's recognition accuracy is verified using a printed material test set, and the model parameters are adjusted to meet the requirements for printed background segmentation, thus completing the model construction. Model input and output: Input: Offline printed image after preprocessing specific to print materials; Output: Masked image of the background area of the printed material.
[0023] In step S3, a pre-trained lightweight convolutional neural network is invoked. This convolutional neural network has been optimized through pruning, quantization, and knowledge distillation. Pruning: Remove redundant convolutional kernels and neurons to reduce the number of model parameters; Quantization: Converts several floating-point weights into preset integer values, reducing computational load and memory usage; Knowledge distillation: Using soft labels from teacher models to guide the training of lightweight student models while preserving accuracy; Specifically, the system calls a pre-trained lightweight convolutional neural network. According to the task requirements of printing defect detection, the system retrieves a pre-trained lightweight convolutional neural network from the model library that matches the current printing process and substrate scenario. The model has completed the entire process of pruning, quantization, and knowledge distillation optimization and verified its accuracy. The retrieved model is initialized and loaded, and the network parameters and inference configuration are automatically adapted to match the computing power allocation rules of the current hardware environment to prepare for batch parallel inference. The data flow interface between the model and the preceding steps is established to realize the standardized input of semantic defect feature maps, ensuring that the format and dimension of the input data are completely matched with the model input requirements, without any additional manual preprocessing operations. The training of the lightweight student model is guided by the soft labels of the teacher model. Specifically, the model is fully trained based on a large number of printing defect samples. The accuracy of the recognition and classification of printing defects is much higher than that of the lightweight student model to be trained. It can output the feature judgment results of defects. The model is specifically optimized for the dot, texture and color features of printed materials. It can accurately capture the subtle features of printing defects and meet the defect detection task requirements of this method. During inference, it can not only output hard labels of whether it is a certain type of defect, but also output the probability distribution values of each defect type, which contains richer defect feature judgment information and conveys accurate feature learning rules to the student model. The output semantic defect feature maps are batch-input into a lightweight convolutional neural network, enabling multi-threaded parallel inference mode to process defect candidate regions from multiple images simultaneously. The network outputs a defect probability value for each candidate region, filtering out regions with probabilities higher than the defect judgment confidence threshold as suspected defects. By comparing the defect sample size in the knowledge graph, small sample scenarios of defects are identified. Combined with printing process parameters, virtual defect samples are generated through a defect simulation algorithm. Suspected defect regions are detected through a multi-label classification network, which supports the simultaneous identification of multiple superimposed defects. For each detected defect, a corresponding confidence value is output. By integrating all defect type, location, and confidence information, a structured defect detection result is generated. Specifically, virtual defect samples are generated through a defect simulation algorithm. This involves: based on the identified small sample defect types, retrieving the corresponding printing process parameters and the formation mechanism and pixel grayscale distribution characteristics of the defect from the knowledge graph; using the background features of a normal printed image as a base, simulating the generation logic of the defect in actual production; superimposing defect features onto the base image; adjusting the defect scale, grayscale deviation, and spatial position according to process parameters to match the actual morphological pattern of the defect; optimizing the details of the generated initial virtual defects; adding inherent texture constraints of printed materials to avoid false features and ensure the consistency of features between virtual defects and actual printing defects; and generating batches of small sample virtual defects of this type with different process parameter variations and different forms to supplement the defect sample set, providing sufficient sample support for subsequent multi-label classification network detection.
[0024] In step S4, defect detection results of offline printed images in the same batch or across batches are collected, including defect type, location, confidence level and unique identification information of the corresponding printed matter, a batch defect database is established, the production process parameters corresponding to the batch are associated, and multi-dimensional statistical reports are automatically generated based on the batch defect database, including: defect type distribution report, defect location pattern report and batch pass rate report. Defect Type Distribution Report: Statistics on the frequency and percentage of each defect type to pinpoint core quality issues; Defect Location Pattern Report: Analyzes the distribution characteristics of defects on the printing surface and identifies systematic deviations in equipment and processes; Batch pass rate report: Calculates the defect rate and pass rate of each batch to generate a quality trend analysis curve; By using data mining algorithms, the system analyzes the correlation between defect types and production process parameters. For suspected defects with a confidence level lower than the defect judgment confidence threshold in the detection results, as well as newly identified defect types, the system automatically triggers a manual annotation process. The annotation interface supports defect type confirmation, location selection, and filling in remarks, and associates them with the corresponding printing process parameters. Specifically, the process of forming a quality trend analysis curve involves: extracting the defect rate data of the target batch from the batch defect database, and associating it with the production time and process parameter dimensional information of the corresponding batch. A two-dimensional coordinate system is constructed with production time as the horizontal axis and defect rate as the vertical axis. The defect rate values of each batch are mapped to the coordinate system in chronological order to form discrete data points. Linear interpolation or smoothing fitting algorithms are used to connect the discrete data points into a continuous curve, which intuitively presents the trend of defect rate change over time. The curve is then labeled with a trend and associated with changes in process parameters to form a traceable quality trend analysis curve. The analysis of the correlation between defect types and production process parameters involves: extracting two types of data: process parameters and defect types, associating them with timestamps, unifying parameter units, encoding defect types, eliminating invalid data, determining the correspondence between single parameter combinations and defects, judging the correlation strength, connecting the correlation patterns to the manual annotation interface, and matching parameters to assist in defect confirmation.
[0025] In S1, the dot density, line spacing, and inherent printing texture features in the edge direction of each grid are extracted, specifically: dot density extraction, line spacing extraction, and edge direction extraction. Dot density extraction: Traverse the pixels in a single grid row by row and column by column to identify the pixel features of the printed dots, count the number of effective dots in the grid, and then combine the actual size of the grid to calculate the number of dots per unit area, which is the dot density of the grid. Line spacing extraction: First, identify the pixel contours of the printed lines within the grid, mark the core contour lines of two adjacent lines, calculate the pixel distance between the contour lines, and take the average value of the spacing between all adjacent lines within the grid as the line spacing of the grid. Edge direction extraction: Perform edge detection on the pixels within the grid, identify all pixels at the texture edges, count the extension direction of each edge, and determine the edge direction with the highest proportion as the core edge direction of the grid. If it is an irregular texture, mark it as having no fixed direction.
[0026] In step S1, a pixel-level dynamic compensation model is constructed as follows: Based on the identified and output coordinates of the uneven illumination areas, the entire printed image is divided into a normal illumination area and several independent uneven illumination sub-regions. Each uneven illumination sub-region is uniquely identified to ensure the targeted nature of pixel compensation. Each uneven illumination sub-region, along with a predefined substrate and process illumination compensation parameter library, is matched to assign corresponding illumination compensation benchmark values to different sub-regions. Based on the average grayscale deviation value of each uneven illumination sub-region, a one-to-one mapping rule between the grayscale deviation value and the compensation amount is established for each pixel within the region. The larger the grayscale deviation of the pixel itself, the more closely the matched compensation amount matches the substrate and process compensation benchmark, realizing the dynamic change of the compensation amount with the pixel deviation. For the normal illumination area, a constraint rule of zero compensation amount is set to preserve the original grayscale features of the image. The pixel mapping rules of all uneven illumination sub-regions and the compensation constraints of the normal illumination area are integrated to form a pixel-level dynamic compensation model with full coverage. The model can directly call the coordinates and grayscale deviation value of each pixel and automatically output the corresponding grayscale adjustment amount.
[0027] In step S2, the qualitative descriptions in the knowledge graph are transformed into quantifiable feature constraints. Specifically, the qualitative descriptions of the formation mechanism, spatial distribution, and pixel grayscale of various defects in the knowledge graph are broken down into core determinable feature dimensions such as grayscale difference, shape, spatial distribution, and edge features. Machine-calcifiable quantitative indicators are defined for each dimension. Combining printing process characteristics, industry quality standards, and graph case samples, the threshold range for defect judgment is calibrated for each quantitative indicator, clarifying the quantitative boundary between normal features and defect features. For each type of defect, all its quantitative indicators and corresponding ranges are combined through logical association rules to form a set of exclusive feature constraint rules for that type of defect. All defect rule sets are integrated to construct a quantitative feature constraint library associated with the process and substrate scenario, which is transformed into numerical comparison and condition judgment logic that can be directly called by the machine, completing the transformation from qualitative to quantitative.
[0028] In step S4, a batch defect database is established, specifically by constructing a core data table, setting the batch number and the unique identifier of the printed product as the global associated primary key, and setting up three core tables: a basic information table for printed products, a defect detection information table, and a production process parameter table. This enables multi-table linkage and matching, and the collected information is categorized and entered into the database according to the tables. Basic Information Table: Contains the unique identifier of the printed matter, batch number, and substrate type; Defect Detection Information Table: Stores the defect type, location, and confidence level of each printed item, and associates it with the corresponding printed item through a unique identifier; Production process parameter table: stores batch-level printing width, dot density, ink type and printing pressure parameters, which are linked to the corresponding batch through batch number; Based on the primary key setting automatic association logic, the defect data of a single printed product is bound to its basic information through a unique identifier. The basic information and defect data of all printed products in the same batch are uniformly bound to the corresponding production process parameters through the batch number, realizing the full-domain data association of single products, batches and process parameters. The format and integrity of the data entering the database are checked, the naming of defect types, the format of location coordinates and the confidence level range are unified, invalid data is removed, and the standardization and statisticalness of the data in the database are guaranteed, thus completing the establishment of the batch defect database.
[0029] This invention also provides a printing defect identification system for offline image analysis, comprising: A dedicated image preprocessing module for printed materials: adaptive noise reduction of printing texture, identification of uneven lighting areas in the image, construction of a pixel-level dynamic compensation model based on the type of printing substrate, and super-resolution reconstruction of low-resolution images; The semantic feature extraction module integrates printing process knowledge: it loads a pre-built industry knowledge graph of printing defects, extracts multi-scale features of process perception, and separates the background features of patterns, text, and background color of printed materials from defect features through semantic segmentation algorithms. Lightweight and high-precision defect detection and classification module: It calls a lightweight convolutional neural network optimized by pruning, quantization and knowledge distillation to perform parallel reasoning on defect candidate regions. It combines defect simulation generation technology based on printing process for data augmentation to improve the classification accuracy of small sample defects. For printed materials with multiple defects superimposed, it uses a multi-label classification network for detection. Offline dedicated quality analysis module: performs statistical analysis and source tracing of printing batch quality, and marks defects.
[0030] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0031] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0032] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0033] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0034] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0035] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0036] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for identifying printing defects in offline image analysis, characterized in that, Includes the following steps: S1: Printing-specific image preprocessing: Adaptive algorithms are used to denoise the printing texture, identify uneven lighting areas in the image, combine the type of printing substrate to construct a dynamic compensation model, and perform super-resolution reconstruction on low-resolution images; S2: Semantic feature extraction integrating printing process knowledge: Load a pre-built industry knowledge graph of printing defects, extract multi-scale image features of process-aware printing processes, and separate the background features of patterns, text, and background color of printed materials from defect features through semantic segmentation algorithms. S3: Lightweight and high-precision defect detection and classification: It calls a lightweight convolutional neural network optimized by pruning, quantization and knowledge distillation to perform parallel reasoning on defect candidate regions. It combines data augmentation with defect simulation generation technology based on printing process to improve the classification accuracy of small sample defects. For printed materials with multiple defects superimposed, it uses a multi-label classification network for detection. S4: Offline Dedicated Quality Analysis: Performs statistical analysis and source tracing of the quality of printing batches, and marks defects.
2. The printing defect identification method for offline image analysis according to claim 1, characterized in that, In S1, the input offline printing image is segmented into a grid, and the inherent printing texture features of dot density, line spacing and edge direction in each grid are extracted. Based on these features, a printing texture mask is constructed to mark the normal printing texture area and the suspected defect area in the image. For the suspected defect area, an adaptive median filter is used for targeted noise reduction to preserve the edge and detail features of the defect. For the normal printing texture area, only slight smoothing is performed. By using global grayscale histogram analysis and local variance calculation, the system automatically identifies uneven areas of light and dark in an image caused by differences in scanning angle and light source intensity. It outputs the location coordinates and grayscale deviation values of the uneven lighting areas, imports the substrate type and printing process information of the printed matter, matches the predefined substrate and process lighting compensation parameter library, obtains the lighting compensation benchmark value in this scene, and combines the grayscale deviation value of the uneven lighting areas with the substrate and process compensation benchmark to construct a pixel-level dynamic compensation model. This model dynamically adjusts the grayscale value of each pixel in the image to eliminate the false defect interference caused by uneven lighting. If the resolution of the input image is lower than the preset minimum resolution threshold for defect identification, the super-resolution reconstruction process is triggered. A lightweight generative super-resolution network optimized for printed images is used to reconstruct the low-resolution image. Printed texture constraints are introduced during the reconstruction process. The sharpness of the super-resolution image is evaluated. If the resolution requirements for defect identification are met, the subsequent feature extraction stage is entered. Otherwise, the super-resolution parameters are readjusted and reconstruction is performed again.
3. The printing defect identification method for offline image analysis according to claim 1, characterized in that, In step S2, a pre-constructed knowledge graph of the printing defect industry is loaded. This knowledge graph contains typical defect information under different printing processes and substrates. It covers the formation mechanism, spatial distribution pattern, pixel grayscale features, and typical case samples of defects. The qualitative descriptions in the knowledge graph are transformed into quantifiable feature constraints. The process parameters of the current printed product are input, including the printing size, dot density, and ink type. Based on the process parameters, the defect scale distribution pattern under the corresponding scenario is matched from the knowledge graph. Based on the defect scale distribution pattern, the scale window size of the feature extraction is dynamically adjusted to generate a multi-scale feature extraction template. Multi-scale convolution operations are performed on the image to extract visual features of texture, edge, and grayscale at different scales. Combined with the feature constraints of the knowledge graph, the multi-scale features are filtered and fused, retaining effective features strongly correlated with defects and removing redundant background features. A semantic segmentation model optimized for printed materials is loaded. The semantic segmentation model has been trained using background samples of printed patterns, text, and background colors. Semantic segmentation is performed on the preprocessed image to automatically identify and mark the background regions of the printed pattern regions, text regions, and background color regions. The mask image of the background region is output to clearly distinguish the background from potential defect regions. The multi-scale feature map and the background mask are processed pixel by pixel to remove the features corresponding to the background regions and retain only the features of the potential defect regions. The purified defect features are normalized to generate the final semantic defect feature map.
4. The printing defect identification method for offline image analysis according to claim 1, characterized in that, In step S3, a pre-trained lightweight convolutional neural network is invoked. This convolutional neural network has been optimized through pruning, quantization, and knowledge distillation. Pruning: Remove redundant convolutional kernels and neurons to reduce the number of model parameters; Quantization: Converts several floating-point weights into preset integer values, reducing computational load and memory usage; Knowledge distillation: Using soft labels from teacher models to guide the training of lightweight student models while preserving accuracy; The output semantic defect feature maps are batch-input into a lightweight convolutional neural network, enabling multi-threaded parallel inference mode to process defect candidate regions from multiple images simultaneously. The network outputs a defect probability value for each candidate region, filtering out regions with probabilities higher than the defect judgment confidence threshold as suspected defects. By comparing the defect sample size in the knowledge graph, small-sample defect scenarios are identified. Combined with printing process parameters, virtual defect samples are generated through a defect simulation algorithm. Suspected defect regions are detected using a multi-label classification network, which supports the simultaneous identification of multiple superimposed defects. For each detected defect, a corresponding confidence value is output. By integrating all defect type, location, and confidence information, a structured defect detection result is generated.
5. A printing defect identification method for offline image analysis according to claim 1, characterized in that, In step S4, defect detection results of offline printed images in the same batch or across batches are collected, including defect type, location, confidence level and unique identification information of the corresponding printed matter, a batch defect database is established, the production process parameters corresponding to the batch are associated, and multi-dimensional statistical reports are automatically generated based on the batch defect database, including: defect type distribution report, defect location pattern report and batch pass rate report. Defect Type Distribution Report: Statistics on the frequency and percentage of each defect type to pinpoint core quality issues; Defect Location Pattern Report: Analyzes the distribution characteristics of defects on the printing surface and identifies systematic deviations in equipment and processes; Batch pass rate report: Calculates the defect rate and pass rate of each batch to generate a quality trend analysis curve; By using data mining algorithms, the system analyzes the correlation between defect types and production process parameters. For suspected defects with a confidence level lower than the defect judgment confidence threshold in the detection results, as well as newly identified defect types, the system automatically triggers a manual annotation process. The annotation interface supports defect type confirmation, location selection, and filling in remarks, and associates them with the corresponding printing process parameters.
6. The printing defect identification method for offline image analysis according to claim 1, characterized in that, In S1, the dot density, line spacing, and inherent printing texture features in the edge direction of each grid are extracted, specifically: dot density extraction, line spacing extraction, and edge direction extraction. Dot density extraction: Traverse the pixels in a single grid row by row and column by column to identify the pixel features of the printed dots, count the number of effective dots in the grid, and then combine the actual size of the grid to calculate the number of dots per unit area, which is the dot density of the grid. Line spacing extraction: First, identify the pixel contours of the printed lines within the grid, mark the core contour lines of two adjacent lines, calculate the pixel distance between the contour lines, and take the average value of the spacing between all adjacent lines within the grid as the line spacing of the grid. Edge direction extraction: Perform edge detection on the pixels within the grid, identify all pixels at the texture edges, count the extension direction of each edge, and determine the edge direction with the highest proportion as the core edge direction of the grid. If it is an irregular texture, mark it as having no fixed direction.
7. The printing defect identification method for offline image analysis according to claim 1, characterized in that, In step S1, a pixel-level dynamic compensation model is constructed as follows: Based on the identified and output coordinates of the uneven illumination areas, the entire printed image is divided into a normal illumination area and several independent uneven illumination sub-regions. Each uneven illumination sub-region is uniquely identified to ensure the targeted nature of pixel compensation. Each uneven illumination sub-region, along with a predefined substrate and process illumination compensation parameter library, is matched to assign corresponding illumination compensation benchmark values to different sub-regions. Based on the average grayscale deviation value of each uneven illumination sub-region, a one-to-one mapping rule between the grayscale deviation value and the compensation amount is established for each pixel within the region. The larger the grayscale deviation of the pixel itself, the more closely the matched compensation amount matches the substrate and process compensation benchmark, realizing the dynamic change of the compensation amount with the pixel deviation. For the normal illumination area, a constraint rule of zero compensation amount is set to preserve the original grayscale features of the image. The pixel mapping rules of all uneven illumination sub-regions and the compensation constraints of the normal illumination area are integrated to form a pixel-level dynamic compensation model with full coverage. The model can directly call the coordinates and grayscale deviation value of each pixel and automatically output the corresponding grayscale adjustment amount.
8. A method for identifying printing defects in offline image analysis according to claim 1, characterized in that, In step S2, the qualitative descriptions in the knowledge graph are transformed into quantifiable feature constraints. Specifically, the qualitative descriptions of the formation mechanism, spatial distribution, and pixel grayscale of various defects in the knowledge graph are broken down into core determinable feature dimensions such as grayscale difference, shape, spatial distribution, and edge features. Machine-calcifiable quantitative indicators are defined for each dimension. Combining printing process characteristics, industry quality standards, and graph case samples, the threshold range for defect judgment is calibrated for each quantitative indicator, clarifying the quantitative boundary between normal features and defect features. For each type of defect, all its quantitative indicators and corresponding ranges are combined through logical association rules to form a set of exclusive feature constraint rules for that type of defect. All defect rule sets are integrated to construct a quantitative feature constraint library associated with the process and substrate scenario, which is transformed into numerical comparison and condition judgment logic that can be directly called by the machine, completing the transformation from qualitative to quantitative.
9. A method for identifying printing defects in offline image analysis according to claim 1, characterized in that, In step S4, a batch defect database is established, specifically by constructing a core data table, setting the batch number and the unique identifier of the printed product as the global associated primary key, and setting up three core tables: a basic information table for printed products, a defect detection information table, and a production process parameter table. This enables multi-table linkage and matching, and the collected information is categorized and entered into the database according to the tables. Base Information sheet: Contains the unique identifier of the printed matter, batch number, and substrate type; Defect Detection Information Table: Stores the defect type, location, and confidence level of each printed item, and associates it with the corresponding printed item through a unique identifier; Production process parameter table: stores batch-level printing width, dot density, ink type and printing pressure parameters, which are linked to the corresponding batch through batch number; Based on the primary key setting automatic association logic, the defect data of a single printed product is bound to its basic information through a unique identifier. The basic information and defect data of all printed products in the same batch are uniformly bound to the corresponding production process parameters through the batch number, realizing the full-domain data association of single products, batches and process parameters. The format and integrity of the data entering the database are checked, the naming of defect types, the format of location coordinates and the confidence level range are unified, invalid data is removed, and the standardization and statisticalness of the data in the database are guaranteed, thus completing the establishment of the batch defect database.
10. A printing defect identification system for offline image analysis, applied to the printing defect identification method for offline image analysis as described in any one of claims 1-9, characterized in that, include: A dedicated image preprocessing module for printed materials: adaptive noise reduction of printing texture, identification of uneven lighting areas in the image, construction of a pixel-level dynamic compensation model based on the type of printing substrate, and super-resolution reconstruction of low-resolution images; The semantic feature extraction module integrates printing process knowledge: it loads a pre-built industry knowledge graph of printing defects, extracts multi-scale features of process perception, and separates the background features of patterns, text, and background color of printed materials from defect features through semantic segmentation algorithms. Lightweight and high-precision defect detection and classification module: It calls a lightweight convolutional neural network optimized by pruning, quantization and knowledge distillation to perform parallel reasoning on defect candidate regions. It combines defect simulation generation technology based on printing process for data augmentation to improve the classification accuracy of small sample defects. For printed materials with multiple defects superimposed, it uses a multi-label classification network for detection. Offline dedicated quality analysis module: performs statistical analysis and source tracing of printing batch quality, and marks defects.