Multi-currency banknote serial number recognition method and device based on deep learning

Through deep learning methods, using convolutional neural networks and template feature positioning, a multi-currency banknote serial number recognition system was constructed, which solved the compatibility and accuracy problems of multi-national banknote serial number recognition and achieved fast and accurate banknote information acquisition.

CN114202759BActive Publication Date: 2025-09-12GUOGUANG ELECTRONICS INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111503246.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-09-12
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

Existing technologies are difficult to achieve compatible serial number recognition of multiple countries' banknotes while ensuring accuracy and efficiency, making development difficult.

Method used

A deep learning-based method is used to identify the currency, denomination and orientation of banknotes through a convolutional neural network. Template features are used to locate the serial number area, and a deep learning model is built to recognize serial number characters, including image preprocessing, feature extraction, model training and character decoding.

Benefits of technology

It realizes the rapid recognition of serial numbers of banknotes of multiple currencies, reduces manual intervention, has strong compatibility, fast recognition speed, high accuracy and short recognition time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114202759B_ABST
    Figure CN114202759B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for recognizing the serial numbers of multiple currency banknotes based on deep learning, belonging to the field of banknote recognition. The method comprises: acquiring a first image; the first image is a banknote image scanned by a scanning device; preprocessing the first image and obtaining a first feature; the first feature includes the currency, denomination, and orientation of the banknote; determining the position of the serial number area based on the first feature, and intercepting and obtaining a second image; the second image is a serial number image; presetting a first model; constructing the first model based on a deep learning network model structure, and training the network model structure using serial number sample data; recognizing the second image through the first model, decoding and obtaining a second feature; the second feature is the serial number character of the banknote. The present invention adopts a serial number recognition method based on deep learning, which has fast recognition speed, high accuracy, and strong compatibility with multiple banknotes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of banknote recognition, and in particular to a method and device for recognizing serial numbers of multiple currency banknotes based on deep learning. Background Art

[0002] The serial number of a banknote is a key component of banknote printing and production management and control, helping to control the issuance volume and verify counterfeit banknotes. By identifying the serial numbers of circulating banknotes, banks can easily understand the flow of banknotes, which not only helps control economic market security but also effectively prevents economic crime.

[0003] With the development of economic globalization, the recognition of banknote serial numbers is no longer limited to domestic banknotes. Research on supporting the recognition of serial numbers of banknotes from multiple countries has become a development trend. How to support the recognition of serial numbers of more currencies while maintaining accuracy and efficiency is a question worth studying. Summary of the Invention

[0004] The object of the present invention is to provide a method, device, server and readable storage medium for multi-currency banknote serial number recognition based on deep learning to solve the problems involved in the background technology.

[0005] Based on the above technical problems, the present invention proposes a multi-currency banknote serial number recognition method, device, server and readable storage medium based on deep learning, which includes the following four aspects.

[0006] In a first aspect, the present invention provides a method for recognizing serial numbers of multi-currency banknotes based on deep learning, the method comprising:

[0007] Acquire a first image; the first image is a banknote image scanned by a scanning device;

[0008] Preprocessing the first image and obtaining a first feature; the first feature includes the currency, denomination, and orientation of the banknote;

[0009] Determine the position of the serial number region according to the first feature, and intercept and obtain a second image; the second image is the serial number image;

[0010] Preset a first model; the construction of the first model is based on a network model structure of deep learning, and the network model structure is trained using serial number sample data;

[0011] The second image is recognized by the first model and decoded to obtain a second feature; the second feature is the serial number characters of the banknote.

[0012] Preferably or optionally, the method of pre-processing the first image includes: uniformly setting the banknote image size, and performing a normalization operation on the image with the uniform size.

[0013] Preferably or optionally, the method for acquiring the first feature includes:

[0014] Creating a training set and a test set; the training set and the test set are data obtained by labeling the pre-processed multi-currency banknote images with the type, denomination and orientation of the banknotes;

[0015] A general convolutional neural network model structure is used for classification training and the training model is saved to obtain a second model;

[0016] The second image is input into the second model to obtain the first feature.

[0017] Preferably or optionally, the method for acquiring the second image includes:

[0018] Pre-acquiring the coordinate relationship between the template feature of each banknote and the second feature; the template feature includes: pre-scanning images of banknotes of different currencies and denominations and selecting iconic elements;

[0019] Matching a template feature corresponding to the banknote according to the first feature;

[0020] Acquire the position of the template feature according to the first image;

[0021] The serial number area is located in the banknote image based on the coordinate relationship between the template feature and the second feature, and then captured.

[0022] Preferably or optionally, the first model comprises 7 convolutional modules and two fully connected layers, connected in sequence;

[0023] Among them, the first model input data size is image data with width, height, and number of channels (150, 32, 3);

[0024] The first convolution module consists of a convolution layer with a convolution kernel of (5,5) and a relu layer; the second, fourth and sixth convolution modules are the same, consisting of a convolution layer with a convolution kernel of (3,3), a relu layer, a convolution layer with a convolution kernel of (1,1) and a relu layer; the third, fifth and seventh convolution modules are the same, consisting of a convolution layer with a convolution kernel of (3,3), a relu layer, a batch normalization layer, a convolution layer with a convolution kernel of (1,1), a batch normalization layer and a relu layer; the second, fourth and sixth convolution modules are each followed by a pooling layer;

[0025] Two fully connected layers are connected after the seven convolution modules, and the features extracted by the convolution modules are fully connected for extraction. The input dimension of the first fully connected layer is the feature dimension of the data extracted by the seven convolution modules, and the output dimension is half of the feature dimension of the data. The input dimension of the second fully connected layer is half of the feature dimension of the data, and the output dimension is the number of types of characters that need to be recognized.

[0026] Preferably or optionally, the training method of the first model includes:

[0027] Obtain the intercepted serial number data and perform size-fixing and normalization processing;

[0028] Create a character label list based on the number of categories; the character label list is digits 0-9 and letters A-Z, a total of 36 characters;

[0029] Mark the serial number data, and write the serial number picture name and the character content corresponding to the serial number picture into the text file in rows;

[0030] Divide the data and test set into small batches, use the Adam optimization method to train the constructed deep learning model structure, and use the CTC loss function as the loss function;

[0031] Set the training batch, select the deep learning model parameters with the best effect after training and save them, and use the saved deep learning model parameters in the test set for test experiments.

[0032] Preferably or optionally, the method for acquiring the second feature includes:

[0033] performing a fixed size and normalization process on the second image;

[0034] The processed second image is fed into the first model for recognition and output of the recognition result; the recognition result is the probability that each character in the serial number image is a character in the 36 character labels, that is, 36 probability numbers are output for each character to be recognized;

[0035] Save the position of the maximum probability value of the character label corresponding to each character in the crown number image in the character label list;

[0036] Retrieve the character label list based on the position information and output the crown character recognition result.

[0037] In a second aspect, the present invention further provides a multi-currency banknote serial number recognition device based on deep learning, the device comprising:

[0038] A first acquiring unit, adapted to acquire a first image; the first image is a banknote image scanned by a scanning device;

[0039] a first processing unit adapted to pre-process the first image and obtain a first feature; the first feature including the currency, denomination, and orientation of the banknote;

[0040] a second processing unit adapted to determine a position of the serial number region according to the first feature, and intercept and obtain a second image; the second image being a serial number image;

[0041] A first preset unit is configured to preset a first model; the first model is constructed based on a network model structure of deep learning, and the network model structure is trained using serial number sample data;

[0042] The third processing unit is adapted to recognize the second image through the first model and decode to obtain a second feature; the second feature is the serial number character of the banknote.

[0043] In a third aspect, the present invention also provides a server for multi-currency banknote serial number recognition based on deep learning, comprising a memory, a processor, and a computer program stored on the memory and runnable on the processor, wherein when the processor executes the program, the steps of the multi-currency banknote serial number recognition method based on deep learning are implemented.

[0044] In a fourth aspect, a computer-readable storage medium is provided, which, when executed by a processor, implements the steps of the multi-currency banknote serial number recognition method based on deep learning.

[0045] Beneficial effects: The present invention relates to a method, device, server and readable storage medium for recognizing serial numbers of multiple currency banknotes based on deep learning.

[0046] 1. The present invention adopts convolutional neural network to classify and identify the currency, denomination and orientation of banknotes, which can quickly obtain banknote information and reduce manual intervention.

[0047] 2. This invention's neural network recognition system can quickly adapt to other banknote information. Simply add the banknote data and retrain the neural network. In actual use, simply replace the network structure and modify the corresponding configuration parameters, greatly reducing development difficulty.

[0048] 3. The present invention uses template matching to quickly locate the serial number position of the banknote, avoiding the problem of incomplete serial number recognition caused by a slight tilt of the banknote scanned image when locating by the coordinates of the upper left corner of the entire image.

[0049] 4. The present invention adopts a serial number recognition method based on deep learning, which can flexibly add new types of banknotes to be recognized in practical applications and has strong compatibility.

[0050] 5. This invention uses a deep learning-based serial number recognition method that can directly identify the entire serial number image, eliminating the need to segment the serial number characters and significantly reducing recognition time. With a recognition accuracy of 99%, the recognition speed for a single serial number image is 2-3ms. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a flow chart of a multi-currency banknote serial number recognition method based on deep learning in Example 1 of the present invention.

[0052] Figure 2 Schematic diagram of exemplary template features in Example 1 of the present invention.

[0053] Figure 3 Schematic diagram of the position of exemplary template features in the first image in Example 1 of the present invention.

[0054] Figure 4 Schematic diagram of the position of the serial number area matched by template features in Example 1 of the present invention.

[0055] Figure 5 This is a training flowchart of the first model in Example 1 of the present invention.

[0056] Figure 6 This is a multi-currency banknote serial number recognition device based on deep learning in Example 2 of the present invention.

[0057] Figure 7 This is a schematic structural diagram of an exemplary electronic device in Example 3 of the present invention.

[0058] Explanation of the reference numerals: first acquisition unit 11 , first processing unit 12 , second processing unit 13 , first preset unit 14 , third processing unit 15 , bus 300 , receiver 301 , processor 302 , transmitter 303 , memory 304 , bus interface 305 . DETAILED DESCRIPTION

[0059] In the following description, numerous specific details are provided to provide a more thorough understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without one or more of these details. In other instances, certain technical features well known in the art are not described to avoid confusion with the present invention. SUMMARY OF THE INVENTION

[0061] With the rapid development of image recognition technology, image classification and image recognition are increasingly being used in daily life. Serial numbers are composed of a combination of numbers and letters, and their identification can be attributed to image recognition technology. Currently used serial number recognition technology utilizes traditional image methods to identify serial numbers based on image details of the serial number's location. This method has limited accuracy and is challenging to develop for serial number recognition across different currencies. Deep learning-based image recognition technology can rapidly improve recognition accuracy by training models with large amounts of data. Furthermore, the compatibility of recognition models can be enhanced by adding diverse data, making multi-currency serial number recognition possible using deep learning methods.

[0062] The present invention provides a method for recognizing the serial numbers of multi-currency banknotes based on deep learning, comprising four parts: banknote information recognition, serial number region extraction, deep learning model construction and training, and serial number character recognition. The banknote information recognition part is used to perform neural network classification processing on banknote images scanned by a banknote scanning device to obtain the currency, denomination, and orientation information of the banknote; the serial number region extraction part is used to match and locate the serial number position in the banknote image based on pre-collected template features of the currency type and extract it; the deep learning model construction and training part first builds a deep learning model for serial number character recognition, and trains and optimizes the model using collected and organized serial number image data. After multiple iterative tests, the model parameters with the best recognition effect are saved; the serial number character recognition part uses the trained optimal deep learning model to recognize the serial number character, obtain the maximum value of the label corresponding to the character, and obtain the final recognized character through decoding. Example

[0063] As attached Figure 1 As shown, Figure 1 The flowchart of a multi-currency banknote serial number recognition method based on deep learning in Example 1 of the present invention is as follows:

[0064] S100, obtaining a first image; the first image is a banknote image scanned by a scanning device;

[0065] Specifically, an image of the banknote is obtained by a scanning device. The scanning device can be a handheld scanner, which allows the user to directly scan a single banknote and then send the image information to a computer for subsequent processing. The scanning device can also be a scanning device pre-installed in a banknote detector or ATM device, which batch-imports the image information into the computer.

[0066] S200: Preprocess the first image and obtain a first feature; the first feature includes the currency, denomination, and orientation of the banknote;

[0067] Specifically, the method for obtaining the first feature includes the following steps:

[0068] S110: The pre-processing uniformly sets the banknote image size and performs a normalization operation on the uniformly sized image. In this way, the positions of the banknotes can be standardized, the outer edges of the banknotes can be accurately obtained, and the efficiency of positioning and identifying the banknote serial numbers can be improved.

[0069] In this embodiment, the banknote image is first resized to a width and height of (1000, 500), and then the banknote image is normalized. Normalization assumes that the banknote image data is img, and the image data is an RGB image with a value range of [0, 255]. Normalization can fix the range of image data values ​​between [-1, 1], making the data positively distributed and convenient for classification and recognition. The calculation formula for data normalization is:

[0070]

[0071] S120: Identify the currency, denomination, and orientation of banknotes. The identification method includes: S210: Creating a training set and a test set; the training set and the test set are obtained by labeling the type, denomination, and orientation of pre-processed images of multi-currency banknotes; S220: Using a general convolutional neural network model structure to perform classification training and save the trained model to obtain a second model; S230: Inputting the second image into the second model to obtain the first feature.

[0072] Specifically, this example uses 18 different denominations of banknotes from 6 currencies as a test. First, the 500 scanned banknote images are processed in step 11 and then classified and labeled. Considering the front and back of the banknotes, a total of 36 categories are labeled, represented by numbers 0-35. Each number corresponds to a label value for the banknote information, such as 0 corresponds to the label value of the front of the 100-yuan banknote. The labeled data is then divided into a data set, a test set, and a validation set in a ratio of 7:2:1, and sent to a general convolutional neural network for classification training. This example uses a lightweight network structure, mobilenet-V2, which can quickly iterate and optimize the optimal model. The batchsize of the model iterative optimization is set to 32, and the loss function uses the cross-entropy loss function to judge the closeness between the model output and the actual label value during training, thereby updating the model parameters. The specific formula is:

[0073]

[0074] Among them, p and q are the output and actual label values ​​of the model during training, respectively, and x is the recognition result corresponding to the number of labeled categories.

[0075] After multiple iterations, the model's performance is verified using a validation set, and the model file with the highest classification accuracy is saved. Finally, the banknote image to be classified is fed into the trained model for recognition. The recognition result is the label of the class with the highest probability among all classifications. Based on the label, the corresponding label value is retrieved to obtain the currency, denomination, and orientation information of the banknote image.

[0076] S300, determining the position of the serial number region according to the first feature, and intercepting and obtaining a second image; the second image is a serial number image;

[0077] Specifically, the method for obtaining the second image includes the following steps: pre-acquiring the coordinate relationship between the template feature of each banknote and the second feature; the template feature includes: pre-scanning images of banknotes of different currencies and denominations, and selecting iconic elements; matching the template feature corresponding to the banknote according to the first feature; obtaining the position of the template feature according to the first image; locating the position of the serial number area in the banknote image based on the coordinate relationship between the template feature and the second feature, and intercepting it.

[0078] In this embodiment, the template features corresponding to the banknote denomination are feature areas pre-cut from images of different types of banknotes. The feature areas are unique, ensuring that other types of banknote images do not have similar features. The coordinates of the serial number area are then calculated based on the position coordinates of the feature areas in the image. Figure 2 As shown in the figure, the feature area of ​​a 100-denomination banknote has a coordinate of (130, 170) for the upper left corner of the feature area in a standard 100-denomination banknote image, and a coordinate of (80, 90) for the upper left corner of the serial number area in a standard 100-denomination banknote image. The width and height differences are -50 and -80, respectively. The configuration options for the serial number interception of the 100-denomination banknote are set to (-50, -80, 225, 40), where -225 and 40 are the width and height of the serial number area in a standard 100-denomination banknote image, respectively.

[0079] The banknote image to be identified is matched with the template image. The template feature area is found in the banknote image and matched. After the matching feature area is found, the coordinates of the matching position are returned. Taking the 100-denomination banknote as an example, the matching successful image is shown in the attached figure. Figure 3 As shown in the figure, the returned position coordinates are the coordinates of the upper left corner of the matching position. The coordinates after matching are: (130,169). Based on the relationship between the coordinates of the serial number and the coordinates of the feature area, the coordinates of the upper left corner of the serial number area are inferred to be: (80,89). The final intercepted serial number area is shown in the attached figure. Figure 4 shown.

[0080] S400: Preset a first model; the first model is constructed based on a deep learning network model structure, and the network model structure is trained using serial number sample data;

[0081] Among them, the first model includes 7 convolution modules and two fully connected layers, which are connected in sequence; the first model input data size is image data with width, height and number of channels (150, 32, 3); the first convolution module consists of a convolution layer with a convolution kernel of (5, 5) and a relu layer; the second convolution module, the fourth convolution module and the sixth convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3, 3), a relu layer, a convolution layer with a convolution kernel of (1, 1) and a relu layer; the third convolution module, the fifth convolution module and the seventh convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3, 3), a relu layer, a convolution layer with a convolution kernel of (1, 1) and a relu layer. It consists of a convolutional layer with a kernel of (3,3), a relu layer, a batch normalization layer, a convolutional layer with a kernel of (1,1), a batch normalization layer and a relu layer; there is a pooling layer after the second convolutional module, the fourth convolutional module and the sixth convolution; two fully connected layers are connected after the seven convolutional modules, and the features extracted by the convolutional modules are fully connected for extraction; the input dimension of the first fully connected layer is the feature dimension of the data extracted by the seven convolutional modules, and the output dimension is half of the feature dimension of the data; the input dimension of the second fully connected layer is half of the feature dimension of the data, and the output dimension is the number of types of characters that need to be recognized.

[0082] The training method of the first model includes: obtaining intercepted crown number data, and performing fixed size and normalization processing; making a character label list according to the number of categories; the character label list is the numbers 0-9, the letters A-Z, a total of 36 characters; marking the crown number data, and writing the crown number image name and the character content corresponding to the crown number image into a text file line by line; dividing the data and test set, dividing the data into small batches of data, using the Adam optimization method to train the constructed deep learning model structure, and the loss function uses the CTC loss function; setting the training batch, selecting the deep learning model parameters with the best effect after training is completed and saving them, and using the saved deep learning model parameters in the test set to conduct test experiments.

[0083] In this embodiment, as shown in the attached Figure 5As shown in the flowchart, 9,000 images of serial numbers of 18 different denominations of banknotes were collected. The images were fixed to a width and height of (150, 32) and normalized. Serial number recognition required 36 characters: the digits 0-9 and the letters A-Z. These characters were arranged sequentially to create labels of length 36. The collected serial number images were labeled by creating a new .txt file and writing the serial number image name and the corresponding serial number character content into the .txt file. The data was divided into training, test, and validation sets in a 7:2:1 ratio. The labels for the training and test sets were named train.txt and test.txt, respectively. The validation set was reserved for verifying the trained model. The batch size for data reading was set to 32, and training was terminated after 15 epochs on all data. Training was performed using the Adam optimization method with a learning rate of 0.001. The Adam method, with its gradient sliding average and bias correction features, is commonly used in training deep learning models. The loss function adopts the CTC loss function, and the calculation formula of the CTC loss function is:

[0084] in , represents the probability of output sequence z given input x, and S is the training set data.

[0085] After the deep learning model training is completed, the model file is selected based on the optimal accuracy verified by the validation set. This model file is used for the serial number character recognition work in this case.

[0086] S500: Identify the second image using the first model and decode to obtain a second feature; the second feature is the serial number of the banknote.

[0087] The method for obtaining the second feature includes: fixing the size and normalizing the second image; sending the processed second image into the first model for recognition and outputting the recognition result; the recognition result is the probability that each character in the crown number image is a character in 36 character labels, that is, each character to be recognized is recognized and output with 36 probability numbers; saving the position of the maximum probability number of the corresponding character label of each character in the crown number image in the character label list; searching the character label list according to the position information, and outputting the crown number character recognition result.

[0088] In this embodiment, the captured serial number image to be recognized is resized and normalized before being fed into a trained deep learning model for recognition. The recognition results are output as a matrix. Assuming the number of characters in the serial number image to be tested is n, the size of the output matrix N is n*36. Each row of the matrix contains the probability of that character corresponding to each label value. The position of the maximum value in each row of matrix N is taken to form a new matrix M. This matrix contains the position information of the character content in the label.

[0089] The corresponding characters in the labels are retrieved based on the label position information in matrix M, and the final result of the serial number image recognition is output. Verified by the validation set, the serial number character recognition method of the present invention has a recognition accuracy rate of 99%, and the average time from reading a single serial number image to recognizing and outputting the characters is approximately 2-3ms.

[0090] Compared to existing technologies, this embodiment offers the following advantages: 1. The present invention utilizes a convolutional neural network to classify and identify the currency, denomination, and orientation of banknotes, enabling rapid acquisition of banknote information and reducing manual intervention. 2. The present invention's neural network recognition allows for rapid integration with other banknote information, requiring only the addition of the banknote data to retrain the neural network. In practice, this can be achieved by simply replacing the network structure and modifying the corresponding configuration parameters, significantly reducing development complexity. 3. The present invention utilizes template matching to rapidly locate the banknote serial number, avoiding the potential problem of incomplete serial number recognition caused by slightly tilted banknote scans when locating using the coordinates of the entire image's upper left corner. 4. The present invention utilizes a deep learning-based serial number recognition method, allowing for flexible addition of new banknote types in practical applications and offering strong compatibility. 5. The present invention utilizes a deep learning-based serial number recognition method, enabling direct recognition of the entire serial number image, eliminating the need for segmentation of the serial number characters and significantly reducing recognition time. With a recognition accuracy of 99%, the recognition speed for a single serial number image is 2-3 ms. Example

[0091] Based on the same inventive concept as the multi-currency banknote serial number recognition method based on deep learning in the aforementioned embodiment 1, the present invention also provides a multi-currency banknote serial number recognition device based on deep learning, such as Figure 6 As shown, the device includes:

[0092] A first acquiring unit, adapted to acquire a first image; the first image is a banknote image scanned by a scanning device;

[0093] a first processing unit adapted to pre-process the first image and obtain a first feature; the first feature including the currency, denomination, and orientation of the banknote;

[0094] a second processing unit adapted to determine a position of the serial number region according to the first feature, and intercept and obtain the second image; the second image being the serial number image;

[0095] A first preset unit is configured to preset a first model; the first model is constructed based on a network model structure of deep learning, and the network model structure is trained using serial number sample data;

[0096] The third processing unit is adapted to recognize the second image through the first model and decode to obtain a second feature; the second feature is the serial number character of the banknote.

[0097] Furthermore, the device also includes: the method for pre-processing the first image includes: uniformly setting the banknote image size, and performing a normalization operation on the image of the uniform size.

[0098] Furthermore, the device further comprises:

[0099] The fourth processing unit is adapted to prepare a training set and a test set; the training set and the test set are obtained by annotating the pre-processed multi-currency banknote images by type, marking the currency, denomination and orientation of the banknotes;

[0100] The second preset unit is adapted to perform classification training using a general convolutional neural network model structure and save the training model to obtain a second model;

[0101] The fifth processing unit is adapted to input the second image into the second model to obtain the first feature.

[0102] Furthermore, the device further comprises:

[0103] The second acquisition unit is adapted to pre-acquire a coordinate relationship between a template feature of each banknote and a second feature; the template feature comprises: pre-scanning images of banknotes of different currencies and denominations and selecting characteristic elements;

[0104] a sixth processing unit, adapted to match a template feature corresponding to the banknote according to the first feature;

[0105] a seventh processing unit, adapted to obtain a position of the template feature according to the first image;

[0106] The eighth processing unit is adapted to locate the serial number area in the banknote image based on the coordinate relationship between the template feature and the second feature, and to capture the position.

[0107] Furthermore, the first model includes 7 convolution modules and two fully connected layers, which are connected in sequence; wherein the first model input data size is image data with a width, height, and number of channels of (150, 32, 3); the first convolution module consists of a convolution layer with a convolution kernel of (5, 5) and a relu layer; the second convolution module, the fourth convolution module and the sixth convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3, 3), a relu layer, a convolution layer with a convolution kernel of (1, 1) and a relu layer; the third convolution module, the fifth convolution module and the seventh convolution module are all the same, consisting of a The network consists of a convolution layer with a convolution kernel of (3,3), a relu layer, a batch normalization layer, a convolution layer with a convolution kernel of (1,1), a batch normalization layer and a relu layer; there is a pooling layer after the second convolution module, the fourth convolution module and the sixth convolution module; two fully connected layers are connected after the seven convolution modules, and the features extracted by the convolution modules are fully connected for extraction; the input dimension of the first fully connected layer is the feature dimension of the data after extraction by the seven convolution modules, and the output dimension is half of the feature dimension of the data; the input dimension of the second fully connected layer is half of the feature dimension of the data, and the output dimension is the number of types of characters that need to be recognized.

[0108] Furthermore, the device further comprises:

[0109] a ninth processing unit adapted to obtain the intercepted serial number data and perform size-fixing and normalization processing;

[0110] a tenth processing unit adapted to generate a character label list according to the classification number; the character label list is a list of digits 0-9 and letters A-Z, for a total of 36 characters;

[0111] an eleventh processing unit adapted to mark the serial number data and write the serial number picture name and the character content corresponding to the serial number picture into a text file in lines;

[0112] The twelfth processing unit is suitable for dividing data and test sets, dividing the data into small batches of data, and using the Adam optimization method to train the constructed deep learning model structure, and the loss function adopts the CTC loss function;

[0113] The thirteenth processing unit is adapted to set a training batch, select and save the deep learning model parameters with the best effect after training, and use the saved deep learning model parameters in a test set to perform a test experiment.

[0114] Furthermore, the device further comprises:

[0115] a fourteenth processing unit, adapted to perform size-fixing and normalization processing on the second image;

[0116] a fifteenth processing unit adapted to feed the processed second image into the first model for recognition and output a recognition result; the recognition result being the probability that each character in the serial number image is a character in the 36 character labels, i.e., 36 probability numbers are output for each character to be recognized;

[0117] a sixteenth processing unit, adapted to store the position of the maximum probability value of the character label corresponding to each character in the crown number image in the character label list;

[0118] The seventeenth processing unit is adapted to retrieve the character label list according to the position information and output the crown number character recognition result.

[0119] The various variations and specific examples of the multi-currency banknote serial number recognition method based on deep learning in the aforementioned embodiment 1 are also applicable to the multi-currency banknote serial number recognition device based on deep learning in this embodiment. Through the aforementioned detailed description of the multi-currency banknote serial number recognition method based on deep learning, those skilled in the art can clearly know the implementation method of the multi-currency banknote serial number recognition device based on deep learning in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here. Example

[0120] Based on the same inventive concept as the multi-currency banknote serial number recognition method based on deep learning in the aforementioned embodiment, the present invention also provides a multi-currency banknote serial number recognition server based on deep learning, such as Figure 7 As shown, Figure 7 It is an exemplary electronic device in Example 3, including a memory 304, a processor 302 and a computer program stored in the memory 304 and executable on the processor 302. When the processor 302 executes the program, it implements the steps of any of the methods of multi-currency banknote serial number recognition based on deep learning described above.

[0121] Among them, Figure 7 In the embodiment of the present invention, a bus architecture (represented by bus 300) is shown. Bus 300 may include any number of interconnected buses and bridges. Bus 300 links various circuits, including one or more processors represented by processor 302 and memory represented by memory 304. Bus 300 may also link various other circuits, such as peripheral devices, voltage regulators, and power management circuits. These are well known in the art and, therefore, will not be described further herein. Bus interface 305 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 may be the same component, namely a transceiver, which provides a means for communicating with various other devices over a transmission medium.

[0122] The processor 302 is responsible for managing the bus 300 and general processing, while the memory 304 may be used to store data used by the processor 302 when performing operations. Example

[0123] Based on the same inventive concept as the multi-currency banknote serial number recognition method based on deep learning in the aforementioned embodiment, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the following steps when executed by a processor: acquiring a first image; the first image is a banknote image scanned by a scanning device; preprocessing the first image and obtaining a first feature; the first feature includes the currency, denomination and orientation of the banknote; determining the position of the serial number area based on the first feature, and intercepting and obtaining the second image; the second image is a serial number image; presetting a first model; the construction of the first model is based on a network model structure of deep learning, and the network model structure is trained using serial number sample data; identifying the second image through the first model, decoding to obtain a second feature; the second feature is the serial number character of the banknote.

[0124] One or more of the above-mentioned technical solutions in the embodiments of the present invention have at least one or more of the following technical effects: 1. The present invention utilizes a convolutional neural network to classify and identify the currency, denomination, and orientation of banknotes, enabling rapid acquisition of banknote information and reducing manual intervention. 2. The present invention's neural network recognition allows for rapid integration with the recognition of other banknote information, requiring only the addition of the banknote data to retrain the neural network. In actual use, this can be accomplished by simply replacing the network structure and modifying the corresponding configuration parameters, significantly reducing development complexity. 3. The present invention utilizes template matching to rapidly locate the banknote serial number, avoiding the problem of incomplete serial number recognition caused by slightly tilted banknote scanned images when locating using the coordinates of the entire image's upper left corner. 4. The present invention utilizes a deep learning-based serial number recognition method, which allows for flexible addition of new banknote types in practical applications and offers strong compatibility. 5. The present invention utilizes a deep learning-based serial number recognition method, enabling direct recognition of the entire serial number image, eliminating the need for segmentation of the serial number characters and significantly reducing recognition time. With a recognition accuracy of 99%, the recognition speed for a single serial number image is 2-3 ms.

[0125] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. To avoid unnecessary repetition, the present invention will not further describe various possible combinations.

Claims

1. A multi-currency banknote serial number recognition method based on deep learning, characterized in that: The method comprises: Acquire a first image; the first image is a banknote image scanned by a scanning device; Input the first image into the preprocessing model, preprocess the first image, and obtain first features; the first features include the currency, denomination, and orientation of the banknote; the preprocessing model uses the lightweight network structure mobilenet-V2, the batch size of the model iterative optimization is set to 32, and the loss function uses the cross-entropy loss function; The position of the serial number region is determined based on the first feature, and a second image is captured and obtained. The method for acquiring the second image includes: pre-acquiring a coordinate relationship between a template feature of each banknote and a second feature; the second feature is the serial number character of the banknote; the template feature includes: pre-scanning images of banknotes of different currencies and denominations and selecting characteristic elements; matching the template feature corresponding to the banknote based on the first feature; acquiring the position of the template feature based on the first image; locating the position of the serial number region in the banknote image based on the coordinate relationship between the template feature and the second feature, and capturing the image. The first model is preset; the construction of the first model is based on the network model structure of deep learning, and the network model structure is trained using the crown sample data; the first model includes 7 convolution modules and two fully connected layers, which are connected in sequence; wherein, the first model input data size is image data with a width, height, and number of channels (150, 32, 3); the first convolution module consists of a convolution layer with a convolution kernel of (5, 5) and a relu layer; the second convolution module, the fourth convolution module and the sixth convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3, 3), a relu layer, a convolution layer with a convolution kernel of (1, 1) and a relu layer; the third convolution module The convolution module, the fifth convolution module and the seventh convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3,3), a relu layer, a batch normalization layer, a convolution layer with a convolution kernel of (1,1), a batch normalization layer and a relu layer; the second convolution module, the fourth convolution module and the sixth convolution module are each followed by a pooling layer; two fully connected layers are connected after the seven convolution modules to perform full connection extraction on the features extracted by the convolution modules; the input dimension of the first fully connected layer is the feature dimension of the data extracted by the seven convolution modules, and the output dimension is half of the feature dimension of the data; the input dimension of the second fully connected layer is half of the feature dimension of the data, and the output dimension is the number of types of characters to be recognized; The second image is identified by using the first model and decoded to obtain a second feature.

2. The multi-currency banknote serial number recognition method based on deep learning according to claim 1 is characterized in that: The method for preprocessing the first image includes: uniformly setting the banknote image size, and performing a normalization operation on the image with the uniform size.

3. The multi-currency banknote serial number recognition method based on deep learning according to claim 1 is characterized in that: The method for obtaining the first feature includes: Creating a training set and a test set; the training set and the test set are data obtained by labeling the pre-processed multi-currency banknote images with the type, denomination and orientation of the banknotes; A general convolutional neural network model structure is used for classification training and the training model is saved to obtain a second model; The second image is input into the second model to obtain the first feature.

4. The multi-currency banknote serial number recognition method based on deep learning according to claim 1 is characterized in that: The training method of the first model includes: Obtain the intercepted serial number data and perform size-fixing and normalization processing; Create a character label list based on the number of categories; the character label list is digits 0-9 and letters A-Z, a total of 36 characters; Mark the serial number data, and write the serial number picture name and the character content corresponding to the serial number picture into the text file in rows; Divide the data and test set into small batches, use the Adam optimization method to train the constructed deep learning model structure, and use the CTC loss function as the loss function; Set the training batch, select the deep learning model parameters with the best effect after training, and save them. Use the saved deep learning model parameters in the test set for test experiments.

5. The multi-currency banknote serial number recognition method based on deep learning according to claim 1 is characterized in that: The method for obtaining the second feature includes: performing a fixed size and normalization process on the second image; The processed second image is fed into the first model for recognition and output of the recognition result; the recognition result is the probability that each character in the serial number image is a character in the 36 character labels, that is, 36 probability numbers are output for each character to be recognized; Save the position of the maximum probability value of the character label corresponding to each character in the crown number image in the character label list; Retrieve the character label list based on the position information and output the crown character recognition result.

6. A multi-currency banknote serial number recognition device based on deep learning, characterized in that: The device comprises: A first acquiring unit, adapted to acquire a first image; the first image is a banknote image scanned by a scanning device; a first processing unit adapted to preprocess the first image and obtain first features, wherein the first features include the currency, denomination, and orientation of the banknote; the preprocessing model uses a lightweight network structure, mobilenet-V2, the batch size for model iterative optimization is set to 32, and the loss function uses a cross-entropy loss function; The second processing unit is adapted to determine the position of the serial number region based on the first feature, and to intercept and obtain a second image; the second image is a serial number image; a method for obtaining the second image comprises: pre-acquiring a coordinate relationship between a template feature of each banknote and a second feature; the second feature is the serial number character of the banknote; the template feature comprises: pre-scanning images of banknotes of different currencies and denominations and selecting characteristic elements; matching the template feature corresponding to the banknote based on the first feature; obtaining the position of the template feature based on the first image; locating the position of the serial number region in the banknote image based on the coordinate relationship between the template feature and the second feature, and intercepting the image; The first preset unit is suitable for presetting the first model; the construction of the first model is based on the network model structure of deep learning, and the network model structure is trained using the crown number sample data; the first model includes 7 convolution modules and two fully connected layers, which are connected in sequence; wherein, the first model input data size is image data with a width, height, and number of channels (150, 32, 3); the first convolution module consists of a convolution layer with a convolution kernel of (5, 5) and a relu layer; the second convolution module, the fourth convolution module and the sixth convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3, 3), a relu layer, a convolution layer with a convolution kernel of (1, 1) and a relu layer ; The third convolution module, the fifth convolution module and the seventh convolution module are all the same, consisting of a convolution layer with a convolution kernel of (3,3), a relu layer, a batch normalization layer, a convolution layer with a convolution kernel of (1,1), a batch normalization layer and a relu layer; the second convolution module, the fourth convolution module and the sixth convolution module are each followed by a pooling layer; two fully connected layers are connected after the seven convolution modules, and the features extracted by the convolution modules are fully connected for extraction; the input dimension of the first fully connected layer is the feature dimension of the data extracted by the seven convolution modules, and the output dimension is half of the feature dimension of the data; the input dimension of the second fully connected layer is half of the feature dimension of the data, and the output dimension is the number of types of characters to be recognized; The third processing unit is adapted to recognize the second image through the first model and decode to obtain the second feature.

7. A server for multi-currency banknote serial number recognition based on deep learning, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the program.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Intelligent paper money serial number identification method based on DSP

    CN106845542A

  • RMB serial number multi-label recognition method based on deep convolutional neural network

    CN111583502A