Signature image comparison method and device, computer equipment and storage medium

By extracting and comparing feature vectors of signature images, the problem of manual inspection of authenticity verification in the existing technology in signatures is solved, and efficient and accurate signature verification is achieved to meet modern business needs.

CN119649067APending Publication Date: 2025-03-18CHINA RESOURCES PHARM COMMERCIAL GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411772492.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The authenticity verification of the signature seal in the existing technology relies on manual inspection, which is inefficient and prone to errors. The problem is more prominent when processing a large number of files and cannot meet the needs of modern business.

Method used

By obtaining the feature vectors of the standard signature image, a comparison data set is constructed, and the feature vectors of the target signature image are compared with the feature vectors of the comparison data set, the signature similarity is calculated, and the comparison results of the target signature image are determined based on the preset threshold.

Benefits of technology

It improves the automation of authenticity verification of signatures and seals, ensures the accuracy of signatures and seals, and at the same time improves verification speed, and can process a large number of documents more efficiently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649067A_ABST
    Figure CN119649067A_ABST
Patent Text Reader

Abstract

The invention relates to a signature image comparison method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a comparison data set and a to-be-compared target signature image; wherein the comparison data set is obtained by performing feature vector extraction on a standard signature image; comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector; calculating signature similarity according to the comparison result vector; and determining a target comparison result of the target signature image according to the signature similarity and a preset similarity threshold. By adopting the method, the verification speed of signature authenticity can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a signature image comparison method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] In the fields of logistics and finance, the authenticity verification of signatures is an important part of ensuring the safety and legality of operations. As a verification mark for key documents such as contracts and invoices, signatures can prove the intentions of both parties to the transaction and the authenticity and validity of the agreement.

[0003] However, the current method of comparing signatures and seals relies on manual inspection, which is not only inefficient, but also prone to errors due to human negligence or misjudgment, especially when a large number of documents need to be processed. With the advancement of information technology and the advancement of digital transformation, the speed of verifying the authenticity of signatures and seals by manual inspection can no longer meet the needs of modern business. Summary of the invention

[0004] Based on this, it is necessary to provide a signature image comparison method, device, computer equipment, computer-readable storage medium and computer program product that can improve the verification speed of signature authenticity in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a signature image comparison method, comprising:

[0006] Obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image;

[0007] Compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector;

[0008] Calculating signature similarity based on the comparison result vector;

[0009] A target comparison result of the target signature image is determined according to the signature similarity and a preset similarity threshold.

[0010] In one embodiment, obtaining a comparison data set includes:

[0011] Get the signature sample image;

[0012] Input the signature sample image into a signature detection model, and output the signature coordinate information in the signature sample image; wherein the signature detection model is trained based on the signature coordinate information in the historical signature image;

[0013] Extracting a standard signature image according to the signature coordinate information;

[0014] Feature vectors are extracted according to the standard signature image to obtain a comparison data set.

[0015] In one embodiment, before extracting the standard signature image according to the signature coordinate information, the method further includes:

[0016] Obtaining a manually annotated image; wherein the manually annotated image is obtained by annotating a portion of the signature sample image that contains the signature;

[0017] The annotation coordinate information is determined according to the manually annotated image, and the signature coordinate information is supplemented according to the annotation coordinate information.

[0018] In one embodiment, extracting a feature vector according to the standard signature image to obtain a comparison data set includes:

[0019] Generating feature images of multiple scales according to the standard signature image;

[0020] For each of the feature images, respectively, extreme value detection is performed on the pixel points of the feature image to locate and obtain feature points of the feature image;

[0021] Determine the vector length and vector direction of each feature point according to the amplitude distribution and gradient direction distribution of the region where each feature point is located, so as to obtain a feature vector;

[0022] The feature vectors of each of the feature images are collected to obtain a comparison data set.

[0023] In one embodiment, the comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector includes:

[0024] Inputting the first feature vector of the target signature image into a first comparison sub-model to obtain a first output vector, and inputting the second feature vector in the comparison data set into a second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same;

[0025] A vector distance between the first output vector and the second output vector is calculated to obtain a comparison result vector.

[0026] In one embodiment, the step of inputting the first feature vector of the target signature image into a first comparison sub-model to obtain a first output vector, and inputting the second feature vector in the comparison data set into a second comparison sub-model to obtain a second output vector comprises:

[0027] The first feature vector of the target signature image is input into the first comparison sub-model, and the second feature vector in the comparison data set is input into the second comparison sub-model, and the first feature vector and the second feature vector are iterated using a comparison loss function to obtain a first output vector and a second output vector; the comparison loss function is used to make feature vectors that meet similarity conditions close to each other and make feature vectors that do not meet similarity conditions far away from each other.

[0028] In a second aspect, the present application also provides a signature image comparison device, comprising:

[0029] A data acquisition module, used to acquire a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image;

[0030] A feature comparison module, used for comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector;

[0031] A data calculation module, used to calculate the signature similarity according to the comparison result vector;

[0032] The result determination module is used to determine the target comparison result of the target signature image according to the signature similarity and a preset similarity threshold.

[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] Obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image;

[0035] Compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector;

[0036] Calculating signature similarity based on the comparison result vector;

[0037] A target comparison result of the target signature image is determined according to the signature similarity and a preset similarity threshold.

[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0039] Obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image;

[0040] Compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector;

[0041] Calculating signature similarity based on the comparison result vector;

[0042] A target comparison result of the target signature image is determined according to the signature similarity and a preset similarity threshold.

[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0044] Obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image;

[0045] Compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector;

[0046] Calculating signature similarity based on the comparison result vector;

[0047] A target comparison result of the target signature image is determined according to the signature similarity and a preset similarity threshold.

[0048] The above-mentioned signature image comparison method, device, computer equipment, storage medium and computer program product obtain a comparison data set and a target signature image to be compared by extracting feature vectors from a standard signature image, thereby comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector, and then calculate the signature similarity based on the comparison result vector, and finally determine the target comparison result of the target signature image based on the signature similarity and a preset similarity threshold. This method improves the degree of automation of signature comparison and verification by comparing the feature vectors of the target signature image and the standard signature image, thereby improving the speed of verifying the authenticity of the signature while ensuring the accuracy of the signature comparison. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1A diagram showing an application environment of a signature image comparison method in an embodiment;

[0051] Figure 2 A schematic diagram of a flow chart of a signature image comparison method in one embodiment;

[0052] Figure 3 Schematic diagram of the process of step S202 of the signature image comparison method in one embodiment;

[0053] Figure 4 is a structural block diagram of a signature image comparison device in an embodiment;

[0054] Figure 5 is an internal structure diagram of a computer device in one embodiment;

[0055] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The signature image comparison method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network, and the terminal 102 can be used to receive the target signature image to be compared uploaded by the user, and send the target signature image to the server 104. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store the comparison data set, and can also be used to store the first feature vector of the target signature image generated by the server 104 during the calculation process and the second feature vector in the comparison data set and other data. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0058] In an exemplary embodiment, Figure 2 As shown, a signature image comparison method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S208. Among them:

[0059] Step S202: Obtain a comparison data set and a target signature image to be compared.

[0060] The comparison data set is obtained by extracting feature vectors from standard signature images. The comparison data set can be stored in an Elasticsearch (ES) vector database, that is, in an impression vector database.

[0061] For example, the server 104 may receive the target signature image to be compared sent by the terminal 102. In an actual usage scenario, the user may upload the target signature image to be compared through the terminal 102. The target signature image may be a signature image whose authenticity is to be verified. Furthermore, the server 104 may obtain the comparison data set from other service terminals or the terminal 102, or the server 104 may obtain the comparison data set by extracting feature vectors from standard signature images.

[0062] Among them, a seal refers to a seal or signature affixed by an individual or organization on a document to prove the authenticity and legality of the document content. It plays an important role in identity verification and is usually regarded as the signatory's approval and consent to the document content. In this embodiment, the seal can take a variety of forms, including but not limited to handwritten signatures, printed seals, electronic signatures, etc. The target seal image uploaded by the user can be a scanned copy or a high-quality photo.

[0063] Furthermore, the server 104 may standardize the format of the target signature image sent by the terminal 102, for example, by sending upload requirement information to the terminal 102, thereby constraining the format and size of the image uploaded by the user. The server 104 may also pre-process the target signature image sent by the terminal 102, for example, by resizing, rotating, etc.

[0064] Step S204: compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector.

[0065] Exemplarily, the server 104 may input the first feature vector of the target signature image into the first comparison sub-model to obtain a first output vector, and input the second feature vector in the comparison data set into the second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same; and calculate the vector distance between the first output vector and the second output vector to obtain a comparison result vector.

[0066] The first comparison sub-model and the second comparison sub-model can be two twin networks. The twin network algorithm is used to compare the first feature vector of the target signature image with the second feature vector in the comparison data set. The twin network consists of two sub-networks (also called "branches"), which have exactly the same structure and share weights. Each sub-network receives an input and then extracts the features of the input. By sharing parameters, the twin network ensures that for the same input, the features extracted by the two sub-networks are based on the same standard.

[0067] Furthermore, the server 104 may input the first feature vector of the target signature image into the first comparison sub-model, and input the second feature vector in the comparison data set into the second comparison sub-model, and use the comparison loss function to iterate the first feature vector and the second feature vector to obtain the first output vector and the second output vector; the comparison loss function is used to make the feature vectors that meet the similarity condition close to each other and make the feature vectors that do not meet the similarity condition far away from each other. For similar input pairs (for example, images representing the same category) in the comparison loss function, their feature vector distance is as small as possible; and for dissimilar input pairs (for example, images representing different categories), their feature vector distance is as large as possible. During the training comparison process, the twin network receives a pair of data (that is, the first feature vector of the target signature image and the second feature vector in the comparison data set) as input. Each sub-network will process one of the inputs respectively, extract its feature vector, calculate the distance between the feature vectors output by the two sub-networks (for example, the Euclidean distance), and calculate the loss value through the comparison loss function. The goal of the loss function is to minimize the distance between similar pairs and increase the distance between dissimilar pairs, and then use the back propagation algorithm to update the weight of the network. By optimizing the loss function, the network can gradually learn how to distinguish between similar and dissimilar input pairs.

[0068] Step S206, calculating the signature similarity based on the comparison result vector.

[0069] Exemplarily, by calculating the distance between two feature vectors, the twin network composed of the first contrast sub-model and the second contrast sub-model can output a similarity score, which can range from 0 to 1, where 1 represents that the two images are exactly the same and 0 represents that they are completely different.

[0070] Step S208: determining a target comparison result of the target signature image according to the signature similarity and a preset similarity threshold.

[0071] Exemplarily, the server 104 can set a preset similarity threshold, such as 0.9. When the similarity exceeds this threshold, the two pictures can be considered to be a match. The server 104 can send the target comparison result to the terminal 102, and the terminal 102 can display the target comparison result on the display interface. If the similarity exceeds the preset similarity threshold, the user is prompted that the signature verification is successful; if it is lower than the threshold, the verification fails.

[0072] In the above-mentioned signature image comparison method, a comparison data set and a target signature image to be compared are obtained by extracting a feature vector of a standard signature image, thereby comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector, and then calculating the signature similarity based on the comparison result vector. Finally, based on the signature similarity and a preset similarity threshold, the target comparison result of the target signature image is determined. This method improves the degree of automation of signature comparison and verification by comparing the feature vectors of the target signature image and the standard signature image. Therefore, while ensuring the accuracy of signature comparison, the speed of verifying the authenticity of the signature is improved.

[0073] In an exemplary embodiment, Figure 3 As shown, step S202 includes steps S302 to S306. Among them:

[0074] Step S302, obtaining a signature sample image.

[0075] Exemplarily, the server 104 may obtain an image containing a signature as a signature sample image by file uploading, scanning, taking a photo, etc. The signature sample image may be a part of a document or a picture, and may contain background noise, messy patterns or other non-signature parts.

[0076] Step S304: input the signature sample image into the signature detection model, and output the signature coordinate information in the signature sample image.

[0077] Among them, the signature detection model is trained based on the signature coordinate information in the historical signature image.

[0078] For example, the server 104 can input the signature sample image into a trained signature detection model to identify and locate the signature area in the image. The signature detection model is trained based on a large number of historical signature images and their corresponding signature coordinate information. The training process uses a labeled signature image dataset, in which each image contains the precise coordinates of the signature. By learning this data, the model can recognize the shape, position, size and other features of the signature in the image.

[0079] Furthermore, the server 104 may utilize a signature detection model trained by a deep learning framework YOLOv5. YOLOv5 is a real-time target detection framework based on deep learning, which can provide a very fast detection speed without sacrificing accuracy.

[0080] Furthermore, the signature detection model can also use image classification and region extraction methods, such as convolutional neural networks or other deep learning technologies. After the model processes the input signature sample image, it can accurately identify the location of the signature and output a set of coordinate information. These coordinates usually include the rectangular boundaries of the signature in the image (such as the coordinate points of the upper left corner and the lower right corner). Through this information, the system can determine the specific location of the signature in the image.

[0081] Step S306: extracting a standard signature image according to the signature coordinate information.

[0082] For example, the server 104 can crop the area where the signature is located according to the signature coordinate information obtained in step S304, and extract a standard signature image from the entire signature sample image. The server 104 can crop the original image according to the coordinate information to ensure that the cropped area accurately contains the signature itself. In order to improve the image quality, the server 104 can also perform certain preprocessing, such as: denoising: eliminating background noise or interference elements in the image to avoid affecting subsequent processing; normalization: adjusting the brightness, contrast, size, etc. of the image to make the image of the signature part more suitable for feature extraction; size standardization: adjusting the cropped signature image to a standard size to ensure that the processing scale of all images is consistent.

[0083] Exemplarily, the server 104 may also obtain a manually annotated image; wherein the manually annotated image is obtained by annotating the portion of the signature sample image containing the signature, determining the annotation coordinate information based on the manually annotated image, and supplementing the signature coordinate information based on the annotation coordinate information. The user may use the drawing tool provided by the terminal 102 to draw the signature position in the image in the form of a rectangular frame, and then send the drawing result as a manually annotated image to the server 104, thereby manually determining the coordinate information.

[0084] Step S308: extracting feature vectors based on the standard signature image to obtain a comparison data set.

[0085] Exemplarily, the server 104 may use the SIFT (Scale-Invariant Feature Transform) feature extraction algorithm to extract features from the standard signature image. The purpose of feature extraction is to extract key features from the image that can uniquely identify the signature. A feature vector can be a high-dimensional mathematical representation that includes a variety of feature information such as the shape, texture, and color of the signature. SIFT is a classic computer vision algorithm used to extract feature points from images that are not affected by scale, rotation, and perspective changes.

[0086] Exemplarily, the server 104 can generate feature images of multiple scales based on the standard signature image, perform extreme value detection on the pixels of each feature image, locate the feature points of the feature image, determine the vector length and vector direction of the feature point based on the amplitude distribution and gradient direction distribution of the region where each feature point is located to obtain the feature vector, and collect the feature vectors of each feature image to obtain a comparison data set.

[0087] Furthermore, the server 104 can generate feature images of multiple scales based on the standard signature image. This is achieved by applying Gaussian blur to the original signature image. Different degrees of blur correspond to different scales, thereby ensuring that features are extracted from different detail levels of the image. At each scale, the server 104 can locate feature points in the feature image by performing extreme value detection. The extreme value detection process can be performed using the differential Gaussian (DoG) method, which performs differential processing on the image at different scales to find extreme points of brightness or grayscale values ​​in the image. These points can correspond to corners or other significant features in the image. At each scale level, the feature points detected by the server 104 are possible key points.

[0088] Next, for each detected feature point, the server 104 can determine the descriptor of the feature point by analyzing the amplitude distribution and gradient direction distribution of the surrounding area. Specifically, the server 104 can calculate the gradient size and direction of the pixels in the area, and build a direction histogram based on this information. By counting the gradient information of the area, the server 104 can assign a direction to each feature point, so that the feature point is invariant to rotation. Next, the server 104 can perform rotation normalization on the image area around the feature point based on the direction information to ensure that its descriptor remains consistent under rotation transformation.

[0089] The vector descriptor of each feature point is encoded by calculating the gradient direction and amplitude information in its local neighborhood, combined with the feature point direction in the area, and the server 104 can generate a 128-dimensional feature vector. All these feature vectors are merged together to form a set containing all key point descriptors, which is the comparison data set. Finally, by collecting the feature vectors in each scale image, the server 104 can obtain a complete comparison data set. These feature vectors can be used for subsequent feature matching or image comparison tasks to help achieve effective comparison and matching between different images.

[0090] In another exemplary embodiment, the server 104 obtains a signature sample image and inputs the signature sample image into a signature detection model, outputs the signature coordinate information in the signature sample image, and simultaneously obtains a manually annotated image obtained by annotating the portion of the signature sample image containing the signature, determines the annotation coordinate information based on the manually annotated image, and supplements the signature coordinate information based on the annotation coordinate information.

[0091] Next, the server 104 extracts the standard signature image according to the signature coordinate information, generates feature images of multiple scales according to the standard signature image, and then performs extreme value detection on the pixel points of each feature image respectively to locate the feature points of the feature image, and determines the vector length and vector direction of the feature point according to the amplitude distribution and gradient direction distribution of the area where each feature point is located to obtain the feature vector, and collects the feature vectors of each feature image to obtain a comparison data set.

[0092] After obtaining the target signature image to be compared, the server 104 inputs the first feature vector of the target signature image into the first comparison sub-model, and inputs the second feature vector in the comparison data set into the second comparison sub-model, and iterates the first feature vector and the second feature vector using the comparison loss function to obtain the first output vector and the second output vector; in this process, the server 104 uses the comparison loss function to make the feature vectors that meet the similarity condition close to each other, and make the feature vectors that do not meet the similarity condition far away from each other, and the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same;

[0093] Finally, the server 104 calculates the vector distance between the first output vector and the second output vector to obtain a comparison result vector, calculates the signature similarity based on the comparison result vector, and then determines the target comparison result of the target signature image based on the signature similarity and a preset similarity threshold.

[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0095] Based on the same inventive concept, the embodiment of the present application also provides a signature image comparison device for implementing the signature image comparison method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more signature image comparison device embodiments provided below can refer to the limitations of the signature image comparison method above, and will not be repeated here.

[0096] In an exemplary embodiment, Figure 4 As shown, a signature image comparison device is provided, comprising: a data acquisition module 402, a feature comparison module 404, a data calculation module 406 and a result determination module 408, wherein:

[0097] The data acquisition module 402 is used to acquire a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from the standard signature image;

[0098] A feature comparison module 404 is used to compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector;

[0099] The data calculation module 406 is used to calculate the signature similarity according to the comparison result vector;

[0100] The result determination module 408 is used to determine the target comparison result of the target signature image according to the signature similarity and a preset similarity threshold.

[0101] In one embodiment, the data acquisition module 402 includes:

[0102] A sample acquisition unit, used to acquire a signature sample image;

[0103] A sample processing unit, used to input the signature sample image into the signature detection model, and output the signature coordinate information in the signature sample image; wherein the signature detection model is trained based on the signature coordinate information in the historical signature image;

[0104] An image extraction unit, used for extracting a standard signature image according to signature coordinate information;

[0105] The feature extraction unit is used to extract feature vectors according to the standard signature image to obtain a comparison data set.

[0106] In one of the embodiments, the sample processing unit is specifically used to: obtain a manually annotated image; wherein the manually annotated image is obtained by annotating the portion of the signature sample image containing the signature; determine the annotation coordinate information based on the manually annotated image, and supplement the signature coordinate information based on the annotation coordinate information.

[0107] In one of the embodiments, the feature extraction unit is specifically used to: generate feature images of multiple scales based on a standard signature image; perform extreme value detection on the pixel points of each feature image to locate the feature points of the feature image; determine the vector length and vector direction of the feature point based on the amplitude distribution and gradient direction distribution of the region where each feature point is located to obtain a feature vector; and collect the feature vectors of each feature image to obtain a comparison data set.

[0108] In one embodiment, the feature comparison module 404 is specifically used to: input the first feature vector of the target signature image into the first comparison sub-model to obtain a first output vector, and input the second feature vector in the comparison data set into the second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same; calculate the vector distance between the first output vector and the second output vector to obtain a comparison result vector.

[0109] In one embodiment, the feature comparison module 404 is also used to: input the first feature vector of the target signature image into the first comparison sub-model, and input the second feature vector in the comparison data set into the second comparison sub-model, and use the comparison loss function to iterate the first feature vector and the second feature vector to obtain the first output vector and the second output vector; the comparison loss function is used to make the feature vectors that meet the similarity condition close to each other, and make the feature vectors that do not meet the similarity condition move away from each other.

[0110] Each module in the above-mentioned signature image comparison device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a comparison data set, and can also be used to store data such as the first feature vector of the target signature image generated by the server 104 during the calculation process and the second feature vector in the comparison data set. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a signature image comparison method is implemented.

[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a signature image comparison method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0113] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image; comparing a first feature vector of the target signature image with a second feature vector in the comparison data set to obtain a comparison result vector; calculating signature similarity based on the comparison result vector; and determining a target comparison result of the target signature image based on the signature similarity and a preset similarity threshold.

[0115] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a signature sample image; inputting the signature sample image into a signature detection model, and outputting signature coordinate information in the signature sample image; wherein the signature detection model is trained based on signature coordinate information in historical signature images; extracting a standard signature image based on the signature coordinate information; extracting a feature vector based on the standard signature image to obtain a comparison data set.

[0116] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a manually annotated image; wherein the manually annotated image is obtained by annotating the portion of the signature sample image that contains the signature; determining the annotation coordinate information based on the manually annotated image, and supplementing the signature coordinate information based on the annotation coordinate information.

[0117] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the standard signature image, feature images of multiple scales are generated; for each feature image, extreme value detection is performed on the pixel points of the feature image to locate the feature points of the feature image; based on the amplitude distribution and gradient direction distribution of the region where each feature point is located, the vector length and vector direction of the feature point are determined to obtain a feature vector; and the feature vectors of each feature image are collected to obtain a comparison data set.

[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the first feature vector of the target signature image is input into the first comparison sub-model to obtain a first output vector, and the second feature vector in the comparison data set is input into the second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same; and the vector distance between the first output vector and the second output vector is calculated to obtain a comparison result vector.

[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the first feature vector of the target signature image is input into the first comparison sub-model, and the second feature vector in the comparison data set is input into the second comparison sub-model, and the first feature vector and the second feature vector are iterated using the comparison loss function to obtain the first output vector and the second output vector; the comparison loss function is used to make the feature vectors that meet the similarity condition close to each other, and make the feature vectors that do not meet the similarity condition move away from each other.

[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image; comparing a first feature vector of the target signature image with a second feature vector in the comparison data set to obtain a comparison result vector; calculating signature similarity based on the comparison result vector; and determining a target comparison result of the target signature image based on the signature similarity and a preset similarity threshold.

[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a signature sample image; inputting the signature sample image into a signature detection model, and outputting the signature coordinate information in the signature sample image; wherein the signature detection model is trained based on the signature coordinate information in the historical signature image; extracting a standard signature image based on the signature coordinate information; extracting a feature vector based on the standard signature image to obtain a comparison data set.

[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a manually annotated image; wherein the manually annotated image is obtained by annotating the portion of the signature sample image that contains the signature; determining the annotation coordinate information based on the manually annotated image, and supplementing the signature coordinate information based on the annotation coordinate information.

[0123] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the standard signature image, feature images of multiple scales are generated; for each feature image, extreme value detection is performed on the pixel points of the feature image to locate the feature points of the feature image; based on the amplitude distribution and gradient direction distribution of the region where each feature point is located, the vector length and vector direction of the feature point are determined to obtain a feature vector; and the feature vectors of each feature image are combined to obtain a comparison data set.

[0124] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: the first feature vector of the target signature image is input into a first comparison sub-model to obtain a first output vector, and the second feature vector in the comparison data set is input into a second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same; and the vector distance between the first output vector and the second output vector is calculated to obtain a comparison result vector.

[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the first feature vector of the target signature image is input into the first comparison sub-model, and the second feature vector in the comparison data set is input into the second comparison sub-model, and the first feature vector and the second feature vector are iterated using the comparison loss function to obtain the first output vector and the second output vector; the comparison loss function is used to make the feature vectors that meet the similarity condition close to each other, and make the feature vectors that do not meet the similarity condition move away from each other.

[0126] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image; comparing a first feature vector of the target signature image with a second feature vector in the comparison data set to obtain a comparison result vector; calculating signature similarity based on the comparison result vector; and determining a target comparison result of the target signature image based on the signature similarity and a preset similarity threshold.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a signature sample image; inputting the signature sample image into a signature detection model, and outputting the signature coordinate information in the signature sample image; wherein the signature detection model is trained based on the signature coordinate information in the historical signature image; extracting a standard signature image based on the signature coordinate information; extracting a feature vector based on the standard signature image to obtain a comparison data set.

[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a manually annotated image; wherein the manually annotated image is obtained by annotating the portion of the signature sample image that contains the signature; determining the annotation coordinate information based on the manually annotated image, and supplementing the signature coordinate information based on the annotation coordinate information.

[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the standard signature image, feature images of multiple scales are generated; for each feature image, extreme value detection is performed on the pixel points of the feature image to locate the feature points of the feature image; based on the amplitude distribution and gradient direction distribution of the region where each feature point is located, the vector length and vector direction of the feature point are determined to obtain a feature vector; and the feature vectors of each feature image are combined to obtain a comparison data set.

[0130] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: the first feature vector of the target signature image is input into a first comparison sub-model to obtain a first output vector, and the second feature vector in the comparison data set is input into a second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same; and the vector distance between the first output vector and the second output vector is calculated to obtain a comparison result vector.

[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the first feature vector of the target signature image is input into the first comparison sub-model, and the second feature vector in the comparison data set is input into the second comparison sub-model, and the first feature vector and the second feature vector are iterated using the comparison loss function to obtain the first output vector and the second output vector; the comparison loss function is used to make the feature vectors that meet the similarity condition close to each other, and make the feature vectors that do not meet the similarity condition move away from each other.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0134] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0135] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A signature image comparison method, characterized in that: The method comprises: Obtaining a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image; Compare the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector; Calculating signature similarity based on the comparison result vector; A target comparison result of the target signature image is determined according to the signature similarity and a preset similarity threshold.

2. The method according to claim 1, characterized in that The obtaining of the comparison data set includes: Get the signature sample image; Input the signature sample image into a signature detection model, and output the signature coordinate information in the signature sample image; wherein the signature detection model is trained based on the signature coordinate information in the historical signature image; Extracting a standard signature image according to the signature coordinate information; Feature vectors are extracted based on the standard signature image to obtain a comparison data set.

3. The method according to claim 2, characterized in that Before extracting the standard signature image according to the signature coordinate information, the method further includes: Obtaining a manually annotated image; wherein the manually annotated image is obtained by annotating a portion of the signature sample image that contains the signature; The annotation coordinate information is determined according to the manually annotated image, and the signature coordinate information is supplemented according to the annotation coordinate information.

4. The method according to claim 1, characterized in that: The step of extracting a feature vector according to the standard signature image to obtain a comparison data set includes: Generating feature images of multiple scales according to the standard signature image; For each of the feature images, respectively, extreme value detection is performed on the pixel points of the feature image to locate and obtain feature points of the feature image; Determine the vector length and vector direction of each feature point according to the amplitude distribution and gradient direction distribution of the region where each feature point is located, so as to obtain a feature vector; The feature vectors of each of the feature images are collected to obtain a comparison data set.

5. The method according to any one of claims 1 to 4, characterized in that: The step of comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector includes: Inputting the first feature vector of the target signature image into a first comparison sub-model to obtain a first output vector, and inputting the second feature vector in the comparison data set into a second comparison sub-model to obtain a second output vector; wherein the model parameters and model weights of the first comparison sub-model and the second comparison sub-model are the same; A vector distance between the first output vector and the second output vector is calculated to obtain a comparison result vector.

6. The method according to claim 5, characterized in that The step of inputting the first feature vector of the target signature image into a first comparison sub-model to obtain a first output vector, and inputting the second feature vector in the comparison data set into a second comparison sub-model to obtain a second output vector includes: The first feature vector of the target signature image is input into the first comparison sub-model, and the second feature vector in the comparison data set is input into the second comparison sub-model, and the first feature vector and the second feature vector are iterated using a comparison loss function to obtain a first output vector and a second output vector; the comparison loss function is used to make feature vectors that meet similarity conditions close to each other and make feature vectors that do not meet similarity conditions far away from each other.

7. A signature image comparison device, characterized in that: The device comprises: A data acquisition module, used to acquire a comparison data set and a target signature image to be compared; wherein the comparison data set is obtained by extracting feature vectors from a standard signature image; A feature comparison module, used for comparing the first feature vector of the target signature image with the second feature vector in the comparison data set to obtain a comparison result vector; A data calculation module, used to calculate the signature similarity according to the comparison result vector; The result determination module is used to determine the target comparison result of the target signature image according to the signature similarity and a preset similarity threshold.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.