Corrugated carton printing defect degree evaluation method and system
By detecting the flatness of corrugated cartons and extracting the printed image feature, combined with clustering and spectral analysis, the problems of low printing defect detection efficiency and poor accuracy in the existing technology are solved, and fast and accurate defect recognition and printing parameter adjustment are achieved, improving the The yield rate of corrugated cartons.
Patent Information
- Application Number
- CN202411201723.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-29
AI Technical Summary
The prior art has problems in the process of corrugated carton printing, with low detection efficiency and poor accuracy, especially low manual detection efficiency and insufficient generalization ability of image detection models, so it is impossible to effectively identify complex and changeable printing defects.
By detecting the flatness of corrugated cartons, screening the target detection object, and collecting printed images for feature extraction and clustering analysis, combining spectral analysis to determine the type and number of defects, adjusting the printing parameters using the defect analysis results, and dynamically adjusting the next Printing parameters.
It improves the efficiency and accuracy of printing defect detection, reduces the degree of defects in the next printing process, improves the yield rate of corrugated cartons, and does not require a large amount of data to quickly identify defect types.
Smart Images

Figure CN119169327A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of corrugated paper box defect detection, and in particular to a method and system for evaluating the degree of printing defects of corrugated paper boxes. Background Art
[0002] During the printing process of corrugated boxes, due to environmental factors or improper printing parameter settings, printing defects such as printing position deviation, uneven color, blurred handwriting, and large color difference are prone to occur. In order to ensure the product quality of corrugated boxes, it is necessary to perform defect detection on the printed patterns of corrugated boxes.
[0003] At present, commonly used defect detection methods include manual inspection and image inspection. Manual inspection mainly relies on the naked eye and manual experience to inspect the appearance of the carton to confirm whether there is a problem with the printed pattern. Image detection usually trains a defect recognition model, inputs the collected carton image into the model, and automatically identifies the defect type. However, relying on manual inspection is not only inefficient, but also has large errors in the detection results. Although image detection can improve detection accuracy to a certain extent compared to manual inspection, it requires the collection of a large amount of defect data to train the model in the early stage, and the generalization ability of the model is usually poor, so it is impossible to effectively identify complex and changeable printing defects. Summary of the invention
[0004] In order to solve at least one of the above-mentioned technical problems, the present invention provides a method and system for evaluating the degree of printing defects of corrugated paper boxes.
[0005] In a first aspect, the present invention provides a method for evaluating the degree of printing defects of corrugated paper boxes, the method comprising:
[0006] Detect the flatness of the corrugated paper boxes to be tested after printing, and select the corrugated paper boxes to be tested whose flatness meets the preset conditions as the target detection objects;
[0007] Collect the printed image of the target detection object, extract the features of the printed image, input the extracted target features into the X defect types in the clustering algorithm for clustering, and obtain the clustering results;
[0008] Determine the defect analysis result of the target feature according to the clustering result, including when the clustering result is X defect types, determine the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering result is more than X defect types, use spectral analysis to determine the defect type and the number of defect features of the target feature;
[0009] The defect analysis results and the number of target detection objects are used to calculate the printing defect degree of the corrugated box to be tested, and the next printing parameters of the corrugated box are adjusted according to the feedback of the printing defect degree.
[0010] Preferably, the method of detecting the flatness of the printed corrugated paper box to be tested includes:
[0011]
[0012] In the formula, F fl represents the flatness factor, α and β are constant coefficients, satisfying 0<α<0.01, 0<β<1; T and P represent the temperature and pressure during the printing process of corrugated paperboard, respectively, and W represents the moisture content of the corrugated paperboard; H and L represent the thickness and length of the corrugated paperboard, respectively; E and I represent the elastic modulus and structural moment of inertia of the corrugated paperboard, respectively, and e is the base of the natural logarithm.
[0013] Preferably, the method of calculating the printing defect degree of the corrugated box to be tested by using the defect analysis result, the number of target features and the number of target detection objects includes:
[0014]
[0015] In the formula, Q represents the degree of printing defects, M0 represents the number of target detection objects, and M represents the number of corrugated boxes to be tested. It represents the sum of the average distances of all pixels in the feature to their centroids, D i It represents the distance from the i-th sample point to its centroid, and there are N sample points in total; Var(C), Var(G), Var(B) represent the variance of color features, texture features, and edge features, respectively; Z represents the number of defect types obtained by clustering; γ1, γ2, and γ3 are weight factors, respectively.
[0016] Preferably, the step of adjusting the next printing parameters of the corrugated box according to the feedback of the printing defect degree includes:
[0017] A reinforcement learning algorithm is used to learn the degree of printing defects and historical printing parameters, train the adaptive adjustment model, and dynamically adjust the next printing parameters according to the adaptive adjustment model.
[0018] Preferably, the feature extraction of the printed image includes:
[0019] Preprocess the printed image, including converting the printed image to Lab color space, and performing image enhancement, median filtering and size unification;
[0020] Based on the preprocessed printed image, target features of the printed image are extracted, wherein the target features include color features, texture features and edge features.
[0021] Preferably, the step of inputting the extracted target features into the X defect types in the clustering algorithm for clustering to obtain clustering results includes:
[0022] The PCA algorithm is used to reduce the dimension of the extracted target features, and the random forest algorithm is used to fit the reduced target features. According to the fitted screening indicators, the feature quantity with the greatest correlation is screened out;
[0023] The K-means algorithm is used to cluster the selected features and generate clustering results.
[0024] In a second aspect, the present invention further provides a system for evaluating the degree of printing defects of corrugated paper boxes, the system comprising:
[0025] The target screening unit is used to detect the flatness of the corrugated paper boxes to be tested after printing, and screen out the corrugated paper boxes to be tested whose flatness meets the preset conditions as the target detection objects;
[0026] A clustering unit is used to collect a printed image of a target detection object, extract features from the printed image, input the extracted target features into the X defect types in the clustering algorithm for clustering, and obtain a clustering result;
[0027] A defect analysis unit, used to determine the defect analysis result of the target feature according to the clustering result, including when the clustering result is X defect types, determining the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering result is more than X defect types, using spectral analysis to determine the defect type and the number of defect features of the target feature;
[0028] The parameter adjustment unit is used to calculate the printing defect degree of the corrugated paper box to be tested by using the defect analysis results and the number of target detection objects, and adjust the next printing parameters of the corrugated paper box according to the feedback of the printing defect degree.
[0029] In a third aspect, the present invention further provides an electronic device comprising: a processor and a memory, wherein the memory is used to store computer program code, wherein the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in the first aspect above and any possible implementation thereof.
[0030] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the method as described in the first aspect above and any possible implementation thereof.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] 1) Before detecting printing defects, the present invention first detects the flatness of the corrugated cardboard boxes to be tested after printing, and selects the corrugated cardboard boxes to be tested whose flatness meets the preset conditions as the target detection objects. Since the flatness problem usually directly affects the printing results, it can be directly considered that there are printing defects for the cardboard boxes with flatness defects, which can greatly improve the detection efficiency. For the detection of flatness, instruments are usually used to scan the surface of the cardboard for detection. This method is not only costly but also inefficient. For this reason, when detecting flatness, the present invention mainly constructs a calculation model of the flatness factor based on the printing parameters and material property parameters. By inputting the printing parameters and the parameters of the material itself into the calculation model, the flatness size can be quickly predicted, which has the advantages of low cost, high efficiency and high prediction accuracy.
[0033] 2) After determining the target detection object, the present invention will collect the printed image of the target detection object, extract features from the printed image, input the extracted target features into the X types of defect types in the clustering algorithm for clustering, and obtain the clustering results; if the collected printed image is directly subjected to defect clustering, due to many interference factors, the accuracy of the clustering results will usually be affected. Therefore, the present invention will further extract the target features in the image, perform defect clustering through the target features, and improve the accuracy of the clustering results. When the clustering results are obtained, the defect analysis results of the target features are determined according to the clustering results, including when the clustering results are X types of defects, determining the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering results are greater than X types of defects, using spectral analysis to determine the defect type and the number of defect features of the target feature; compared to training defect recognition models with a large amount of data, the present invention uses a clustering algorithm without collecting a large amount of data labels to train the model, and can quickly determine the defect type, and spectral analysis will be used for unrecognizable defect types, further ensuring the accuracy of the defect detection results.
[0034] 3) After obtaining the defect analysis results, the present invention will use the defect analysis results and the number of target detection objects to calculate the printing defect degree of the corrugated paper box to be tested, and adjust the next printing parameters of the corrugated paper box according to the feedback of the printing defect degree. In this way, the defect degree of the next printing process can be reduced, which is conducive to improving the yield rate of paper box printing.
[0035] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0037] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0038] Figure 1 A schematic diagram of a process for evaluating the degree of printing defects of corrugated paper boxes provided by an embodiment of the present invention;
[0039] Figure 2 A structural schematic diagram of a corrugated box printing defect degree assessment system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0041] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0042] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0043] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0044] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0045] At present, the evaluation of corrugated box printing defects mostly adopts manual detection or defect model recognition. The former is inefficient, the latter has a high cost for model training, and the model generalization ability is poor. To this end, the present invention provides a method for evaluating the degree of corrugated box printing defects, which can quickly identify the defect type through a clustering algorithm, and takes into account the influence of flatness. After identifying the defect, the printing parameters of the next printing process will be fed back, thereby improving the yield rate.
[0046] See also Figure 1 , Figure 1 The present invention provides a flowchart of a method for evaluating the degree of printing defects of corrugated paper boxes. Figure 1 As shown, a method for evaluating the degree of printing defects of corrugated paper boxes comprises the following steps:
[0047] S10, detecting the flatness of the printed corrugated paper boxes to be tested, and selecting the corrugated paper boxes to be tested whose flatness meets the preset conditions as the target detection objects;
[0048] The flatness of the carton usually directly affects the printing quality. When the surface of the carton paperboard is uneven, there will usually be uneven contact between the paper and the printing plate during printing, which will reduce the overprint accuracy of the pattern during multi-color printing, and cause misalignment, ghosting or blurred color edges. In some scenarios, the unevenness of the carton surface may also cause ink scraping during the printing process, that is, after the ink accumulates on the protrusions of the cardboard, it is transferred to the adjacent printing area, causing contamination of the non-printing area. Therefore, before detecting the defects of the printed pattern, this embodiment first considers the influence of flatness, and will detect the flatness of the corrugated box to be tested after printing, and determine whether the flatness meets the preset conditions. Those that do not meet the conditions will be eliminated, and the remaining corrugated boxes to be tested that meet the conditions will be used as target detection objects. This is equivalent to the flatness not meeting the conditions being directly regarded as having printing defects, so that the detection efficiency of printing defects can be greatly improved.
[0049] At present, when detecting the flatness of cartons, corresponding detection instruments are usually used. For example, flatness testers, thickness measuring instruments, etc., when using instruments for detection, manual handheld instruments are required to detect the flatness of cartons one by one. This method requires manual scanning and detection of all areas of the carton. Once certain positions are missed, the detection results cannot be guaranteed. In addition, this method requires a lot of manpower and material resources, and there are problems of high cost and low efficiency. Faced with the scenario of detecting a large number of cartons in this embodiment, this method is obviously not applicable. In order to take into account both the efficiency and accuracy of flatness detection, the present invention considers constructing a calculation model of the flatness factor based on printing parameters and material parameters itself, and characterizing the flatness of the carton through the flatness factor.
[0050] In one embodiment, the method of detecting the flatness of the printed corrugated paper box to be tested includes:
[0051]
[0052] In the formula, F fl represents the flatness factor, α and β are constant coefficients, satisfying 0<α<0.01, 0<β<1; T and P represent the temperature and pressure during the printing process of corrugated paperboard, respectively, and W represents the moisture content of the corrugated paperboard; H and L represent the thickness and length of the corrugated paperboard, respectively; E and I represent the elastic modulus and structural moment of inertia of the corrugated paperboard, respectively, and e is the base of the natural logarithm.
[0053] To help understand, the model is explained below by substituting specific values:
[0054] Assuming α = 0.001, β = 0.5, the printing parameters in this printing process are obtained: T = 120 ° C, P = 5 × 10 5 N / m 2 ; Get the parameters of the carton material: W = 60%, H = 0.003m, L = 0.5m, E = 5×10 9 N / m 2 , I = 10 -6 m 4 Substitute all the values into the above formula to calculate the flatness factor F fl Approximately 1.41×10 -6 Generally, the smaller the flatness factor, the higher the corresponding flatness. Therefore, the preset threshold of the flatness factor can be set to 1×10 -6 , if the calculated 1.41×10 -6 More than 1×10 -6 , it is considered that the flatness of the carton does not meet the preset conditions and the corresponding carton needs to be removed; when the calculated flatness factor is less than or equal to 1×10 -6 When , it is considered that the preset conditions are met, and the cartons that meet the conditions are taken as target detection objects.
[0055] Therefore, compared with the use of instruments to manually detect flatness, this embodiment combines printing parameters and material properties to construct a calculation model for the flatness factor. When predicting the flatness, it is only necessary to obtain the printing parameters and the material's own parameters and input them into the model to quickly determine whether the flatness meets the preset conditions, taking into account both the flatness detection quality and detection efficiency.
[0056] S20, collecting a printed image of the target detection object, extracting features from the printed image, inputting the extracted target features into the X defect types in the clustering algorithm for clustering, and obtaining a clustering result;
[0057] At present, in the process of image recognition using machine vision, if you want to identify printing defects, you need a large amount of labeled data to train the defect recognition model, and the data collection, labeling difficulty and training cost are relatively large. And once a new defect appears, the model under this supervised learning cannot be recognized, and the generalization ability is poor. For this reason, the embodiment adopts an unsupervised learning clustering model, which can quickly and accurately generate clustering results by extracting features from the printed image and then performing clustering operations.
[0058] In one embodiment, the feature extraction of the printed image includes:
[0059] Preprocess the printed image, including converting the printed image to Lab color space, and performing image enhancement, median filtering and size unification;
[0060] Based on the preprocessed printed image, target features of the printed image are extracted, wherein the target features include color features, texture features and edge features.
[0061] It should be noted that before extracting features, in order to ensure the quality of extracted features, the image needs to be preprocessed. Lab color space is more suitable for visual perception than RGB or CMYK. The L component represents brightness, and the a and b components represent color changes from green to red and blue to yellow, respectively. Converting to Lab space helps to separate color and brightness information, which facilitates subsequent feature extraction and analysis. Image enhancement includes contrast, brightness or sharpening, which can improve the visibility and distinguishability of features, especially in cases of uneven light or poor printing quality. Including rotating the image, contrast stretching, etc. to remove salt and pepper noise and small particle interference in the image, while keeping the edge information relatively intact. Median filtering can remove salt and pepper noise and small particle interference in the image, while keeping the edge information relatively intact. Finally, all images to be processed are scaled to the same size to ensure the consistency of feature extraction and the feasibility of comparison, so as to avoid the scale effect caused by different image sizes.
[0062] After preprocessing, target feature extraction is performed, including color features, texture features, and edge features. In the Lab color space, statistics such as color histogram, color mean, and standard deviation can be calculated as features. Color features reflect the overall tone and color uniformity of printing, and are crucial for identifying defects such as color unevenness and color cast. Texture features can be extracted through grayscale co-occurrence matrix and wavelet transform, which describe the spatial distribution of pixel values in the image and are very effective for identifying texture defects such as stripes and uneven dots. Edge features use edge detection algorithms such as Canny and Sobel operators to extract boundary information in images. Edge features can reveal the shape and structure in the image, and are very effective for identifying problems such as the integrity and blur of printed patterns.
[0063] Therefore, this embodiment ensures the effectiveness of feature extraction through image preprocessing. By analyzing color features, texture features and edge features, defects can be identified from multiple angles, which is conducive to improving the accuracy of defect identification results.
[0064] In one embodiment, the extracted target features are input into the clustering algorithm to cluster the X defect types to obtain clustering results, including:
[0065] The PCA algorithm is used to reduce the dimension of the extracted target features, and the random forest algorithm is used to fit the reduced target features. According to the fitted screening indicators, the feature quantity with the greatest correlation is screened out;
[0066] The K-means algorithm is used to cluster the selected features and generate clustering results.
[0067] In this embodiment, by performing PCA transformation on the extracted target feature matrix, a new feature coordinate system can be found, in which the first few principal components can explain most of the data variance. These principal components are the new features after dimensionality reduction. The features after dimensionality reduction are fitted using the random forest algorithm, and then the features with the greatest correlation are selected based on the feature importance. These features will be used in subsequent cluster analysis to ensure the accuracy and efficiency of the clustering effect.
[0068] Furthermore, based on the previously selected features with the greatest correlation, the K-means algorithm is applied for clustering. First, the K value, that is, the desired number of cluster categories, corresponding to X types of defects, needs to be determined. The algorithm iteratively optimizes the position of the cluster center until the stop condition is met, such as the change in the cluster center is less than the threshold or the maximum number of iterations is reached, and finally X clustering results are obtained, each cluster representing a type or category of printing defects.
[0069] Therefore, this embodiment can reduce the interference of invalid features and reduce the computational complexity by reducing the feature dimension, and further improve the accuracy of the clustering results by screening the feature quantities with high correlation.
[0070] S30, determining the defect analysis result of the target feature according to the clustering result, including when the clustering result is X defect types, determining the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering result is more than X defect types, using spectral analysis to determine the defect type and the number of defect features of the target feature.
[0071] It can be understood that after obtaining the clustering results, it is only necessary to judge the number of defect types in the clustering results. Assuming that the clustering result is X defect types, it means that no new defect types have appeared. At this time, it is only necessary to determine the corresponding defect types and the number of defect features based on the clustering cluster where the target feature is located. Assuming that the number of defect types clustered is greater than X defect types, it means that a new defect type has appeared. At this time, the corresponding defect type and the number of defect features can be determined based on the clustering cluster where a part of the target features are located. For new defects, spectral analysis can be used directly to determine the new defect type and the number of defect features. Finally, the identified new defect type data can be added to the clustering algorithm for data update. In the next clustering, the algorithm can identify the newly generated defects, which is equivalent to the adaptive iterative process of unsupervised learning.
[0072] S40, calculating the printing defect degree of the corrugated paper box to be tested by using the defect analysis result and the number of target detection objects, and adjusting the next printing parameters of the corrugated paper box according to the feedback of the printing defect degree.
[0073] In one embodiment, the method of calculating the printing defect degree of the corrugated box to be tested by using the defect analysis result, the number of target features and the number of target detection objects includes:
[0074]
[0075] In the formula, Q represents the degree of printing defects, M0 represents the number of target detection objects, and M represents the number of corrugated boxes to be tested. It represents the sum of the average distances of all pixels in the feature to their centroids, D i It represents the distance from the i-th sample point to its centroid, and there are N sample points in total; Var(C), Var(G), Var(B) represent the variance of color features, texture features, and edge features, respectively; Z represents the number of defect types obtained by clustering; γ1, γ2, and γ3 are weight factors, respectively.
[0076] In the above formula, M0 / M is used first, that is, the qualified rate of flatness that meets the conditions is determined. Then, based on this, the degree of defect is evaluated according to the clustering results. γ1, γ2, and γ3 are weight factors, respectively, satisfying that each value does not exceed 1, and the sum of the three weight factors is 1. It can be adjusted according to the application scenario and experience, for example, the values are 0.4, 0.4, and 0.2 respectively. Var(C), Var(G), and Var(B) represent the variance of color features, texture features, and edge features, respectively. A large variance indicates a high degree of dispersion of the features, which usually means more inconsistency or complexity, thus reflecting the degree of defect. When calculating the variance of color features, the variance of the three components L, a, and b in Lab space can be calculated and then averaged. When calculating the variance of texture features, taking the gray level co-occurrence matrix (GLCM) as an example, assuming that several texture features such as contrast, energy, and entropy are extracted, the variance of each feature can be calculated independently, or the joint variance of these feature vectors can be calculated. Edge features may be based on edge strength or direction after edge detection algorithms. If the edge intensity is quantified as the intensity value of each edge pixel in the image, the variance of the edge feature can be calculated based on the intensity value of each edge pixel. Therefore, the defect degree can be quickly and accurately evaluated through the above defect degree calculation formula, which can be used for feedback adjustment of the printing parameters of the next printing process.
[0077] In one embodiment, the next printing parameter of the corrugated box is adjusted according to the feedback of the printing defect level, including:
[0078] A reinforcement learning algorithm is used to learn the degree of printing defects and historical printing parameters, train an adaptive adjustment model, and dynamically adjust the next printing parameters according to the adaptive adjustment model.
[0079] Specifically, the feedback adjustment parameters using the intensity learning algorithm include the following process:
[0080] Define the environment:
[0081] State: The current set of printing parameters, including printing speed, ink volume, printing pressure, etc., as well as possible historical printing defect feedback information.
[0082] Action: A change within the range of adjustable printing parameters, such as increasing or decreasing the percentage of printing pressure, adjusting the ink supply, etc.
[0083] Reward: Feedback given based on the printing results. A low degree of printing defects will result in a high reward, while a high degree of printing defects will result in a low reward. Specifically, it can be a negative defect metric (such as a negative value of the defect count or defect severity score), and the goal is to minimize this value.
[0084] Observation: After executing an action, the environment provides feedback on the current printing defect level and other related status information.
[0085] Select Algorithm: Select Q-Learning, which is applicable to discrete action spaces and learns an action value function Q(s,a), which represents the expected return of taking action a in state s. It is more applicable when the action space is continuous or very large, and directly learns the strategy π(s) to select actions and estimate the value of the action.
[0086] Initialization and exploration:
[0087] Initialization strategy: At the beginning, the initial printing parameters can be randomly selected or set based on existing experience.
[0088] Exploration and Exploitation: Introduce ε-greedy strategies or other exploration mechanisms to balance the need to explore new parameter combinations and exploit the best known strategy.
[0089] Training process:
[0090] Observe the current status: Get current printing parameters and historical printing defect feedback from the environment.
[0091] Select and execute an action: Select an action (adjust printing parameters) based on the current strategy and execute it.
[0092] Receive rewards and observe new states: After completing a printing cycle, the rewards are calculated based on the defect detection results, and new state information is observed.
[0093] Update model: Update Q value or policy parameters according to rewards and new and old states, and optimize the model in the hope of obtaining higher rewards in the future.
[0094] Adaptive adjustment: As learning progresses, the model gradually learns to select the optimal or near-optimal printing parameters under different circumstances, achieves adaptive adjustment, and reduces printing defects. Finally, the trained reinforcement learning model can be deployed to the actual printing system to monitor the printing quality and defect feedback in real time and continuously optimize the model performance.
[0095] In summary, the present invention learns the degree of defects through a reinforcement learning algorithm, and adjusts the next printing parameters of the corrugated box according to the feedback of the degree of printing defects. This can reduce the degree of defects in the next printing process, which is conducive to improving the yield rate of carton printing.
[0096] See also Figure 2 In one embodiment, the present invention further provides a corrugated box printing defect degree assessment system, the system comprising:
[0097] The target screening unit 100 is used to detect the flatness of the corrugated paper boxes to be tested after printing, remove the corrugated paper boxes to be tested whose flatness is less than a preset threshold, and use the remaining corrugated paper boxes to be tested as target detection objects;
[0098] The clustering unit 200 is used to collect the printed image of the target detection object, extract features from the printed image, input the extracted target features into the X defect types in the clustering algorithm for clustering, and obtain a clustering result;
[0099] The defect analysis unit 300 is used to determine the defect analysis result of the target feature according to the clustering result, including when the clustering result is X defect types, determining the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering result is more than X defect types, using spectral analysis to determine the defect type and the number of defect features of the target feature;
[0100] The parameter adjustment unit 400 is used to calculate the printing defect degree of the corrugated paper box to be tested by using the defect analysis results and the number of target detection objects, and adjust the next printing parameters of the corrugated paper box according to the feedback of the printing defect degree.
[0101] It can be understood that the functions or modules included in the system provided in this embodiment can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0102] The present invention also provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes a method as described in any possible implementation manner.
[0103] The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a method as described in any possible implementation manner.
[0104] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present invention have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.
[0106] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0109] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0110] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
Claims
1. A method for evaluating the degree of printing defects of corrugated paperboard. It is characterized in that The method comprises: Detect the flatness of the corrugated paper boxes to be tested after printing, and select the corrugated paper boxes to be tested whose flatness meets the preset conditions as the target detection objects; Collect the printed image of the target detection object, extract the features of the printed image, input the extracted target features into the X defect types in the clustering algorithm for clustering, and obtain the clustering results; Determine the defect analysis result of the target feature according to the clustering result, including when the clustering result is X defect types, determine the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering result is more than X defect types, use spectral analysis to determine the defect type and the number of defect features of the target feature; The defect analysis results and the number of target detection objects are used to calculate the printing defect degree of the corrugated box to be tested, and the next printing parameters of the corrugated box are adjusted according to the feedback of the printing defect degree.
2. The method for evaluating the degree of printing defects of corrugated paperboard according to claim 1, It is characterized in that The method of detecting the flatness of the printed corrugated paper box to be tested comprises: In the formula, F fl represents the flatness factor, α and β are constant coefficients, satisfying 0<α<0.01, 0<β<1; T and P represent the temperature and pressure during the printing process of corrugated paperboard, respectively, and W represents the moisture content of the corrugated paperboard; H and L represent the thickness and length of the corrugated paperboard, respectively; E and I represent the elastic modulus and structural moment of inertia of the corrugated paperboard, respectively, and e is the base of the natural logarithm.
3. The method for evaluating the degree of printing defects of corrugated paperboard according to claim 1, It is characterized in that The method of calculating the printing defect degree of the corrugated paper box to be tested by using the defect analysis results, the number of target features and the number of target detection objects includes: In the formula, Q represents the degree of printing defects, M 0 represents the number of target detection objects, M represents the number of corrugated boxes to be tested, It represents the sum of the average distances of all pixels in the feature to their centroids, D i represents the distance from the i-th sample point to its centroid, and there are N sample points in total; Var(C), Var(G), Var(B) represent the variance of color features, texture features, and edge features, respectively; Z represents the number of defect types obtained by clustering; γ 1 , γ 2 , γ 3 are weight factors respectively.
4. The method for evaluating the degree of printing defects of corrugated paperboard according to claim 1, It is characterized in that The method of adjusting the next printing parameters of the corrugated box according to the feedback of the printing defect degree includes: A reinforcement learning algorithm is used to learn the degree of printing defects and historical printing parameters, train the adaptive adjustment model, and dynamically adjust the next printing parameters according to the adaptive adjustment model.
5. The method for evaluating the degree of printing defects of corrugated paper boxes according to claim 1, It is characterized in that The feature extraction of the printed image comprises: Preprocess the printed image, including converting the printed image to Lab color space, and performing image enhancement, median filtering and size unification; Based on the preprocessed printed image, target features of the printed image are extracted, wherein the target features include color features, texture features and edge features.
6. The method for evaluating the degree of printing defects of corrugated paperboard according to claim 5, It is characterized in that The extracted target features are input into the X defect types in the clustering algorithm for clustering to obtain clustering results, including: The PCA algorithm is used to reduce the dimension of the extracted target features, and the random forest algorithm is used to fit the reduced target features. According to the fitted screening indicators, the feature quantity with the greatest correlation is screened out; The K-means algorithm is used to cluster the selected features and generate clustering results.
7. A corrugated box printing defect assessment system, It is characterized in that The system comprises: The target screening unit is used to detect the flatness of the corrugated paper boxes to be tested after printing, and screen out the corrugated paper boxes to be tested whose flatness meets the preset conditions as the target detection objects; A clustering unit is used to collect a printed image of a target detection object, extract features from the printed image, input the extracted target features into the X defect types in the clustering algorithm for clustering, and obtain a clustering result; A defect analysis unit, used to determine the defect analysis result of the target feature according to the clustering result, including when the clustering result is X defect types, determining the corresponding defect type and the number of defect features according to the clustering cluster where the target feature is located; when the clustering result is more than X defect types, using spectral analysis to determine the defect type and the number of defect features of the target feature; The parameter adjustment unit is used to calculate the printing defect degree of the corrugated paper box to be tested by using the defect analysis results and the number of target detection objects, and adjust the next printing parameters of the corrugated paper box according to the feedback of the printing defect degree.
8. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and when the processor executes the computer instructions, the electronic device executes the method for evaluating the degree of printing defects of corrugated paperboard as described in any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the method for evaluating the degree of printing defects of corrugated paper boxes according to any one of claims 1 to 6.
Citation Information
Patent Citations
A visual defect detection method based on a multi-spectral depth convolution neural network
CN109447977A
Hyperspectral anomaly target intelligent detection method based on robust spectral covariance distance
CN112016529A
Flatness measuring device and method for corrugated board production
CN113251955A
Corrugated board quality detection method based on image vision
CN115294123A
Printing quality closed-loop control system and printing equipment
CN117246040A
