CN109685968A - A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks - Google Patents

A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks Download PDF

Info

Publication number
CN109685968A
CN109685968A CN201811537487.1A CN201811537487A CN109685968A CN 109685968 A CN109685968 A CN 109685968A CN 201811537487 A CN201811537487 A CN 201811537487A CN 109685968 A CN109685968 A CN 109685968A
Authority
CN
China
Prior art keywords
layer
convolutional
neural networks
feature mapping
convolutional layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811537487.1A
Other languages
Chinese (zh)
Inventor
王可
丁云乐
舒粤
夏小东
邱峰艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Architecture and Technology
Original Assignee
Xian University of Architecture and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Architecture and Technology filed Critical Xian University of Architecture and Technology
Priority to CN201811537487.1A priority Critical patent/CN109685968A/en
Publication of CN109685968A publication Critical patent/CN109685968A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/202Testing patterns thereon using pattern matching
    • G07D7/206Matching template patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30144Printing quality

Abstract

The identification model for the banknote image defect based on convolutional neural networks that the present invention relates to a kind of constructs and recognition methods, it include: 1 all convolution kernels in training sample and C1 to be subjected to convolution summation, and activate to obtain the Feature Mapping figure of multiple first convolutional layers by being located at the function after C1;The Feature Mapping figure of C1 is carried out down-sampling by 2 in S1, obtains high-resolution features figure;3 will input C2 after the specific high-resolution features figure combination, obtain the Feature Mapping figure of the second convolutional layer C2;4 by the Feature Mapping figure of C2 in S2 down-sampling, obtain S2 Feature Mapping figure;By in the Feature Mapping figure of S2 and C3, the Feature Mapping figure of C3 is obtained;The Feature Mapping figure of C3 is subjected to down-sampling in S3, obtains the Feature Mapping figure of S3;The Feature Mapping figure of S3 is inputted full articulamentum by 5, exports characteristic pattern O, by output characteristic pattern O compared with desired label T, generates error term E;Banknote image defect recognition accuracy rate of the invention is high.

Description

A kind of identification model building of banknote image defect based on convolutional neural networks and Recognition methods
Technical field
The invention belongs to banknote image defect identification method fields, and in particular to a kind of paper based on convolutional neural networks The identification model of coin image deflects constructs and recognition methods.
Background technique
Due to bank note printing during money press tool and print paper money material it is not perfect and some inevitably it is random because Element influence, often will appear the distortion of bank note shade during printing, ink stain, text are obscured, are wrinkled, biting, The various defects such as scratch, register trouble.It is the heat of current research with the defect recognition detection that machine vision carries out banknote image Point, key technology and final purpose are the identification of defect image.Domestic and foreign scholars have made more research to this, but used Method belongs to traditional machine shallow-layer learning structure more, and original input signal is only transformed to particular problem space, forms one The simple feature knot of kind.Artificial defect Feature Selection, manual features description meter are carried out after extracting to defect target using segmentation again It calculates, the mode of statistical method or shallow-layer Network Recognition.Uneven, the defect target class because of banknote image background complexity itself The features such as type is more, defect target is very small, the accurate segmentation of banknote image defect, effective description of manual features and standard It really chooses relatively difficult, needs very professional knowledge, and limited by actual conditions, and rely on accurate defect Segmentation Statistical model or shallow-layer network model, object specific aim are very strong.Adaptability is poor.
Convolutional neural networks are a kind of efficient methods in deep learning, have become the research heat of numerous scientific domains One of point, especially in machine learning field.
Summary of the invention
In order to solve the above-mentioned problems in the prior art, the present invention provides one kind+subject names.The present invention wants The technical issues of solution, is achieved through the following technical solutions:
A kind of identification model construction method of the banknote image defect based on convolutional neural networks, includes the following steps;
Step 1: training sample is obtained, by all convolution kernels in training sample and the first convolutional layer C1 in a manner of convolution Convolution summation is carried out, and passes through the sigmoid function activation after the first convolutional layer C1 is set, obtains multiple first convolutional layers Feature Mapping figure;
Step 2: the Feature Mapping figure of the first convolutional layer being subjected to down-sampling in the first down-sampling layer S1, reduces and differentiates Rate simultaneously obtains multiple high-resolution features figures;
Step 3: will input the second convolutional layer C2 after the specific high-resolution features figure combination, and with the second convolution Corresponding convolution kernel carries out convolution summation in layer C2, obtains the Feature Mapping figure of multiple second convolutional layer C2;
Step 4: the Feature Mapping figure of the second convolutional layer C2 being subjected to down-sampling in the second down-sampling layer S2, reduces and divides Resolution and the Feature Mapping figure for obtaining multiple second sample level S2;Then by the Feature Mapping figure and third of the second sample level S2 All convolution kernels in convolutional layer C3 carry out convolution summation, obtain the Feature Mapping figure of third convolutional layer C3;By third convolutional layer The Feature Mapping figure of C3 carries out down-sampling in third sample level S3, reduces resolution ratio and obtains the feature of third sample level S3 Mapping graph;
Step 5: the Feature Mapping figure of third sample level S3 being inputted into full articulamentum, and characteristic pattern is exported by full articulamentum O generates error term E=O:T by output characteristic pattern O compared with desired label T;
The reverse path that convolutional neural networks model is traversed by the error term E, updates the weight of corresponding convolution kernel wij, until error term E converges on a stable weight set, lacked to obtain the banknote image based on convolutional neural networks Fall into identification model;
The calculating process of convolutional layer is indicated using formula (1) in 1~step 5 of above-mentioned steps:
Wherein: l represents the number of plies, and k represents convolution kernel, MjThe receptive field of input layer, b represent bias term.
Further, the calculating process of the first down-sampling layer S1, the first down-sampling layer S2 and the first down-sampling layer S3 It is indicated using formula (2):
Y=Sigmoid [wsum (xi)+b] (2)
Wherein, y indicates output, and w indicates weight, sum (xi) indicate to input xiCarry out summation and xiIndicate input, b table Show bias term, Sigmoid () indicates activation primitive.
Further, the second convolutional layer C2, and and volume Two will be inputted after the specific high-resolution features figure combination Corresponding convolution kernel carries out convolution summation in lamination C2, obtains the combination input of the Feature Mapping figure of multiple second convolutional layer C2 Method are as follows:
If the number of high-resolution features figure is the factor of the convolution kernel number of C2, by corresponding high-resolution Characteristic pattern is combined as specific high-resolution features figure, and is connect with the convolution kernel of C2;
Specifically, j-th of characteristic pattern C2j, j ∈ { 1,2,3... } for the second convolutional layer C2 has:
C2j=Sigmoid (∑i∈MSi+b) (3)
Wherein, M ∈ { i, j mod i==0 }, i ∈ { 1,2,3... }, b are bias term.
Further, in the step 5, the reverse path of convolutional neural networks model is traversed by the error term E, Update the weight Δ w of corresponding convolution kernelijProcess are as follows:
For any one convolutional layer L, i-th of input feature vector X of convolutional neural networksiWith j-th of output characteristic Yi Between weight wijMore new formula be using formula (4) indicate:
Δwij=α δjXi (4)
Wherein, α indicates learning rate;The δ when being the last layer of convolutional network for L layersjAre as follows:
δj=(Tj-Yj)h′L(Xi) (5)
In formula: TjFor j-th of expected label, h 'LIt (x) is the derivative of nonlinear mapping function, j=1,2,3..., when L layers When not being the last layer, L+1 layers are its next layers, then δjAre as follows:
In formula: NL+1For L+1 layers export feature number, m=1,2,3 ... NL+1, wjmFor j-th of L layers output with Weight between L+1 layers of m-th of output.
Further, the quantity of the convolution kernel of the first convolutional layer C1, the second convolutional layer C2, third convolutional layer C3 point Not are as follows: 12,24,24.
Further, the zoom factor that each down-sampling layer uses is 2, and down-sampling layer is carried out using maximum value process Chi Hua.
Further, in the step 1, pretreated specific steps are carried out to the sample of acquisition are as follows:
Step 1.1: defective image set, zero defect image set are obtained according to CCD image-forming detecting system respectively;
Step 1.2: defect map image set, zero defect image set are zoomed in and out respectively, obtain pretreatment defective data collection, Zero defect data set is pre-processed, pretreatment defective data collection, pretreatment zero defect data set are subjected to mixed merga pass and divided at random Group mode obtains training sample and test sample.
Further, further include step 6: test sample being inputted in banknote image defect recognition model and is tested;
It is to sentence that the test sample, which is inputted the specific method tested in the banknote image defect recognition model, The output characteristic pattern O that full articulamentum exports that breaks then passes through the error term E times with the presence or absence of over-fitting if there is over-fitting The reverse path for going through convolutional neural networks model updates the weight w of corresponding convolution kernelij, until error term E converges on one surely Fixed weight set, with the banknote image defect recognition model corrected.
Step 2: by the bank note defect image identification model in the sample set to be identified input claim 1-7 into Row identification, and export recognition result.A kind of recognition methods of the banknote image defect based on convolutional neural networks, including it is following Step:
Step 1: the sample of acquisition being pre-processed, sample set to be identified is obtained;
Step 2: by the bank note defect image identification model in the sample set to be identified input claim 1-7 into Row identification, and export recognition result.
Compared with prior art, beneficial effects of the present invention:
1. the banknote image defect recognition model of the invention based on convolutional neural networks, can overcome banknote image sheet Carry that scape is complicated and uneven, defect target type is more, the small problem of defect target on the body, the accurate knowledge of realization banknote image defect Not, and recognition correct rate is high;Multi-class support vector machine (direct multi class support vcector is met with using Machine, DMSVM) method and use tower-type gradient histogram support vector machines (pyramid histogram of Oriented gradients, PHOGSVM) method compares, and context of methods is all high in the discrimination of training stage and cognitive phase In DMSVM method and MLPNN method;It is equally important that context of methods is directly identified, avoid DMSVM method and The conventional methods such as MLPNN method need to manually extract the drawbacks of dominant character, and have better robustness.
2. a kind of banknote image defect identification method based on convolutional neural networks of the invention, this method uses convolution The a large amount of training image samples of neural network learning, the substantive characteristics in defect image region is successively extracted by convolutional network, is realized The defect recognition of sample overcomes existing blindness, Operating Complexity and classification essence when traditional bank note defect image identification Low deficiency is spent, and banknote image defect recognition accuracy of the invention is high.
Detailed description of the invention
Fig. 1 is structural schematic diagram of the invention.
Fig. 2 is the banknote image sample for having ink dot defect.
Fig. 3 is the banknote image sample of inkless point defect.
Fig. 4 is flow chart of the invention.
Fig. 5 is the training flow chart of banknote image defect recognition model.
The update schematic diagram of convolution kernel weight when L layers of Fig. 6 expression is the last layer.
The update schematic diagram of convolution kernel weight when L layers of Fig. 7 expression is not the last layer.
Specific embodiment
Further detailed description is done to the present invention combined with specific embodiments below, but embodiments of the present invention are unlimited In this.
Embodiment 1:
- Fig. 4 referring to Fig.1, a kind of construction method of the banknote image defect recognition model based on convolutional neural networks, packet Include following steps:
Step 1: pretreated training sample is obtained, by the institute in training sample and the first convolutional layer C1 in a manner of convolution There is convolution kernel to carry out convolution summation, and pass through the sigmoid function activation after the first convolutional layer C1 is set, obtains the first volume The Feature Mapping figure of lamination;
Step 2: the Feature Mapping figure of the first convolutional layer being subjected to down-sampling in the first down-sampling layer S1, reduces and differentiates Rate simultaneously obtains multiple high-resolution features figures;
Step 3: will input the second convolutional layer C2 after the specific high-resolution features figure combination, and with the second convolution Corresponding convolution kernel carries out convolution summation in layer C2, obtains the Feature Mapping figure of multiple second convolutional layer C2;
Step 4: the Feature Mapping figure of the second convolutional layer C2 being subjected to down-sampling in the second down-sampling layer S2, reduces and divides Resolution and the Feature Mapping figure for obtaining multiple second sample level S2;Then by the Feature Mapping figure and third of the second sample level S2 All convolution kernels in convolutional layer C3 carry out convolution summation, obtain the Feature Mapping figure of third convolutional layer C3;By third convolutional layer The Feature Mapping figure of C3 carries out down-sampling in third sample level S3, reduces resolution ratio and obtains the feature of third sample level S3 Mapping graph;
Step 5: the Feature Mapping figure of third sample level S3 being inputted into full articulamentum, and characteristic pattern is exported by full articulamentum O generates error term E by output characteristic pattern O compared with desired label T;
The reverse path that convolutional neural networks model is traversed by the error term E, updates the weight of corresponding convolution kernel wij, until error term E converges on a stable weight set, lacked to obtain the banknote image based on convolutional neural networks Fall into identification model;
The calculating process of convolutional layer is indicated using formula (1) in 1~step 5 of above-mentioned steps:
Wherein: l represents the number of plies, and k represents convolution kernel, MjThe receptive field of input layer, b represent bias term.
Sample level samples input picture using maximum value process in the present embodiment;And the second convolutional layer C2, third volume Activation primitive of the sigmoid function as this layer is respectively provided with after lamination C3.
In specific implementation, it is necessary first to obtain training sample and test sample:
A: defective image set, zero defect image set are obtained according to CCD image-forming detecting system respectively;
B: respectively zooming in and out defect map image set, zero defect image set, obtains pretreatment defective data collection, pretreatment Pretreatment defective data collection, pretreatment zero defect data set are carried out the mixed random packet mode of merga pass by zero defect data set Obtain training sample and test sample.
It should be pointed out that the first down-sampling layer S1, the first down-sampling layer S2 and the first down-sampling described in the present embodiment The calculating process of layer S3 is indicated using formula (2):
Y=Sigmoid [wsum (xi)+b] (2)
Wherein, y indicates output, and w indicates weight, sum (xi) indicate to sum to input, xiIndicate input, b indicates inclined Item is set, Sigmoid () indicates activation primitive.
Meanwhile in step 3, the second convolutional layer C2 is inputted after the specific high-resolution features figure being respectively combined, And convolution summation is carried out with convolution kernel corresponding in the second convolutional layer C2, obtain the Feature Mapping figure of multiple second convolutional layer C2 Combination input method are as follows:
It, will be corresponding high if the number of high-resolution features figure is the factor of the number of corresponding convolution kernel in C2 Resolution characteristics figure is as specific high-resolution features figure, and convolution kernel corresponding to C2's connects;For the second convolutional layer C2 J-th of convolution kernel C2j, j ∈ { 1,2,3... } have:
C2j=Sigmoid (∑i∈MSi+b) (3)
Wherein, M ∈ { i, j mod i==0 }, i ∈ { 1,2,3... }, b are bias term.And in other next volumes In lamination, identical combined strategy is used.
In the step 5:
1) each neural unit on full articulamentum, is connected with each other with all neural units in upper one layer;And it is every The output of one neuron can be indicated with formula (7):
hW, b(x)=f (WTx+b); (7)
In formula: x is the input of neuron, hW, bIt (x) is the output of neuron, W is connection weight, and b is biasing, and f () is Nonlinear activation function.
2) reverse path that convolutional neural networks model is traversed by the error term E, updates the weight of corresponding convolution kernel ΔwijProcess are as follows:
For any one convolutional layer L, i-th of input feature vector X of convolutional neural networksiWith j-th of output characteristic Yi Between weight wijMore new formula be using formula (4) indicate:
Δwij=α δjXi (4)
Wherein, α indicates learning rate;The δ when being the last layer of convolutional network for L layersjAre as follows:
δj=(Tj-Yj)h′L(Xi) (5)
In formula: TjFor j-th of expected label, h 'L(x) be nonlinear mapping function derivative, j=1 2,3 ..., works as L When layer is not the last layer, L+1 layers are its next layers, then δjAre as follows:
In formula: NL+1For L+1 layers export feature number, m=1,2,3 ... NL+1, wjmFor j-th of L layers output with Weighted value between L+1 layers of m-th of output.
In the present embodiment, the first convolutional layer C1, the second convolutional layer C2, third convolutional layer C3 convolution kernel quantity It is respectively as follows: 12,24,24.
The zoom factor that each down-sampling layer uses in the present invention is 2, and down-sampling layer carries out pond using maximum value Change.
Model of the invention is also needed to carry out discrimination detection to model by test sample and be repaired after the completion of training Just, the test sample is inputted and is tested in the banknote image identification model method particularly includes:
Judge that the output characteristic pattern O of full articulamentum output then passes through institute if there is over-fitting with the presence or absence of over-fitting The reverse path for stating error term E traversal convolutional neural networks model, updates the weight w of corresponding convolution kernelij, until error term E is received It holds back in a stable weight set, with the banknote image defect recognition model corrected.
The invention also discloses a kind of banknote image defect identification methods, comprising the following steps:
Step 1: the sample of acquisition being pre-processed, sample set to be identified is obtained;
Step 2: the sample set to be identified being inputted in above-mentioned trained bank note defect image identification model and carried out Identification, and export recognition result.
Technical solution of the present invention is further described with a specific example below:
One, experimental data acquires
The initial data of experiment is mainly derived from the defective bank note collected in CCD image-forming detecting system on production line Image.Experiment verifies the bank note proposed by the invention based on convolutional neural networks with the recognition effect to ink smudge defect The construction method of image deflects identification model.
Screen first to image data set, the foundation mainly screened out has: the wrong picture of information is (such as snow, big Area is completely black etc.);Source is not the picture of Surface testing point, such as has an X-rayed test point picture (this kind of picture is black and white);Ink dot The defect picture too far away from picture centre.
When screening defect image, picture portion operation is not carried out, includes glue gravure figure in defect picture All information such as case, paper area, watermark, number, safety line.The ink dot defect of test further comprises a lot of other mode of appearance classes It is similar to defect of ink dot, such as oily dirty, set-off etc., has all given retaining, therefore defect point has shallow stain in addition to color has deeply Except, it further include just like the various defect points such as red, yellow, blue;The smallest ink dot is no more than three pixels on area, most Big defect area has twenty or thirty pixel or so.Ink dot defect banknote image sample is as shown in Figure 2.
Since the picture size of input convolutional neural networks model is 48*48 size, to the defective original of acquisition Beginning data carry out unified scaling processing, finally obtain the image pattern 405 comprising ink dot defect and open, have therefrom randomly selected 100 Zhang Zuowei test sample, remaining is put into training sample set.
Flawless image data set comes from identical image-forming detecting system, including bank note front and back, by bank note figure Picture area zoom obtains flawless sample image 420 and opens to 48*48 size, equally therefrom randomly selects 100 as survey Sample sheet, remaining picture are put into training set.Zero defect banknote image sample is as shown in the figure:
Training set image totally 625 are finally obtained, wherein positive and negative samples distinguish accounting 49% and 51%, test set image Totally 200, positive negative sample respectively accounts for half.
Two, the training of convolutional neural networks model
Banknote image defect recognition model of the invention includes: 3 convolutional layers, 3 down-sampling layers, a full articulamentum, Wherein the convolution kernel size that takes of convolutional layer is respectively 5*5,5*5,3*3;Convolutional layer is all made of Sigmoid function as activation letter Number, down-sampling layer carries out pond using maximum value process, while having used the neural network of full connecting-type.
Step 1: all convolution kernels in training sample and the first convolutional layer C1 are subjected to convolution summation in a manner of convolution, And pass through the sigmoid function activation after the first convolutional layer C1 is set, obtain the Feature Mapping figure of multiple first convolutional layers;
Specifically, training sample is inputted first convolutional layer C1,12 48*48 sizes are obtained after carrying out feature extraction Feature Mapping figure, the Feature Mapping figure as the Feature Mapping figure of the first convolutional layer C1,12 first convolutional layers is to pass through The convolution kernel of one 5*5 size obtains.
The size of convolution kernel determines the size of a neuron receptive field, and convolution kernel is too small, can not extract effective part Feature, when convolution kernel is excessive, the complexity of the feature of extraction may be far more than the expression ability of convolution kernel.
The convolution kernel that 5*5 size has been used in C1, the picture for 48*48 size of deconvoluting are final to obtain (48-5+1) * One Feature Mapping figure of (48-5+1)=44*44 size.The result that convolution obtains be not be stored directly in C1 layers, but It first passes through Sigmoid activation primitive to be calculated, is re-used as the characteristic value of C1 layers of some neuron.
Step 2: the Feature Mapping figure of the first convolutional layer being subjected to down-sampling in the first down-sampling layer S1, reduces and differentiates Rate simultaneously obtains multiple high-resolution features figures;
Specifically, the first down-sampling layer is to weigh the sub-block x summation of the 2*2 not overlapped all in C1 multiplied by one Weight w is calculated in addition a bias term b is obtained by formula (2);
The zoom factor that down-sampling layer of the invention uses is 2, its purpose is to control the speed of scaling decline, because Scaling is exponential scaling, and the speed of diminution also implies that very much extraction characteristics of image is more coarse fastly, it will loses more images Minutia.
Step 3: will input the second convolutional layer C2 after the specific high-resolution features figure combination, and with the second convolution Corresponding convolution kernel carries out convolution summation in layer C2, obtains the Feature Mapping figure of multiple second convolutional layer C2;
Specifically, there are 24 convolution kernels, and the size of each convolution kernel is 5*5 in the second convolutional layer C2;So it The characteristic pattern size of acquisition is (24-5+1) * (24-5+1)=20*20.Due to passing through the processing of C1 and S1, actually S1's is every The receptive field of one neuron covering has been equivalent to the 10*10 of original image;The convolution kernel size of C1 is 5*5, the sampling of S1 Sub-block size is 2*2, therefore, 5*5*2*2=10*10;
The convolution kernel that present C2 passes through a 5*5 size again extracts the feature of S1, its receptive field further expansion, phase When in original image 50*50.
The characteristic pattern of C2 shares 24, increases one times than C1, C1 obtains 12 mappings by one picture of input layer and puts down Face, present C2 need to map out 24 characteristic patterns from 12 characteristic patterns of S1.Each convolution kernel in C2 when making convolution, Input is to be combined into input by Feature Mapping figures several in S1 or whole characteristic patterns, then convolution sum convolution corresponding to C2's It obtains.It is not or not always using whole characteristic patterns of S1 as the reason of input of each convolution kernel: incomplete connection mechanism Within the scope of so that the quantity of connection is maintained at reasonable;Simultaneously, it is most important that it destroys the symmetry of network, different What combination was extracted is different feature naturally;
Specifically: if the Feature Mapping figure number of S1 is the factor of the convolution sum of C2, their above-mentioned S1's Feature Mapping figure is that convolution kernel corresponding to C2's has connection, and specific: the characteristic pattern 1 in such as S1 is connected in C2 Convolution kernel, the characteristic pattern 2 in S1 are connected to the convolution kernel that all numbers in C2 are even number.Characteristic pattern 3 in S1 is connected in C2 The convolution kernel of all number aliquots 3, and so on.For convolutional layer C2 j-th of convolution kernel C2j, j ∈ 1,2 ..., 24 } have:
C2j=Sigmoid (∑i∈MSi+b) (3)
Wherein, M ∈ { i, j mod i==0 }, i ∈ { 1,2 ..., 12 };In next convolutional layer, use is identical Combination input mode.
Step 4: the Feature Mapping figure of the second convolutional layer C2 being subjected to down-sampling in the second down-sampling layer S2, reduces and divides Resolution and the Feature Mapping figure for obtaining multiple second sample level S2;Then by the Feature Mapping figure and third of the second sample level S2 All convolution kernels in convolutional layer C3 carry out convolution summation, obtain the Feature Mapping figure of third convolutional layer C3;By third convolutional layer The Feature Mapping figure of C3 carries out down-sampling in third sample level S3, reduces resolution ratio and obtains the feature of third sample level S3 Mapping graph;
By C1, S1, C2, S2 number layer convolution and down-sampling, the feature of extraction very have ability to express, however it Abstracting power it is still inadequate.In an experiment, as use only C1, S1, C2, the convolutional neural networks of S2, acquisition is just True nicety of grading only has about 60%;
And after adding third pond layer C3 and third down-sampling layer S3 after S2, correct nicety of grading is substantially increased.
Step 5: the Feature Mapping figure of third sample level S3 being inputted into full articulamentum, and characteristic pattern is exported by full articulamentum O generates error term E by output characteristic pattern O compared with desired label T;
The reverse path that convolutional neural networks model is traversed by the error term E, updates the weight of corresponding convolution kernel wij, until error term E converges on a stable weight set, lacked to obtain the banknote image based on convolutional neural networks Fall into identification model;
Specifically;
Corresponding convolution kernel weight w is updated according to right value update formula (12)ij, for any one layer of L of convolutional network, Its i-th of input feature vector XiWith j-th of output characteristic YiBetween weight wijMore new formula using formula (4) indicate:
Δwij=α δjXi (4)
Wherein, α indicates learning rate;When being the last layer of convolutional network for L layers, as shown in fig. 6, wherein δjAre as follows:
δj=(Tj-Yj)h′L(Xi) (5)
In formula: TjFor j-th of expected label, h 'LIt (x) is the derivative of nonlinear mapping function, j=1,2,3 ...;
When being not the last layer for L layers, as shown in fig. 6, L+1 layers are its next layers:
Then δjFor
In formula: NL+1For L+1 layers export feature number, m=1,2,3 ... NL+1, wjmFor L layers of j-th of output Weight between (j-th of input as L+1 layers) and m-th of L+1 layer output.
In the present invention, the calculating process of all convolutional layers is all made of formula (1) expression, the calculating of all down-sampling layers Journey is all made of formula (2) expression, and the calculating process of full articulamentum is all made of formula (7) expression.
Three, the test of convolutional neural networks model
Test sample is inputted in banknote image defect recognition model and is tested, it will be described in test sample input It is tested in banknote image defect recognition model method particularly includes:
Test sample is inputted in trained banknote image defect recognition model, and judges the defeated of full articulamentum output Characteristic pattern O whether there is over-fitting out, if there is over-fitting, then traverse convolutional neural networks model by the error term E Reverse path, update the weight w of corresponding convolution kernelij, until error term E converges on a stable weight set, to obtain The banknote image defect recognition model of correction.
Four, experimental data and interpretation of result
Convolutional neural networks are to solve weight by interative computation, obtain ideal by successive ignition operation Parameter.Experimental result using different the number of iterations is as shown in table 1.
The different the number of iterations experimental results of table 1:
In the case where the number of iterations is seldom, network science common practice is insufficient, and the model that training obtains is also undesirable, therefore Recognition effect is poor.With the increase of the number of iterations, network parameter is continuously available optimization, and recognition accuracy can rise with it, but It is that, with the increase of the number of iterations, classification accuracy rate ascensional range is gradually reduced.When frequency of training is enough, network parameter There will be no big variation, indicates that convolutional network has been in convergence state, know sub-category performance and be optimal.
Because the convolutional neural networks input of design is the picture of 48*48 size, and the bank note defective data collected The picture of concentration is the image that size is 185*160 size.So carrying out size shearing firstly the need of to picture, that is, choose paper That defective a part of image on coin, then convolutional neural networks are input to, this also allows for CNN itself for scale, rotation It is insensitive, excessive pre-treatment step is omitted.During processing, in image proportion very little element, lead to Cross after multilayer convolution remain on can by its information representation into high-level characteristic, what this also had benefited from using in convolutional neural networks Structure, therefore the information extraction for different scale, it is only necessary to sufficient training sample be provided respectively, do not needed Do too complicated multi-scale strategy.
With in the comparative experiments of existing identifying schemes, using direct multi-class support vector machine (direct multi Classsupport vcector machine, DMSVM) method and use tower-type gradient histogram support vector machines (pyramid histogram of oriented gradients, PHOGSVM) method, to training sample image described previously herein Identification experiment is carried out with test sample image, experimental data is as shown in table 2:
The comparison of 2 experimental data of table:
Method DMSVM PHOGSVM The present invention
Discrimination 90.6% 92.5% 95.6%
The experimental results showed that context of methods the discrimination of training stage and cognitive phase be all higher than DMSVM method and MLPNN method;It is equally important that context of methods is directly identified, it is traditional to avoid DMSVM method and MLPNN method etc. Method need to manually extract the drawbacks of dominant character, and have better robustness.
Five, conclusion
Traditional bank note image deflects basis of characterization experience extracts feature from defect image, then is divided in this feature Class identification, there are blindness, the defects such as low with nicety of grading complicated for operation, are furtheing investigate base to convolutional neural networks herein On plinth, a kind of banknote image defect identification method based on convolutional neural networks is proposed, which lacks there is no above-mentioned Point, and the results show this method accuracy in banknote image defect recognition is higher.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, cannot recognize Fixed specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, Without departing from the inventive concept of the premise, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to the present invention Protection scope.

Claims (9)

1. a kind of identification model construction method of the banknote image defect based on convolutional neural networks, which is characterized in that including with Lower step;
Step 1: obtaining training sample, rolled up training sample and all convolution kernels in the first convolutional layer C1 in a manner of convolution Product summation, and pass through the sigmoid function activation after the first convolutional layer C1 is set, the feature for obtaining multiple first convolutional layers is reflected Penetrate figure;
Step 2: the Feature Mapping figure of the first convolutional layer being subjected to down-sampling in the first down-sampling layer S1, resolution ratio is reduced and obtains To multiple high-resolution features figures;
Step 3: will input the second convolutional layer C2 after the specific high-resolution features figure combination, and in the second convolutional layer C2 Corresponding convolution kernel carries out convolution summation, obtains the Feature Mapping figure of multiple second convolutional layer C2;
Step 4: the Feature Mapping figure of the second convolutional layer C2 being subjected to down-sampling in the second down-sampling layer S2, reduces resolution ratio simultaneously Obtain the Feature Mapping figure of multiple second sample level S2;Then by the Feature Mapping figure of the second sample level S2 and third convolutional layer C3 In all convolution kernels carry out convolution summation, obtain the Feature Mapping figure of third convolutional layer C3;By the feature of third convolutional layer C3 Mapping graph carries out down-sampling in third sample level S3, reduces resolution ratio and obtains the Feature Mapping figure of third sample level S3;
Step 5: the Feature Mapping figure of third sample level S3 is inputted into full articulamentum, and characteristic pattern O is exported by full articulamentum, it will be defeated Characteristic pattern O generates error term E=O:T compared with desired label T out;
The reverse path that convolutional neural networks model is traversed by the error term E, updates the weight w of corresponding convolution kernelij, until Error term E converges on a stable weight set, to obtain the banknote image defect recognition mould based on convolutional neural networks Type;
The calculating process of convolutional layer is indicated using formula (1) in 1~step 5 of above-mentioned steps:
Wherein: l represents the number of plies, and k represents convolution kernel, MjThe receptive field of input layer, b represent bias term.
2. the identification model construction method of the banknote image defect according to claim 1 based on convolutional neural networks, It is characterized in that, the calculating process of the first down-sampling layer S1, the first down-sampling layer S2 and the first down-sampling layer S3 use formula (2) it indicates:
Y=Sigmoid [wsum (xi)+b] (2)
Wherein, y indicates output, and w indicates weight, sum (xi) indicate to input xiIt sums, xiIndicate input, b indicates biasing , Sigmoid () indicates activation primitive.
3. the identification model construction method of the banknote image defect according to claim 2 based on convolutional neural networks, Be characterized in that, will input the second convolutional layer C2 after the specific high-resolution features figure combination, and in the second convolutional layer C2 Corresponding convolution kernel carries out convolution summation, obtains the combination input method of the Feature Mapping figure of multiple second convolutional layer C2 are as follows:
If the number of high-resolution features figure is the factor of the convolution kernel number of C2, by corresponding high-resolution features figure It combines as specific high-resolution features figure, and is connect with the convolution kernel of C2;
Specifically, j-th of characteristic pattern C2j, j ∈ { 1,2,3... } for the second convolutional layer C2 has:
C2j=Sigmoid (∑i∈MSi+b) (3)
Wherein, M ∈ { i, jmodi==0 }, i ∈ { 1,2,3... }, b are bias term.
4. the identification model construction method of the banknote image defect according to claim 3 based on convolutional neural networks, It is characterized in that, in the step 5, the reverse path of convolutional neural networks model is traversed by the error term E, updates respective roll The weight Δ w of product coreijProcess are as follows:
For any one convolutional layer L, i-th of input feature vector X of convolutional neural networksiWith j-th of output characteristic YiBetween Weight wijMore new formula be using formula (4) indicate:
Δwij=α δjXi (4)
Wherein, α indicates learning rate;The δ when being the last layer of convolutional network for L layersjAre as follows:
δj=(Tj-Yj)h′L(Xi) (5)
In formula: TjFor j-th of expected label, h 'L(x) be nonlinear mapping function derivative, j=1 2,3 ..., when L layers is not When the last layer, L+1 layers are its next layers, then δjAre as follows:
In formula: NL+1For L+1 layers export feature number, m=1,2,3 ... NL+1, wjmFor L layers of j-th of output and L+1 layers M-th output between weight.
5. the identification model structure of the banknote image defect described in any one of -4 based on convolutional neural networks according to claim 1 Construction method, which is characterized in that the first convolutional layer C1, the second convolutional layer C2, third convolutional layer C3 convolution kernel quantity point Not are as follows: 12,24,24.
6. the identification model structure of the banknote image defect described in any one of -4 based on convolutional neural networks according to claim 1 Construction method, which is characterized in that the zoom factor that each down-sampling layer uses is 2, and down-sampling layer is carried out using maximum value process Chi Hua.
7. the identification model construction method of the banknote image defect according to claim 1 based on convolutional neural networks, It is characterized in that, in the step 1, pretreated specific steps is carried out to the sample of acquisition are as follows:
Step 1.1: defective image set, zero defect image set are obtained according to CCD image-forming detecting system respectively;
Step 1.2: defect map image set, zero defect image set being zoomed in and out respectively, obtain pretreatment defective data collection, pretreatment Pretreatment defective data collection, pretreatment zero defect data set are carried out the mixed random packet mode of merga pass by zero defect data set Obtain training sample and test sample.
8. the identification model construction method of the banknote image defect according to claim 7 based on convolutional neural networks, It is characterized in that, further includes step 6: test sample being inputted in banknote image defect recognition model and is tested;
The test sample, which is inputted the specific method tested in the banknote image defect recognition model, is, judgement connects entirely The output characteristic pattern O of layer output is met with the presence or absence of over-fitting, if there is over-fitting, then convolution is traversed by the error term E The reverse path of neural network model updates the weight w of corresponding convolution kernelij, until error term E converges on a stable weight Set, with the banknote image defect recognition model corrected.
9. a kind of recognition methods of the banknote image defect based on convolutional neural networks, which comprises the following steps:
Step 1: the sample of acquisition being pre-processed, sample set to be identified is obtained;
Step 2: will know in the bank note defect image identification model in the sample set input claim 1-7 to be identified Not, and recognition result is exported.
CN201811537487.1A 2018-12-15 2018-12-15 A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks Pending CN109685968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811537487.1A CN109685968A (en) 2018-12-15 2018-12-15 A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811537487.1A CN109685968A (en) 2018-12-15 2018-12-15 A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks

Publications (1)

Publication Number Publication Date
CN109685968A true CN109685968A (en) 2019-04-26

Family

ID=66186151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811537487.1A Pending CN109685968A (en) 2018-12-15 2018-12-15 A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks

Country Status (1)

Country Link
CN (1) CN109685968A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110689011A (en) * 2019-09-29 2020-01-14 河北工业大学 Solar cell panel defect detection method of multi-scale combined convolution neural network
CN111951253A (en) * 2020-05-19 2020-11-17 惠州高视科技有限公司 Method, device and readable storage medium for detecting surface defects of lithium battery
CN112950837A (en) * 2021-03-03 2021-06-11 中国工商银行股份有限公司 Banknote damage condition identification method and device based on deep learning
WO2022221982A1 (en) * 2021-04-19 2022-10-27 中国科学院深圳先进技术研究院 Image reconstruction method and apparatus, terminal device, and storage medium
CN116486418A (en) * 2023-06-19 2023-07-25 恒银金融科技股份有限公司 Method and device for generating banknote crown word number image

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751447A (en) * 2015-01-10 2015-07-01 哈尔滨工业大学(威海) Lithium battery unit defect detection method
CN105957238A (en) * 2016-05-20 2016-09-21 聚龙股份有限公司 Banknote management method and system
CN106156734A (en) * 2016-06-28 2016-11-23 浙江工业大学 A kind of current speed-measuring method based on convolutional neural networks image recognition
CN106529569A (en) * 2016-10-11 2017-03-22 北京航空航天大学 Three-dimensional model triangular facet feature learning classification method and device based on deep learning
CN107145846A (en) * 2017-04-26 2017-09-08 贵州电网有限责任公司输电运行检修分公司 A kind of insulator recognition methods based on deep learning
CN107657204A (en) * 2016-07-25 2018-02-02 中国科学院声学研究所 The construction method and facial expression recognizing method and system of deep layer network model
CN108074231A (en) * 2017-12-18 2018-05-25 浙江工业大学 A kind of magnetic sheet detection method of surface flaw based on convolutional neural networks
CN108764195A (en) * 2018-06-04 2018-11-06 平安科技(深圳)有限公司 Handwriting model training method, hand-written character recognizing method, device, equipment and medium
CN108806792A (en) * 2017-05-03 2018-11-13 金波 Deep learning facial diagnosis system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751447A (en) * 2015-01-10 2015-07-01 哈尔滨工业大学(威海) Lithium battery unit defect detection method
CN105957238A (en) * 2016-05-20 2016-09-21 聚龙股份有限公司 Banknote management method and system
CN106156734A (en) * 2016-06-28 2016-11-23 浙江工业大学 A kind of current speed-measuring method based on convolutional neural networks image recognition
CN107657204A (en) * 2016-07-25 2018-02-02 中国科学院声学研究所 The construction method and facial expression recognizing method and system of deep layer network model
CN106529569A (en) * 2016-10-11 2017-03-22 北京航空航天大学 Three-dimensional model triangular facet feature learning classification method and device based on deep learning
CN107145846A (en) * 2017-04-26 2017-09-08 贵州电网有限责任公司输电运行检修分公司 A kind of insulator recognition methods based on deep learning
CN108806792A (en) * 2017-05-03 2018-11-13 金波 Deep learning facial diagnosis system
CN108074231A (en) * 2017-12-18 2018-05-25 浙江工业大学 A kind of magnetic sheet detection method of surface flaw based on convolutional neural networks
CN108764195A (en) * 2018-06-04 2018-11-06 平安科技(深圳)有限公司 Handwriting model training method, hand-written character recognizing method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
毕盼盼: "《图像处理技术在印刷缺陷检测中的应用研究》", 《中国优秀硕士学位论文全文数据库(电子期刊)工程科技Ⅰ辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110689011A (en) * 2019-09-29 2020-01-14 河北工业大学 Solar cell panel defect detection method of multi-scale combined convolution neural network
CN111951253A (en) * 2020-05-19 2020-11-17 惠州高视科技有限公司 Method, device and readable storage medium for detecting surface defects of lithium battery
CN111951253B (en) * 2020-05-19 2021-08-20 高视科技(苏州)有限公司 Method, device and readable storage medium for detecting surface defects of lithium battery
CN112950837A (en) * 2021-03-03 2021-06-11 中国工商银行股份有限公司 Banknote damage condition identification method and device based on deep learning
CN112950837B (en) * 2021-03-03 2023-06-16 中国工商银行股份有限公司 Banknote breakage condition identification method and device based on deep learning
WO2022221982A1 (en) * 2021-04-19 2022-10-27 中国科学院深圳先进技术研究院 Image reconstruction method and apparatus, terminal device, and storage medium
CN116486418A (en) * 2023-06-19 2023-07-25 恒银金融科技股份有限公司 Method and device for generating banknote crown word number image
CN116486418B (en) * 2023-06-19 2023-10-03 恒银金融科技股份有限公司 Method and device for generating banknote crown word number image

Similar Documents

Publication Publication Date Title
CN109685968A (en) A kind of the identification model building and recognition methods of the banknote image defect based on convolutional neural networks
CN107122776A (en) A kind of road traffic sign detection and recognition methods based on convolutional neural networks
CN104598885B (en) The detection of word label and localization method in street view image
CN109376792A (en) Photovoltaic cell open defect classification method based on multichannel residual error neural network
CN109284669A (en) Pedestrian detection method based on Mask RCNN
CN107103317A (en) Fuzzy license plate image recognition algorithm based on image co-registration and blind deconvolution
CN105989659B (en) A kind of similar character recognition methods and paper money code recognition methods
CN108734189A (en) Vehicle License Plate Recognition System based on atmospherical scattering model and deep learning under thick fog weather
CN105809121A (en) Multi-characteristic synergic traffic sign detection and identification method
CN109271991A (en) A kind of detection method of license plate based on deep learning
CN109117885B (en) Stamp identification method based on deep learning
CN109447977A (en) A kind of defects of vision detection method based on multispectral depth convolutional neural networks
CN106529532A (en) License plate identification system based on integral feature channels and gray projection
CN106650731A (en) Robust license plate and logo recognition method
CN101908241A (en) Method and system for identifying valued documents
CN106228166B (en) The recognition methods of character picture
CN104298989A (en) Counterfeit identifying method and counterfeit identifying system based on zebra crossing infrared image characteristics
CN110335262A (en) A kind of printed matter automatic defect classification method in machine vision
CN106874929B (en) Pearl classification method based on deep learning
CN111310628A (en) Paper currency forming mode inspection and identification method based on paper currency printing pattern characteristics
CN107195069A (en) A kind of RMB crown word number automatic identifying method
CN110197259A (en) Wafer defect detection method based on small lot data set Yu deep learning algorithm
CN108268865A (en) Licence plate recognition method and system under a kind of natural scene based on concatenated convolutional network
CN107437293A (en) A kind of bill anti-counterfeit discrimination method based on bill global characteristics
CN108416270A (en) A kind of traffic sign recognition method based on more attribute union features

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190426

RJ01 Rejection of invention patent application after publication