Movatterモバイル変換


[0]ホーム

URL:


CN112115921B - Authenticity identification method, device and electronic equipment - Google Patents

Authenticity identification method, device and electronic equipment
Download PDF

Info

Publication number
CN112115921B
CN112115921BCN202011065166.3ACN202011065166ACN112115921BCN 112115921 BCN112115921 BCN 112115921BCN 202011065166 ACN202011065166 ACN 202011065166ACN 112115921 BCN112115921 BCN 112115921B
Authority
CN
China
Prior art keywords
target subject
subject
target
real
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011065166.3A
Other languages
Chinese (zh)
Other versions
CN112115921A (en
Inventor
冯博豪
庞敏辉
谢国斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co LtdfiledCriticalBeijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011065166.3ApriorityCriticalpatent/CN112115921B/en
Publication of CN112115921ApublicationCriticalpatent/CN112115921A/en
Application grantedgrantedCritical
Publication of CN112115921BpublicationCriticalpatent/CN112115921B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请公开了一种真伪鉴别方法、装置以及电子设备,涉及计算机视觉、深度学习和文字识别等人工智能技术领域。具体实现方案为:获取第一图像;在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,其中,目标主体包括印章和签名中至少一项,特征信息包括形状特征、拓扑特征和卷积特征中的至少一项;基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。即在本实施例中,可利用目标主体的文字内容和/或目标主体的形状特征、拓扑特征和卷积特征中的至少一项来确定目标主体的真伪,无需人工核对以鉴别真伪,可提高真伪鉴别的效率。

The present application discloses a method, device and electronic device for authenticity identification, which relates to the fields of artificial intelligence technology such as computer vision, deep learning and text recognition. The specific implementation scheme is: acquiring a first image; in the case where it is detected that the first image includes a target subject, identifying the text content in the target subject and/or extracting the feature information of the target subject, wherein the target subject includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature and a convolution feature; based on the text content of the target subject and/or the feature information of the target subject, determining the target authenticity identification result of the target subject. That is, in this embodiment, the text content of the target subject and/or at least one of the shape feature, topological feature and convolution feature of the target subject can be used to determine the authenticity of the target subject, without manual verification to identify the authenticity, which can improve the efficiency of authenticity identification.

Description

Translated fromChinese
一种真伪鉴别方法、装置以及电子设备Authenticity identification method, device and electronic equipment

技术领域Technical Field

本申请涉及人工智能技术领域,具体为计算机视觉、深度学习和文字识别技术领域,尤其涉及一种真伪鉴别方法、装置以及电子设备。The present application relates to the field of artificial intelligence technology, specifically the field of computer vision, deep learning and text recognition technology, and in particular to an authenticity identification method, device and electronic device.

背景技术Background technique

在日常生活或工作中,会产生大量的文件或合同等,很多重要的文件或者合同,为确保真实性,需要对上面的印章以及签名等进行真伪验证。In daily life or work, a large number of documents or contracts are generated. To ensure the authenticity of many important documents or contracts, it is necessary to verify the authenticity of the seals and signatures on them.

目前,对于文件或合同中的印章以及签名等主体的真伪验证,常采用方式是通过人工核对验证。Currently, manual verification is often used to verify the authenticity of seals, signatures, and other entities in documents or contracts.

发明内容Summary of the invention

本申请提供一种真伪鉴别方法、装置和电子设备。The present application provides an authenticity identification method, device and electronic device.

第一方面,本申请一个实施例提供一种真伪鉴别方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for authenticity identification, the method comprising:

获取第一图像;acquiring a first image;

在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息,其中,所述目标主体包括印章和签名中至少一项,所述特征信息包括形状特征、拓扑特征和卷积特征中的至少一项;In the case where it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject, wherein the target subject includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature, and a convolution feature;

基于所述目标主体的文字内容和/或所述目标主体的特征信息,确定所述目标主体的目标真伪鉴别结果。Based on the text content of the target subject and/or the characteristic information of the target subject, a target authenticity identification result of the target subject is determined.

本实施例的真伪鉴别方法中,通过获取第一图像,并在第一图像中检测到目标主体情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。目标主体包括印章和签名中的至少一项,特征信息可包括形状特征、拓扑特征和卷积特征中的至少一项,即在本实施例中,可利用目标主体的文字内容和/或目标主体的形状特征、拓扑特征和卷积特征中的至少一项来确定目标主体的真伪,无需人工核对以鉴别真伪,可提高真伪鉴别的效率。与此同时,通过本实施例的真伪鉴别方法,可表面通过人工核对鉴别真伪时容易产生错误的情况,可提高鉴别准确性。In the authenticity identification method of the present embodiment, by acquiring a first image, and in the case where a target subject is detected in the first image, the text content in the target subject is identified and/or the characteristic information of the target subject is extracted, and based on the text content of the target subject and/or the characteristic information of the target subject, the target authenticity identification result of the target subject is determined. The target subject includes at least one of a seal and a signature, and the characteristic information may include at least one of a shape feature, a topological feature, and a convolution feature. That is, in the present embodiment, the text content of the target subject and/or at least one of the shape feature, topological feature, and convolution feature of the target subject can be used to determine the authenticity of the target subject, without manual verification to identify the authenticity, which can improve the efficiency of authenticity identification. At the same time, through the authenticity identification method of the present embodiment, the situation that errors are prone to occur when verifying the authenticity through manual verification can be surfaced, which can improve the accuracy of identification.

第二方面,本申请一个实施例提供一种真伪鉴别装置,所述装置包括:In a second aspect, an embodiment of the present application provides an authenticity identification device, the device comprising:

获取模块,用于获取第一图像;An acquisition module, used for acquiring a first image;

处理模块,用于在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息,其中,所述目标主体包括印章和签名中至少一项,所述特征信息包括形状特征、拓扑特征和卷积特征中的至少一项;a processing module, configured to, when detecting that the first image includes a target subject, identify text content in the target subject and/or extract feature information of the target subject, wherein the target subject includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature, and a convolution feature;

确定模块,用于基于所述目标主体的文字内容和/或所述目标主体的特征信息,确定所述目标主体的目标真伪鉴别结果。The determination module is used to determine the target authenticity identification result of the target subject based on the text content of the target subject and/or the characteristic information of the target subject.

本实施例的真伪鉴别装置进行真伪鉴别过程中,通过获取第一图像,并在第一图像中检测到目标主体情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。目标主体包括印章和签名中的至少一项,特征信息可包括形状特征、拓扑特征和卷积特征中的至少一项,即在本实施例中,可利用目标主体的文字内容和/或目标主体的形状特征、拓扑特征和卷积特征中的至少一项来确定目标主体的真伪,无需人工核对以鉴别真伪,可提高真伪鉴别的效率。与此同时,通过本实施例的真伪鉴别方法,可表面通过人工核对鉴别真伪时容易产生错误的情况,可提高鉴别准确性。In the process of authenticity identification by the authenticity identification device of this embodiment, by acquiring a first image and detecting the target subject in the first image, the text content in the target subject is identified and/or the characteristic information of the target subject is extracted, and the target authenticity identification result of the target subject is determined based on the text content of the target subject and/or the characteristic information of the target subject. The target subject includes at least one of a seal and a signature, and the characteristic information may include at least one of a shape feature, a topological feature, and a convolution feature. That is, in this embodiment, the text content of the target subject and/or at least one of the shape feature, topological feature, and convolution feature of the target subject can be used to determine the authenticity of the target subject, without manual verification to identify the authenticity, which can improve the efficiency of authenticity identification. At the same time, through the authenticity identification method of this embodiment, it is possible to surface the situation where errors are easily generated when identifying the authenticity through manual verification, which can improve the accuracy of identification.

第三方面,本申请一个实施例还提供一种电子设备,包括:In a third aspect, an embodiment of the present application further provides an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请各实施例提供的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods provided in each embodiment of the present application.

第四方面,本申请一个实施例还提供一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行本申请各实施例提供的方法。In a fourth aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the methods provided in the embodiments of the present application.

第五方面,本申请一个实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现本申请各实施例提供的方法。In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which implements the methods provided in the embodiments of the present application when executed by a processor.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图用于更好地理解本方案,不构成对本申请的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

图1是本申请提供的一个实施例的真伪鉴别方法的流程示意图之一;FIG1 is a flow chart of a method for authenticity identification according to an embodiment of the present application;

图2是本申请提供的一个实施例的真伪鉴别方法的流程示意图之二;FIG2 is a second flow chart of an authenticity identification method according to an embodiment of the present application;

图3是本申请提供的一个实施例的真伪鉴别方法的流程示意图之三;FIG3 is a third flow chart of an authenticity identification method according to an embodiment of the present application;

图4是本申请提供的一个实施例的实现真伪鉴别方法的真伪鉴别系统的原理图;FIG4 is a schematic diagram of an authenticity identification system for implementing an authenticity identification method according to an embodiment of the present application;

图5是本申请提供的一个实施例的真伪鉴别方法的流程示意图之四;FIG5 is a fourth flow chart of an authenticity identification method according to an embodiment of the present application;

图6是本申请提供的一个实施例的真伪鉴别装置的结构图之一;FIG6 is a structural diagram of a device for authenticity identification according to an embodiment of the present application;

图7是本申请提供的一个实施例的真伪鉴别装置的结构图之二;FIG7 is a second structural diagram of an authenticity identification device according to an embodiment of the present application;

图8是本申请提供的一个实施例的真伪鉴别装置的结构图之三;FIG8 is a third structural diagram of an authenticity identification device according to an embodiment of the present application;

图9是用来实现本申请实施例的真伪鉴别方法的电子设备的框图。FIG. 9 is a block diagram of an electronic device for implementing the authenticity identification method according to an embodiment of the present application.

具体实施方式Detailed ways

以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

如图1所示,根据本申请的实施例,本申请提供一种真伪鉴别方法,可应用于电子设备,方法包括:As shown in FIG1 , according to an embodiment of the present application, the present application provides an authenticity identification method, which can be applied to electronic devices. The method includes:

步骤S101:获取第一图像。Step S101: Acquire a first image.

第一图像可以是对待鉴别主体(即待鉴别实物)进行拍摄得到的图像,也可以是扫描得到的图像,也可以是截图得到的图像。在真伪鉴别过程中,可将第一图像输入到进行真伪鉴别方法的执行主体例如电子设备中。例如,对于有印章的合同等,通过拍摄装置对该合同进行拍摄,即可得到该合同对应的图像。又例如,对于有签名的文件等,通过拍摄装置对该文件进行拍摄,即可得到该文件对应的图像。The first image can be an image obtained by photographing the subject to be identified (i.e., the physical object to be identified), or it can be an image obtained by scanning or screenshotting. In the authenticity identification process, the first image can be input into an execution subject of the authenticity identification method, such as an electronic device. For example, for a contract with a seal, the image corresponding to the contract can be obtained by photographing the contract with a photographing device. For another example, for a document with a signature, the image corresponding to the document can be obtained by photographing the document with a photographing device.

步骤S102:在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息。Step S102: when it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject.

其中,目标主体包括印章和签名中至少一项,特征信息包括形状特征、拓扑特征和卷积特征中的至少一项。The target subject includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature and a convolution feature.

对不同待鉴别主体进行拍摄得到的第一图像中包括的目标主体不同,例如,对有印章的合同拍摄得到的第一图像中,包括的目标主体为印章,对有签名的文件拍摄得到的第一图像中,包括的目标主体为签名。在本实施例中,在检测到第一图像包括印章和签名中至少一项的情况下,即可识别目标主体中的文字内容和/或提取目标主体的特征信息,作为一个示例,对于印章,可识别印章中的文字内容和提取印章的形状特征,对于签名,可提取签名的拓扑特征和/或卷积特征。The target subject included in the first image obtained by photographing different subjects to be identified is different. For example, the target subject included in the first image obtained by photographing a contract with a seal is the seal, and the target subject included in the first image obtained by photographing a document with a signature is the signature. In this embodiment, when it is detected that the first image includes at least one of the seal and the signature, the text content in the target subject can be identified and/or the feature information of the target subject can be extracted. As an example, for a seal, the text content in the seal can be identified and the shape feature of the seal can be extracted. For a signature, the topological feature and/or convolution feature of the signature can be extracted.

作为一个示例,可通过预训练的目标检测模型对第一图像进行目标检测,在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息。作为一个示例,该目标检测模型可以是yolov3检测模型(一种目标检测网络),通过该模型进行目标检测可提高目标检测效率。As an example, the first image may be subjected to target detection by a pre-trained target detection model, and when it is detected that the first image includes a target subject, the text content in the target subject may be identified and/or feature information of the target subject may be extracted. As an example, the target detection model may be a yolov3 detection model (a target detection network), and target detection by the model may improve target detection efficiency.

步骤S103:基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。Step S103: Determine the target authenticity identification result of the target subject based on the text content of the target subject and/or the characteristic information of the target subject.

在识别目标主体中的文字内容和/或提取目标主体的特征信息后,即可利用目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果,即可确定第一图像中印章和/或签名的真伪,实现印章和/或签名真伪鉴别。目标真伪鉴别结果包括真鉴别结果或伪鉴别结果。After identifying the text content in the target subject and/or extracting the characteristic information of the target subject, the target authenticity identification result of the target subject can be determined by using the text content of the target subject and/or the characteristic information of the target subject, and the authenticity of the seal and/or signature in the first image can be determined to achieve the authenticity identification of the seal and/or signature. The target authenticity identification result includes a true identification result or a false identification result.

本实施例的真伪鉴别方法中,通过获取第一图像,并在第一图像中检测到目标主体情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。目标主体包括印章和签名中的至少一项,特征信息可包括形状特征、拓扑特征和卷积特征中的至少一项,即在本实施例中,可利用目标主体的文字内容和/或目标主体的形状特征、拓扑特征和卷积特征中的至少一项来确定目标主体的真伪,无需人工核对以鉴别真伪,可提高真伪鉴别的效率。与此同时,通过本实施例的真伪鉴别方法,可表面通过人工核对鉴别真伪时容易产生错误的情况,可提高鉴别准确性。In the authenticity identification method of the present embodiment, by acquiring a first image, and in the case where a target subject is detected in the first image, the text content in the target subject is identified and/or the characteristic information of the target subject is extracted, and based on the text content of the target subject and/or the characteristic information of the target subject, the target authenticity identification result of the target subject is determined. The target subject includes at least one of a seal and a signature, and the characteristic information may include at least one of a shape feature, a topological feature, and a convolution feature. That is, in the present embodiment, the text content of the target subject and/or at least one of the shape feature, topological feature, and convolution feature of the target subject can be used to determine the authenticity of the target subject, without manual verification to identify the authenticity, which can improve the efficiency of authenticity identification. At the same time, through the authenticity identification method of the present embodiment, the situation that errors are prone to occur when verifying the authenticity through manual verification can be surfaced, which can improve the accuracy of identification.

可选的,目标主体包括印章,目标主体的特征信息包括印章的形状特征。在本实施例中,基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果,包括:将印章的文字内容与印章的真实文字内容进行比对,得到印章的第一真伪鉴别结果;基于印章的形状特征,确定印章的第二真伪鉴别结果;根据第一真伪鉴别结果以及第二真伪鉴别结果,确定目标真伪结果。即在本实施例中,如图2所示,提供一种真伪鉴别方法,包括以下步骤:Optionally, the target subject includes a seal, and the characteristic information of the target subject includes the shape characteristics of the seal. In this embodiment, based on the text content of the target subject and/or the characteristic information of the target subject, determining the target authenticity identification result of the target subject includes: comparing the text content of the seal with the real text content of the seal to obtain a first authenticity identification result of the seal; based on the shape characteristics of the seal, determining a second authenticity identification result of the seal; and determining the target authenticity result according to the first authenticity identification result and the second authenticity identification result. That is, in this embodiment, as shown in FIG2 , an authenticity identification method is provided, comprising the following steps:

步骤S201:获取第一图像。Step S201: Acquire a first image.

第一图像可以是对待鉴别主体(即待鉴别实物)进行拍摄得到的图像,也可以是扫描得到的图像,也可以是截图得到的图像。在真伪鉴别过程中,可将第一图像输入到进行真伪鉴别方法的执行主体例如电子设备中。例如,对于有印章的合同等,通过拍摄装置对该合同进行拍摄,即可得到该合同对应的图像。又例如,对于有签名的文件等,通过拍摄装置对该文件进行拍摄,即可得到该文件对应的图像。The first image can be an image obtained by photographing the subject to be identified (i.e., the physical object to be identified), or it can be an image obtained by scanning or screenshotting. In the authenticity identification process, the first image can be input into an execution subject of the authenticity identification method, such as an electronic device. For example, for a contract with a seal, the image corresponding to the contract can be obtained by photographing the contract with a photographing device. For another example, for a document with a signature, the image corresponding to the document can be obtained by photographing the document with a photographing device.

步骤S202:在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息。Step S202: when it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject.

其中,目标主体包括印章,特征信息包括形状特征。The target subject includes a seal, and the feature information includes a shape feature.

对不同待鉴别主体进行拍摄得到的第一图像中包括的目标主体不同,例如,对有印章的合同拍摄得到的第一图像中,目标主体包括印章,对有签名的文件拍摄得到的第一图像中,目标主体包括签名。在本实施例中,在检测到第一图像包括印章和签名中至少一项的情况下,即可识别目标主体中的文字内容和/或提取目标主体的特征信息,作为一个示例,对于印章,可识别印章中的文字内容和提取印章的形状特征。在本实实施例中,目标主体是包括印章,目标主体的特征信息包括印章的形状特征,即是在检测到第一图像包括印章的情况下,识别印章中的文字内容和提取印章的形状特征。The target subject included in the first image obtained by photographing different subjects to be identified is different. For example, in the first image obtained by photographing a contract with a seal, the target subject includes the seal, and in the first image obtained by photographing a document with a signature, the target subject includes the signature. In this embodiment, when it is detected that the first image includes at least one of the seal and the signature, the text content in the target subject can be identified and/or the characteristic information of the target subject can be extracted. As an example, for the seal, the text content in the seal can be identified and the shape features of the seal can be extracted. In this embodiment, the target subject includes the seal, and the characteristic information of the target subject includes the shape features of the seal, that is, when it is detected that the first image includes the seal, the text content in the seal is identified and the shape features of the seal are extracted.

步骤S203:将印章的文字内容与印章的真实文字内容进行比对,得到印章的第一真伪鉴别结果。Step S203: Compare the text content of the seal with the real text content of the seal to obtain a first authenticity identification result of the seal.

步骤S204:基于印章的形状特征,确定印章的第二真伪鉴别结果。Step S204: Determine a second authenticity identification result of the seal based on the shape feature of the seal.

步骤S205:根据第一真伪鉴别结果以及第二真伪鉴别结果,确定目标真伪结果。Step S205: Determine a target authenticity result according to the first authenticity identification result and the second authenticity identification result.

在检测到第一图像中包括印章的情况下,识别印章中的文字内容,并提取印章的形状特征,然后将印章的文字内容与印章的真实文字内容进行比对,得到印章的第一真伪鉴别结果。基于印章的形状特征,确定印章的第二真伪鉴别结果。即印章的鉴别涉及两方面,一方面是文字内容的比对,另一方面通过第一图像中印章图像(区域)的形状特征判断真伪,在这两方面均为真的情况下,可确定印章的目标鉴别结果为真。如此,可提高对印章真伪鉴别的准确性。When it is detected that the seal is included in the first image, the text content in the seal is identified, and the shape feature of the seal is extracted, and then the text content of the seal is compared with the real text content of the seal to obtain the first authenticity identification result of the seal. Based on the shape feature of the seal, the second authenticity identification result of the seal is determined. That is, the identification of the seal involves two aspects. On the one hand, the text content is compared, and on the other hand, the authenticity is judged by the shape feature of the seal image (area) in the first image. When both aspects are true, the target identification result of the seal can be determined to be true. In this way, the accuracy of the authenticity identification of the seal can be improved.

作为一个示例,提取印章的形状特征,可以包括通过VGG16模型(一种卷积神经网路)对印章进行特征提取,得到印章的形状特征。As an example, extracting the shape features of a seal may include extracting features of the seal using a VGG16 model (a convolutional neural network) to obtain the shape features of the seal.

作为一个示例,根据第一真伪鉴别结果以及第二真伪鉴别结果,确定目标真伪结果,包括:在第一真伪鉴别结果以及第二真伪鉴别结果均为真鉴别结果的情况下,确定目标鉴别结果为真鉴别结果;或者,在第一真伪鉴别结果和第二真伪鉴别结果中至少一项伪真鉴别结果的情况下,确定目标鉴别结果为伪鉴别结果。As an example, determining a target authenticity result based on a first authenticity identification result and a second authenticity identification result includes: when both the first authenticity identification result and the second authenticity identification result are true identification results, determining the target identification result to be a true identification result; or, when at least one of the first authenticity identification result and the second authenticity identification result is a false identification result, determining the target identification result to be a false identification result.

作为一个示例,识别印章中的文字内容,可以包括:对印章中的文字进行检测,得到印章的文字主体,然后对文字主体进行文字识别,得到印章的文字内容。作为一个示例,可利用LOMO模型(一种文本检测器)对对印章中的文字进行检测,利用LOMO模型能够较准确地检测出印章上面的文字,包括红章上面的弯曲文字等。LOMO模型包括依次连接的直接回归器(DR)、迭代细化模块(IRM)和形状表达模块(SEM)。首先,DR分支生成四边形的文本proposals(预选框)。然后IRM基于提取的文本proposals的特征块,通过迭代细化逐步感知整个长文本。再通过考虑文本实例的几何属性,包括文本区域、文本中心线和边界偏移等,引入SEM来得到更精确的弯曲文本表示。利用LOMO模型,能够非常准确地检测出红章上的弯曲文字。作为一个示例,可通过文字识别模型对文字主体进行文字识别,即识别检测的文字,该文字识别模型可以采用CRNN(Convolutional Recurrent Neural Network,RNN,卷积循环神经网络)模型等。As an example, recognizing the text content in a seal may include: detecting the text in the seal to obtain the text body of the seal, and then performing text recognition on the text body to obtain the text content of the seal. As an example, the LOMO model (a text detector) can be used to detect the text in the seal. The LOMO model can accurately detect the text on the seal, including the curved text on the red seal. The LOMO model includes a direct regressor (DR), an iterative refinement module (IRM), and a shape expression module (SEM) connected in sequence. First, the DR branch generates quadrilateral text proposals (pre-selected boxes). Then, based on the feature blocks of the extracted text proposals, the IRM gradually perceives the entire long text through iterative refinement. Then, by considering the geometric properties of the text instance, including the text area, the text centerline, and the boundary offset, the SEM is introduced to obtain a more accurate representation of the curved text. Using the LOMO model, the curved text on the red seal can be detected very accurately. As an example, the text body can be recognized by a text recognition model, that is, the detected text can be recognized. The text recognition model can adopt a CRNN (Convolutional Recurrent Neural Network, RNN) model, etc.

可选的,特征信息包括拓扑特征和卷积特征中至少一项。在本实施例中,基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果,包括:将目标主体的拓扑特征以及目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过第一神经网络输出目标主体的第一真实概率;和/或,将目标主体的卷积特征以及目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过第二神经网络输出目标主体的第二真实概率;基于第一真实概率和/或第二真实概率,确定目标真伪鉴别结果。即在本实施例中,如图3所示,提供一种真伪鉴别方法,包括以下步骤:Optionally, the feature information includes at least one of a topological feature and a convolution feature. In the present embodiment, the target authenticity identification result of the target subject is determined based on the text content of the target subject and/or the feature information of the target subject, including: inputting the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into the first neural network, and outputting the first real probability of the target subject through the first neural network; and/or, inputting the convolution features of the target subject and the real convolution features of the real subject corresponding to the target subject into the second neural network, and outputting the second real probability of the target subject through the second neural network; based on the first real probability and/or the second real probability, the target authenticity identification result is determined. That is, in the present embodiment, as shown in FIG3 , a method for authenticity identification is provided, including the following steps:

步骤S301:获取第一图像。Step S301: Acquire a first image.

第一图像可以是对待鉴别主体(即待鉴别实物)进行拍摄得到的图像,也可以是扫描得到的图像,也可以是截图得到的图像。在真伪鉴别过程中,可将第一图像输入到进行真伪鉴别方法的执行主体例如电子设备中。例如,对于有印章的合同等,通过拍摄装置对该合同进行拍摄,即可得到该合同对应的图像。又例如,对于有签名的文件等,通过拍摄装置对该文件进行拍摄,即可得到该文件对应的图像。The first image can be an image obtained by photographing the subject to be identified (i.e., the physical object to be identified), or it can be an image obtained by scanning or screenshotting. In the authenticity identification process, the first image can be input into an execution subject of the authenticity identification method, such as an electronic device. For example, for a contract with a seal, the image corresponding to the contract can be obtained by photographing the contract with a photographing device. For another example, for a document with a signature, the image corresponding to the document can be obtained by photographing the document with a photographing device.

步骤S302:在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息。Step S302: when it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject.

其中,特征信息包括拓扑特征和卷积特征中至少一项。The feature information includes at least one of a topological feature and a convolution feature.

对不同待鉴别主体进行拍摄得到的第一图像中包括的目标主体不同,例如,对有印章的合同拍摄得到的第一图像中,目标主体包括印章,对有签名的文件拍摄得到的第一图像中,目标主体包括签名。在本实施例中,在检测到第一图像包括印章和签名中至少一项的情况下,即可识别目标主体中的文字内容和/或提取目标主体的特征信息。作为一个示例,对于签名,可提取签名的拓扑特征和/或卷积特征。例如,在本实实施例中,目标主体是包括签名,目标主体的特征信息包括签名的拓扑特征和/或卷积特征,即是在检测到第一图像包括签名的情况下,和提取签名的拓扑特征和/或卷积特征。The target subject included in the first image obtained by photographing different subjects to be identified is different. For example, in the first image obtained by photographing a contract with a seal, the target subject includes the seal, and in the first image obtained by photographing a document with a signature, the target subject includes the signature. In this embodiment, when it is detected that the first image includes at least one of the seal and the signature, the text content in the target subject can be identified and/or the characteristic information of the target subject can be extracted. As an example, for a signature, the topological features and/or convolution features of the signature can be extracted. For example, in this embodiment, the target subject includes the signature, and the characteristic information of the target subject includes the topological features and/or convolution features of the signature, that is, when it is detected that the first image includes the signature, the topological features and/or convolution features of the signature are extracted.

步骤S303:将目标主体的拓扑特征以及目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过第一神经网络输出目标主体的第一真实概率;和/或,将目标主体的卷积特征以及目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过第二神经网络输出目标主体的第二真实概率。Step S303: input the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into the first neural network, and output the first real probability of the target subject through the first neural network; and/or, input the convolution features of the target subject and the real convolution features of the real subject corresponding to the target subject into the second neural network, and output the second real probability of the target subject through the second neural network.

步骤S304:基于第一真实概率和/或第二真实概率,确定目标真伪鉴别结果。Step S304: Determine the target authenticity identification result based on the first true probability and/or the second true probability.

在本实施例中,采用目标主体的拓扑特征和卷积特征中至少一项来鉴别目标主体的真伪,例如,可先将目标主体的拓扑特征以及目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过第一神经网络输出目标主体的第一真实概率,和/或,将目标主体的卷积特征以及目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过第二神经网络输出目标主体的第二真实概率。如此,可得到第一真实概率和/或第二真实概率,然后,可基于第一真实概率和/或第二真实概率,确定目标真伪鉴别结果,以提高目标主体真伪鉴别的准确性。In this embodiment, at least one of the topological features and convolutional features of the target subject is used to identify the authenticity of the target subject. For example, the topological features of the target subject and the real topological features of the real subject corresponding to the target subject can be first input into the first neural network, and the first real probability of the target subject is output through the first neural network, and/or the convolutional features of the target subject and the real convolutional features of the real subject corresponding to the target subject are input into the second neural network, and the second real probability of the target subject is output through the second neural network. In this way, the first real probability and/or the second real probability can be obtained, and then, the target authenticity identification result can be determined based on the first real probability and/or the second real probability to improve the accuracy of the authenticity identification of the target subject.

作为一个示例,第一神经网络可以是第一BP(back propagation,前馈)神经网络,第二神经网络可以是第二卷积神经网络。作为一个示例,该目标主体可以是签名。As an example, the first neural network may be a first BP (back propagation) neural network, and the second neural network may be a second convolutional neural network. As an example, the target subject may be a signature.

可选的,将目标主体的拓扑特征以及目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过第一神经网络输出目标主体的第一真实概率,包括:基于目标主体的拓扑特征以及真实拓扑特征,得到第一特征向量;将第一特征向量输入至第一神经网络,得到第一真实概率。Optionally, the topological features of the target subject and the real topological features of the real subject corresponding to the target subject are input into the first neural network, and the first real probability of the target subject is output through the first neural network, including: obtaining a first feature vector based on the topological features of the target subject and the real topological features; inputting the first feature vector into the first neural network to obtain a first real probability.

以目标主体为签名为例,对应的真实主体即为真实签名,由于每个人的签名笔记有自己的特点和相对稳定性。在鉴别过程中,可以把签名看成一个平面无向图,然后通过算法提取无向图的拓扑特征。拓扑特征可以包括:连通片(互相边连结在一起的笔迹)、网孔(由笔迹围成的闭合空白区域)、一度定点(笔迹的端点)以及多度顶点(由相交笔迹形成的三叉点、四差点等)等。Taking the target subject as an example, the corresponding real subject is the real signature. Since each person's signature notes have their own characteristics and relative stability, in the identification process, the signature can be regarded as a planar undirected graph, and then the topological features of the undirected graph are extracted through the algorithm. Topological features can include: connected pieces (handwriting connected to each other by edges), meshes (closed blank areas surrounded by handwriting), first-degree fixed points (end points of handwriting) and multi-degree vertices (trifurcations, quadruplets, etc. formed by intersecting handwriting), etc.

为了提供拓扑结构的区分度,可利用OpenCV(是一个基于BSD(Berkeley SoftwareDistribution,伯克利软件套件)许可(开源)发行的跨平台计算机视觉和机器学习软件库,可以运行在Linux、Windows、Android和Mac OS操作系统上)对签名进行了骨架提取。骨架是签名中文字符号的形状特征,由一些细曲线或圆弧组成。这些曲线或弧线可以较好地保持文字符号原始形状的连通性,同时展示文字符号的拓扑属性,是结构形状的重要表示,可以将签名文字简化为骨架图像。骨架提取,实际上是提取签名中文字在图像上的中心像素轮廓。提取文字的骨架能够简化图像的特征,也有利于后续深度学习中的特征提取。实现的方法是从文字目标外围往文字目标中心不断腐蚀,直至腐蚀到不能再腐蚀为止,剩下单层像素宽度,此即为文字骨架。In order to provide the distinction of topological structure, OpenCV (a cross-platform computer vision and machine learning software library released under the BSD (Berkeley Software Distribution, Berkeley Software Suite) license (open source) can be used to extract the skeleton of the signature. The skeleton is the shape feature of the text symbol in the signature, which is composed of some thin curves or arcs. These curves or arcs can better maintain the connectivity of the original shape of the text symbol, while showing the topological properties of the text symbol. They are important representations of the structural shape and can simplify the signature text into a skeleton image. Skeleton extraction is actually to extract the central pixel outline of the text in the signature on the image. Extracting the skeleton of the text can simplify the features of the image and is also conducive to feature extraction in subsequent deep learning. The implementation method is to continuously erode from the periphery of the text target to the center of the text target until it can no longer be eroded, leaving a single layer of pixel width, which is the text skeleton.

获取到签名的拓扑结构(即拓扑特征)后,将签名的拓扑特征和真实签名的拓扑特征(提取过程与签名的拓扑特征的提取过程类似,不同在于签名不同,这里是真实签名)进行向量化得到第一特征向量,并输入到第一神经网络,进行二分类,判断签名是否与比对的真实签名出自同一人之手,并给出相应的置信度(即第一真实概率)。After obtaining the topological structure of the signature (i.e., topological features), the topological features of the signature and the topological features of the real signature (the extraction process is similar to the extraction process of the topological features of the signature, the difference is that the signatures are different, here is the real signature) are vectorized to obtain the first feature vector, and input into the first neural network for binary classification to determine whether the signature and the compared real signature are from the same person, and give the corresponding confidence level (i.e., the first true probability).

真实主体的真实拓扑特征可预先得到,在得到目标主体的拓扑特征后,可对目标主体的拓扑特征以及真实拓扑特征进行向量化,得到第一特征向量,将其输入至第一神经网络,通过第一神经网络输出第一真实概率。如此,可提高第一真实概率的准确性。The real topological features of the real subject can be obtained in advance. After the topological features of the target subject are obtained, the topological features of the target subject and the real topological features can be vectorized to obtain a first feature vector, which is input into the first neural network and the first real probability is output through the first neural network. In this way, the accuracy of the first real probability can be improved.

可选的,将目标主体的卷积特征以及目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过第二神经网络输出目标主体的第二真实概率,包括:对目标主体进行二值化处理,得到第一二值化主体;对第一二值化主体进行字符切割,得到第一二值化主体的切割后的字符;通过第一卷积神经网络提取第一二值化主体的切割后的字符的卷积特征;将第一二值化主体的切割后的字符的卷积特征以及真实主体的切割后的字符的真实卷积特征输入第二神经网络,得到第二真实概率。Optionally, the convolution features of the target subject and the real convolution features of the real subject corresponding to the target subject are input into a second neural network, and a second real probability of the target subject is output through the second neural network, including: binarizing the target subject to obtain a first binarized subject; performing character segmentation on the first binarized subject to obtain segmented characters of the first binarized subject; extracting the convolution features of the segmented characters of the first binarized subject through the first convolution neural network; inputting the convolution features of the segmented characters of the first binarized subject and the real convolution features of the segmented characters of the real subject into the second neural network to obtain a second real probability.

真实主体的切割后的字符的真实卷积特征可预先提取得到,真实主体的切割后的字符的真实卷积特征的提取过程与目标主体的切割后的字符的卷积特征的过程类似,即预先对真实主体进行二值化处理,得到第二二值化主体;对第二二值化主体进行字符切割,得到第二二值化主体的切割后的字符;通过第一卷积神经网络提取第二二值化主体的切割后的字符的卷积特征,实现真实主体的卷积特征的提取。通过对目标主体进行二值化处理,得到第一二值化主体;对第一二值化主体进行字符切割,得到第一二值化主体的切割后的字符;通过第一卷积神经网络提取第一二值化主体的切割后的字符的卷积特征,实现目标主体的卷积特征的提取。然后将第一二值化主体的切割后的字符的卷积特征以及真实主体的切割后的字符的真实卷积特征输入第二神经网络,通过第二神经网络输出第二真实概率,如此,可提高第二真实概率的准确性。The real convolution features of the characters after the real subject is cut can be extracted in advance. The process of extracting the real convolution features of the characters after the real subject is similar to the process of extracting the convolution features of the characters after the target subject is cut, that is, the real subject is binarized in advance to obtain a second binarized subject; the second binarized subject is character cut to obtain the characters after the second binarized subject is cut; the convolution features of the characters after the second binarized subject are extracted by the first convolution neural network to achieve the extraction of the convolution features of the real subject. The first binarized subject is binarized to obtain the first binarized subject; the first binarized subject is character cut to obtain the characters after the first binarized subject is cut; the convolution features of the characters after the first binarized subject are extracted by the first convolution neural network to achieve the extraction of the convolution features of the target subject. Then the convolution features of the characters after the first binarized subject and the real convolution features of the characters after the real subject are input into the second neural network, and the second real probability is output by the second neural network, so that the accuracy of the second real probability can be improved.

作为一个示例,对于字符切割,可通过OpenCV中的连通域算法对字符进行切割。这里选择应用连通域算法进行切割,是基于签名往往存在连笔的情况,对于这种情况,通过连通域算法不会将连笔的字符切割,而是将这种连笔的情况作为重要特征输入到第一卷积神经网络中。As an example, for character segmentation, the connected domain algorithm in OpenCV can be used to segment characters. The connected domain algorithm is chosen here for segmentation because signatures often have connected strokes. In this case, the connected domain algorithm will not segment the connected characters, but will use this connected stroke as an important feature and input it into the first convolutional neural network.

作为一个示例,将第一二值化主体的切割后的字符的卷积特征以及真实主体的切割后的字符的真实卷积特征输入第二神经网络之前,还可以包括:对第一二值化主体的切割后的字符的卷积特征进行降维处理,得到第一降维特征,对第一降维特征通过FisherVectors编码方式对第一降维特征进行编码,得到第二特征,可形成维度一样的具有全局特征的特征。如此,可将第一二值化主体的切割后的字符的第二特征以及真实主体的切割后的字符的第三特征输入第二神经网络,通过第二神经网络输出第二真实概率,其中,第三特征为对真实主体的切割后的字符的卷积特征进行降维处理以及通过Fisher Vectors编码方式对降维后的特征进行编码得到的特征。作为一个示例,可通过PCA(PrincipalComponent Analysis,主成分分析)降维方式进行降维处理。As an example, before the convolutional features of the characters cut from the first binary subject and the real convolutional features of the characters cut from the real subject are input into the second neural network, it can also include: performing dimensionality reduction processing on the convolutional features of the characters cut from the first binary subject to obtain a first dimensionality reduction feature, encoding the first dimensionality reduction feature by Fisher Vectors encoding to obtain a second feature, and forming a feature with global features of the same dimension. In this way, the second feature of the characters cut from the first binary subject and the third feature of the characters cut from the real subject can be input into the second neural network, and the second real probability is output through the second neural network, wherein the third feature is a feature obtained by performing dimensionality reduction processing on the convolutional features of the characters cut from the real subject and encoding the dimensionality reduction features by Fisher Vectors encoding. As an example, dimensionality reduction processing can be performed by PCA (Principal Component Analysis) dimensionality reduction method.

作为一个示例,第一卷积神经网络可以是AlexNet网络(一种卷积神经网络),利用AlexNet网络进行卷积特征提取,例如,AlexNet网络可包含依次连接的5个卷积层、3个池化层和2个全连接层,用于特征提取。第一个卷积层有96个卷积核,卷积核的大小是11*11,卷积步长是4。第二个卷积层有256个卷积核,卷积核大小为5,卷积步长为1。接下来的三个卷积层的卷积核大小均为3,卷积步长均为1。第三个和第四个卷积层的卷积核个数为384,第五个卷积层卷积核个数为256。最后连接两个全连接层节点数目4096,输出层节点数为1000。选择以AlexNet网络来提取特征,是基于该网络在图像分类的效果要优于同类网络,如此,可提高提取的卷积特征的准确性。As an example, the first convolutional neural network can be an AlexNet network (a convolutional neural network), and the AlexNet network is used for convolutional feature extraction. For example, the AlexNet network can include 5 convolutional layers, 3 pooling layers, and 2 fully connected layers connected in sequence for feature extraction. The first convolutional layer has 96 convolution kernels, the size of the convolution kernel is 11*11, and the convolution step is 4. The second convolutional layer has 256 convolution kernels, the convolution kernel size is 5, and the convolution step is 1. The convolution kernel size of the next three convolutional layers is 3, and the convolution step is 1. The number of convolution kernels in the third and fourth convolutional layers is 384, and the number of convolution kernels in the fifth convolutional layer is 256. Finally, the number of nodes in the two fully connected layers is 4096, and the number of nodes in the output layer is 1000. The choice of AlexNet network to extract features is based on the fact that the effect of the network in image classification is better than that of similar networks, so that the accuracy of the extracted convolutional features can be improved.

可选的,在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息之前,还包括:提取第一图像的待鉴别子图像;对待鉴别子图像进行角度矫正,得到矫正后的子图像;Optionally, when it is detected that the first image includes a target subject, before recognizing the text content in the target subject and/or extracting the feature information of the target subject, the method further includes: extracting a sub-image to be identified of the first image; performing angle correction on the sub-image to be identified to obtain a corrected sub-image;

其中,在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,包括:Wherein, in the case where it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject includes:

在检测到矫正后的图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息。When it is detected that the corrected image includes a target subject, text content in the target subject is recognized and/or feature information of the target subject is extracted.

待鉴别子图像可以理解为待鉴别主体的图像,由于在对待鉴别主体进行拍摄过程中,可能存在其他背景或干扰,在获取第一图像后,需对第一图像进行待鉴别主体检测,将待鉴别主体与背景分离,实现待鉴别主体的提取,即提取待鉴别子图像。待鉴别主体检测主要是通过算法将第一图像中待鉴别主体部分进行提取,去掉背景的干扰。第一图像的待鉴别主体提取应用的模型可以是图像语义分割模型,即通过图像语义分割模型提取第一图像的待鉴别子图像。图像语义分割应用的算法可以是PaddleSeg(一种图像分割库),该算法能够较准确地将待鉴别主体检测出。The sub-image to be identified can be understood as the image of the subject to be identified. Since there may be other backgrounds or interferences during the shooting of the subject to be identified, after acquiring the first image, the subject to be identified needs to be detected in the first image, and the subject to be identified is separated from the background to extract the subject to be identified, that is, to extract the sub-image to be identified. The detection of the subject to be identified mainly uses an algorithm to extract the subject to be identified in the first image and remove the interference of the background. The model applied to the extraction of the subject to be identified in the first image can be an image semantic segmentation model, that is, the sub-image to be identified of the first image is extracted through the image semantic segmentation model. The algorithm applied for image semantic segmentation can be PaddleSeg (an image segmentation library), which can detect the subject to be identified more accurately.

提取第一图像的待鉴别子图像后,还需对其进行角度矫正,由于拍摄角度的问题,拍摄得到的第一图像可能存在一定的倾斜,则提取的待鉴别子图像可能存在一定的倾斜,从而可对待鉴别子图像进行角度矫正,得到矫正后的子图像,以提高后续进行文字内容识别和特征提取的准确性。作为一个示例,可利用OpenCV中的矫正算法完成图像的矫正。After extracting the sub-image to be identified of the first image, it is necessary to perform angle correction on it. Due to the problem of shooting angle, the first image shot may have a certain tilt, and the extracted sub-image to be identified may have a certain tilt, so the sub-image to be identified can be angle corrected to obtain a corrected sub-image to improve the accuracy of subsequent text content recognition and feature extraction. As an example, the correction algorithm in OpenCV can be used to complete the image correction.

下面以一个具体实施例对上述真伪鉴别方法的过程加以具体说明。The process of the authenticity identification method described above is specifically described below with reference to a specific embodiment.

如图4所示,为实现上述真伪鉴别方法的真伪鉴别系统的原理图,真伪鉴别系统包括:图像接入模块、图像预处理模块、印章检测和校验模块、发票号码校验模块、签名校验模块、交互界面和存储模块。图像接入模块接收第一图像,图像预处理模块进行待鉴别子图像的提取以及矫正,印章检测和校验模块用于检测印章以及鉴别印章真伪,发票号码校验模块用于识别发票号码以及鉴别发票号码真伪,签名校验模块用于检测签名以及鉴别签名真伪。As shown in Figure 4, the principle diagram of the authenticity identification system for implementing the above-mentioned authenticity identification method is shown. The authenticity identification system includes: an image access module, an image preprocessing module, a seal detection and verification module, an invoice number verification module, a signature verification module, an interactive interface and a storage module. The image access module receives the first image, the image preprocessing module extracts and corrects the sub-image to be identified, the seal detection and verification module is used to detect the seal and identify the authenticity of the seal, the invoice number verification module is used to identify the invoice number and identify the authenticity of the invoice number, and the signature verification module is used to detect the signature and identify the authenticity of the signature.

如图5所示,为一实施例的真伪鉴别方法的流程图,以先检测印章,再检测发票号码,最后检测签名的顺序为例进行说明,通过真伪鉴别系统实现真伪鉴别方法的流程如下:As shown in FIG5 , it is a flow chart of an authenticity identification method according to an embodiment, and takes the sequence of first detecting the seal, then detecting the invoice number, and finally detecting the signature as an example for explanation. The process of implementing the authenticity identification method through the authenticity identification system is as follows:

首先,用户通过扫描、拍摄或截图等方式得到第一图像,将第一图像输入到真伪鉴别系统中。First, the user obtains a first image by scanning, photographing or taking a screenshot, and inputs the first image into the authenticity identification system.

真伪鉴别系统首先通过印章检测模块检测第一图像中是否包含有印章。The authenticity identification system first detects whether the first image contains a seal through a seal detection module.

如果第一图像中包含有印章,则对第一图像进行印章进行真伪鉴别,例如,通过印章内容识别模块识别印章中的文本内容,印章对比模块将文本内容与真实文本内容进行比对等;如果第一图像中不包含印章,则跳过此步骤,进入检测第一图像是否包含发票号码。If the first image contains a seal, the authenticity of the seal is identified on the first image. For example, the text content in the seal is identified by the seal content recognition module, and the seal comparison module compares the text content with the real text content. If the first image does not contain a seal, this step is skipped and the process proceeds to detect whether the first image contains the invoice number.

真伪鉴别系统通过通用光学字符识别(Optical Character Recognition,OCR)模块检测第一图像中是否包含有发票号码。如果第一图像中包含有发票号码,则通过调用发票查询接口,进行发票验真。如果第一图像中不包含发票号码,则系统跳过此步骤,进入检测第一图像是否包含手写签名。The authenticity identification system detects whether the first image contains the invoice number through the universal optical character recognition (OCR) module. If the first image contains the invoice number, the invoice is verified by calling the invoice query interface. If the first image does not contain the invoice number, the system skips this step and proceeds to detect whether the first image contains a handwritten signature.

真伪鉴别系统接着检测第一图像上是否包含有手写签名。如果第一图像中包含有手写签名,则系统通过签名校验模块中的基于拓扑结构鉴别模块提取拓扑特征,利用拓扑特征进行真伪鉴别,以及通过图像分析鉴别模块提取卷积特征,基于卷积特征进行真伪鉴别,从而确定签名的真伪。The authenticity identification system then detects whether the first image contains a handwritten signature. If the first image contains a handwritten signature, the system extracts topological features through the topological structure-based identification module in the signature verification module, uses the topological features to perform authenticity identification, and extracts convolutional features through the image analysis identification module, performs authenticity identification based on the convolutional features, thereby determining the authenticity of the signature.

以上鉴别的结果都会展示在交互界面上,人工通过交互界面可以查看鉴别的结果,也可以通过交互界面录入手写签名和印章图像。The above identification results will be displayed on the interactive interface. The human can view the identification results through the interactive interface, and can also enter handwritten signatures and seal images through the interactive interface.

最后,真伪鉴别系统的存储模块将以上所有的鉴别结果进行保存,用于系统训练。存储模块主要是将系统接收到的第一图像、印章和签名等进行保存。后续这些数据经过标注后,都会成为本系统的训练数据。为了更准确地进行签名的验真,需要对保留在系统中的签名进行训练。训练过程主要针对基于拓扑特征进行鉴别的分类器、AlexNet模型以及基于图像信息进行分类的分类器。为了数据增广,本申请实施例利用保存的签名生成更多的签名。例如,首先把70*60大小的签名放大到76*66,即宽高各增加6个像素。然后用滑动窗的形式在放大后的图像中采集70*60的子区域,滑动窗的步长为3,这样总共可以得到9个同类的样本。除此之外,本申请还可通过旋转签名来进行签名的增广。Finally, the storage module of the authenticity identification system saves all the above identification results for system training. The storage module mainly saves the first image, seal and signature received by the system. After the data are annotated, they will become the training data of this system. In order to verify the authenticity of the signature more accurately, it is necessary to train the signature retained in the system. The training process is mainly aimed at the classifier based on topological features, the AlexNet model and the classifier based on image information for classification. For data augmentation, the embodiment of the present application uses the saved signature to generate more signatures. For example, first enlarge the signature of 70*60 to 76*66, that is, increase the width and height by 6 pixels. Then collect the 70*60 sub-area in the enlarged image in the form of a sliding window, and the step size of the sliding window is 3, so that a total of 9 similar samples can be obtained. In addition, the present application can also augment the signature by rotating the signature.

本申请通过人工智能的技术(包括手写内容识别、印刷文字识别、发票号码验真、手写签名验真、印章检测等技术)来完成验真工作。整个验真过程自动化进行,效率高,而且成本低。且可提高真伪鉴别的效率,而且响应速度快,能够形成稳定服务,具有较强的泛化能力。本申请包含有训练数据生成模块,能够降低人工收集数据和标注数据的成本。This application uses artificial intelligence technology (including handwritten content recognition, printed text recognition, invoice number verification, handwritten signature verification, seal detection and other technologies) to complete the verification work. The entire verification process is automated, efficient and low-cost. It can also improve the efficiency of authenticity identification, and has a fast response speed, can form a stable service, and has strong generalization capabilities. This application includes a training data generation module, which can reduce the cost of manually collecting and annotating data.

如图6所示,根据本申请的实施例,本申请还提供一种真伪鉴别装置600,可应用于电子设备,装置600包括:As shown in FIG6 , according to an embodiment of the present application, the present application further provides an authenticity identification device 600, which can be applied to electronic equipment. The device 600 includes:

获取模块601,用于获取第一图像;An acquisition module 601 is used to acquire a first image;

处理模块602,用于在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,其中,目标主体包括印章和签名中至少一项,特征信息包括形状特征、拓扑特征和卷积特征中的至少一项;The processing module 602 is used to identify text content in the target body and/or extract feature information of the target body when it is detected that the first image includes a target body, wherein the target body includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature, and a convolution feature;

确定模块603,用于基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。The determination module 603 is used to determine the target authenticity identification result of the target subject based on the text content of the target subject and/or the characteristic information of the target subject.

可选的,目标主体包括印章,目标主体的特征信息包括印章的形状特征;Optionally, the target subject includes a seal, and the characteristic information of the target subject includes shape characteristics of the seal;

确定模块,包括:Identify modules, including:

比对模块,用于将印章的文字内容与印章的真实文字内容进行比对,得到印章的第一真伪鉴别结果;A comparison module, used for comparing the text content of the seal with the real text content of the seal to obtain a first authenticity identification result of the seal;

第一子确定模块,用于基于印章的形状特征,确定印章的第二真伪鉴别结果;A first sub-determination module is used to determine a second authenticity identification result of the seal based on the shape feature of the seal;

第二子确定模块,用于根据第一真伪鉴别结果以及第二真伪鉴别结果,确定目标真伪结果。The second sub-determination module is used to determine a target authenticity result according to the first authenticity identification result and the second authenticity identification result.

即在本实施例中,如图7所示,本申请还提供一种真伪鉴别装置700,可应用于电子设备,装置700包括:That is, in this embodiment, as shown in FIG. 7 , the present application further provides an authenticity identification device 700, which can be applied to electronic equipment. The device 700 includes:

获取模块701,用于获取第一图像;An acquisition module 701 is used to acquire a first image;

处理模块702,用于在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,其中,所述目标主体包括所述印章,所述目标主体的特征信息包括所述印章的形状特征;The processing module 702 is used to recognize text content in the target body and/or extract feature information of the target body when it is detected that the first image includes a target body, wherein the target body includes the seal, and the feature information of the target body includes shape features of the seal;

比对模块703,用于将印章的文字内容与印章的真实文字内容进行比对,得到印章的第一真伪鉴别结果;The comparison module 703 is used to compare the text content of the seal with the real text content of the seal to obtain a first authenticity identification result of the seal;

第一子确定模块704,用于基于印章的形状特征,确定印章的第二真伪鉴别结果;A first sub-determination module 704 is used to determine a second authenticity identification result of the seal based on the shape feature of the seal;

第二子确定模块705,用于根据第一真伪鉴别结果以及第二真伪鉴别结果,确定目标真伪结果。The second sub-determination module 705 is used to determine a target authenticity result according to the first authenticity identification result and the second authenticity identification result.

可选的,特征信息包括拓扑特征和卷积特征中至少一项;Optionally, the feature information includes at least one of a topological feature and a convolution feature;

确定模块,包括:Identify modules, including:

概率确定模块,用于将目标主体的拓扑特征以及目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过第一神经网络输出目标主体的第一真实概率;和/或,用于将目标主体的卷积特征以及目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过第二神经网络输出目标主体的第二真实概率;A probability determination module, used to input the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into a first neural network, and output a first real probability of the target subject through the first neural network; and/or used to input the convolution features of the target subject and the real convolution features of the real subject corresponding to the target subject into a second neural network, and output a second real probability of the target subject through the second neural network;

第三子确定模块,用于基于第一真实概率和/或第二真实概率,确定目标真伪鉴别结果。The third sub-determination module is used to determine the target authenticity identification result based on the first true probability and/or the second true probability.

即在本实施例中,如图8所示,本申请还提供一种真伪鉴别装置800,可应用于电子设备,装置800包括:That is, in this embodiment, as shown in FIG8 , the present application further provides an authenticity identification device 800, which can be applied to electronic equipment. The device 800 includes:

获取模块801,用于获取第一图像;An acquisition module 801 is used to acquire a first image;

处理模块802,用于在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,其中,所述目标主体包括所述印章,所述目标主体的特征信息包括所述印章的形状特征;The processing module 802 is used to recognize text content in the target body and/or extract feature information of the target body when it is detected that the first image includes a target body, wherein the target body includes the seal, and the feature information of the target body includes shape features of the seal;

概率确定模块803,用于将目标主体的拓扑特征以及目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过第一神经网络输出目标主体的第一真实概率;和/或,用于将目标主体的卷积特征以及目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过第二神经网络输出目标主体的第二真实概率;The probability determination module 803 is used to input the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into the first neural network, and output the first real probability of the target subject through the first neural network; and/or, to input the convolution features of the target subject and the real convolution features of the real subject corresponding to the target subject into the second neural network, and output the second real probability of the target subject through the second neural network;

第三子确定模块804,用于基于第一真实概率和/或第二真实概率,确定目标真伪鉴别结果。The third sub-determination module 804 is used to determine the target authenticity identification result based on the first true probability and/or the second true probability.

可选的,概率确定模块803,包括:Optionally, the probability determination module 803 includes:

特征向量确定模块,用于基于目标主体的拓扑特征以及真实拓扑特征,得到第一特征向量;A feature vector determination module, used to obtain a first feature vector based on the topological features of the target subject and the real topological features;

第一概率获取模块,用于将第一特征向量输入至第一神经网络,得到第一真实概率。The first probability acquisition module is used to input the first feature vector into the first neural network to obtain a first true probability.

可选的,概率确定模块803,包括:Optionally, the probability determination module 803 includes:

二值化模块,用于对目标主体进行二值化处理,得到第一二值化主体;A binarization module, used for performing binarization processing on the target subject to obtain a first binarized subject;

切割模块,用于对第一二值化主体进行字符切割,得到第一二值化主体的切割后的字符;A cutting module, used for performing character cutting on the first binary body to obtain the cut characters of the first binary body;

特征提取模块,用于通过第一卷积神经网络提取第一二值化主体的切割后的字符的卷积特征;A feature extraction module, used for extracting convolution features of the cut characters of the first binarized body through a first convolutional neural network;

第二真实概率确定模块,用于将第一二值化主体的切割后的字符的卷积特征以及真实主体的切割后的字符的真实卷积特征输入第二神经网络,得到第二真实概率。The second true probability determination module is used to input the convolution features of the cut characters of the first binarized body and the real convolution features of the cut characters of the real body into the second neural network to obtain a second true probability.

可选的,真伪鉴别装置还包括:Optionally, the authenticity identification device further includes:

子图像提取模块,用于提取第一图像的待鉴别子图像;A sub-image extraction module, used for extracting a sub-image to be identified from the first image;

矫正模块,用于对待鉴别子图像进行角度矫正,得到矫正后的子图像;A correction module, used for performing angle correction on the sub-image to be identified to obtain a corrected sub-image;

其中,在检测到第一图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,包括:Wherein, in the case where it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject includes:

在检测到矫正后的图像包括目标主体的情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息。When it is detected that the corrected image includes a target subject, text content in the target subject is recognized and/or feature information of the target subject is extracted.

上述各实施例的真伪鉴别装置为实现上述各实施例的真伪鉴别方法的装置,技术特征对应,技术效果对应,在此不再赘述。The authenticity identification devices of the above-mentioned embodiments are devices for implementing the authenticity identification methods of the above-mentioned embodiments, and their technical features and technical effects correspond to each other, which will not be described in detail here.

根据本申请的实施例,本申请还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.

如图9所示,是根据本申请实施例的真伪鉴别方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。As shown in Figure 9, it is a block diagram of an electronic device according to the authenticity identification method of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and/or required herein.

如图9所示,该电子设备包括:一个或多个处理器901、存储器902,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUM的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图9中以一个处理器901为例。As shown in Figure 9, the electronic device includes: one or more processors 901, a memory 902, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphic information of the GUM on an external input/output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). In Figure 9, a processor 901 is taken as an example.

存储器902即为本申请所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请所提供的真伪鉴别方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的真伪鉴别方法。The memory 902 is a non-transient computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the authenticity identification method provided in the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the authenticity identification method provided in the present application.

存储器902作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的真伪鉴别方法对应的程序指令/模块(例如,附图6所示的获取模块601、处理模块602、确定模块603)。处理器901通过运行存储在存储器902中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的真伪鉴别方法。The memory 902, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions/modules corresponding to the authenticity identification method in the embodiment of the present application (for example, the acquisition module 601, the processing module 602, and the determination module 603 shown in FIG. 6). The processor 901 executes various functional applications and data processing of the server by running the non-transient software programs, instructions, and modules stored in the memory 902, that is, the authenticity identification method in the above method embodiment is implemented.

存储器902可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据键盘显示的电子设备的使用所创建的数据等。此外,存储器902可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器902可选包括相对于处理器901远程设置的存储器,这些远程存储器可以通过网络连接至键盘显示的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device displayed by the keyboard, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the electronic device displayed by the keyboard via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

真伪鉴别方法的电子设备还可以包括:输入装置903和输出装置904。处理器901、存储器902、输入装置903和输出装置904可以通过总线或者其他方式连接,图9中以通过总线连接为例。The electronic device of the authenticity identification method may further include: an input device 903 and an output device 904. The processor 901, the memory 902, the input device 903 and the output device 904 may be connected via a bus or other means, and FIG9 takes the bus connection as an example.

输入装置903可接收输入的数字或字符信息,以及产生与键盘显示的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置904可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。The input device 903 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device displayed by the keyboard, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 904 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASMC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, dedicated ASMCs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and/or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and/or data to a programmable processor.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

根据本申请实施例的技术方案,通过获取第一图像,并在第一图像中检测到目标主体情况下,识别目标主体中的文字内容和/或提取目标主体的特征信息,基于目标主体的文字内容和/或目标主体的特征信息,确定目标主体的目标真伪鉴别结果。目标主体包括印章和签名中的至少一项,特征信息可包括形状特征、拓扑特征和卷积特征中的至少一项,即在本实施例中,可利用目标主体的文字内容和/或目标主体的形状特征、拓扑特征和卷积特征中的至少一项来确定目标主体的真伪,无需人工核对以鉴别真伪,可提高真伪鉴别的效率。与此同时,通过本实施例的真伪鉴别方法,可表面通过人工核对鉴别真伪时容易产生错误的情况,可提高鉴别准确性。According to the technical solution of the embodiment of the present application, by acquiring a first image, and in the case where a target subject is detected in the first image, the text content in the target subject is identified and/or the characteristic information of the target subject is extracted, and based on the text content of the target subject and/or the characteristic information of the target subject, the target authenticity identification result of the target subject is determined. The target subject includes at least one of a seal and a signature, and the characteristic information may include at least one of a shape feature, a topological feature, and a convolution feature. That is, in this embodiment, the text content of the target subject and/or at least one of the shape feature, topological feature, and convolution feature of the target subject can be used to determine the authenticity of the target subject, without manual verification to identify the authenticity, which can improve the efficiency of authenticity identification. At the same time, through the authenticity identification method of this embodiment, it is possible to surface the situation where errors are easily generated when identifying the authenticity through manual verification, which can improve the accuracy of identification.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims (11)

Translated fromChinese
1.一种真伪鉴别方法,其中,所述方法包括:1. A method for authenticity identification, wherein the method comprises:获取第一图像;acquiring a first image;在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息,其中,所述目标主体包括印章和签名中至少一项,所述特征信息包括形状特征、拓扑特征和卷积特征中的至少一项;In the case where it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject, wherein the target subject includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature, and a convolution feature;基于所述目标主体的文字内容和/或所述目标主体的特征信息,确定所述目标主体的目标真伪鉴别结果;Determine the target authenticity identification result of the target subject based on the text content of the target subject and/or the characteristic information of the target subject;所述目标主体包括所述印章时,所述目标主体的特征信息包括所述印章的形状特征;When the target subject includes the seal, the characteristic information of the target subject includes the shape characteristics of the seal;所述基于所述目标主体的文字内容和/或所述目标主体的特征信息,确定所述目标主体的目标真伪鉴别结果,包括:The determining of the target authenticity identification result of the target subject based on the text content of the target subject and/or the feature information of the target subject includes:将所述印章的文字内容与所述印章的真实文字内容进行比对,得到所述印章的第一真伪鉴别结果;Comparing the text content of the seal with the real text content of the seal to obtain a first authenticity identification result of the seal;基于所述印章的形状特征,确定所述印章的第二真伪鉴别结果;Determining a second authenticity identification result of the seal based on the shape feature of the seal;根据所述第一真伪鉴别结果以及所述第二真伪鉴别结果,确定所述目标真伪鉴别结果;Determining the target authenticity identification result according to the first authenticity identification result and the second authenticity identification result;所述目标主体包括所述签名时,所述特征信息包括所述拓扑特征和所述卷积特征;When the target subject includes the signature, the feature information includes the topological feature and the convolution feature;所述基于所述目标主体的文字内容和/或所述目标主体的特征信息,确定所述目标主体的目标真伪鉴别结果,包括:The determining of the target authenticity identification result of the target subject based on the text content of the target subject and/or the feature information of the target subject includes:将所述目标主体的拓扑特征以及所述目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过所述第一神经网络输出所述目标主体的第一真实概率;和,Inputting the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into a first neural network, and outputting a first real probability of the target subject through the first neural network; and,将所述目标主体的卷积特征以及所述目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过所述第二神经网络输出所述目标主体的第二真实概率;Inputting the convolutional features of the target subject and the real convolutional features of the real subject corresponding to the target subject into a second neural network, and outputting a second real probability of the target subject through the second neural network;基于所述第一真实概率和所述第二真实概率,确定所述目标真伪鉴别结果。The target authenticity identification result is determined based on the first true probability and the second true probability.2.根据权利要求1所述的方法,其中,所述将所述目标主体的拓扑特征以及所述目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过所述第一神经网络输出所述目标主体的第一真实概率,包括:2. The method according to claim 1, wherein the step of inputting the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into a first neural network, and outputting the first real probability of the target subject through the first neural network comprises:基于所述目标主体的拓扑特征以及所述真实拓扑特征,得到第一特征向量;Based on the topological features of the target subject and the real topological features, obtaining a first feature vector;将所述第一特征向量输入至所述第一神经网络,得到所述第一真实概率。The first feature vector is input into the first neural network to obtain the first true probability.3.根据权利要求1所述的方法,其中,所述将所述目标主体的卷积特征以及所述目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过所述第二神经网络输出所述目标主体的第二真实概率,包括:3. The method according to claim 1, wherein the step of inputting the convolution feature of the target subject and the real convolution feature of the real subject corresponding to the target subject into a second neural network, and outputting a second real probability of the target subject through the second neural network comprises:对所述目标主体进行二值化处理,得到第一二值化主体;Binarizing the target subject to obtain a first binary subject;对所述第一二值化主体进行字符切割,得到所述第一二值化主体的切割后的字符;Performing character segmentation on the first binary body to obtain segmented characters of the first binary body;通过第一卷积神经网络提取所述第一二值化主体的切割后的字符的卷积特征;Extracting convolutional features of the cut characters of the first binarized body through a first convolutional neural network;将所述第一二值化主体的切割后的字符的卷积特征以及所述真实主体的切割后的字符的真实卷积特征输入所述第二神经网络,得到所述第二真实概率。The convolution features of the cut characters of the first binarized subject and the real convolution features of the cut characters of the real subject are input into the second neural network to obtain the second real probability.4.根据权利要求1所述的方法,其中,所述在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息之前,还包括:4. The method according to claim 1, wherein, before the step of identifying text content in the target subject and/or extracting feature information of the target subject when the first image is detected to include the target subject, further comprises:提取所述第一图像的待鉴别子图像;extracting a sub-image to be identified of the first image;对所述待鉴别子图像进行角度矫正,得到矫正后的子图像;Performing angle correction on the sub-image to be identified to obtain a corrected sub-image;其中,所述在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息,包括:Wherein, in the case where it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject includes:所述在检测到所述矫正后的子图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息。In the case where it is detected that the corrected sub-image includes a target subject, text content in the target subject is recognized and/or feature information of the target subject is extracted.5.一种真伪鉴别装置,其中,所述装置包括:5. A device for authenticity identification, wherein the device comprises:获取模块,用于获取第一图像;An acquisition module, used for acquiring a first image;处理模块,用于在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息,其中,所述目标主体包括印章和签名中至少一项,所述特征信息包括形状特征、拓扑特征和卷积特征中的至少一项;a processing module, configured to, when detecting that the first image includes a target subject, identify text content in the target subject and/or extract feature information of the target subject, wherein the target subject includes at least one of a seal and a signature, and the feature information includes at least one of a shape feature, a topological feature, and a convolution feature;确定模块,用于基于所述目标主体的文字内容和/或所述目标主体的特征信息,确定所述目标主体的目标真伪鉴别结果;A determination module, used to determine the target authenticity identification result of the target subject based on the text content of the target subject and/or the characteristic information of the target subject;所述目标主体包括所述印章时,所述目标主体的特征信息包括所述印章的形状特征;When the target subject includes the seal, the characteristic information of the target subject includes the shape characteristics of the seal;所述确定模块,包括:The determination module comprises:比对模块,用于将所述印章的文字内容与所述印章的真实文字内容进行比对,得到所述印章的第一真伪鉴别结果;A comparison module, used for comparing the text content of the seal with the real text content of the seal to obtain a first authenticity identification result of the seal;第一子确定模块,用于基于所述印章的形状特征,确定所述印章的第二真伪鉴别结果;A first sub-determination module, used for determining a second authenticity identification result of the seal based on the shape feature of the seal;第二子确定模块,用于根据所述第一真伪鉴别结果以及所述第二真伪鉴别结果,确定所述目标真伪鉴别结果;A second sub-determination module, configured to determine the target authenticity identification result according to the first authenticity identification result and the second authenticity identification result;所述目标主体包括所述签名时,所述特征信息包括所述拓扑特征和所述卷积特征;When the target subject includes the signature, the feature information includes the topological feature and the convolution feature;所述确定模块,包括:The determination module comprises:概率确定模块,用于将所述目标主体的拓扑特征以及所述目标主体对应的真实主体的真实拓扑特征输入至第一神经网络,通过所述第一神经网络输出所述目标主体的第一真实概率;和,用于将所述目标主体的卷积特征以及所述目标主体对应的真实主体的真实卷积特征输入至第二神经网络,通过所述第二神经网络输出所述目标主体的第二真实概率;A probability determination module, used for inputting the topological features of the target subject and the real topological features of the real subject corresponding to the target subject into a first neural network, and outputting a first real probability of the target subject through the first neural network; and, used for inputting the convolution features of the target subject and the real convolution features of the real subject corresponding to the target subject into a second neural network, and outputting a second real probability of the target subject through the second neural network;第三子确定模块,用于基于所述第一真实概率和所述第二真实概率,确定所述目标真伪鉴别结果。The third sub-determination module is used to determine the target authenticity identification result based on the first true probability and the second true probability.6.根据权利要求5所述的装置,其中,所述概率确定模块,包括:6. The apparatus according to claim 5, wherein the probability determination module comprises:特征向量确定模块,用于基于所述目标主体的拓扑特征以及所述真实拓扑特征,得到第一特征向量;A feature vector determination module, configured to obtain a first feature vector based on the topological features of the target subject and the real topological features;第一概率获取模块,用于将所述第一特征向量输入至所述第一神经网络,得到所述第一真实概率。The first probability acquisition module is used to input the first feature vector into the first neural network to obtain the first true probability.7.根据权利要求5所述的装置,其中,所述概率确定模块,包括:7. The apparatus according to claim 5, wherein the probability determination module comprises:二值化模块,用于对所述目标主体进行二值化处理,得到第一二值化主体;A binarization module, used for performing binarization processing on the target subject to obtain a first binarized subject;切割模块,用于对所述第一二值化主体进行字符切割,得到所述第一二值化主体的切割后的字符;A cutting module, used for performing character cutting on the first binary body to obtain the cut characters of the first binary body;特征提取模块,用于通过第一卷积神经网络提取所述第一二值化主体的切割后的字符的卷积特征;A feature extraction module, used for extracting convolution features of the cut characters of the first binarized body through a first convolutional neural network;第二真实概率确定模块,用于将所述第一二值化主体的切割后的字符的卷积特征以及所述真实主体的切割后的字符的真实卷积特征输入所述第二神经网络,得到所述第二真实概率。The second true probability determination module is used to input the convolution features of the cut characters of the first binarized body and the real convolution features of the cut characters of the real body into the second neural network to obtain the second true probability.8.根据权利要求5所述的装置,其中,还包括:8. The device according to claim 5, further comprising:子图像提取模块,用于提取所述第一图像的待鉴别子图像;A sub-image extraction module, used for extracting a sub-image to be identified from the first image;矫正模块,用于对所述待鉴别子图像进行角度矫正,得到矫正后的子图像;A correction module, used for performing angle correction on the sub-image to be identified to obtain a corrected sub-image;其中,所述在检测到所述第一图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息,包括:Wherein, in the case where it is detected that the first image includes a target subject, identifying text content in the target subject and/or extracting feature information of the target subject includes:所述在检测到所述矫正后的子图像包括目标主体的情况下,识别所述目标主体中的文字内容和/或提取所述目标主体的特征信息。In the case where it is detected that the corrected sub-image includes a target subject, text content in the target subject is recognized and/or feature information of the target subject is extracted.9.一种电子设备,包括:9. An electronic device comprising:至少一个处理器;以及at least one processor; and与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1-4中任一所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.10.一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行如权利要求1-4中任一所述的方法。10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.11.一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-4中任一项所述的方法。11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 4.
CN202011065166.3A2020-09-302020-09-30 Authenticity identification method, device and electronic equipmentActiveCN112115921B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011065166.3ACN112115921B (en)2020-09-302020-09-30 Authenticity identification method, device and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011065166.3ACN112115921B (en)2020-09-302020-09-30 Authenticity identification method, device and electronic equipment

Publications (2)

Publication NumberPublication Date
CN112115921A CN112115921A (en)2020-12-22
CN112115921Btrue CN112115921B (en)2024-08-06

Family

ID=73798418

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011065166.3AActiveCN112115921B (en)2020-09-302020-09-30 Authenticity identification method, device and electronic equipment

Country Status (1)

CountryLink
CN (1)CN112115921B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112836665B (en)*2021-02-182025-08-26北京玖臺食品有限公司 Wine tasting device and wine tasting method
CN113434912B (en)*2021-08-242021-12-24共道网络科技有限公司Material compliance verification method and device
CN114140431B (en)*2021-12-012025-06-27北京三快在线科技有限公司 Method, device, equipment and computer-readable storage medium for identifying authenticity of image
CN114255334B (en)*2021-12-132022-08-30中国中医科学院中药研究所Shape feature acquisition device, database and identification system for traditional Chinese medicine
CN115063804A (en)*2022-06-292022-09-16支付宝(杭州)信息技术有限公司 Seal recognition and anti-counterfeiting detection method and system
CN116109914B (en)*2023-04-072023-06-27平安银行股份有限公司Method and device for identifying authenticity of bank running water image, electronic equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101593324A (en)*2009-06-172009-12-02浙江师范大学 Network multi-level approval method and system based on trusted computing application technology
CN103617673A (en)*2013-12-102014-03-05江苏国光信息产业股份有限公司Ultraviolet image characteristic-based check true and false identification system and method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1087461C (en)*1996-10-042002-07-10星友科技股份有限公司 Seal automatic contrast recognition system
CN106778586B (en)*2016-12-082020-11-17武汉理工大学Off-line handwritten signature identification method and system
CN108446621A (en)*2018-03-142018-08-24平安科技(深圳)有限公司Bank slip recognition method, server and computer readable storage medium
CN108491870B (en)*2018-03-142020-01-21平安科技(深圳)有限公司Electronic device, physical seal recognition method, and computer-readable storage medium
CN109977750A (en)*2019-01-152019-07-05平安科技(深圳)有限公司Seal true and false method of calibration, device and computer readable storage medium
CN110378351B (en)*2019-07-262021-11-26中国工商银行股份有限公司Seal identification method and device
CN110765992B (en)*2019-09-232023-03-24厦门大学Seal identification method, medium, equipment and device
CN111401372B (en)*2019-12-202024-04-16国家电网有限公司 A method for extracting and identifying image and text information from scanned documents

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101593324A (en)*2009-06-172009-12-02浙江师范大学 Network multi-level approval method and system based on trusted computing application technology
CN103617673A (en)*2013-12-102014-03-05江苏国光信息产业股份有限公司Ultraviolet image characteristic-based check true and false identification system and method

Also Published As

Publication numberPublication date
CN112115921A (en)2020-12-22

Similar Documents

PublicationPublication DateTitle
CN112115921B (en) Authenticity identification method, device and electronic equipment
CN109343920B (en)Image processing method and device, equipment and storage medium thereof
CN113627439A (en)Text structuring method, processing device, electronic device and storage medium
WO2021012382A1 (en)Method and apparatus for configuring chat robot, computer device and storage medium
US11995905B2 (en)Object recognition method and apparatus, and electronic device and storage medium
CN104751153B (en)A kind of method and device of identification scene word
CN111862031B (en) A method, device, electronic device and storage medium for detecting synthetic face images
CN114255337A (en)Method and device for correcting document image, electronic equipment and storage medium
CN110147785B (en)Image recognition method, related device and equipment
Wu et al.Offline Sketch Parsing via Shapeness Estimation.
CN110751154A (en)Complex environment multi-shape text detection method based on pixel-level segmentation
CN112270745A (en) An image generation method, apparatus, device and storage medium
CN118968537A (en) Bill scene recognition method, device, equipment and storage medium
Dhanikonda et al.An efficient deep learning model with interrelated tagging prototype with segmentation for telugu optical character recognition
CN114418124A (en)Method, device, equipment and storage medium for generating graph neural network model
Qin et al.Finger-vein quality assessment based on deep features from grayscale and binary images
WO2024164979A1 (en)Article identification method and apparatus, and storage medium and electronic device
Mohammad et al.Contour-based character segmentation for printed Arabic text with diacritics
CN114708420B (en) Visual positioning method and device based on local variance and posterior probability classifier
CN111767859A (en) Method, apparatus, electronic device, and computer-readable storage medium for image correction
Uzair et al.Electronet: An enhanced model for small-scale object detection in electrical schematic diagrams
Belhedi et al.Adaptive scene‐text binarisation on images captured by smartphones
JP2019194788A (en)Learning device, recognition device, learning method and computer program
Chi et al.Handwriting Recognition Based on Resnet-18
CN116994251A (en) Seal generation method, device, terminal equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp