Banknote printing quality inspection method based on deep learning algorithm
By applying a deep learning algorithm method in banknote printing quality detection, the problems of high false alarm rate and poor classification effect in the prior art are solved, and higher detection accuracy and lower manual review requirements are achieved, which improves production quality and reduces costs.
Patent Information
- Application Number
- CN202210089577.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-01-25
AI Technical Summary
The prior art has problems with high false alarm rate and poor classification effect in banknote printing quality inspection, which requires a large amount of manual review.
The banknote printing quality inspection method based on deep learning algorithms is adopted, including defect segmentation module, defect deception determination module based on blob analysis and real waste image recognition classification module, and defect segmentation, deception and classification of images through deep learning models.
It effectively reduces false alarms caused by factors such as imaging instability, improves the accuracy and classification effect of defect detection, reduces the need for manual review, improves production quality and reduces costs.
Smart Images

Figure CN114445365B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and defect detection and identification, and in particular to a banknote printing quality inspection method based on a deep learning algorithm. Background Art
[0002] During the printing process of banknotes, due to the influence of printing technology, mechanical precision and some random factors, various defects such as color distortion, ink stains, missing prints, scratches, and overprint deviation may occur. At present, the quality inspection of banknote printing is affected by factors such as imaging conditions and overprint deviation, and there are a large number of false alarms. In addition, there are many types of scrapped products in each process, and the printing defects themselves are complex in shape and variable in position. The classification and grading of defects using traditional algorithms are not effective, and banknote printing companies need to rely on a large number of experienced inspectors to manually review them with the naked eye. Summary of the invention
[0003] The present invention provides a banknote printing quality inspection method based on a deep learning algorithm to solve at least one of the above-mentioned technical problems.
[0004] To solve the above problems, as one aspect of the present invention, a banknote printing quality inspection method based on a deep learning algorithm is provided, comprising:
[0005] Step 1, segment the defects in the image through the defect segmentation module, so as to detect the defects from the background image and obtain a defect binary image b;
[0006] Step 2, input the defect binary image b into the defect scrapping module based on blob analysis to perform connected domain analysis, extract the features of each connected domain, and perform defect scrapping according to the set conditions, so as to determine whether it is an erroneous scrapping or a real scrapping;
[0007] Step 3: The real waste image is transferred to the real waste image recognition and classification module to identify and classify the defect type.
[0008] Preferably, step 1 includes: if there is no defect in the background image, then the final output defect binary image b is a picture of all 0s, and the process ends; if there is a defect in the background image, then the module will segment the defective area, locate the defect information, and the output binary image b has pixels of 1 at the position corresponding to the defect, and pixels of other defect-free areas are 0.
[0009] Preferably, the defect segmentation module segments defects in the image through the following steps:
[0010] Step a1, data collection: collect defect sample data sets from different machines and different product lines through traditional inspection systems;
[0011] Step a2, data cleaning and labeling: For the collected data, first, the noise data needs to be removed, then the defect location is labeled at the pixel level to generate a label image, and each sample containing defects is enhanced and transformed to achieve the purpose of expanding the sample data set;
[0012] Step a3, build a network model and train it: use the training sample data set processed by the enhanced transformation to train the established deep learning model, which contains convolutional layers and fully connected layers, and can be described by the following formula:
[0013] y=f(x;θ)
[0014] y(u,v)=p(x(u,v))
[0015] Where f represents the established network model, x represents the input defective image, θ represents the model parameters, y represents the output probability map, (u, v) represents the pixel position index in the image, and p represents the probability that a certain pixel is a defect. Then p(x(u, v)) represents the probability that the pixel (u, v) is a defect.
[0016] The training process can be regarded as an iterative process of solving the optimization problem, which can be expressed by the following formula:
[0017]
[0018] Where gt is the label number image in step a2;
[0019] The optimal parameter θ is learned through training to establish the relationship between defective pixels and defect probabilities in the training sample data set, so that in the process of forward reasoning, the probability of each pixel in the current image being a defect is calculated through the optimal parameter θ, and then a probability map with the same resolution as the input image is output;
[0020] Step a4, model deployment and post-processing: Deploy the optimal model parameters trained in step a3 on the server for on-site inspection, input the image with defects, and obtain a corresponding defect probability map after model forward inference. Then, the probability map is thresholded by the set threshold t to obtain the final defect binary map b. The process can be described by the following formula:
[0021]
[0022] Preferably, the model includes 36 convolutional units, 6 deconvolutional units, and multiple basic connection units; each unit is composed of a convolutional layer, a deconvolutional layer, a batch normalization layer, a nonlinear activation layer, a fully connected layer, a feature aggregation layer, and a pooling layer in different forms according to different functions.
[0023] Preferably, the defect rejection module based on blob analysis performs connected domain analysis through the following steps:
[0024] Step b1, analyzing the relevant information of the defect blob block: firstly, performing a connected domain analysis on the b graph, extracting the relevant information of each connected domain and the relevant information of the defect position corresponding to the blob block, wherein the relevant information includes: area, perimeter, and centroid; the relevant information of the defect position corresponding to the blob block includes: energy, color distribution, defect position information, etc., and combining the features of the above two related information to form an n-dimensional feature vector, wherein the blob block refers to the connected domain with a pixel of 1 in the defect binary image b;
[0025] Step b2, set conditions for the data in the feature vector according to the on-site conditions and customer needs: the specific means is mainly achieved by setting thresholds. The above process can operate on each feature in the feature vector, and finally the conditions of all features are combined for judgment. Those that meet the conditions are considered to be actually scrapped, and those that do not meet the conditions are considered to be mistakenly scrapped.
[0026] Preferably, in step b2, a threshold is set for the area feature in the feature vector. A threshold greater than t1 indicates that condition 1 is satisfied, a threshold between t1 and t2 indicates that condition 2 is satisfied, and a threshold less than t2 indicates that condition 3 is satisfied. <t1。
[0027] Preferably, the waste image recognition and classification module performs defect type recognition and classification according to the following steps:
[0028] Step c1, data collection: the same method as step a1 is used;
[0029] Step c2, data cleaning and labeling: The data cleaning process uses the same method as step a2, but the labeling method needs to mark the defects in the image with a position box, and then set the corresponding category. After each image is labeled, a corresponding text file is generated, which contains the defect location and category information in the image;
[0030] Step c3, build a classification network model and train it: Use the enhanced training sample data set to train the established deep learning model, which contains convolutional layers and fully connected layers, and can be described by the following formula:
[0031] c=g(x;ω)
[0032] Among them, g represents the established classification network model, x represents the input defective image, ω represents the model parameter, and c represents an n-dimensional vector, where:
[0033] n=c1+c2
[0034] c1 and c2 represent the total number of categories of scrap types and the total number of categories of defect types, respectively;
[0035] The training process can be regarded as an iterative process of solving the optimization problem, which can be expressed by the following formula:
[0036]
[0037] Among them, c[i] and c[j] represent the elements of the c vector, pos represents the true label set of the current image, and neg represents other non-true label sets;
[0038] The optimal parameter ω is learned through training to establish the relationship between the defect images in the training sample data set and the process categories and defect types;
[0039] Step c4, model deployment and post-processing: deploy the optimal model parameters trained in step c3 on the on-site inspection server, input the defective image, output an n-dimensional vector, take the index of the largest element in the first c1 dimension as the process scrap label, and the index of the largest element in the remaining c2 dimension as the defect type label.
[0040] Preferably, the categories in c2 include process scrap labels and defect category labels. The process scrap labels include: gravure printing, offset printing, silk screen printing, white paper, etc.; the defect category labels include: dirty, dotted, missing, light, color mixing, etc.
[0041] Preferably, the model in c3 contains 24 convolutional units, and each unit is composed of a convolutional layer, a batch normalization layer, a nonlinear activation layer, a fully connected layer, a feature aggregation layer, and a pooling layer in different forms according to different functions.
[0042] Due to the adoption of the above-mentioned technical scheme, the present invention can utilize a deep learning algorithm to detect and analyze banknote images. On the one hand, printing defects can be detected through a segmentation network model, and the machine-inspected waste can be divided into good products and waste products in combination with blob analysis technology, effectively reducing a large number of false alarms caused by factors such as unstable imaging; on the other hand, the classification network model is used to calculate the waste images, and the waste is automatically divided into waste processes and multiple waste types, which can effectively reduce personnel allocation, improve production quality, and reduce production costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 The flowchart of the method of the present invention is schematically shown;
[0044] Figure 2 A flow chart of the method of the present invention is schematically shown. DETAILED DESCRIPTION
[0045] The following is a detailed description of embodiments of the present invention, but the present invention can be implemented in many different ways as defined and covered by the claims.
[0046] With the vigorous development of deep learning algorithms in recent years, recognition technology has made rapid progress. The present invention introduces deep learning methods into the detection and recognition of banknote printing defects, which can greatly improve the accuracy of recognition, reduce the missed detection rate, and improve robustness.
[0047] In view of the fact that online detection equipment in existing banknote production processes has many false alarms and poor classification effects, and relies on a large amount of manual review work, the present invention provides a method for defect detection and grading classification using a deep learning algorithm.
[0048] The present invention mainly includes the following three modules: (1) a defect segmentation module based on deep learning, (2) a defect scrapping module based on blob analysis, and (3) a recognition and classification module for real scrap images. First, the defects in the image are segmented by the defect segmentation module. The function realized in this step is to detect the defects from the background image. If there are no defects in the background image, the final output defect binary image b is a full-zero image, and the process ends; if there are defects in the background image, the module will segment the defect area, locate the defect information, and the output binary image b has pixels of 1 at the position corresponding to the defect, and pixels of other non-defective areas are 0. Then, the binary image b with defects is input into the defect scrapping module based on blob analysis for connected domain analysis, extracting the features of each connected domain, and judging the defects according to the set conditions. If it is judged to be wrongly scrapped, the process ends; if it is judged to be real scrap, the real scrap image is passed into the third module for defect type recognition and classification.
[0049] Each module contains several steps, which are described below.
[0050] The first module: defect segmentation module based on deep learning.
[0051] The steps include:
[0052] 1) Data collection.
[0053] Through traditional inspection systems, defect sample data sets from different machines and product lines can be collected.
[0054] 2) Data cleaning and labeling.
[0055] For the collected data, we first need to remove the noise data, such as abnormal imaging images, machine background images, and plate paper images; then we annotate the defect positions at the pixel level to generate a label image; for example, after an image with defects is annotated, the resulting label image is a binary image, in which the defective pixel position is 1 and the other non-defective positions are 0.
[0056] For banknote printing defects, some defect samples are very large, while others are very few. Therefore, each sample containing defects needs to be enhanced and transformed. These transformations include: affine transformation, color transformation, distortion deformation, brightness adjustment, etc., in order to achieve the purpose of expanding the sample data set.
[0057] 3) Build and train the network model.
[0058] This model is a deep learning model that includes convolutional layers and fully connected layers. It contains 36 convolutional units, 6 deconvolutional units, and some basic connection units: such as feature aggregation units, hyperlink units, etc. Each unit is composed of convolutional layers, deconvolutional layers, batch normalization layers, non-linear activation layers, fully connected layers, feature aggregation layers, and pooling layers in different forms according to different functions.
[0059] For example, the convolution unit consists of a convolution layer, a batch normalization layer, and a nonlinear activation layer; the deconvolution unit consists of a deconvolution layer, a batch normalization layer, and a nonlinear activation layer; and the feature aggregation unit consists of a batch normalization layer and a feature aggregation layer.
[0060] The established deep learning model is trained with the enhanced training sample dataset, which can be described by the following formula:
[0061] y=f(x;θ)
[0062] y(u,v)=p(x(u,v))
[0063] Among them, f represents the established network model, x represents the input defective image, θ represents the model parameters, y represents the output probability map, (u, v) represents the pixel position index in the image, and p represents the probability that a certain pixel is a defect. Then p(x(u, v)) represents the probability that the pixel (u, v) is a defect.
[0064] The training process can be regarded as an iterative process of solving the optimization problem, which can be expressed by the following formula:
[0065]
[0066] Where gt is the label number image in step 2).
[0067] Through training, the optimal parameter θ can be learned to establish the relationship between defective pixels and defect probabilities in the training sample dataset. In this way, during the forward inference process, the probability that each pixel in the current image is defective can be calculated through the optimal parameter θ, and then a probability map with the same resolution as the input image is output.
[0068] 4) Model deployment and post-processing.
[0069] Deploy the optimal model parameters trained in step 3) on the server for on-site detection. Input the defective image. After forward inference of the model, a corresponding defect probability map is obtained. Subsequently, the probability map is thresholded through the set threshold t to obtain the final binary defect map b. This process can be described by the following formula:
[0070]
[0071] The second module: Defect rejection module based on blob analysis.
[0072] It mainly includes the following steps:
[0073] 1) Analyze the relevant information of the defect blob (connected component). Here, the blob refers to the connected component where the pixel value in the binary defect map b is 1. Therefore, first perform connected component analysis on the b map to extract the relevant information of each connected component, including: area, perimeter, centroid; and the relevant information of the defect position corresponding to the blob, including: energy, color distribution, defect position information, etc. Combine the above features to form an n-dimensional feature vector.
[0074] 2) According to the on-site situation and customer requirements, the data in the feature vector can be conditionally set:
[0075] The specific means are mainly achieved by setting thresholds. For example, set a threshold for the area feature in the feature vector. Greater than t1 indicates that condition 1 is satisfied, between t1 and t2 indicates that condition 2 is satisfied, and less than t2 indicates that condition 3 is satisfied, where t2 < t1; the above process can be operated for each feature in the feature vector. Finally, the conditions of all features are combined for judgment. Those that meet the conditions are actual rejects, and those that do not meet the conditions are judged as false rejects.
[0076] The third module: Identification and classification module for actual reject defects.
[0077] It includes the following steps:
[0078] 1) Data collection.
[0079] The data collected in step 1) of the first module can be reused.
[0080] 2) Data cleaning and annotation.
[0081] The data cleaning process is the same as step 2) in the first module, but the labeling method is slightly different. The defects in the image need to be marked by position boxes.
[0082] Then, set the corresponding category. The category here includes two labels. One is the process scrap label, which mainly includes: gravure, offset, silk screen, white paper, etc. The second is the defect category label: mainly includes: dirty, dot, missing, light, color mixing, etc. After each image is annotated, a corresponding text file is generated, which contains the defect location and category information in the image.
[0083] 3) Build and train a classification network model.
[0084] This model is a deep learning model that includes convolutional layers and fully connected layers. It contains 24 convolutional units. Each unit is composed of convolutional layers, batch normalization layers, nonlinear activation layers, fully connected layers, feature aggregation layers, and pooling layers in different forms according to different functions.
[0085] The established deep learning model is trained with the enhanced training sample dataset, which can be described by the following formula:
[0086] c=g(x;ω)
[0087] Among them, g represents the established classification network model, x represents the input defective image, ω represents the model parameter, and c represents an n-dimensional vector, where:
[0088] n=c1+c2
[0089] c1 and c2 represent the total number of categories of scrap types and the total number of categories of defect types respectively.
[0090] The training process can be regarded as an iterative process of solving the optimization problem, which can be expressed by the following formula:
[0091]
[0092] Where c[i] and c[j] represent the elements of the c vector, pos represents the true label set of the current image, and neg represents other non-true label sets.
[0093] Through training, the optimal parameter ω can be learned to establish the relationship between the defect images in the training sample dataset and the process categories and defect types.
[0094] 4) Model deployment and post-processing.
[0095] The optimal model parameters trained in step 3) are deployed on the on-site inspection server, and the defective image is input. An n-dimensional vector is output. The index of the largest element in the first c1 dimension is taken as the process scrap label, and the index of the largest element in the remaining c2 dimension is taken as the defect type label.
[0096] Due to the adoption of the above-mentioned technical scheme, the present invention can utilize a deep learning algorithm to detect and analyze banknote images. On the one hand, printing defects can be detected through a segmentation network model, and the machine-inspected waste can be divided into good products and waste products in combination with blob analysis technology, effectively reducing a large number of false alarms caused by factors such as unstable imaging; on the other hand, the classification network model is used to calculate the waste images, and the waste is automatically divided into waste processes and multiple waste types, which can effectively reduce personnel allocation, improve production quality, and reduce production costs.
[0097] The present invention will be further described in detail below with reference to the accompanying drawings and preferred embodiments. Figure 1 This is a schematic diagram of the workflow of a banknote printing quality inspection method based on a deep learning algorithm in an embodiment of the present invention.
[0098] like Figure 1 As shown, the method includes:
[0099] S1: According to the banknote printing defects to be identified and classified and the production line process type, the defect images collected and saved by the banknote printing equipment online detection system are collected;
[0100] S2: Preprocess the images collected in S1 by positioning, rotation correction, and size normalization.
[0101] S3: annotate and classify the images in S2, and generate a training sample set and a test sample set for a deep learning-based defect segmentation model and a training sample set and a test sample set for a real-waste defect recognition and classification model respectively;
[0102] S4: According to the types and characteristics of banknote printing defects, design a deep learning-based defect segmentation network model and a real and waste defect recognition and classification network model;
[0103] S5: training the deep learning network model according to the training sample set and the training process of the deep learning network model;
[0104] S6: According to the verification sample set and the evaluation method of the deep learning network model, evaluate various indicators of the deep learning network model, and optimize the deep learning network model;
[0105] S7: Deploy and apply the deep learning network model according to different equipment conditions.
[0106] Furthermore, the image is labeled and classified in S3, and the specific method is as follows:
[0107] First, the corresponding defect positions and pixels on the collected defect images are annotated using annotation software to obtain a mask image of the same size as the corresponding defect image, which is used in the defect segmentation module based on deep learning. In addition, the defect images are classified and annotated according to the production process and defect type. The annotated process categories are: white paper, offset printing, gravure printing, code printing, coating, and inspection and sealing. The annotated defect categories are: light flowers, missing prints, ink spots, ink stains, rubbed stains, reverse stains, color bleeding, paper defects, oil stains, wrinkles, plate deviation, and watermark stains, which are used in the recognition and classification module of real waste defects.
[0108] To ensure the recognition effect and provide sufficient and comprehensive data sources for deep learning training and verification, each picture contains a defect, and at least 1,000 pictures of each defect are collected. Then, a part of the defect pictures and the corresponding annotation information are randomly selected as training sample sets according to a certain ratio, and the rest are used as test sample sets.
[0109] Specifically, 70%-80% of the banknote defect images and the corresponding annotation information can be used as the training sample set, and the remaining 20%-30% can be used as the test sample set.
[0110] Furthermore, two network models are designed in S4, namely a defect segmentation network model based on deep learning and a real-waste defect recognition and classification network model. The defect segmentation model uses a deep learning model based on a semantic segmentation method, which is specific to the pixel level when processing images and can mark the number of pixels with defects in the image.
[0111] Then, through the defect judgment module based on blob analysis, the image is judged as good or defective according to the blob (connected domain) information and set conditions; the real defect recognition and classification model is designed as a deep learning model including convolutional layers and fully connected layers according to the number of defect types and defect characteristics, which contains 24 convolutional units.
[0112] Furthermore, the training process of the model in S5 is consistent with the training process of the two network models, the defect segmentation network model based on deep learning and the real waste defect recognition and classification network model, which is specifically as follows:
[0113] a. Combine the defective images in the training set with the defect-free standard images and input them into the constructed deep learning network for forward propagation to obtain the predicted value;
[0114] b. Calculate the error value loss between the predicted value and the expected value through the error function;
[0115] c. Determine the gradient vector by back propagation;
[0116] d. Adjust the parameters and weights of the network according to the gradient vector to gradually reduce the loss;
[0117] e. Repeat steps b to e until the set number of times or loss converges.
[0118] Furthermore, the evaluation of various indicators of the deep learning network model and optimization of the deep learning network model described in S6 specifically include: taking the test sample set image data as input and passing it through the deep learning network model to obtain the accuracy and recall rate of the recognition results; optimizing the learning rate in the network model, retraining the network model and evaluating various indicators until the accuracy and recall rate are optimal and higher than the set threshold, thereby ensuring that the trained network model is usable.
[0119] Furthermore, the deployment and application of the network model in S7 requires a host computer with matching performance to access the online system image of the banknote printing and detection equipment sorting machine or the large-sheet inspection machine after the code through a network connection. The specific application process is as follows: Figure 2 As shown:
[0120] a. Obtain images collected by banknote quality inspection equipment through the network;
[0121] b. The image is first passed through the defect segmentation module based on deep learning to obtain a defect binary mask image. The mask image is the same size as the banknote image, the grayscale of the defect area image is 1, and the grayscale of the non-defect area image is 0;
[0122] c. The defect rejection module based on blob analysis classifies the severity of defects into good and bad products according to the blob (connected domain) information in the defect binary mask image, combined with the defect size, color difference, whether the pattern is a key area and other rule-set conditions, and divides the image into good and bad products;
[0123] d. The result of the rejection module is that the image of the reject is a defective product that exceeds the quality rejection standard of the banknote and cannot be circulated. This part of the image is then passed through the real waste defect recognition and classification module to obtain the production process and defect type information that caused the defect;
[0124] e. The corresponding identification result information is stored, and the statistics and analysis of the corresponding data can be used to guide production and improve production quality.
[0125] The innovation of the present invention lies in: (1) combining deep learning technology with banknote printing image quality inspection; (2) the entire system includes both AI-related technologies and a scrap judgment expert system, which is a combination of deep learning and traditional learning algorithms, realizes manual adjustment of the scrap judgment process, and improves the interception rate of scrap products.
[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A banknote printing quality inspection method based on deep learning algorithm, characterized in that: include: Step 1, segment the defects in the image through the defect segmentation module, so as to detect the defects from the background image and obtain a defect binary image b; Step 2: Input the defect binary image b into the defect scrapping module based on blob analysis to perform connected domain analysis, extract the features of each connected domain, and perform defect scrapping according to the set conditions to determine whether it is an erroneous scrapping or a real scrapping; the defect scrapping module based on blob analysis performs connected domain analysis through the following steps: Step b1, analyzing the relevant information of the defect blob block: firstly, performing a connected domain analysis on the b graph, extracting the relevant information of each connected domain and the relevant information of the defect position corresponding to the blob block, wherein the relevant information of each connected domain includes: area, perimeter, and centroid; the relevant information of the defect position corresponding to the blob block includes: energy, color distribution, and defect position information, and combining the features of the above two related information to form an n-dimensional feature vector, wherein the blob block refers to the connected domain with a pixel of 1 in the defect binary image b; Step b2, condition the data in the feature vector according to the on-site situation and customer needs: the specific means is to set the threshold value. The above process can be operated for each feature in the feature vector, and finally the conditions of all features are combined for judgment. If the conditions are met, it is considered to be real waste, and if the conditions are not met, it is considered to be wrong waste; Step 3: The real waste image is transferred to the real waste image recognition and classification module for defect type recognition and classification, using the following steps: Step c1, data collection: collect defect sample data sets from different machines and different product lines through traditional inspection systems; Step c2, data cleaning and labeling: For the collected data, first, the noise data needs to be removed, then the defect position is labeled at the pixel level to generate a label image, and each sample containing defects is enhanced and transformed to achieve the purpose of expanding the sample data set. When labeling, the defects in the image need to be marked by the position box, and then the corresponding category is set. After each image is labeled, a corresponding text file is generated, which contains the defect position and category information in the image; Step c3, build a classification network model and train it: Use the enhanced training sample data set to train the established deep learning model, which contains convolutional layers and fully connected layers, and can be described by the following formula: , Among them, g represents the established classification network model, x represents the input image with defects, ω represents the model parameters, c represents an n-dimensional vector, where: , c1 and c2 represent the total number of categories of scrap types and the total number of categories of defect types, respectively; The training process can be regarded as an iterative process of solving the optimization problem, which can be expressed by the following formula: , Among them, c[i] and c[j] represent the elements of the c vector, pos represents the true label set of the current image, and neg represents other non-true label sets; Learning optimal parameters through training ω , to establish the relationship between defect images and process categories and defect types in the training sample dataset; Step c4, model deployment and post-processing: deploy the optimal model parameters trained in step c3 on the on-site inspection server, input the defective image, output an n-dimensional vector, take the index of the largest element in the first c1 dimension as the process scrap label, and the index of the largest element in the remaining c2 dimension as the defect type label.
2. The banknote printing quality inspection method based on deep learning algorithm according to claim 1 is characterized in that: Step 1 includes: if there are no defects in the background image, then the final output defect binary image b is a picture of all 0s, and the process ends; if there are defects in the background image, then the module will segment the defective area, locate the defect information, and the output binary image b will have pixels of 1 at the position corresponding to the defect, and pixels of other non-defective areas will be 0.
3. The banknote printing quality inspection method based on deep learning algorithm according to claim 1 is characterized in that: The defect segmentation module segments defects in the image through the following steps: Step a1, collecting data using the same method as step c1; Step a2, data cleaning and labeling: For the collected data, first, the noise data needs to be removed, then the defect location is labeled at the pixel level to generate a label image, and each sample containing defects is enhanced and transformed to achieve the purpose of expanding the sample data set; Step a3, build a network model and train it: use the training sample data set processed by the enhanced transformation to train the established deep learning model, which contains convolutional layers and fully connected layers, and can be described by the following formula: , , Where f represents the established network model, x represents the input image with defects, θ represents the model parameters, y represents the output probability map, (u, v) represents the pixel position index in the image, and p represents the probability that a certain pixel is a defect. Then p(x(u, v)) represents the probability that the pixel (u, v) is a defect. The training process can be regarded as an iterative process of solving the optimization problem, which can be expressed by the following formula: , Where gt is the label number image in step a2; Learning optimal parameters through training θ , in order to establish the relationship between defective pixels and defect probability in the training sample data set, so as to obtain the optimal parameters in the forward reasoning process. θ Calculate the probability that each pixel in the current image is a defect, and then output a probability map with the same resolution as the input image; Step a4, model deployment and post-processing: Deploy the optimal model parameters trained in step a3 on the server for on-site inspection, input the image with defects, and obtain a corresponding defect probability map after model forward inference. Then, the probability map is thresholded by the set threshold t to obtain the final defect binary map b. The process can be described by the following formula: 。 4. The banknote printing quality inspection method based on deep learning algorithm according to claim 3 is characterized in that: The model contains 36 convolutional units, 6 deconvolutional units, and multiple basic connection units; each unit is composed of convolutional layers, deconvolutional layers, batch normalization layers, non-linear activation layers, fully connected layers, feature aggregation layers, and pooling layers in different forms according to different functions.
5. The banknote printing quality inspection method based on deep learning algorithm according to claim 1 is characterized in that: In step b2, a threshold is set for the area feature in the feature vector. A threshold greater than t1 indicates that condition 1 is satisfied, a threshold between t1 and t2 indicates that condition 2 is satisfied, and a threshold less than t2 indicates that condition 3 is satisfied. <t1。 6. The banknote printing quality inspection method based on deep learning algorithm according to claim 1 is characterized in that: The categories in c2 include process scrap labels and defect category labels. The process scrap labels include: gravure printing, offset printing, silk screen printing, and white paper; the defect category labels include: dirty, dotted, missing, light, and color mixing.
7. The banknote printing quality inspection method based on deep learning algorithm according to claim 6 is characterized in that: The model in c3 contains 24 convolutional units. Each unit is composed of a convolutional layer, a batch normalization layer, a nonlinear activation layer, a fully connected layer, a feature aggregation layer, and a pooling layer in different forms according to its different functions.
Citation Information
Patent Citations
Method for detecting quality of printed matter
CN105844621A
A method for detecting and classifying pixel defects in inkjet printing of a printed display panel and a device thereof
CN108986086A