Intelligent pre-printed image optimization system and method based on deep learning
Through an intelligent preprint image optimization system based on deep learning, combined with Swin Transformer and sliding window mechanism, the image processing parameters are dynamically adjusted, which solves the problems of insufficient global information capture and inaccurate defect evaluation in the existing technology, and achieves efficient and accurate image optimization and processing.
Patent Information
- Application Number
- CN202411332941.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing preprint image optimization system fails to effectively capture global information, resulting in insufficient processing of complex scenes, lack of dynamic adaptability, and inability to accurately evaluate image defects, affecting image quality and processing efficiency.
Using a deep learning-based intelligent preprint image optimization system, through data collection, preprocessing, image error prediction, quality evaluation and optimization execution modules, combined with Swin Transformer, sliding window mechanism and Patch Merging, dynamically adjust the size of image blocks and window count , construct preprint image error prediction and defect detection models, and evaluate defect severity to optimize images.
It enhances the understanding of the overall structure of the image, improves the global perception ability of the model, ensures the accuracy and efficiency of image quality evaluation, avoids unnecessary optimization, and saves computing resources and time.
Smart Images

Figure CN119273651A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and more specifically, to an intelligent pre-print image optimization system and method based on deep learning. Background Art
[0002] The patent application with the publication number CN113256170A discloses a graphics processing device and method for paper pre-printing. The present invention matches the image to be pre-printed with the online corrugated paper pre-printing production end according to the different applicability of various types of printing methods in the pre-printing process in terms of printing resolution, printing color, printing format and printing surface paper material, and then performs pre-printed graphics processing according to the properties of the corrugated paper pre-printing production end; the present invention realizes automatic and efficient graphics processing in the corrugated paper pre-printing process, and optimizes resources and time.
[0003] The existing pre-print image optimization system and method have the following main problems:
[0004] Failure to consider the sliding window mechanism may cause the model to focus only on local features and fail to effectively capture global information; it will affect the understanding of the overall structure of the image and may lead to insufficient processing of complex scenes; the window size is fixed, and the model's ability to adapt to images with different features will be reduced, especially when processing diverse image data sets, which may lead to poor performance; unreasonable window division may lead to a waste of computing resources, especially when processing large images, failure to dynamically adjust the number of windows may make the model too dispersed in local feature extraction, and unable to concentrate resources on extracting important features; lack of dynamic adaptation of image features may lead to insufficient generalization ability of the model when facing new images, and it is difficult to effectively process unseen image types;
[0005] Lack of comprehensive consideration of key parameters may lead to inaccurate evaluation results of image defects, affecting subsequent processing decisions; the inability to quantify the severity of defects may lead to unreasonable priority decisions of the processing system, and the most significant defects may be ignored, affecting the final image quality; the lack of clear defect evaluation standards may lead to computing resources and time being wasted on processing unimportant image features, while ignoring defects that really need attention; failure to effectively capture the full picture of image defects will reduce the overall efficiency of image processing, affecting the response speed and processing power of the processing system.
[0006] In view of this, the present invention proposes an intelligent pre-print image optimization system and method based on deep learning to solve the above problems. Summary of the invention
[0007] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: an intelligent pre-print image optimization system and method based on deep learning, comprising:
[0008] A data collection module, used to collect image parameter data, pre-printing device parameter data and user behavior data;
[0009] A data processing module is used to pre-process the acquired image parameter data, pre-printing device parameter data and user behavior data to obtain an image feature data set, a pre-printing device feature data set and a user behavior feature data set; evaluate the impact of the user behavior feature data set on the image feature data set and the pre-printing device feature data set to obtain an impact feature data set;
[0010] An image error prediction module is used to obtain a pre-print image error prediction model according to the influencing feature data set training, and obtain the pre-print image error through the pre-print image error prediction model prediction;
[0011] A quality assessment module is used to compare the predicted pre-print image error with a preset pre-print image error threshold to determine whether the pre-print image quality meets the standard;
[0012] Optimization evaluation module: if the quality of the pre-printed image meets the standard, there is no need to optimize the pre-printed image, and a printing instruction is directly issued through the intelligent pre-printing terminal to print the pre-printed image; if the quality of the pre-printed image does not meet the standard, the pre-printed image needs to be optimized, and an optimization instruction is issued through the intelligent pre-printing terminal, and the pre-printed image data that needs to be optimized is automatically collected;
[0013] The optimization execution module is used to obtain an image defect detection model according to the pre-printed image data training that needs to be optimized, and obtain the pre-printed image defect type based on the image defect detection model; obtain the severity of the pre-printed image defect type through the pre-printed image defect degree assessment model, and execute the corresponding image optimization plan according to the severity of the pre-printed image defect type; each module is connected by wired and / or wireless means.
[0014] Further, the image parameter data includes image attribute data, image format data, color calibration data and image noise data; the image attribute data includes image resolution data, color space data, bit depth, compression rate, metadata, image brightness data and contrast data;
[0015] Pre-printed equipment parameter data includes printing resolution, scanning resolution, color mode parameters, and paper type and size parameters; user behavior data includes image adjustment behavior and user preference data;
[0016] Pre-printed equipment parameter data and user behavior data are obtained through embedded sensors and user terminals; image parameter data is obtained through Swin Transformer; after multi-head self-attention mechanism, sliding window mechanism and Patch Merging operation, the feature matrix is finally output; the feature matrix of the final output is further analyzed and extracted to obtain image parameter data; the specific method is as follows:
[0017] S21, input original pre-printed image I∈R H×W×C , where I is the original pre-printed image, R is the real number space where the original pre-printed image is located, H is the image height, W is the image width, and C is the number of channels; the original pre-printed image is divided into q non-overlapping image blocks of size n×n, each of which contains n 2 ×C pixels; the pixels in each image patch are flattened to become a feature vector; where n is the size of the image patch, and the value of n is adjusted by the size adjustment formula;
[0018] The size adjustment formula is specifically:
[0019] Among them, Pmin is the minimum number of pixels contained in each image block; k is the control factor that controls the number of image blocks in the horizontal and vertical directions, and is usually greater than or equal to 1 to ensure that the image can be completely covered; is the rounding function, which means rounding down to ensure that n is an integer;
[0020] S22. Apply linear projection to each image patch, projecting it from the flattened feature vector to a higher-dimensional feature space to obtain a feature vector of dimension d; integrate the feature vectors of all projected image patches to form a matrix X∈R d ;
[0021] S23, use Swin Transformer Block to process small image blocks, and capture local dependency information through the local window attention mechanism; divide the small image blocks into V windows of size M×M; for the small image blocks in each window, use the multi-head self-attention mechanism to capture local features;
[0022] The number V of image windows is adjusted by the window number adjustment formula, and the window number adjustment formula is: Where q is the number of image patches; n is the size of the image patches;
[0023] Patch Merging is used to perform downsampling operations and merge adjacent blocks; a sliding window mechanism is used to capture the global features of small image blocks; the window is slidingly displaced, and the sliding operation of each window at the tth layer is denoted by S t, then the window feature after sliding is X′=S t (X); After the above steps, the final output feature matrix X∈RH′×W′×d′; where H′ and W′ are the spatial dimensions after multiple patch merging, and d′ is the number of channels;
[0024] S24, further analyzing and extracting the feature matrix to obtain image parameter data.
[0025] Furthermore, the method of preprocessing the acquired image parameter data, preprinting device parameter data and user behavior data to obtain an image feature data set, a preprinting device feature data set and a user behavior feature data set includes:
[0026] The acquired image parameter data, pre-printing equipment parameter data and user behavior data were cleaned, the missing values were filled using interpolation method, and the outliers were detected and removed using clustering algorithm; the image parameter data, pre-printing equipment parameter data and user behavior data were converted into a standard normal distribution with a mean of 0 and a standard deviation of 1 using Z-score standardization to eliminate the dimension effect;
[0027] After the preprocessing in the above steps, the image feature dataset, the preprinting device feature dataset and the user behavior feature dataset are obtained.
[0028] Furthermore, the method of evaluating the influence of the user behavior feature dataset on the image feature dataset and the pre-printed device feature dataset to obtain the influenced feature dataset includes:
[0029] Taking image features, pre-printed device features and user behavior features as input variables, a joint regression model is constructed. By constructing the joint regression model, the impact of the user behavior feature dataset on the image feature dataset and the pre-printed device feature dataset is analyzed, and finally the impact feature dataset is obtained.
[0030] Furthermore, the training method of the pre-printed image error prediction model includes:
[0031] The dataset is divided into a training set, a validation set, and a test set to train the model and evaluate the model performance; the sample set is a subset of the dataset, and each sample set includes a historical impact feature dataset and the corresponding preprint image error;
[0032] Constructing a pre-printed image error prediction model, the pre-printed image error prediction model includes an input layer, a convolution layer, a pooling layer, a batch normalization layer, a fully connected layer and an output layer; the input layer is used to input a historical impact feature data set, and the output layer is used to output a pre-printed image error; the pre-printed image error prediction model is a 3D convolutional neural network model;
[0033] Use mean absolute error as the loss function to measure the error between the model's predicted value and the actual value; use the training set data to train the model and use the Adam optimizer to minimize the loss function; use the validation set to evaluate the performance of the model and tune the model's hyperparameters until the model performance no longer improves significantly or reaches the preset stopping condition;
[0034] The test set is used to evaluate the performance of the model in the prediction task, and the current influencing feature dataset is input into the trained pre-print image error prediction model to obtain the pre-print image error.
[0035] Furthermore, the method of comparing the predicted pre-print image error with a preset pre-print image error threshold to determine whether the pre-print image quality meets the standard includes:
[0036] If the predicted pre-print image error is less than a preset pre-print image error threshold, it is determined that the pre-print image quality meets the standard;
[0037] If the predicted pre-print image error is greater than or equal to a preset pre-print image error threshold, it is determined that the pre-print image quality does not meet the standard.
[0038] Furthermore, the pre-printed image data that needs to be optimized includes image resolution, color space, image format, color calibration rate, image noise, image brightness and contrast.
[0039] Furthermore, the training method of the image defect detection model includes:
[0040] The data set is divided into a training set, a validation set, and a test set to train the model and evaluate the model performance; the sample set is a subset of the data set, and each sample set includes the historical pre-printed image data that needs to be optimized and the corresponding pre-printed image defect type;
[0041] The input data of the model is the historical pre-printed image data that needs to be optimized; the output label of the model is the pre-printed image defect type; the image defect detection model consists of v decision trees, and through Bootstrap sampling, when training each decision tree, a subset is randomly selected from the training set to train the tree, and a subset of features is randomly selected to split the node until the stopping condition is reached; the image defect detection model is a random forest model;
[0042] Use multi-classification cross entropy as the model's loss function to measure the difference between the model's predicted value and the actual value; use the training set to train the image defect detection model, and update the model parameters through the back propagation algorithm to minimize the loss function; use the validation set to evaluate the performance of the image defect detection model by calculating the precision index;
[0043] Adopt the grid search hyperparameter optimization method to tune the hyperparameters of the image defect detection model according to the performance feedback of the validation set, and adjust the model hyperparameter combination until the performance of the model is no longer significantly improved or the preset stopping condition is reached;
[0044] The test set is used to evaluate the performance of the model in the prediction task, and the trained image defect detection model is used to predict the pre-printed image defect data that currently needs to be optimized to obtain the pre-printed image defect type.
[0045] Furthermore, the method of executing a corresponding image optimization solution according to the severity of the pre-printed image defect type includes:
[0046] Construct a pre-printed image defect degree assessment model, calculate the severity of the pre-printed image defect type through the pre-printed image defect degree assessment model, and execute the corresponding image optimization scheme according to the severity of the pre-printed image defect type; the pre-printed image defect degree assessment model is:
[0047]
[0048] Where Sge is the severity of the pre-printed image defect type; R re is the image resolution; C lr is the color space; Fot is the image format; C lb is the color calibration rate; N se is image noise; L bs is the image brightness; Dst is the contrast; ω1, ω2, ω3, ω4, ω5, ω6, and ω7 are the weight factors of each parameter.
[0049] An intelligent pre-print image optimization method based on deep learning, comprising:
[0050] S1, collect image parameter data, pre-printing device parameter data and user behavior data;
[0051] S2. Preprocess the acquired image parameter data, preprinting device parameter data, and user behavior data to obtain an image feature data set, a preprinting device feature data set, and a user behavior feature data set; evaluate the impact of the user behavior feature data set on the image feature data set and the preprinting device feature data set to obtain an impact feature data set;
[0052] S3, obtaining a pre-print image error prediction model according to the influencing feature data set training, and obtaining the pre-print image error through the pre-print image error prediction model prediction;
[0053] S4, comparing the predicted pre-printed image error with a preset pre-printed image error threshold to determine whether the pre-printed image quality meets the standard;
[0054] S5. If the quality of the pre-printed image meets the standard, there is no need to optimize the pre-printed image, and a printing instruction is directly issued through the intelligent pre-printing terminal to print the pre-printed image; if the quality of the pre-printed image does not meet the standard, the pre-printed image needs to be optimized, and an optimization instruction is issued through the intelligent pre-printing terminal, and the pre-printed image data that needs to be optimized is automatically collected;
[0055] S6. An image defect detection model is obtained by training the pre-printed image data to be optimized, and the pre-printed image defect type is obtained based on the image defect detection model; the severity of the pre-printed image defect type is obtained through a pre-printed image defect degree assessment model, and a corresponding image optimization solution is executed according to the severity of the pre-printed image defect type.
[0056] Technical effects and advantages of the deep learning-based intelligent pre-print image optimization system and method of the present invention:
[0057] The present invention can dynamically adjust the size of small image blocks according to different features of the image through the size adjustment formula; the adaptive division can not only effectively process images of different resolutions and sizes, but also ensure that the images can be fully covered to avoid information loss; at the same time, the size of small image blocks is dynamically adjusted according to the control factor, ensuring flexible processing of different images; through the sliding window mechanism, not only local information can be obtained, but also the global features of the image can be captured through the sliding operation of the window; the ability to understand the overall image is enhanced, and the problem of global information loss that may be caused by the local attention mechanism is avoided; the sliding window mechanism can also shift at different levels, capture more global features layer by layer, and further enhance the global perception ability of the model; by adaptively adjusting the number of windows, the model's attention on local and global features can be reasonably allocated;
[0058] The pre-printed image defect assessment model can quantify the severity of pre-printed image defect types; the model combines multiple key parameters that affect image quality, such as resolution, color space, image format, color calibration rate, image noise, brightness and contrast; it can effectively capture the full picture of image defects and ensure that the assessment results are highly accurate and reliable; by quantifying the severity of defects, the model can help the image processing system prioritize the most significant defect problems and avoid unnecessary global optimization; it not only improves the efficiency of image processing, but also reduces the waste of computing resources that are not optimized for other image characteristics, saving time and computing overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A schematic diagram of the structure of an intelligent pre-printed image optimization system based on deep learning of the present invention;
[0060] Figure 2 This is a schematic flow chart of an intelligent pre-print image optimization method based on deep learning of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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.
[0062] Embodiment 1
[0063] See also Figure 1 As shown, the intelligent pre-print image optimization system and method based on deep learning described in this embodiment include:
[0064] A data collection module, used to collect image parameter data, pre-printing device parameter data and user behavior data;
[0065] A data processing module is used to pre-process the acquired image parameter data, pre-printing device parameter data and user behavior data to obtain an image feature data set, a pre-printing device feature data set and a user behavior feature data set; evaluate the impact of the user behavior feature data set on the image feature data set and the pre-printing device feature data set to obtain an impact feature data set;
[0066] An image error prediction module is used to obtain a pre-print image error prediction model according to the influencing feature data set training, and obtain the pre-print image error through the pre-print image error prediction model prediction;
[0067] A quality assessment module is used to compare the predicted pre-print image error with a preset pre-print image error threshold to determine whether the pre-print image quality meets the standard;
[0068] Optimization evaluation module: if the quality of the pre-printed image meets the standard, there is no need to optimize the pre-printed image, and a printing instruction is directly issued through the intelligent pre-printing terminal to print the pre-printed image; if the quality of the pre-printed image does not meet the standard, the pre-printed image needs to be optimized, and an optimization instruction is issued through the intelligent pre-printing terminal, and the pre-printed image data that needs to be optimized is automatically collected;
[0069] The optimization execution module is used to obtain an image defect detection model according to the pre-printed image data training that needs to be optimized, and obtain the pre-printed image defect type based on the image defect detection model; obtain the severity of the pre-printed image defect type through the pre-printed image defect degree assessment model, and execute the corresponding image optimization plan according to the severity of the pre-printed image defect type; each module is connected by wired and / or wireless means.
[0070] The image parameter data includes image attribute data, image format data, color calibration data and image noise data; the image attribute data includes image resolution data, color space data, bit depth, compression rate, metadata, image brightness data and contrast data;
[0071] Pre-printed equipment parameter data includes printing resolution, scanning resolution, color mode parameters, and paper type and size parameters; user behavior data includes image adjustment behavior and user preference data;
[0072] Pre-printed equipment parameter data and user behavior data are obtained through embedded sensors and user terminals; image parameter data is obtained through Swin Transformer; after multi-head self-attention mechanism, sliding window mechanism and Patch Merging operation, the feature matrix is finally output; the final output feature matrix is further analyzed and extracted to obtain image parameter data; the specific method is as follows:
[0073] S21, input original pre-printed image I∈R H×W×C , where I is the original pre-printed image, R is the real number space where the original pre-printed image is located, H is the image height, W is the image width, and C is the number of channels; the original pre-printed image is divided into q non-overlapping image blocks of size n×n, each of which contains n 2 ×C pixels; the pixels in each image patch are flattened to become a feature vector; where n is the size of the image patch, and the value of n is adjusted by the size adjustment formula;
[0074] The sizing formula is:
[0075] Among them, Pmin is the minimum number of pixels contained in each image block; k is the control factor that controls the number of image blocks in the horizontal and vertical directions, and is usually greater than or equal to 1 to ensure that the image can be completely covered; is the rounding function, which means rounding down to ensure that n is an integer;
[0076] For example, suppose the original image size is H=1000, W=800, C=3; each image block must contain at least 256 pixels, that is, P min =256; adjustment factor k = 2; then
[0077]
[0078] Compare the two values and take the smaller one as the value of n, then n = min (16, 400) = 16; since W < H,
[0079] In summary, the original pre-printed image is divided into 63 image patches of size 16×16;
[0080] S22. Apply linear projection to each image patch, projecting it from the flattened feature vector to a higher-dimensional feature space to obtain a feature vector of dimension d; integrate the feature vectors of all projected image patches to form a matrix X∈R d ;
[0081] S23, use Swin Transformer Block to process small image blocks, and capture local dependency information through the local window attention mechanism; divide the small image blocks into V windows of size M×M; for the small image blocks in each window, use the multi-head self-attention mechanism to capture local features;
[0082] The number of image windows V is adjusted by the window number adjustment formula, and the window number adjustment formula is: Where q is the number of image patches; n is the size of the image patches;
[0083] For example, when the original pre-printed image is divided into 63 image blocks of size 16×16, the number of image windows is:
[0084] Patch Merging is used to perform downsampling operations and merge adjacent blocks; a sliding window mechanism is used to capture the global features of small image blocks; the window is slidingly displaced, and the sliding operation of each window at the tth layer is denoted by S t , then the window feature after sliding is X′=S t (X); After the above steps, the final output feature matrix X∈RH′×W′×d′; where H′ and W′ are the spatial dimensions after multiple patch merging, and d′ is the number of channels;
[0085] S24, further analyzing and extracting the feature matrix to obtain image parameter data;
[0086] Captures larger-scale dependencies through a sliding window mechanism across windows, thereby extracting global parameter data such as tonal balance, overall lighting, and texture variations in complex images;
[0087] For example, in even-numbered layers, the window is slightly moved horizontally and vertically by a number of pixels, so that the small image blocks at the previous window boundary participate in the new window attention calculation, and the features across windows are fused, thereby capturing the global long-range dependency information in the image.
[0088] The method of preprocessing the acquired image parameter data, preprinting device parameter data and user behavior data to obtain an image feature data set, a preprinting device feature data set and a user behavior feature data set includes:
[0089] The acquired image parameter data, pre-printing equipment parameter data and user behavior data were cleaned, the missing values were filled using interpolation method, and the outliers were detected and removed using clustering algorithm; the image parameter data, pre-printing equipment parameter data and user behavior data were converted into a standard normal distribution with a mean of 0 and a standard deviation of 1 using Z-score standardization to eliminate the dimension effect;
[0090] After the preprocessing in the above steps, the image feature dataset, the preprinting device feature dataset and the user behavior feature dataset are obtained.
[0091] The method for evaluating the influence of the user behavior feature dataset on the image feature dataset and the pre-printed device feature dataset to obtain the influenced feature dataset includes:
[0092] Taking image features, pre-printed device features and user behavior features as input variables, a joint regression model is constructed. By constructing the joint regression model, the impact of the user behavior feature dataset on the image feature dataset and the pre-printed device feature dataset is analyzed, and finally the impact feature dataset is obtained.
[0093] The training method of the preprint image error prediction model includes:
[0094] The dataset is divided into a training set, a validation set, and a test set to train the model and evaluate the model performance; the sample set is a subset of the dataset, and each sample set includes a historical impact feature dataset and the corresponding preprint image error;
[0095] Constructing a pre-printed image error prediction model, the pre-printed image error prediction model includes an input layer, a convolution layer, a pooling layer, a batch normalization layer, a fully connected layer and an output layer; the input layer is used to input a historical impact feature data set, and the output layer is used to output a pre-printed image error; the pre-printed image error prediction model is a 3D convolutional neural network model;
[0096] The mean absolute error is used as the loss function to measure the error between the model's predicted value and the actual value; the mean absolute error loss function is: Wherein, MAE is the mean absolute error; n′ is the number of data sets; yi is the true value of the error of the i-th preprinted image; is the predicted value of the error of the i-th pre-printed image;
[0097] Use the training set data to train the model and minimize the loss function using the Adam optimizer. Use the validation set to evaluate the performance of the model and tune the model's hyperparameters until the model performance no longer improves significantly or reaches the preset stopping condition.
[0098] The test set is used to evaluate the performance of the model in the prediction task, and the current influencing feature dataset is input into the trained pre-print image error prediction model to obtain the pre-print image error.
[0099] The method of comparing the predicted pre-print image error with a preset pre-print image error threshold to determine whether the pre-print image quality meets the standard includes:
[0100] If the predicted pre-print image error is less than a preset pre-print image error threshold, it is determined that the pre-print image quality meets the standard;
[0101] If the predicted pre-print image error is greater than or equal to a preset pre-print image error threshold, it is determined that the pre-print image quality does not meet the standard.
[0102] Pre-print image data that needs to be optimized includes image resolution, color space, image format, color calibration ratio, image noise, image brightness and contrast.
[0103] The training methods for image defect detection models include:
[0104] The data set is divided into a training set, a validation set, and a test set to train the model and evaluate the model performance; the sample set is a subset of the data set, and each sample set includes the historical pre-printed image data that needs to be optimized and the corresponding pre-printed image defect type;
[0105] The input data of the model is the historical pre-printed image data that needs to be optimized; the output label of the model is the pre-printed image defect type; the image defect detection model consists of v decision trees, and through Bootstrap sampling, when training each decision tree, a subset is randomly selected from the training set to train the tree, and a subset of features is randomly selected to split the node until the stopping condition is reached; the image defect detection model is a random forest model;
[0106] Use multi-classification cross entropy as the loss function of the model to measure the difference between the model's predicted value and the actual value; the multi-classification cross entropy loss function is:
[0107] Where L is the average loss of the dataset; N is the total number of samples in the dataset; B is the number of preprint image optimization types; p i′b′ Optimize the true label of the type for the b′th preprinted image for the i′th sample; p i′b′ The probability that the i′th sample predicted by the model belongs to the optimized type of the b′th preprinted image;
[0108] Use the training set to train the image defect detection model and use the back propagation algorithm to update the model parameters to minimize the loss function. Use the validation set to evaluate the performance of the image defect detection model by calculating the precision index.
[0109] Adopt the grid search hyperparameter optimization method to tune the hyperparameters of the image defect detection model according to the performance feedback of the validation set, and adjust the model hyperparameter combination until the performance of the model is no longer significantly improved or the preset stopping condition is reached;
[0110] The test set is used to evaluate the performance of the model in the prediction task, and the trained image defect detection model is used to predict the pre-printed image defect data that currently needs to be optimized to obtain the pre-printed image defect type.
[0111] The method for executing a corresponding image optimization solution according to the severity of the pre-printed image defect type includes:
[0112] Construct a pre-print image defect degree assessment model, calculate the severity of the pre-print image defect type through the pre-print image defect degree assessment model, and execute the corresponding image optimization plan according to the severity of the pre-print image defect type; the pre-print image defect degree assessment model is:
[0113]
[0114] Where Sge is the severity of the pre-printed image defect type; R re is the image resolution; C lr is the color space; Fot is the image format; C lb is the color calibration rate; N se is image noise; L bs is the image brightness; Dst is the contrast; ω1, ω2, ω3, ω4, ω5, ω6, and ω7 are the weight factors of each parameter.
[0115] For example, the image resolution R re 300dpi, color space C lr is 90, the image format Fot is 1.2 (the weight of a certain format), and the color calibration rate C lb is 0.8, image noise N se is 50, image brightness L bs is 100, contrast Dst is 1.5, ω1 is 0.5, ω2 is 0.3, ω3 is 0.7, ω4 is 0.4, ω5 is 0.6, ω6 is 0.2, and ω7 is 0.9. The severity of the pre-printed image defect type is
[0116] The preset pre-print image error threshold is set by a staff member, and different pre-print image errors are collected through an intelligent pre-print terminal, and an average value of multiple pre-print image errors is taken as the preset pre-print image error threshold.
[0117] In this embodiment, the size of the image block can be dynamically adjusted according to the different features of the image through the size adjustment formula; the adaptive division can not only effectively process images of different resolutions and sizes, but also ensure that the image can be fully covered to avoid information loss; at the same time, the size of the image block is dynamically adjusted according to the control factor, ensuring flexible processing of different images; through the sliding window mechanism, not only local information can be obtained, but also the global features of the image can be captured through the sliding operation of the window; the ability to understand the overall image is enhanced, and the problem of global information loss that may be caused by the local attention mechanism is avoided; the sliding window mechanism can also shift at different levels, capture more global features layer by layer, and further enhance the global perception ability of the model; by adaptively adjusting the number of windows, the model's attention on local and global features can be reasonably allocated;
[0118] The pre-printed image defect assessment model can quantify the severity of pre-printed image defect types; the model combines multiple key parameters that affect image quality, such as resolution, color space, image format, color calibration rate, image noise, brightness and contrast; it can effectively capture the full picture of image defects and ensure that the assessment results are highly accurate and reliable; by quantifying the severity of defects, the model can help the image processing system prioritize the most significant defect problems and avoid unnecessary global optimization; it not only improves the efficiency of image processing, but also reduces the waste of computing resources that are not optimized for other image characteristics, saving time and computing overhead.
[0119] Embodiment 2
[0120] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, which provides an intelligent pre-print image optimization method based on deep learning, including:
[0121] S1, collect image parameter data, pre-printing device parameter data and user behavior data;
[0122] S2. Preprocess the acquired image parameter data, preprinting device parameter data, and user behavior data to obtain an image feature data set, a preprinting device feature data set, and a user behavior feature data set; evaluate the impact of the user behavior feature data set on the image feature data set and the preprinting device feature data set to obtain an impact feature data set;
[0123] S3, obtaining a pre-print image error prediction model according to the influencing feature data set training, and obtaining the pre-print image error through the pre-print image error prediction model prediction;
[0124] S4, comparing the predicted pre-printed image error with a preset pre-printed image error threshold to determine whether the pre-printed image quality meets the standard;
[0125] S5. If the quality of the pre-printed image meets the standard, there is no need to optimize the pre-printed image, and a printing instruction is directly issued through the intelligent pre-printing terminal to print the pre-printed image; if the quality of the pre-printed image does not meet the standard, the pre-printed image needs to be optimized, and an optimization instruction is issued through the intelligent pre-printing terminal, and the pre-printed image data that needs to be optimized is automatically collected;
[0126] S6. An image defect detection model is obtained by training the pre-printed image data to be optimized, and the pre-printed image defect type is obtained based on the image defect detection model; the severity of the pre-printed image defect type is obtained through a pre-printed image defect degree assessment model, and a corresponding image optimization solution is executed according to the severity of the pre-printed image defect type.
[0127] Since the electronic device introduced in this embodiment is an electronic device used to implement a deep learning-based intelligent pre-printed image optimization system and method in the embodiment of the present application, based on the deep learning-based intelligent pre-printed image optimization system and method introduced in the embodiment of the present application, the technical personnel of the field can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as the technical personnel of the field implement the electronic device used by the deep learning-based intelligent pre-printed image optimization system and method in the embodiment of the present application, it belongs to the scope of protection of this application.
[0128] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0129] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An intelligent pre-print image optimization system based on deep learning, characterized in that: include: A data collection module, used to collect image parameter data, pre-printing device parameter data and user behavior data; A data processing module is used to pre-process the acquired image parameter data, pre-printing device parameter data and user behavior data to obtain an image feature data set, a pre-printing device feature data set and a user behavior feature data set; evaluate the impact of the user behavior feature data set on the image feature data set and the pre-printing device feature data set to obtain an impact feature data set; An image error prediction module is used to obtain a pre-print image error prediction model according to the influencing feature data set training, and obtain the pre-print image error through the pre-print image error prediction model prediction; A quality assessment module is used to compare the predicted pre-print image error with a preset pre-print image error threshold to determine whether the pre-print image quality meets the standard; Optimization evaluation module: if the quality of the pre-printed image meets the standard, there is no need to optimize the pre-printed image, and a printing instruction is directly issued through the intelligent pre-printing terminal to print the pre-printed image; if the quality of the pre-printed image does not meet the standard, the pre-printed image needs to be optimized, and an optimization instruction is issued through the intelligent pre-printing terminal, and the pre-printed image data that needs to be optimized is automatically collected; An optimization execution module, used for training and acquiring an image defect detection model according to the pre-printed image data that needs to be optimized, and acquiring the pre-printed image defect type based on the image defect detection model; The severity of the pre-printed image defect type is obtained through the pre-printed image defect degree assessment model, and the corresponding image optimization plan is executed according to the severity of the pre-printed image defect type; each module is connected through wired and / or wireless means.
2. According to claim 1, the intelligent pre-print image optimization system based on deep learning is characterized in that: The image parameter data includes image attribute data, image format data, color calibration data and image noise data; the image attribute data includes image resolution data, color space data, bit depth, compression rate, metadata, image brightness data and contrast data; Pre-printed equipment parameter data includes printing resolution, scanning resolution, color mode parameters, and paper type and size parameters; user behavior data includes image adjustment behavior and user preference data; Pre-printed equipment parameter data and user behavior data are obtained through embedded sensors and user terminals; image parameter data is obtained through Swin Transformer; after multi-head self-attention mechanism, sliding window mechanism and Patch Merging operation, the feature matrix is finally output; The final output feature matrix is further analyzed and extracted to obtain image parameter data; the specific method is: S21, input original pre-printed image I∈R H×W×C , where I is the original pre-printed image, R is the real number space where the original pre-printed image is located, H is the image height, W is the image width, and C is the number of channels; the original pre-printed image is divided into q non-overlapping image blocks of size n×n, each of which contains n 2 ×C pixels; the pixels in each image patch are flattened to become a feature vector; where n is the size of the image patch, and the value of n is adjusted by the size adjustment formula; The size adjustment formula is specifically: Among them, Pmin is the minimum number of pixels contained in each image block; k is the control factor that controls the number of image blocks in the horizontal and vertical directions, and is usually greater than or equal to 1 to ensure that the image can be completely covered; is the rounding function, which means rounding down to ensure that n is an integer; S22. Apply linear projection to each image patch, projecting it from the flattened feature vector to a higher-dimensional feature space to obtain a feature vector of dimension d; integrate the feature vectors of all projected image patches to form a matrix X∈R d ; S23, use Swin Transformer Block to process small image blocks, and capture local dependency information through the local window attention mechanism; divide the small image blocks into V windows of size M×M; for the small image blocks in each window, use the multi-head self-attention mechanism to capture local features; The number V of image windows is adjusted by the window number adjustment formula, and the window number adjustment formula is: Where q is the number of image patches; n is the size of the image patches; Patch Merging is used to perform downsampling operations and merge adjacent blocks; a sliding window mechanism is used to capture the global features of small image blocks; the window is slidingly displaced, and the sliding operation of each window at the tth layer is denoted by S t , then the window feature after sliding is X′=S t (X); After the above steps, the final output feature matrix X∈RH′×W′×d′; where H′ and W′ are the spatial dimensions after multiple patch merging, and d′ is the number of channels; S24, further analyzing and extracting the feature matrix to obtain image parameter data.
3. The deep learning-based intelligent pre-print image optimization system according to claim 2, characterized in that: The method of preprocessing the acquired image parameter data, preprinting device parameter data and user behavior data to obtain an image feature data set, a preprinting device feature data set and a user behavior feature data set comprises: The acquired image parameter data, pre-printing equipment parameter data and user behavior data were cleaned, the missing values were filled using interpolation method, and the outliers were detected and removed using clustering algorithm; the image parameter data, pre-printing equipment parameter data and user behavior data were converted into a standard normal distribution with a mean of 0 and a standard deviation of 1 using Z-score standardization to eliminate the dimension effect; After the preprocessing in the above steps, the image feature dataset, the preprinting device feature dataset and the user behavior feature dataset are obtained.
4. The deep learning-based intelligent pre-print image optimization system according to claim 3, characterized in that: The method of evaluating the influence of the user behavior feature dataset on the image feature dataset and the pre-printing device feature dataset to obtain the influenced feature dataset comprises: Taking image features, pre-printed device features and user behavior features as input variables, a joint regression model is constructed. By constructing the joint regression model, the impact of the user behavior feature dataset on the image feature dataset and the pre-printed device feature dataset is analyzed, and finally the impact feature dataset is obtained.
5. The deep learning-based intelligent pre-print image optimization system according to claim 4, characterized in that: The training method of the pre-printed image error prediction model includes: The dataset is divided into a training set, a validation set, and a test set to train the model and evaluate the model performance; the sample set is a subset of the dataset, and each sample set includes a historical impact feature dataset and the corresponding preprint image error; Constructing a pre-printed image error prediction model, the pre-printed image error prediction model includes an input layer, a convolution layer, a pooling layer, a batch normalization layer, a fully connected layer and an output layer; the input layer is used to input a historical impact feature data set, and the output layer is used to output a pre-printed image error; the pre-printed image error prediction model is a 3D convolutional neural network model; Use mean absolute error as the loss function to measure the error between the model's predicted value and the actual value; use the training set data to train the model and use the Adam optimizer to minimize the loss function; use the validation set to evaluate the performance of the model and tune the model's hyperparameters until the model performance no longer improves significantly or reaches the preset stopping condition; The test set is used to evaluate the performance of the model in the prediction task, and the current influencing feature dataset is input into the trained pre-print image error prediction model to obtain the pre-print image error.
6. The deep learning-based intelligent pre-print image optimization system according to claim 5, characterized in that: The method of comparing the predicted pre-print image error with a preset pre-print image error threshold to determine whether the pre-print image quality meets the standard includes: If the predicted pre-print image error is less than a preset pre-print image error threshold, it is determined that the pre-print image quality meets the standard; If the predicted pre-print image error is greater than or equal to a preset pre-print image error threshold, it is determined that the pre-print image quality does not meet the standard.
7. The deep learning-based intelligent pre-print image optimization system according to claim 6, characterized in that: The pre-printed image data that needs to be optimized includes image resolution, color space, image format, color calibration rate, image noise, image brightness and contrast.
8. The deep learning-based intelligent pre-print image optimization system according to claim 7, characterized in that: The training method of the image defect detection model includes: The data set is divided into a training set, a validation set, and a test set to train the model and evaluate the model performance; the sample set is a subset of the data set, and each sample set includes the historical pre-printed image data that needs to be optimized and the corresponding pre-printed image defect type; The input data of the model is the historical pre-printed image data that needs to be optimized; the output label of the model is the pre-printed image defect type; the image defect detection model consists of v decision trees, and through Bootstrap sampling, when training each decision tree, a subset is randomly selected from the training set to train the tree, and a subset of features is randomly selected to split the node until the stopping condition is reached; the image defect detection model is a random forest model; Use multi-classification cross entropy as the model's loss function to measure the difference between the model's predicted value and the actual value; use the training set to train the image defect detection model, and update the model parameters through the back propagation algorithm to minimize the loss function; use the validation set to evaluate the performance of the image defect detection model by calculating the precision index; Adopt the grid search hyperparameter optimization method to tune the hyperparameters of the image defect detection model according to the performance feedback of the validation set, and adjust the model hyperparameter combination until the performance of the model is no longer significantly improved or the preset stopping condition is reached; The test set is used to evaluate the performance of the model in the prediction task, and the trained image defect detection model is used to predict the pre-printed image defect data that currently needs to be optimized to obtain the pre-printed image defect type.
9. The deep learning-based intelligent pre-print image optimization system according to claim 8, characterized in that: The method for executing a corresponding image optimization solution according to the severity of the pre-printed image defect type includes: Construct a pre-printed image defect degree assessment model, calculate the severity of the pre-printed image defect type through the pre-printed image defect degree assessment model, and execute the corresponding image optimization scheme according to the severity of the pre-printed image defect type; the pre-printed image defect degree assessment model is: Where Sge is the severity of the pre-printed image defect type; R re is the image resolution; C lr is the color space; Fot is the image format; C lb is the color calibration rate; N se is image noise; L bs is the image brightness; Dst is the contrast; ω1, ω2, ω3, ω4, ω5, ω6, and ω7 are the weight factors of each parameter.
10. A deep learning-based intelligent pre-print image optimization method, used to implement a deep learning-based intelligent pre-print image optimization system as claimed in any one of claims 1 to 9, characterized in that: include: S1, collect image parameter data, pre-printing device parameter data and user behavior data; S2. Preprocess the acquired image parameter data, preprinting device parameter data, and user behavior data to obtain an image feature data set, a preprinting device feature data set, and a user behavior feature data set; evaluate the impact of the user behavior feature data set on the image feature data set and the preprinting device feature data set to obtain an impact feature data set; S3, obtaining a pre-print image error prediction model according to the influencing feature data set training, and obtaining the pre-print image error through the pre-print image error prediction model prediction; S4, comparing the predicted pre-printed image error with a preset pre-printed image error threshold to determine whether the pre-printed image quality meets the standard; S5. If the quality of the pre-printed image meets the standard, there is no need to optimize the pre-printed image, and a printing instruction is directly issued through the intelligent pre-printing terminal to print the pre-printed image; if the quality of the pre-printed image does not meet the standard, the pre-printed image needs to be optimized, and an optimization instruction is issued through the intelligent pre-printing terminal, and the pre-printed image data that needs to be optimized is automatically collected; S6. Train and obtain an image defect detection model based on the optimized pre-printed image data as needed, and obtain the pre-printed image defect type based on the image defect detection model; The severity of the pre-printed image defect type is obtained through the pre-printed image defect degree evaluation model, and the corresponding image optimization solution is executed according to the severity of the pre-printed image defect type.
Citation Information
Patent Citations
Graphic processing device and method for preprinting paper products
CN113256170A
Fabric identification method, system and equipment based on deep learning and medium
CN117351473A
Method and device for optimizing printing effect of deep convolutional network and storage medium
CN117591046A
Deep learning-based jet printing color two-dimensional code defect detection method
CN118115782A
Film performance monitoring and evaluating system
CN118258447A