CN111553430B - Foreign currency identification method and device - Google Patents

Foreign currency identification method and device Download PDF

Info

Publication number
CN111553430B
CN111553430B CN202010360620.1A CN202010360620A CN111553430B CN 111553430 B CN111553430 B CN 111553430B CN 202010360620 A CN202010360620 A CN 202010360620A CN 111553430 B CN111553430 B CN 111553430B
Authority
CN
China
Prior art keywords
image
foreign currency
identified
model
coin
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.)
Active
Application number
CN202010360620.1A
Other languages
Chinese (zh)
Other versions
CN111553430A (en
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.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010360620.1A priority Critical patent/CN111553430B/en
Publication of CN111553430A publication Critical patent/CN111553430A/en
Application granted granted Critical
Publication of CN111553430B publication Critical patent/CN111553430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Abstract

The invention provides a foreign currency identification method and a foreign currency identification device, wherein the method comprises the following steps: and acquiring a coin image to be identified, inputting the coin image to be identified into an input layer in a foreign currency identification model, and performing characteristic classification processing on the image output by the input layer through a full-connection layer after a plurality of rounds of preset processing to obtain the currency, version and face value of the coin image to be identified. The foreign currency recognition model is obtained by training an improved VGG-16 model, the total number of convolution layers of the foreign currency recognition model is smaller than that of the VGG-16 model, the number of extracted features of each convolution layer is smaller than that of extracted features of corresponding convolution layers in the VGG-16 model, excessive feature extraction is not carried out on a coin image to be recognized, so that features input into a full-connection layer are low-layer features representing detail textures and the like, analysis of the model on high-layer semantic features of the image is reduced, the occurrence of over fitting phenomenon is avoided, and the accuracy of the foreign currency recognition model for recognizing the foreign currency image is improved.

Description

Foreign currency identification method and device
Technical Field
The invention relates to the technical field of paper currency recognition, in particular to a foreign currency recognition method and device.
Background
With economic globalization, foreign currency exchanges are becoming more common. At present, in the foreign currency cash exchange process, a plurality of foreign currency types are involved, at least ten foreign currencies are common, and each foreign currency also comprises paper currency with different denominations and different versions. However, in real life, unless there is enough knowledge reserve, most people cannot accurately identify various foreign currencies, and the accuracy of identifying foreign currencies by means of manpower is low, so that a great deal risk exists.
In recent years, with the development of image recognition technology, the use of image recognition technology to recognize foreign currency has become a research trend in the field, and there are many mature models in the field of image recognition, such as VGG (Visual Geometry Group ), but these image recognition models are not designed for recognizing foreign currency initially, and if foreign currency is recognized directly by using these existing image recognition models, there is a serious overfitting phenomenon, and the recognition accuracy is low.
Disclosure of Invention
In view of the above, the invention provides a foreign currency recognition method and device, which improves the accuracy of foreign currency recognition.
In order to achieve the above purpose, the specific technical scheme provided by the invention is as follows:
a foreign currency recognition method comprising:
acquiring a coin image to be identified;
inputting the coin image to be identified into an input layer in a foreign currency identification model, performing multi-round preset processing on an image output by the input layer, and performing feature classification processing on a full-connection layer to obtain the currency, version and face value of the coin image to be identified, wherein the size of the input image corresponding to the input layer of the foreign currency identification model is matched with the size of the foreign currency, the preset processing comprises feature extraction processing of a convolution layer group, feature reduction processing of a pooling layer and feature normalization processing of a normalization layer, the total number of convolution layers in the foreign currency identification model is smaller than the total number of convolution layers of a VGG-16 model, and the number of extracted features of each convolution layer in the foreign currency identification model is smaller than the number of extracted features of the corresponding convolution layer in the VGG-16 model.
Optionally, the acquiring the coin image to be identified includes:
acquiring an original image;
preprocessing the original image to obtain a plurality of images to be identified which accord with a preset format;
and respectively inputting each image to be identified into a coin identification model for processing, and determining whether each image to be identified is a coin image to be identified or not according to an identification result.
Optionally, the preprocessing the original image to obtain a plurality of images to be identified in accordance with a preset format includes:
the angles of the original images are randomly rotated for a plurality of times respectively to obtain a plurality of images;
and respectively adjusting the brightness of each image to a preset brightness value, and converting the color space of each image into HSV to obtain a plurality of images to be identified.
Optionally, the training method of the foreign currency recognition model includes:
acquiring various foreign currency images;
the brightness of each foreign currency image is adjusted to a preset brightness value, and the color space of each foreign currency image is converted into HSV, so that each preprocessed foreign currency image is obtained;
classifying, labeling and data enhancing are carried out on various preprocessed foreign currency images, and a training sample set is obtained;
training a preset neural network model by using the training sample set to obtain the foreign currency recognition model, wherein the total number of convolution layers in the preset neural network is smaller than that of the VGG-16 model, and the number of extracted features of each convolution layer in the preset neural network model is smaller than that of the corresponding convolution layer in the VGG-16 model.
Optionally, after obtaining the currency, the layout and the denomination of the coin image to be identified, the method further includes:
inquiring the foreign exchange license plate price corresponding to the currency of the coin image to be identified;
calculating the value of the RMB corresponding to the coin image to be identified according to the denomination and the foreign exchange license price of the coin image to be identified;
and displaying the standard coin image corresponding to the coin image to be identified and the corresponding RMB value in the front-end display page.
Optionally, after obtaining the currency, the layout and the denomination of the coin image to be identified, the method further includes:
acquiring positioning information of a mobile terminal for acquiring the coin image to be identified;
invoking an electronic map, inquiring the position information of the exchange network points in a preset area corresponding to the positioning information, wherein the exchange network points are the exchange network points of the currency of the coin image to be identified;
and displaying the position information of the exchange network points on a front-end display interface.
A foreign currency recognition device, comprising:
the coin image acquisition unit is used for acquiring a coin image to be identified;
the foreign currency identification unit is used for inputting the to-be-identified coin image into an input layer in a foreign currency identification model, after the image output by the input layer is subjected to multi-round preset processing, the coin type, version and face value of the to-be-identified coin image are obtained through feature classification processing of a full-connection layer, wherein the size of the input image corresponding to the input layer of the foreign currency identification model is matched with the size of the foreign currency, the preset processing comprises feature extraction processing of a convolution layer group, feature reduction processing of a pooling layer and feature normalization processing of a normalization layer, the total number of convolution layers in the foreign currency identification model is smaller than the total number of convolution layers of a VGG-16 model, and the number of extracted features of each convolution layer in the foreign currency identification model is smaller than the number of extracted features of corresponding convolution layers in the VGG-16 model.
Optionally, the coin image acquisition unit includes:
an original image acquisition subunit, configured to acquire an original image;
the image preprocessing subunit is used for preprocessing the original image to obtain a plurality of images to be identified which accord with a preset format;
and the coin identification subunit is used for respectively inputting each image to be identified into the coin identification model for processing, and determining whether each image to be identified is a coin image to be identified or not according to the identification result.
Optionally, the image preprocessing subunit is specifically configured to:
the angles of the original images are randomly rotated for a plurality of times respectively to obtain a plurality of images;
and respectively adjusting the brightness of each image to a preset brightness value, and converting the color space of each image into HSV to obtain a plurality of images to be identified.
Optionally, the device further comprises a model training unit, specifically configured to:
acquiring various foreign currency images;
the brightness of each foreign currency image is adjusted to a preset brightness value, and the color space of each foreign currency image is converted into HSV, so that each preprocessed foreign currency image is obtained;
classifying, labeling and data enhancing are carried out on various preprocessed foreign currency images, and a training sample set is obtained;
training a preset neural network model by using the training sample set to obtain the foreign currency recognition model, wherein the total number of convolution layers in the preset neural network is smaller than that of the VGG-16 model, and the number of extracted features of each convolution layer in the preset neural network model is smaller than that of the corresponding convolution layer in the VGG-16 model.
Optionally, the device further comprises a foreign currency value calculation unit, specifically configured to:
inquiring the foreign exchange license plate price corresponding to the currency of the coin image to be identified;
calculating the value of the RMB corresponding to the coin image to be identified according to the denomination and the foreign exchange license price of the coin image to be identified;
and displaying the standard coin image corresponding to the coin image to be identified and the corresponding RMB value in the front-end display page.
Optionally, the device further includes a website recommending unit, specifically configured to:
acquiring positioning information of a mobile terminal for acquiring the coin image to be identified;
invoking an electronic map, inquiring the position information of the exchange network points in a preset area corresponding to the positioning information, wherein the exchange network points are the exchange network points of the currency of the coin image to be identified;
and displaying the position information of the exchange network points on a front-end display interface.
Compared with the prior art, the invention has the following beneficial effects:
according to the foreign currency identification method provided by the invention, the foreign currency identification model is obtained by training the improved VGG-16 model, the size of an input image of an input layer of the foreign currency identification model is matched with the size of the foreign currency, stretching or intercepting treatment is not required to be carried out on the image of the foreign currency to be identified, the model is more suitable for identifying the foreign currency, the total number of convolution layers of the foreign currency identification model is smaller than that of the VGG-16 model, the number of extracted features of each convolution layer is smaller than that of the corresponding convolution layers in the VGG-16 model, excessive feature extraction is not carried out on the image of the foreign currency to be identified, so that the features input into the full-connection layer are low-layer features representing detail textures and the like, analysis of the model on high-layer semantic features of the image is reduced, the phenomenon of overfitting is avoided to a certain extent, a normalization layer is added after pooling is carried out on the features, the phenomenon of overfitting is avoided to a certain extent, the influence on the result of overfitting treatment is avoided, and the image of the foreign currency identification model is accurately fitted.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a foreign currency recognition method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for acquiring a coin image to be identified according to an embodiment of the present invention;
FIG. 3 is a flow chart of a training method of a foreign currency recognition model according to an embodiment of the present invention;
FIG. 4 is a schematic diagram showing a comparison of a VGG-16 model and a modified model according to an embodiment of the invention;
fig. 5 is a schematic structural view of a foreign currency recognition device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention discloses a foreign currency identification method, wherein a user acquires a foreign currency image to be identified through a mobile terminal, such as a smart phone, a tablet personal computer and the like, and then uploads the image to be identified to a server, and the image uploaded by the mobile terminal is preprocessed by the server and then is input into a foreign currency identification model obtained through training in advance for processing, so that the currency, version and face value of the foreign currency image to be identified are obtained. The foreign currency recognition model is obtained by training an improved VGG-16 model, the size of an input image of an input layer of the foreign currency recognition model is matched with the size of the foreign currency, stretching or intercepting treatment is not needed for the to-be-recognized coin image, the model is more suitable for recognizing the foreign currency, the total number of convolution layers of the foreign currency recognition model is smaller than that of the VGG-16 model, the number of extracted features of each convolution layer is smaller than that of the corresponding convolution layer in the VGG-16 model, excessive feature extraction is not needed for the to-be-recognized coin image, so that the features input into a full-connection layer are low-layer features representing detail textures and the like, analysis of the model on high-layer semantic features of the image is reduced, the occurrence of an overfitting phenomenon is avoided to a certain extent, a normalization layer is added after a pooling layer, the features are normalized, the occurrence of the overfitting phenomenon is also avoided to a certain extent, the influence of the modeling treatment result is avoided, and the accuracy of the to-be-recognized coin image is improved.
Specifically, referring to fig. 1, the foreign currency recognition method disclosed in the present embodiment is applied to a server, and specifically includes the following steps:
s101: acquiring a coin image to be identified;
the coin image to be identified may be an original image uploaded by the mobile terminal, where the original image is obtained by the mobile terminal calling a photographing device to photograph with a fixed resolution and then encoding by BASE 64.
In order to improve the recognition efficiency of the images, the coin images to be recognized can also be obtained by preprocessing the original images uploaded by the mobile terminal, and the preprocessing can comprise processing such as rotation random angle, brightness adjustment, color space conversion and the like.
Referring to fig. 2, a preferred method for acquiring an image of a coin to be identified includes the steps of:
s201: acquiring an original image;
the original image is the image obtained by calling the photographing equipment by the mobile terminal to photograph with fixed resolution and then encoding by the BASE 64.
S202: preprocessing an original image to obtain a plurality of images to be identified which accord with a preset format;
because the original image may be obtained by photographing at any angle, the images obtained by photographing at different angles have different influences on the recognition accuracy, and in order to recognize the image as accurately as possible, the angle of the original image is randomly rotated for multiple times to obtain multiple images, and the multiple images are processed by brightness adjustment, color space conversion and the like, so that multiple images to be recognized are correspondingly obtained.
The brightness adjustment is to adjust the brightness of the image to a preset brightness value, wherein the preset brightness value is a preset brightness value, and the influence of the excessive brightness or the excessive darkness of the image collected by the mobile equipment on the identification accuracy is avoided.
The color space is converted into a single-channel image which converts the color space of the image from a 3-channel RGB image to HSV, so that the characteristics extracted by the model during the subsequent image processing are more concentrated, and the identification accuracy is improved.
S203: and respectively inputting each image to be identified into the coin identification model for processing, and determining whether each image to be identified is the coin image to be identified according to the identification result.
The coin identification model is a classifier which is obtained by training in advance.
The user can be in any scene in actual use, the image uploaded by the mobile terminal of the user can be a book, a mental retardation, a packaging bag and the like, the false recognition of the model is easy to cause, in order to avoid the situation as much as possible, the image to be recognized is recognized through the coin recognition model, the non-coin image can be filtered, the false recognition rate is reduced, and the final recognition accuracy is further improved.
S102: and inputting the coin image to be identified into an input layer in the foreign currency identification model, and performing characteristic classification processing on the image output by the input layer through a full-connection layer after a plurality of rounds of preset processing to obtain the currency, version and denomination of the coin image to be identified.
When a plurality of coin images to be identified are obtained after the images uploaded by the mobile terminal are randomly rotated, each coin image to be identified is respectively input into a foreign currency identification model to be processed, and the identification result with the highest confidence coefficient is taken as the final identification result, so that the situation of inaccurate identification caused by overlarge inclination angle during photographing is avoided.
The foreign currency recognition model is obtained by training the improved VGG-16 model in advance, and the size of an input image corresponding to an input layer of the foreign currency recognition model is matched with the size of the foreign currency, for example, the size 224 x 224 of the input image of the VGG-16 input layer is modified to be 256 x 192 matched with the size of most foreign currencies.
The preset processing of the foreign currency recognition model comprises feature extraction processing of a convolution layer group, feature reduction processing of a pooling layer and feature normalization processing of a normalization layer, wherein the convolution layer group comprises at least one convolution layer, the number of convolution layers corresponding to each convolution layer group can be different, the total number of the convolution layers in the foreign currency recognition model is smaller than that of the convolution layers of the VGG-16 model, and the number of extracted features of each convolution layer in the foreign currency recognition model is smaller than that of the corresponding convolution layer in the VGG-16 model.
The external shapes of various foreign currencies are very similar, the high-level semantic information is also very similar, and the model is easy to be overfitted when being actually trained. In order to improve the generalization capability of the foreign currency recognition model, the training data of the foreign currency recognition model needs to be preprocessed and data enhanced, and the preprocessing comprises definition adjustment, brightness adjustment, size scaling, random angle rotation and the like, so that the training data can be greatly expanded, and the recognition accuracy of the model is improved. Referring to fig. 3, the training method of the foreign currency recognition model is as follows:
s301: acquiring various foreign currency images;
s302: the brightness of each foreign currency image is adjusted to a preset brightness value, and the color space of each foreign currency image is converted into HSV, so that each preprocessed foreign currency image is obtained;
s303: classifying, labeling and data enhancing are carried out on various preprocessed foreign currency images, and a training sample set is obtained;
s304: training a preset neural network model by using a training sample set to obtain a foreign currency identification model, wherein the total number of convolution layers in the preset neural network is smaller than that of the VGG-16 model, and the number of extracted features of each convolution layer in the preset neural network model is smaller than that of the corresponding convolution layer in the VGG-16 model.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a comparison between a VGG-16 model and a modified model, wherein the structure of the modified model is only an example, and the invention is not limited thereto.
It can be seen that, compared with the VGG-16 model, the size of the Input image of the Input layer (Input) of the foreign currency recognition model in this embodiment is matched with the size of the foreign currency, so that the model is more suitable for recognizing the foreign currency without stretching or intercepting the to-be-recognized coin image, the total number of convolution layers (conv) of the foreign currency recognition model is smaller than that of the VGG-16 model, the number of extracted features of each convolution layer is smaller than that of the corresponding convolution layers in the VGG-16 model, and excessive feature extraction is not performed on the to-be-recognized coin image, so that the features Input into the full-connection layer are low-level features representing detail textures and the like, analysis of the model on high-level semantic features of the image is reduced, the occurrence of an overfitting phenomenon is avoided to a certain extent, the occurrence of the overfitting phenomenon is also avoided to a certain extent, the occurrence of the overfitting phenomenon is further avoided, the influence of overfitting on the result of the model processing is avoided, and the accuracy of the recognition of the foreign currency recognition model is improved.
After the foreign currency image is identified, the identification result is returned to the front-end display page, and in order to improve user experience while the identification result is displayed, standard foreign currency images, foreign currency introduction, exchangeable RMB, recommended foreign currency reservation functions, exchange website recommendation and the like can be displayed for the user.
Specifically, the exchangeable RMB calculation method comprises the following steps:
inquiring the foreign exchange license plate price corresponding to the currency of the coin image to be identified;
calculating the value of the RMB corresponding to the coin image to be identified according to the denomination and the foreign exchange license price of the coin image to be identified;
and displaying the standard coin image corresponding to the coin image to be identified and the corresponding RMB value in the front-end display page.
The exchangeable website recommendation method comprises the following steps:
acquiring positioning information of a mobile terminal for acquiring the coin image to be identified;
invoking an electronic map, and inquiring position information of exchange points in a preset area corresponding to the positioning information, such as the exchange points within a range of 2 kilometers from the mobile terminal, wherein the exchange points are the exchange points of the currency of the coin image to be identified;
and displaying the position information of the exchange points on a front-end display interface, wherein the display mode is not limited, such as displaying in a map form, displaying in a list form and the like.
In sum, by combining foreign currency introduction and foreign currency branding, foreign currency knowledge can be popularized for users, various foreign currency functions can be recommended, net points are guided down, net point traffic is improved, and user viscosity is increased.
Based on the foreign currency recognition method disclosed in the above embodiment, the present embodiment correspondingly discloses a foreign currency recognition device, please refer to fig. 5, which includes:
a coin image acquisition unit 501 for acquiring a coin image to be identified;
the foreign currency recognition unit 502 is configured to input the to-be-recognized coin image to an input layer in a foreign currency recognition model, after a plurality of rounds of preset processing, the image output by the input layer is subjected to feature classification processing of a full connection layer to obtain a currency, a version and a face value of the to-be-recognized coin image, where a size of the input image corresponding to the input layer of the foreign currency recognition model is matched with a foreign currency size, the preset processing includes feature extraction processing of a convolution layer group, feature reduction processing of a pooling layer and feature normalization processing of a normalization layer, a total number of convolution layers in the foreign currency recognition model is smaller than a total number of convolution layers of a VGG-16 model, and a number of extracted features of each convolution layer in the foreign currency recognition model is smaller than a number of extracted features of a corresponding convolution layer in the VGG-16 model.
Optionally, the coin image acquisition unit 501 includes:
an original image acquisition subunit, configured to acquire an original image;
the image preprocessing subunit is used for preprocessing the original image to obtain a plurality of images to be identified which accord with a preset format;
and the coin identification subunit is used for respectively inputting each image to be identified into the coin identification model for processing, and determining whether each image to be identified is a coin image to be identified or not according to the identification result.
Optionally, the image preprocessing subunit is specifically configured to:
the angles of the original images are randomly rotated for a plurality of times respectively to obtain a plurality of images;
and respectively adjusting the brightness of each image to a preset brightness value, and converting the color space of each image into HSV to obtain a plurality of images to be identified.
Optionally, the device further comprises a model training unit, specifically configured to:
acquiring various foreign currency images;
the brightness of each foreign currency image is adjusted to a preset brightness value, and the color space of each foreign currency image is converted into HSV, so that each preprocessed foreign currency image is obtained;
classifying, labeling and data enhancing are carried out on various preprocessed foreign currency images, and a training sample set is obtained;
training a preset neural network model by using the training sample set to obtain the foreign currency recognition model, wherein the total number of convolution layers in the preset neural network is smaller than that of the VGG-16 model, and the number of extracted features of each convolution layer in the preset neural network model is smaller than that of the corresponding convolution layer in the VGG-16 model.
Optionally, the device further comprises a foreign currency value calculation unit, specifically configured to:
inquiring the foreign exchange license plate price corresponding to the currency of the coin image to be identified;
calculating the value of the RMB corresponding to the coin image to be identified according to the denomination and the foreign exchange license price of the coin image to be identified;
and displaying the standard coin image corresponding to the coin image to be identified and the corresponding RMB value in the front-end display page.
Optionally, the device further includes a website recommending unit, specifically configured to:
acquiring positioning information of a mobile terminal for acquiring the coin image to be identified;
invoking an electronic map, inquiring the position information of the exchange network points in a preset area corresponding to the positioning information, wherein the exchange network points are the exchange network points of the currency of the coin image to be identified;
and displaying the position information of the exchange network points on a front-end display interface.
According to the foreign currency recognition device provided by the embodiment, the foreign currency recognition model is obtained by training the improved VGG-16 model, the size of an input image of an input layer of the foreign currency recognition model is matched with the size of the foreign currency, stretching or intercepting treatment is not needed to be carried out on the image of the money to be recognized, the model is more suitable for recognizing the foreign currency, the total number of convolution layers of the foreign currency recognition model is smaller than that of the VGG-16 model, the number of extracted features of each convolution layer is smaller than that of the corresponding convolution layers in the VGG-16 model, excessive feature extraction is not carried out on the image of the money to be recognized, the features input into the full-connection layer are low-layer features representing detail textures and the like, analysis of the model on high-layer semantic features of the image is reduced, the phenomenon of overfitting is avoided to a certain extent, a normalization layer is added after the pooling layer, the phenomenon of overfitting is avoided to a certain extent, the effect of overfitting on the feature is avoided, and the result of the model processing is further avoided, so that the accuracy of the image of the foreign currency recognition model is improved.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A foreign currency recognition method, comprising:
acquiring a coin image to be identified;
inputting the coin image to be identified into an input layer in a foreign currency identification model, and after a plurality of rounds of preset processing, obtaining the currency, version and face value of the coin image to be identified through feature classification processing of a full-connection layer, wherein the size of the input image corresponding to the input layer of the foreign currency identification model is matched with the size of the foreign currency, the preset processing comprises feature extraction processing of a convolution layer group, feature reduction processing of a pooling layer and feature normalization processing of a normalization layer, the total number of convolution layers in the foreign currency identification model is smaller than the total number of convolution layers of a VGG-16 model, and the number of extracted features of each convolution layer in the foreign currency identification model is smaller than the number of extracted features of corresponding convolution layers in the VGG-16 model;
the acquiring the coin image to be identified comprises the following steps:
acquiring an original image; the original image is an image obtained by calling a photographing device for photographing by the mobile terminal and encoding by the BASE 64;
preprocessing the original image to obtain a plurality of images to be identified which accord with a preset format;
respectively inputting each image to be identified into a coin identification model for processing, and determining whether each image to be identified is a coin image to be identified according to an identification result; taking the recognition result with the highest confidence as a final recognition result, and avoiding inaccurate recognition caused by overlarge inclination angle during photographing;
the preprocessing the original image to obtain a plurality of images to be identified, which conform to a preset format, includes:
the angles of the original images are randomly rotated for a plurality of times respectively to obtain a plurality of images;
and respectively adjusting the brightness of each image to a preset brightness value, and converting the color space of each image into HSV to obtain a plurality of images to be identified.
2. The method of claim 1, wherein the training method of the foreign currency recognition model comprises:
acquiring various foreign currency images;
the brightness of each foreign currency image is adjusted to a preset brightness value, and the color space of each foreign currency image is converted into HSV, so that each preprocessed foreign currency image is obtained;
classifying, labeling and data enhancing are carried out on various preprocessed foreign currency images, and a training sample set is obtained;
training a preset neural network model by using the training sample set to obtain the foreign currency recognition model, wherein the total number of convolution layers in the preset neural network is smaller than that of the VGG-16 model, and the number of extracted features of each convolution layer in the preset neural network model is smaller than that of the corresponding convolution layer in the VGG-16 model.
3. The method of claim 1, wherein after obtaining the currency, layout and denomination of the coin image to be identified, the method further comprises:
inquiring the foreign exchange license plate price corresponding to the currency of the coin image to be identified;
calculating the value of the RMB corresponding to the coin image to be identified according to the denomination and the foreign exchange license price of the coin image to be identified;
and displaying the standard coin image corresponding to the coin image to be identified and the corresponding RMB value in the front-end display page.
4. The method of claim 1, wherein after obtaining the currency, layout and denomination of the coin image to be identified, the method further comprises:
acquiring positioning information of a mobile terminal for acquiring the coin image to be identified;
invoking an electronic map, inquiring the position information of the exchange network points in a preset area corresponding to the positioning information, wherein the exchange network points are the exchange network points of the currency of the coin image to be identified;
and displaying the position information of the exchange network points on a front-end display interface.
5. A foreign currency recognition apparatus, comprising:
the coin image acquisition unit is used for acquiring a coin image to be identified;
the foreign currency identification unit is used for inputting the to-be-identified coin image into an input layer in a foreign currency identification model, after the image output by the input layer is subjected to multi-round preset processing, the coin type, version and face value of the to-be-identified coin image are obtained through feature classification processing of a full-connection layer, wherein the size of the input image corresponding to the input layer of the foreign currency identification model is matched with the size of the foreign currency, the preset processing comprises feature extraction processing of a convolution layer group, feature reduction processing of a pooling layer and feature normalization processing of a normalization layer, the total number of convolution layers in the foreign currency identification model is smaller than the total number of convolution layers of a VGG-16 model, and the number of extracted features of each convolution layer in the foreign currency identification model is smaller than the number of extracted features of corresponding convolution layers in the VGG-16 model;
wherein, coin image acquisition unit includes:
an original image acquisition subunit, configured to acquire an original image; the original image is an image obtained by calling a photographing device for photographing by the mobile terminal and encoding by the BASE 64;
the image preprocessing subunit is used for preprocessing the original image to obtain a plurality of images to be identified which accord with a preset format;
the coin identification subunit is used for respectively inputting each image to be identified into the coin identification model for processing, and determining whether each image to be identified is a coin image to be identified or not according to the identification result; taking the recognition result with the highest confidence as a final recognition result, and avoiding inaccurate recognition caused by overlarge inclination angle during photographing;
the image preprocessing subunit is specifically configured to:
the angles of the original images are randomly rotated for a plurality of times respectively to obtain a plurality of images;
and respectively adjusting the brightness of each image to a preset brightness value, and converting the color space of each image into HSV to obtain a plurality of images to be identified.
6. The apparatus according to claim 5, further comprising a model training unit, in particular for:
acquiring various foreign currency images;
the brightness of each foreign currency image is adjusted to a preset brightness value, and the color space of each foreign currency image is converted into HSV, so that each preprocessed foreign currency image is obtained;
classifying, labeling and data enhancing are carried out on various preprocessed foreign currency images, and a training sample set is obtained;
training a preset neural network model by using the training sample set to obtain the foreign currency recognition model, wherein the total number of convolution layers in the preset neural network is smaller than that of the VGG-16 model, and the number of extracted features of each convolution layer in the preset neural network model is smaller than that of the corresponding convolution layer in the VGG-16 model.
CN202010360620.1A 2020-04-30 2020-04-30 Foreign currency identification method and device Active CN111553430B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010360620.1A CN111553430B (en) 2020-04-30 2020-04-30 Foreign currency identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010360620.1A CN111553430B (en) 2020-04-30 2020-04-30 Foreign currency identification method and device

Publications (2)

Publication Number Publication Date
CN111553430A CN111553430A (en) 2020-08-18
CN111553430B true CN111553430B (en) 2023-08-18

Family

ID=72007971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010360620.1A Active CN111553430B (en) 2020-04-30 2020-04-30 Foreign currency identification method and device

Country Status (1)

Country Link
CN (1) CN111553430B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132073B (en) * 2020-09-28 2024-03-29 中国银行股份有限公司 Garbage classification method and device, storage medium and electronic equipment
CN116912721B (en) * 2023-09-14 2023-12-05 众芯汉创(江苏)科技有限公司 Power distribution network equipment body identification method and system based on monocular stereoscopic vision

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341916A (en) * 2017-07-12 2017-11-10 深圳怡化电脑股份有限公司 A kind of discrimination method and identification device
CN108734850A (en) * 2018-04-27 2018-11-02 深圳怡化电脑股份有限公司 Paper Currency Identification, paper money identifier and terminal device
CN109753978A (en) * 2017-11-01 2019-05-14 腾讯科技(深圳)有限公司 Image classification method, device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324946B (en) * 2013-07-11 2016-08-17 广州广电运通金融电子股份有限公司 A kind of method and system of paper money recognition classification

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341916A (en) * 2017-07-12 2017-11-10 深圳怡化电脑股份有限公司 A kind of discrimination method and identification device
CN109753978A (en) * 2017-11-01 2019-05-14 腾讯科技(深圳)有限公司 Image classification method, device and computer readable storage medium
CN108734850A (en) * 2018-04-27 2018-11-02 深圳怡化电脑股份有限公司 Paper Currency Identification, paper money identifier and terminal device

Also Published As

Publication number Publication date
CN111553430A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
Xiao et al. Image splicing forgery detection combining coarse to refined convolutional neural network and adaptive clustering
CN105118048B (en) The recognition methods of reproduction certificate picture and device
EP4109332A1 (en) Certificate authenticity identification method and apparatus, computer-readable medium, and electronic device
RU2658272C2 (en) Authentication of security documents and mobile device to carry out authentication
CN109117885B (en) Stamp identification method based on deep learning
Fourati et al. Anti-spoofing in face recognition-based biometric authentication using image quality assessment
US20120224765A1 (en) Text region detection system and method
CN111553430B (en) Foreign currency identification method and device
CN110838119B (en) Human face image quality evaluation method, computer device and computer readable storage medium
KR20160063294A (en) Fourth dimension code, image identification systems and method by the fourth dimension code, search system and method
CN112085094B (en) Document image reproduction detection method, device, computer equipment and storage medium
CN108323209A (en) Information processing method, system, cloud processing device and computer program product
Meshram et al. A comprehensive dataset of damaged banknotes in Indian currency (Rupees) for analysis and classification
US20210158035A1 (en) System, method and computer program product for automatic remote verification of identity documents
CN113486715A (en) Image reproduction identification method, intelligent terminal and computer storage medium
CN110619060B (en) Cigarette carton image database construction method and cigarette carton anti-counterfeiting query method
CN113077355B (en) Insurance claim settlement method and device, electronic equipment and storage medium
CN114820476A (en) Identification card identification method based on compliance detection
Singh et al. IPCRF: An End-to-End Indian Paper Currency Recognition Framework for Blind and Visually Impaired People
CN114612995A (en) Face feature recognition method and device
WO2022006829A1 (en) Bill image recognition method and system, electronic device, and storage medium
CN110415424B (en) Anti-counterfeiting identification method and device, computer equipment and storage medium
CN114332993A (en) Face recognition method and device, electronic equipment and computer readable storage medium
CN114037541A (en) Fixed-point medicine institution supervision method based on biological feature recognition and related equipment
Chandrappa et al. Machine Learning Algorithms for Identifying Fake Currencies

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
GR01 Patent grant
GR01 Patent grant