Signature Recognition Method, Device, Computer Equipment and Storage Medium
By extracting and comparing the content and style features of the signature, the problem of low accuracy of signature recognition in the prior art is solved, and more accurate signature recognition is achieved.
Patent Information
- Application Number
- CN202210680727.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-06-16
AI Technical Summary
The accuracy of signature recognition in the prior art is low, mainly because the individual comparison of signature content and signature style is ignored, resulting in the comparison object being unclear enough.
By obtaining the signed image to be identified and the registered signature image, input the content and style features of the extracted signature in the signature recognition model, and compare them separately to determine whether the signature to be identified is a real signature.
The accuracy of signature recognition is improved, and the problem of insufficient recognition caused by focusing on signature content and ignoring the signature style in the prior art is overcome.
Smart Images

Figure CN115035607B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of classification models, and in particular to a signature recognition method, device, computer equipment and storage medium. Background Art
[0002] In many application scenarios, a signature is required to confirm the business handled by the user. Generally, the user is required to register a signature when registering, and enter a new signature when handling the business to confirm the business handled. For example, when a user applies for a bank card, he or she needs to sign the application materials to confirm.
[0003] In the prior art, in order to prevent signature impersonation, the overall features of a new signature are usually compared with the overall features of registered signatures in the registration library to determine whether it is a genuine signature. The prior art only compares the overall features of the signature, while ignoring the separate comparison of the signature content and signature style, making the comparison object unclear and resulting in a low accuracy rate of signature recognition. Summary of the invention
[0004] Based on this, it is necessary to provide a signature recognition method, device, computer equipment and storage medium to address the above technical problems, so as to solve the problem of low accuracy of signature recognition in the prior art.
[0005] A signature recognition method, comprising:
[0006] Obtain the signature image to be identified and the registered signature image of the specified user;
[0007] Input the signature image to be identified and the registered signature image into a signature recognition model, and extract a first signature feature of the signature image to be identified and a second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature;
[0008] determining whether the first content feature and the second content feature are the same;
[0009] When the first content feature and the second content feature are the same, determining whether the first style feature and the second style feature are the same;
[0010] When the first style feature and the second style feature are the same, the signature image to be identified is determined to be the authentic signature of the designated user.
[0011] A signature recognition device, comprising:
[0012] An image acquisition module is used to acquire a signature image to be identified and a registered signature image of a specified user;
[0013] a feature extraction module, configured to input the signature image to be identified and the registered signature image into a signature recognition model, and extract a first signature feature of the signature image to be identified and a second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature;
[0014] a content feature determination module, configured to determine whether the first content feature and the second content feature are the same;
[0015] a style feature judgment module, configured to judge whether the first style feature is the same as the second style feature when the first content feature is the same as the second content feature;
[0016] The real signature module is used to determine that the signature image to be identified is the real signature of the designated user when the first style feature and the second style feature are the same.
[0017] A computer device comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned signature recognition method when executing the computer-readable instructions.
[0018] One or more readable storage media storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the signature recognition method as described above.
[0019] The above-mentioned signature recognition method, device, computer equipment and storage medium obtain the signature image to be recognized and the registered signature image of the designated user; input the signature image to be recognized and the registered signature image into the signature recognition model, and extract the first signature feature of the signature image to be recognized and the second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature; it is determined whether the first content feature and the second content feature are the same; when the first content feature and the second content feature are the same, it is determined whether the first style feature and the second style feature are the same; when the first style feature and the second style feature are the same, it is determined that the signature image to be recognized is the real signature of the designated user. The present invention recognizes the style and content of the signature separately to improve the accuracy of signature recognition, and at the same time overcomes the problem of unclear recognition caused by the existing signature recognition focusing on the signature content and ignoring the signature style. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0021] Figure 1 is a schematic diagram of an application environment of a signature recognition method in an embodiment of the present invention;
[0022] Figure 2 is a flow chart of a signature recognition method in one embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of a structure of a signature recognition device in one embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The signature recognition method provided in this embodiment can be applied in Figure 1 In an application environment, a client communicates with a server. The client includes but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0027] In one embodiment, if Figure 2 As shown, a signature recognition method is provided, which is applied in Figure 1 The server in the example is used as an example to illustrate the following steps:
[0028] S10, obtaining a signature image to be identified and a registered signature image of a designated user.
[0029] Understandably, in many application scenarios that require signatures, users are required to submit a signature image for registration in advance, and the signature image is saved as the user's registration information in the registration information library. When a user handles a business, he needs to submit a new signature image, that is, a signature image to be identified. Among them, the registered signature image refers to the signature image entered when the user registered. The signature image to be identified refers to the signature image newly entered by the user when handling the business. Generally, the signature image is generated based on the signature manually written by the user in the signature client.
[0030] S20. Input the signature image to be identified and the registered signature image into a signature recognition model, and extract the first signature feature of the signature image to be identified and the second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature.
[0031] It can be understood that the signature recognition model refers to a trained neural network model, and the signature recognition model includes a content recognition model and a style recognition model. The signature recognition model is used to recognize the signature content and signature style of the input recognition signature image and the registered signature image. Among them, the content recognition model is used to recognize the signature content of the input recognition signature image and the registered signature image. The style recognition model is used to recognize the signature style of the input recognition signature image and the registered signature image. The first signature feature refers to the overall feature of the signature in the signature image to be recognized. The second signature feature refers to the overall feature of the signature in the registered signature image. The first content feature refers to the feature of the signature content of the signature image to be recognized, that is, the feature of the Chinese characters in the signature newly entered by the user. The second content feature refers to the feature of the signature content of the registered signature image, that is, the feature of the Chinese characters in the signature entered when the user registered. The first style feature refers to the feature of the signature style of the signature image to be recognized, that is, the feature of the writing style of the signature newly entered by the user. The second style feature refers to the feature of the signature style of the registered signature image, that is, the feature of the writing style of the signature entered when the user registered.
[0032] S30: Determine whether the first content feature and the second content feature are the same.
[0033] It is understandable that, based on the first content feature and the second content feature, it can be determined whether the signature content of the signature image to be identified is the same as the signature content of the registered signature image. The feature similarity between the first content feature and the second content feature is determined by a preset calculation method, and whether the first content feature and the second content feature are the same is determined based on the feature similarity between the two. For example, the feature similarity between the first content feature and the second content feature is determined by the Euclidean distance formula, or the feature similarity between the first content feature and the second content feature is determined by the cosine distance formula. Specifically, the Euclidean distance between the first content feature and the second content feature is calculated by the Euclidean distance formula to obtain a calculation result. And it is determined whether the calculation result is less than or equal to the preset Euclidean distance. If the calculation result is less than or equal to the preset Euclidean distance, it is determined that the first content feature and the second content feature are the same. Similarly, if the calculation result is greater than the preset Euclidean distance, it is determined that the first content feature and the second content feature are not the same.
[0034] S40: When the first content feature is the same as the second content feature, determine whether the first style feature is the same as the second style feature.
[0035] It is understandable that when the first content feature and the second content feature are the same, it is determined that the signature content of the signature image to be identified is the same as the signature content of the registered signature image. After determining that the signature content of the signature image to be identified is the same as the signature content of the registered signature image, it is further determined whether the signature style of the signature image to be identified is the same as the signature style of the registered signature image. Specifically, based on the first style feature and the second style feature, it can be determined whether the signature style of the signature image to be identified is the same as the signature style of the registered signature image. The above-mentioned method for determining whether the first content feature and the second content feature are the same is applicable to the determination of whether the first style feature and the second style feature are the same, and will not be repeated here.
[0036] S50: When the first style feature and the second style feature are the same, determine that the signature image to be identified is the real signature of the designated user.
[0037] It can be understood that when it is determined that the signature content of the signature image to be identified is the same as the signature content of the registered signature image, and when it is determined that the signature style of the signature image to be identified is the same as the signature style of the registered signature image, the signature image to be identified is determined to be the authentic signature entered by the designated user.
[0038] In steps S10-S50, the signature image to be identified and the registered signature image of the designated user are obtained; the signature image to be identified and the registered signature image are input into the signature recognition model, and the first signature feature of the signature image to be identified and the second signature feature of the registered signature image are extracted through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature; it is determined whether the first content feature and the second content feature are the same; when the first content feature and the second content feature are the same, it is determined whether the first style feature and the second style feature are the same; when the first style feature and the second style feature are the same, it is determined that the signature image to be identified is the real signature of the designated user. The present invention recognizes the style and content of the signature separately to improve the accuracy of signature recognition, and at the same time, overcomes the problem of unclear recognition caused by the existing signature recognition focusing on the signature content and ignoring the signature style.
[0039] Optionally, in step S30, that is, determining whether the first content feature and the second content feature are the same includes:
[0040] S301, calculating the Euclidean distance between the first content feature and the second content feature to obtain a calculation result;
[0041] S302, determining whether the calculation result is less than or equal to a preset Euclidean distance;
[0042] S303: If the calculation result is less than or equal to the preset Euclidean distance, determine that the first content feature is the same as the second content feature.
[0043] It is understandable that the Euclidean distance between the first content feature and the second content feature is calculated by the Euclidean distance calculation formula, and whether the first content feature and the second content feature are the same is determined according to the size of the calculated Euclidean distance. Specifically, when the calculated Euclidean distance is less than or equal to the preset Euclidean distance, the first content feature and the second content feature are determined to be the same. The preset Euclidean distance refers to a pre-set Euclidean distance. When the calculated Euclidean distance is greater than the preset Euclidean distance, the first content feature and the second content feature are determined to be different.
[0044] In steps S301-S303, the Euclidean distance between the first content feature and the second content feature is calculated to obtain a calculation result; it is determined whether the calculation result is less than or equal to a preset Euclidean distance; if the calculation result is less than or equal to the preset Euclidean distance, it is determined that the first content feature and the second content feature are the same. The similarity between the first content feature and the second content feature is calculated by the Euclidean distance formula, which can improve the accuracy of the calculation result.
[0045] Optionally, after step S30, that is, after determining whether the first content feature and the second content feature are the same, the following steps are included:
[0046] S304: if the first content feature and the second content feature are different, generating a first determination result indicating that the signature image to be identified is an erroneous signature;
[0047] S305: Based on the first determination result, trigger an early warning measure corresponding to the first determination result.
[0048] It is understandable that the first content feature and the second content feature are different, that is, the signature content of the signature image to be identified is different from the signature content of the registered signature image. The first determination result is a result indicating that the signature image to be identified is an image with an incorrect signature. An incorrect signature means that there is a text error in the signature. The early warning measure refers to a pre-set response measure. For example, when the first determination result indicates that the signature image to be identified is an incorrect signature, an early warning measure requiring the signature to be re-entered may be triggered.
[0049] In steps S304 and S305, if the first content feature and the second content feature are different, a first determination result indicating that the signature image to be identified is an erroneous signature is generated; based on the first determination result, an early warning measure corresponding to the first determination result is triggered. The present invention can timely discover erroneous signatures and take early warning measures, thereby improving user experience.
[0050] Optionally, before step S20, that is, before inputting the signature image to be recognized and the registered signature image into the signature recognition model, the following steps are included:
[0051] S201, obtaining a sample signature set; the signature training sample set includes a number of sample signature images;
[0052] S202, inputting a plurality of the sample signature images into an initial signature recognition model, and extracting sample content features and sample style features of the plurality of the sample signatures through the initial signature recognition model; the initial signature recognition model includes an initial content recognition model and an initial style recognition model;
[0053] S203, training and learning a number of sample content features by using the initial content recognition model until a first network parameter of the initial content recognition model converges, and marking the converged initial content recognition model as a content recognition model;
[0054] S204, training and learning the plurality of sample style features and the plurality of sample content features through the initial style recognition model until the second network parameter of the initial style recognition model converges, and marking the converged initial style recognition model as a style recognition model;
[0055] S205: Mark the initial signature recognition model including the style recognition model and the content recognition model as a signature recognition model.
[0056] It can be understood that the sample signature set is used to train the initial signature recognition model to obtain the signature recognition model. The sample signature set is obtained by collection and includes several sample signature images. The sample signature image refers to the collected image containing the signature. The initial content recognition model is used to train and learn the signature content in the sample signature image to obtain the content recognition model. Among them, the content recognition model is used to recognize the signature content in the signature image. The initial style recognition model is used to train and learn the signature style in the sample signature image to obtain the style recognition model. Among them, the style recognition model is used to recognize the signature style in the signature image. The initial content recognition model and the initial style recognition model both refer to untrained neural network models. For example, the initial content recognition model can be a generative adversarial network. Among them, the first network parameter refers to the parameter of the initial content recognition model. The second network parameter refers to the parameter of the initial style recognition model. The first network parameter is continuously updated according to the initial signature recognition model by continuously training and learning the sample signature image until it converges to a certain value. When the first network parameter converges, the training of the initial content recognition model is stopped, and the initial content recognition model when the first network parameter converges is used as the trained content recognition model. Similarly, the initial style recognition model when the second network parameters converge is used as the trained style recognition model. The initial signature recognition model including the style recognition model and the content recognition model is used as the signature recognition model. The signature recognition model is used to recognize the input signature image.
[0057] In steps S201-S205, a sample signature set is obtained; the signature training sample set includes a number of sample signature images; the number of sample signature images are input into the initial signature recognition model, and the sample content features and sample style features of the number of sample signatures are extracted through the initial signature recognition model; the initial signature recognition model includes an initial content recognition model and an initial style recognition model; the number of sample content features are trained and learned through the initial content recognition model until the first network parameter of the initial content recognition model converges, and the converged initial content recognition model is marked as a content recognition model; the number of sample style features and the number of sample content features are trained and learned through the initial style recognition model until the second network parameter of the initial style recognition model converges, and the converged initial style recognition model is marked as a style recognition model; the initial signature recognition model including the style recognition model and the content recognition model is marked as a signature recognition model. The present invention can improve the accuracy of the signature recognition model by training and learning the signature content and signature style of the sample signature set respectively.
[0058] Optionally, the initial content recognition model is a generative adversarial network; in step S203, the step of training and learning a plurality of sample content features through the initial content recognition model until a first network parameter of the initial content recognition model converges includes:
[0059] S2031, learning the sample content features through the generator of the generative adversarial network to generate a new signature image corresponding to the sample content features;
[0060] S2032, calculating the image similarity between the new signature image and the sample signature image corresponding to the sample content feature through the discriminator of the generative adversarial network;
[0061] S2033. Update the first network parameters of the initial content recognition model according to the image similarity until the first network parameters of the initial content recognition model converge.
[0062] It can be understood that the generator is used to generate a new signature image, and the discriminator is used to identify the new signature image generated by the generator. The sample content feature refers to the feature of the signature content of the input sample signature image, that is, the feature of the text contained in the input sample signature image. The new signature image is a new signature image generated by the generator based on the text features of the input sample signature image. Image similarity refers to the similarity between the new signature image and the sample signature image. The process of training the generator is also a process of continuously improving the recognition ability of the discriminator, which means that the training of the generator and the discriminator can be realized at the same time, saving training time and improving the accuracy of the generated adversarial network.
[0063] In steps S2031-S2032, the sample content features are learned by the generator of the generative adversarial network to generate a new signature image corresponding to the sample content features; the image similarity between the new signature image and the sample signature image corresponding to the sample content features is calculated by the discriminator of the generative adversarial network; and the first network parameters of the initial content recognition model are updated according to the image similarity until the first network parameters of the initial content recognition model converge.
[0064] Optionally, after step S40, that is, after determining whether the first style feature and the second style feature are the same, the following steps are included:
[0065] S401, if the first style feature and the second style feature are different, generating a second determination result indicating that the signature image to be identified is a false signature;
[0066] S402: Based on the second determination result, trigger an early warning measure corresponding to the second determination result.
[0067] It is understandable that the first style feature and the second style feature are different, that is, the signature style of the signature image to be identified is different from the signature style of the registered signature image. The second determination result is a result indicating that the signature image to be identified is a false signature image. A false signature means that a signature is identified as not being the signature of the person himself. Early warning measures refer to pre-set response measures. For example, when the second determination result indicates that the signature image to be identified is a false signature, early warning measures for face recognition or fingerprint recognition can be triggered.
[0068] In steps S401 and S402, if the first style feature and the second style feature are different, a second determination result indicating that the signature image to be identified is a false signature is generated; based on the second determination result, a warning measure corresponding to the second determination result is triggered. The present invention can detect false signatures in a timely manner and take warning measures, thereby improving user experience.
[0069] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0070] In one embodiment, a signature recognition device is provided, which corresponds one-to-one to the signature recognition method in the above embodiment. Figure 3 As shown, the signature recognition device includes an image acquisition module 10, a feature extraction module 20, a content feature judgment module 30, a style feature judgment module 40 and a true signature module 50. The detailed description of each functional module is as follows:
[0071] An image acquisition module 10 is used to acquire a signature image to be identified and a registered signature image of a designated user;
[0072] The feature extraction module 20 is used to input the signature image to be identified and the registered signature image into a signature recognition model, and extract the first signature feature of the signature image to be identified and the second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature;
[0073] A content feature determination module 30, configured to determine whether the first content feature and the second content feature are the same;
[0074] A style feature determination module 40, configured to determine whether the first style feature is the same as the second style feature when the first content feature is the same as the second content feature;
[0075] The real signature module 50 is used to determine that the signature image to be identified is the real signature of the designated user when the first style feature and the second style feature are the same.
[0076] Optionally, the content feature determination module 30 includes:
[0077] a calculation result unit, configured to calculate the Euclidean distance between the first content feature and the second content feature to obtain a calculation result;
[0078] A Euclidean distance judgment unit, used to judge whether the calculation result is less than or equal to a preset Euclidean distance;
[0079] The content feature determination unit is configured to determine that the first content feature is the same as the second content feature if the calculation result is less than or equal to the preset Euclidean distance.
[0080] Optionally, after the content feature determination module 30, the following steps are included:
[0081] A first determination result module, configured to generate a first determination result indicating that the signature image to be identified is an erroneous signature if the first content feature and the second content feature are different;
[0082] The first early warning measure module is used to trigger the early warning measure corresponding to the first determination result based on the first determination result.
[0083] Optionally, before the feature extraction module 20, it includes:
[0084] A sample signature set unit, used to obtain a sample signature set; the signature training sample set includes a number of sample signature images;
[0085] An initial signature recognition model unit, used to input the sample signature images into an initial signature recognition model, and extract sample content features and sample style features of the sample signatures through the initial signature recognition model; the initial signature recognition model includes an initial content recognition model and an initial style recognition model;
[0086] A content recognition model unit, configured to train and learn a plurality of sample content features through the initial content recognition model until a first network parameter of the initial content recognition model converges, and mark the converged initial content recognition model as a content recognition model;
[0087] A style recognition model unit, configured to train and learn a plurality of the sample style features and a plurality of the sample content features through the initial style recognition model until a second network parameter of the initial style recognition model converges, and mark the converged initial style recognition model as a style recognition model;
[0088] The signature recognition model unit is used to mark the initial signature recognition model including the style recognition model and the content recognition model as a signature recognition model.
[0089] Optionally, the initial content recognition model is a generative adversarial network; the content recognition model unit includes:
[0090] A new signature image unit, configured to learn the sample content features through the generator of the generative adversarial network and generate a new signature image corresponding to the sample content features;
[0091] An image similarity unit, configured to calculate the image similarity between the new signature image and a sample signature image corresponding to the sample content feature through a discriminator of the generative adversarial network;
[0092] The first network parameter updating unit is used to update the first network parameter of the initial content recognition model according to the image similarity until the first network parameter of the initial content recognition model converges.
[0093] Optionally, after the style feature determination module 40, the following steps are included:
[0094] a second determination result module, configured to generate a second determination result indicating that the signature image to be identified is a false signature if the first style feature and the second style feature are different;
[0095] The second early warning measure module is used to trigger the early warning measure corresponding to the second determination result based on the second determination result.
[0096] The specific definition of the signature recognition device can be found in the definition of the signature recognition method above, which will not be repeated here. Each module in the above-mentioned signature recognition device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0097] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer-readable instructions are executed by the processor, a signature recognition method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0098] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor executes the computer-readable instructions to implement the following steps:
[0099] Obtain the signature image to be identified and the registered signature image of the specified user;
[0100] Input the signature image to be identified and the registered signature image into a signature recognition model, and extract a first signature feature of the signature image to be identified and a second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature;
[0101] determining whether the first content feature and the second content feature are the same;
[0102] When the first content feature and the second content feature are the same, determining whether the first style feature and the second style feature are the same;
[0103] When the first style feature and the second style feature are the same, the signature image to be identified is determined to be the authentic signature of the designated user.
[0104] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media. The readable storage media store computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the following steps are implemented:
[0105] An image acquisition module is used to acquire a signature image to be identified and a registered signature image of a specified user;
[0106] a feature extraction module, configured to input the signature image to be identified and the registered signature image into a signature recognition model, and extract a first signature feature of the signature image to be identified and a second signature feature of the registered signature image through the signature recognition model; the first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature;
[0107] a content feature determination module, configured to determine whether the first content feature and the second content feature are the same;
[0108] a style feature judgment module, configured to judge whether the first style feature is the same as the second style feature when the first content feature is the same as the second content feature;
[0109] The real signature module is used to determine that the signature image to be identified is the real signature of the designated user when the first style feature and the second style feature are the same.
[0110] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0111] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0112] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A signature recognition method, characterized in that, it includes: Obtain the signature image to be recognized and the registered signature image of a specified user; Input the signature image to be recognized and the registered signature image into a signature recognition model, and extract the first signature feature of the signature image to be recognized and the second signature feature of the registered signature image through the signature recognition model; The first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature; the first content feature refers to the feature of the signature content of the signature image to be recognized; the first style feature refers to the feature of the signature style of the signature image to be recognized; Judge whether the first content feature and the second content feature are the same; When the first content feature and the second content feature are the same, judge whether the first style feature and the second style feature are the same; When the first style feature and the second style feature are the same, determine that the signature image to be recognized is the real signature of the specified user; After judging whether the first style feature and the second style feature are the same, it includes: If the first style feature and the second style feature are not the same, generate a second determination result indicating that the signature image to be recognized is a false signature; Based on the second determination result, trigger a warning measure corresponding to the second determination result; wherein, when the second determination result indicates that the signature image to be recognized is a false signature, trigger a warning measure for face recognition or fingerprint recognition.
2. The signature recognition method according to claim 1, characterized in that, judging whether the first content feature and the second content feature are the same includes: Calculate the Euclidean distance between the first content feature and the second content feature to obtain a calculation result; Judge whether the calculation result is less than or equal to a preset Euclidean distance; If the calculation result is less than or equal to the preset Euclidean distance, then determine that the first content feature and the second content feature are the same.
3. The signature recognition method according to claim 1, characterized in that, after judging whether the first content feature and the second content feature are the same, it includes: If the first content feature and the second content feature are not the same, generate a first determination result indicating that the signature image to be recognized is an incorrect signature; Based on the first determination result, trigger a warning measure corresponding to the first determination result.
4. The signature recognition method according to claim 1, characterized in that, before inputting the signature image to be recognized and the registered signature image into the signature recognition model, it includes: Obtain a sample signature set; the signature training sample set includes several sample signature images; Input several of the sample signature images into an initial signature recognition model, and extract the sample content features and sample style features of several of the sample signatures through the initial signature recognition model; the initial signature recognition model includes an initial content recognition model and an initial style recognition model; Training and learning are performed on a number of the sample content features through the initial content recognition model until the first network parameters of the initial content recognition model converge, and the converged initial content recognition model is marked as the content recognition model; Training and learning are performed on a number of the sample style features and a number of the sample content features through the initial style recognition model until the second network parameters of the initial style recognition model converge, and the converged initial style recognition model is marked as the style recognition model; The initial signature recognition model including the style recognition model and the content recognition model is marked as the signature recognition model.
5. The signature recognition method according to claim 4, wherein, the initial content recognition model is a generative adversarial network; the training and learning of a number of the sample content features through the initial content recognition model until the first network parameters of the initial content recognition model converge includes: Learning the sample content features through the generator of the generative adversarial network to generate a new signature image corresponding to the sample content features; Calculating the image similarity between the new signature image and the sample signature image corresponding to the sample content features through the discriminator of the generative adversarial network; Updating the first network parameters of the initial content recognition model according to the image similarity until the first network parameters of the initial content recognition model converge.
6. A signature recognition device, wherein, it includes: An image acquisition module, configured to acquire a signature image to be recognized and a registered signature image of a specified user; A feature extraction module, configured to input the signature image to be recognized and the registered signature image into the signature recognition model, and extract a first signature feature of the signature image to be recognized and a second signature feature of the registered signature image through the signature recognition model; The first signature feature includes a first content feature and a first style feature; the second signature feature includes a second content feature and a second style feature; the first content feature refers to the feature of the signature content of the signature image to be recognized; the first style feature refers to the feature of the signature style of the signature image to be recognized; A content feature judgment module, configured to judge whether the first content feature and the second content feature are the same; A style feature judgment module, configured to judge whether the first style feature and the second style feature are the same when the first content feature and the second content feature are the same; A genuine signature module, configured to determine that the signature image to be recognized is the genuine signature of the specified user when the first style feature and the second style feature are the same; After the style feature judgment module, it includes: A second determination result module, configured to generate a second determination result indicating that the signature image to be recognized is a forged signature if the first style feature and the second style feature are not the same; A second warning measure module, configured to trigger a warning measure corresponding to the second determination result based on the second determination result; wherein, when the second determination result indicates that the signature image to be recognized is a forged signature, a warning measure of face recognition or fingerprint recognition is triggered.
7. The signature recognition device according to claim 6, wherein, the content feature judgment module includes: a calculation result unit for calculating the Euclidean distance between the first content feature and the second content feature to obtain a calculation result; a Euclidean distance judgment unit for judging whether the calculation result is less than or equal to a preset Euclidean distance; a content feature determination unit for determining that the first content feature and the second content feature are the same if the calculation result is less than or equal to the preset Euclidean distance.
8. A computer device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein, when the processor executes the computer-readable instructions, the signature recognition method according to any one of claims 1 to 5 is implemented.
9. One or more readable storage media storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to execute the signature recognition method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Identity verification method and device based on seal and signature and computer device
CN110619274A
Signature verification method and device
CN111178290A