[go: up one dir, main page]

CN107391996B - Identity verification method and device based on L1 norm neural network - Google Patents

Identity verification method and device based on L1 norm neural network Download PDF

Info

Publication number
CN107391996B
CN107391996B CN201710651409.3A CN201710651409A CN107391996B CN 107391996 B CN107391996 B CN 107391996B CN 201710651409 A CN201710651409 A CN 201710651409A CN 107391996 B CN107391996 B CN 107391996B
Authority
CN
China
Prior art keywords
image
target
verified
matched
feature descriptor
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.)
Expired - Fee Related
Application number
CN201710651409.3A
Other languages
Chinese (zh)
Other versions
CN107391996A (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201710651409.3A priority Critical patent/CN107391996B/en
Publication of CN107391996A publication Critical patent/CN107391996A/en
Application granted granted Critical
Publication of CN107391996B publication Critical patent/CN107391996B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于L1范数神经网络的身份验证方法及装置,利用L1范数的代价函数与测试样本的特征描述子得到目标网络和目标全连接层后,将待验证图像与测试图像利用目标网络和目标全连接层进行匹配,最终得到两个图像的相似度,根据待验证图像与预存图像的相似度判断当前用户是否合法。由于基于LI范数的代价函数得到的目标网络中的参数是确定的,每次验证时不会根据测试图像的不同再重新定义参数,因此在下次匹配时,匹配速度快,耗时很少,同时,基于L1范数的代价函数确定的目标网络为深度学习的目标网络,因此有很强大的学习能力,能够充分地学习到测试图像特征信息,因此准确度很高。

Figure 201710651409

The invention discloses an identity verification method and device based on the L1 norm neural network. After obtaining the target network and the target full connection layer by using the cost function of the L1 norm and the feature descriptor of the test sample, the to-be-verified image and the test image are obtained. The target network and the target fully connected layer are used for matching, and finally the similarity of the two images is obtained, and whether the current user is legitimate is judged according to the similarity between the image to be verified and the pre-stored image. Since the parameters in the target network obtained by the cost function based on the LI norm are deterministic, the parameters will not be redefined according to the different test images during each verification. Therefore, in the next matching, the matching speed is fast and the time-consuming is very small. At the same time, the target network determined by the cost function based on the L1 norm is the target network of deep learning, so it has a strong learning ability and can fully learn the feature information of the test image, so the accuracy is high.

Figure 201710651409

Description

一种基于L1范数神经网络的身份验证方法及装置An authentication method and device based on L1 norm neural network

技术领域technical field

本发明涉及人脸识别技术,更具体地说,涉及一种基于L1范数神经网络的身份验证方法方法及装置。The present invention relates to face recognition technology, and more particularly, to an identity verification method and device based on L1 norm neural network.

背景技术Background technique

随着科学技术的发展,身份验证技术也得到了快速的发展。在手机解锁、门禁、移动支付等过程都需要进行身份验证,以确定用户身份是合法的。传统的身份验证方法主要是通过用户名、密码等进行验证,但是这种方式容易被黑客入侵客户端将身份信息窃取利用。With the development of science and technology, authentication technology has also developed rapidly. In the process of mobile phone unlocking, access control, mobile payment, etc., identity verification is required to confirm that the user's identity is legal. The traditional authentication method is mainly through the user name, password, etc., but this method is easy for hackers to invade the client to steal and use the identity information.

人脸也可以作为用户身份的唯一标识信息,因此人脸识别技术也可以应用于用户身份的校验,而且通过人脸识别技术会避免黑客将用户身份信息的窃取利用,但是目前的人脸识别技术的识别精度普遍不高,而精度高的技术耗时又非常大。The face can also be used as the unique identification information of the user's identity, so the face recognition technology can also be applied to the verification of the user's identity, and the use of the face recognition technology will prevent hackers from stealing the user's identity information, but the current face recognition technology The recognition accuracy of the technology is generally not high, and the technology with high accuracy is very time-consuming.

因此,如何利用耗时少而且精度高的人脸识别技术进行用户身份识别验证,是本领域技术人员需要解决的问题。Therefore, how to use the face recognition technology that is less time-consuming and has high precision to perform user identity verification is a problem that needs to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于L1范数神经网络的身份验证方法身份验证的方法及装置,以利用耗时少而且精度高的人脸识别技术进行用户身份识别验证。The purpose of the present invention is to provide a method and device for identity verification based on the L1 norm neural network identity verification method, so as to use the face recognition technology with less time consumption and high precision to perform user identity verification.

为实现上述目的,本发明实施例提供了如下技术方案:To achieve the above purpose, the embodiments of the present invention provide the following technical solutions:

一种基于L1范数神经网络的身份验证方法,包括:An authentication method based on L1 norm neural network, including:

利用测试样本的特征描述子与基于L1范数的代价函数得到目标网络;The target network is obtained by using the feature descriptor of the test sample and the cost function based on L1 norm;

利用所述特征描述子与初始全连接层得到目标全连接层;Using the feature descriptor and the initial fully connected layer to obtain the target fully connected layer;

利用预存图像的尺寸对待验证图像预处理得到目标待验证图像;Use the size of the pre-stored image to preprocess the image to be verified to obtain the target image to be verified;

利用预存图像块的总数对所述目标待验证图像进行遍历分块得到目标待验证图像块,其中所述目标待验证图像块的总数与所述预存图像块的总数相同;Using the total number of pre-stored image blocks to traverse the target to-be-verified image to obtain target to-be-verified image blocks, wherein the total number of the target to-be-verified image blocks is the same as the total number of the pre-stored image blocks;

将所述预存图像块与所述目标待验证图像块送入所述目标网络与目标全连接层得到所述预存图像与所述待验证图像的相似度;Sending the pre-stored image block and the target image block to be verified into the target network and the target fully connected layer to obtain the similarity between the pre-stored image and the to-be-verified image;

利用所述相似度验证所述待验证图像是否合法。Use the similarity to verify whether the image to be verified is legal.

其中,所述利用测试样本的特征描述子与基于L1范数的代价函数得到目标网络,包括:Wherein, the target network is obtained by using the feature descriptor of the test sample and the cost function based on the L1 norm, including:

将测试样本输入初始网络,得到测试样本的特征描述子;Input the test sample into the initial network to obtain the feature descriptor of the test sample;

利用所述特征描述子最小化基于L1范数的代价函数,训练得到目标网络。Using the feature descriptor to minimize the cost function based on the L1 norm, the target network is obtained by training.

其中,所述利用所述特征描述子与初始全连接层得到目标全连接层,包括:Wherein, obtaining the target fully-connected layer by using the feature descriptor and the initial fully-connected layer includes:

利用初始全连接层得到所述特征描述子的匹配结果;Use the initial fully connected layer to obtain the matching result of the feature descriptor;

利用所述匹配结果与测试样本标签的差值,训练得到目标全连接层。Using the difference between the matching result and the test sample label, the target fully connected layer is obtained by training.

其中,所述预存图像块与所述目标待验证图像块利用所述目标网络与目标全连接层得到所述预存图像与所述待验证图像的相似度,包括:Wherein, the pre-stored image block and the target image block to be verified use the target network and the target full connection layer to obtain the similarity between the pre-stored image and the to-be-verified image, including:

将每一块未匹配的目标待验证图像块与对应的未匹配的预存图像块作为一个待匹配对,利用所述目标网络得到每一个待匹配对的第一特征描述子与第二特征描述子;Taking each unmatched target image block to be verified and the corresponding unmatched pre-stored image block as a pair to be matched, and using the target network to obtain the first feature descriptor and the second feature descriptor of each pair to be matched;

将每一个待匹配对的第一特征描述子与第二特征描述子利用目标全连接层得到每一个待匹配对的匹配结果;The first feature descriptor and the second feature descriptor of each pair to be matched use the target fully connected layer to obtain the matching result of each pair to be matched;

统计匹配成功的待匹配对成功总数,将所述待匹配对成功总数与所有待匹配对的总数的比例作为相似度。The total number of successful pairs to be matched is counted, and the ratio of the total number of successful pairs to be matched to the total number of all pairs to be matched is used as the similarity.

其中,所述利用预存图像的尺寸对待验证图像预处理得到目标待验证图像,包括:Wherein, using the size of the pre-stored image to preprocess the image to be verified to obtain the target image to be verified, including:

将所述待验证图像的人脸部分图像截取,并进行灰度化处理,得到灰度待验证图像;Intercepting the face part of the image to be verified, and performing grayscale processing to obtain a grayscale image to be verified;

将所述灰度待验证图像缩放至预存图像的尺寸,得到目标待验证图像。The grayscale image to be verified is scaled to the size of the pre-stored image to obtain the target image to be verified.

一种基于L1范数神经网络的身份验证装置,包括:An authentication device based on L1 norm neural network, comprising:

目标网络获取模块,用于利用测试样本的特征描述子与基于L1范数的代价函数得到目标网络;The target network acquisition module is used to obtain the target network by using the feature descriptor of the test sample and the cost function based on the L1 norm;

目标全连接层获取模块,用于利用所述特征描述子与初始全连接层得到目标全连接层;a target fully connected layer obtaining module, used for obtaining the target fully connected layer by using the feature descriptor and the initial fully connected layer;

待验证图像预处理模块,用于利用预存图像的尺寸对待验证图像预处理得到目标待验证图像;The image preprocessing module to be verified is used to preprocess the image to be verified by using the size of the pre-stored image to obtain the target image to be verified;

分块模块,用于利用预存图像块的总数对所述目标待验证图像进行遍历分块得到目标待验证图像块,其中所述目标待验证图像块的总数与所述预存图像块的总数相同;A block module, configured to traverse the target to-be-verified image into blocks by using the total number of pre-stored image blocks to obtain target to-be-verified image blocks, wherein the total number of the target to-be-verified image blocks is the same as the total number of the pre-stored image blocks;

相似度计算模块,用于将所述预存图像块与所述目标待验证图像块送入所述目标网络与目标全连接层得到所述预存图像与所述待验证图像的相似度;a similarity calculation module, configured to send the pre-stored image block and the target to-be-verified image block into the target network and the target fully connected layer to obtain the similarity between the pre-stored image and the to-be-verified image;

验证模块,用于利用所述相似度验证所述待验证图像是否合法。A verification module, configured to use the similarity to verify whether the image to be verified is legal.

其中,所述目标网络获取模块,包括:Wherein, the target network acquisition module includes:

特征描述子获取单元,用于将测试样本输入初始网络,得到测试样本的特征描述子;The feature descriptor acquisition unit is used to input the test sample into the initial network to obtain the feature descriptor of the test sample;

目标网络训练单元,用于利用所述特征描述子最小化基于L1范数的代价函数,训练得到目标网络。The target network training unit is configured to use the feature descriptor to minimize the cost function based on the L1 norm, and train to obtain the target network.

其中,所述目标全连接层获取模块,包括:Wherein, the target fully connected layer acquisition module includes:

第一匹配结果获取单元,用于利用初始全连接层得到所述特征描述子的匹配结果;a first matching result obtaining unit, used for obtaining the matching result of the feature descriptor by using the initial fully connected layer;

目标全连接层训练单元,用于利用所述匹配结果与测试样本标签的差值,训练得到目标全连接层。The target fully-connected layer training unit is configured to use the difference between the matching result and the test sample label to train to obtain the target fully-connected layer.

其中,所述相似度计算模块,包括:Wherein, the similarity calculation module includes:

匹配对特征描述子获取单元,将每一块未匹配的目标待验证图像块与对应的未匹配的预存图像块作为一个待匹配对,利用所述目标网络得到每一个待匹配对的第一特征描述子与第二特征描述子;The matching pair feature descriptor acquisition unit takes each unmatched target to-be-verified image block and the corresponding unmatched pre-stored image block as a to-be-matched pair, and uses the target network to obtain the first feature description of each to-be-matched pair sub and the second feature descriptor;

第二匹配结果获取单元,用于将每一个待匹配对的第一特征描述子与第二特征描述子利用目标全连接层得到每一个待匹配对的匹配结果;The second matching result obtaining unit is used to obtain the matching result of each to-be-matched pair by using the target fully connected layer of the first feature descriptor and the second feature descriptor of each to-be-matched pair;

统计单元,用于统计匹配成功的待匹配对成功总数,将所述待匹配对成功总数与所有待匹配对的总数的比例作为相似度。The statistics unit is configured to count the total number of successful pairs to be matched that are successfully matched, and use the ratio of the total number of successful pairs to be matched to the total number of all pairs to be matched as the similarity.

其中,所述待验证图像预处理模块,包括:Wherein, the to-be-verified image preprocessing module includes:

灰度处理单元,用于将所述待验证图像的人脸部分图像截取,并进行灰度化处理,得到灰度待验证图像;a grayscale processing unit, configured to intercept the face part image of the image to be verified, and perform grayscale processing to obtain a grayscale image to be verified;

缩放单元,用于将所述灰度待验证图像缩放至预存图像的尺寸,得到目标待验证图像。The scaling unit is used for scaling the grayscale image to be verified to the size of the pre-stored image to obtain the target image to be verified.

通过以上方案可知,本发明提供的一种基于L1范数神经网络的身份验证方法,利用L1范数的代价函数与测试样本的特征描述子得到目标网络和目标全连接层后,将待验证图像与测试图像利用目标网络和目标全连接层进行匹配,最终得到两个图像的相似度,根据待验证图像与预存图像的相似度判断当前用户是否合法。由于基于LI范数的代价函数得到的目标网络中的参数是确定的,每次验证时不会根据测试图像的不同再重新定义参数,因此在下次匹配时,匹配速度快,耗时很少,同时,基于L1范数的代价函数确定的目标网络为深度学习的目标网络,因此有很强大的学习能力,能够充分地学习到测试图像特征信息,因此准确度很高。本发明实施例还提供一种基于L1范数神经网络的身份验证装置,同样可以实现上述技术效果。It can be seen from the above solutions that the present invention provides an identity verification method based on L1 norm neural network. Match the test image with the target network and the target fully connected layer, and finally obtain the similarity of the two images, and judge whether the current user is legitimate according to the similarity between the image to be verified and the pre-stored image. Since the parameters in the target network obtained by the cost function based on the LI norm are deterministic, the parameters will not be redefined according to the different test images during each verification, so the next time the matching is performed, the matching speed is fast and the time-consuming is very small. At the same time, the target network determined by the cost function based on the L1 norm is the target network of deep learning, so it has a strong learning ability and can fully learn the feature information of the test image, so the accuracy is high. The embodiment of the present invention also provides an identity verification device based on the L1 norm neural network, which can also achieve the above technical effects.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative effort.

图1为本发明实施例公开的一种基于L1范数神经网络的身份验证方法流程图;1 is a flowchart of an authentication method based on an L1 norm neural network disclosed in an embodiment of the present invention;

图2为本发明实施例公开的一种具体的基于L1范数神经网络的身份验证方法流程图;2 is a flowchart of a specific L1-norm neural network-based authentication method disclosed in an embodiment of the present invention;

图3为本发明实施例公开的一种神经网络示意图;3 is a schematic diagram of a neural network disclosed in an embodiment of the present invention;

图4为本发明实施例公开的一种具体的基于L1范数神经网络的身份验证方法流程图;4 is a flowchart of a specific L1 norm neural network-based authentication method disclosed in an embodiment of the present invention;

图5为本发明实施例公开的一种具体的基于L1范数神经网络的身份验证方法流程图;5 is a flowchart of a specific L1 norm neural network-based authentication method disclosed in an embodiment of the present invention;

图6为本发明实施例公开的一种基于L1范数神经网络的身份验证装置结构示意图。FIG. 6 is a schematic structural diagram of an identity verification device based on an L1 norm neural network disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例公开了一种基于L1范数神经网络的身份验证方法身份验证的方法及装置,以利用耗时少而且精度高的人脸识别技术进行用户身份识别验证。The embodiment of the present invention discloses a method and device for identity verification based on an L1 norm neural network identity verification method, so as to use a face recognition technology with less time consumption and high precision to perform user identity verification.

参见图1,本发明实施例提供的一种基于L1范数神经网络的身份验证方法,具体包括:Referring to FIG. 1 , an authentication method based on an L1 norm neural network provided by an embodiment of the present invention specifically includes:

S101,利用测试样本的特征描述子与基于L1范数的代价函数得到目标网络。S101, a target network is obtained by using the feature descriptor of the test sample and the cost function based on the L1 norm.

具体地,首先需要利用测试样本得到测试样本的特征描述子,根据特征描述子最小化基于L1范数的代价函数,训练的到目标网络,利用目标网络可以得到图像的特征描述子。Specifically, firstly, it is necessary to use the test sample to obtain the feature descriptor of the test sample, minimize the cost function based on the L1 norm according to the feature descriptor, train the target network, and use the target network to obtain the feature descriptor of the image.

需要说明的是,在本方案中是利用毛孔训练样本作为测试样本,在验证时,也是对毛孔特征进行提取进行验证。由于毛孔尺度特征极其微小,排列独特,很难被伪造,因此不会造成信息泄露,安全性较高。It should be noted that in this scheme, the pore training sample is used as the test sample, and the pore feature is also extracted for verification during verification. Because the pore-scale features are extremely small and unique in arrangement, it is difficult to be forged, so there will be no information leakage and high security.

S102,利用所述特征描述子与初始全连接层得到目标全连接层。S102, using the feature descriptor and the initial fully connected layer to obtain a target fully connected layer.

具体地,利用S101得到的特征描述子与初始的全连接层进行训练,得到目标全连接层,两个特征描述子可以通过全连接层得到它们的匹配结果。Specifically, the feature descriptor obtained in S101 is used for training with the initial fully-connected layer to obtain the target fully-connected layer, and the two feature descriptors can obtain their matching results through the fully-connected layer.

需要说明的是,目标全连接层与目标网络组成了神经网络,在本方案中就是通过神经网络中的目标网络得到待验证图像与预存图像的特征描述子,并将它们的特征描述子通过目标全连接层进行匹配得到匹配结果,根据匹配结果验证用户的身份。It should be noted that the target fully connected layer and the target network form a neural network. In this scheme, the target network in the neural network is used to obtain the feature descriptors of the image to be verified and the pre-stored image, and their feature descriptors are passed through the target. The full connection layer performs matching to obtain the matching result, and verifies the identity of the user according to the matching result.

S103,利用预存图像的尺寸对待验证图像预处理得到目标待验证图像。S103, using the size of the pre-stored image to preprocess the image to be verified to obtain the target image to be verified.

具体地,确定预存图像的尺寸,并将待验证图像的尺寸处理为与预存图像相同的尺寸,并进行人脸部分截取、灰度化等操作,使进行过预处理的待验证图像符合条件,可以进行后续的验证操作。Specifically, determine the size of the pre-stored image, process the size of the image to be verified to be the same size as the pre-stored image, and perform operations such as face part interception, grayscale, etc., so that the pre-processed image to be verified meets the conditions, Subsequent verification operations can be performed.

S104,利用预存图像块的总数对所述目标待验证图像进行遍历分块得到目标待验证图像块,其中所述目标待验证图像块的总数与所述预存图像块的总数相同。S104, using the total number of pre-stored image blocks to traverse the target to-be-verified image to obtain target to-be-verified image blocks, where the total number of the target to-be-verified image blocks is the same as the total number of the pre-stored image blocks.

具体地,确定预存图像分为了多少块预存图像块,并将目标待验证图像进行遍历分块,分成同样块数的目标待验证图像块。Specifically, it is determined how many pre-stored image blocks the pre-stored image is divided into, and the target to-be-verified image is traversed and divided into target to-be-verified image blocks of the same number of blocks.

S105,将所述预存图像块与所述目标待验证图像块送入所述目标网络与目标全连接层得到所述预存图像与所述待验证图像的相似度。S105, sending the pre-stored image block and the target image block to be verified into the target network and the target full connection layer to obtain the similarity between the pre-stored image and the to-be-verified image.

具体地,逐块地将每一块预存图像块与对应的每一块目标待验证图像块送入目标网络,得到每一块预存图像块的特征描述子,与每一块目标待验证图像块的特征描述子,并将对应的两种图像的图像块的特征描述子送入全连接层,得到对应的每一组图像块的匹配结果,可以根据匹配成功的图像块数与总块数的比例计算得出预存图像与待验证图像的相似度。Specifically, each pre-stored image block and each corresponding target image block to be verified are sent to the target network block by block, and the feature descriptor of each pre-stored image block is obtained, and the feature descriptor of each target image block to be verified is obtained. , and send the feature descriptors of the image blocks of the corresponding two images into the fully connected layer to obtain the matching results of each group of corresponding image blocks, which can be calculated according to the ratio of the number of successfully matched image blocks to the total number of blocks. The similarity between the pre-stored image and the image to be verified is calculated.

S106,利用所述相似度验证所述待验证图像是否合法。S106, using the similarity to verify whether the image to be verified is legal.

具体地,判断相似度是否大于预设的一个阈值,也就是是否符合合法的条件,如果是,那么验证通过,如果否那么验证不通过,用户不合法。Specifically, it is judged whether the similarity is greater than a preset threshold, that is, whether it meets legal conditions, and if so, the verification is passed, and if not, the verification fails, and the user is illegal.

通过以上方案可知,本发明提供的一种基于L1范数神经网络的身份验证方法,利用L1范数的代价函数与测试样本的特征描述子得到目标网络和目标全连接层后,将待验证图像与测试图像利用目标网络和目标全连接层进行匹配,最终得到两个图像的相似度,根据待验证图像与预存图像的相似度判断当前用户是否合法。由于基于LI范数的代价函数得到的目标网络中的参数是确定的,每次验证时不会根据测试图像的不同再重新定义参数,因此在下次匹配时,匹配速度快,耗时很少,同时,基于L1范数的代价函数确定的目标网络为深度学习的目标网络,因此有很强大的学习能力,能够充分地学习到测试图像特征信息,因此准确度很高。It can be seen from the above solutions that the present invention provides an identity verification method based on L1 norm neural network. Match the test image with the target network and the target fully connected layer, and finally obtain the similarity of the two images, and judge whether the current user is legitimate according to the similarity between the image to be verified and the pre-stored image. Since the parameters in the target network obtained by the cost function based on the LI norm are deterministic, the parameters will not be redefined according to the different test images during each verification, so the next time the matching is performed, the matching speed is fast and the time-consuming is very small. At the same time, the target network determined by the cost function based on the L1 norm is the target network of deep learning, so it has a strong learning ability and can fully learn the feature information of the test image, so the accuracy is high.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证方法,区别于上一实施例本发明实施例对上述实施例中S101作了具体的限定与说明,其他步骤内容与上一实施例大致相同,此处不再赘述。具体地,参考图2,S101包括:The embodiment of the present invention provides a specific authentication method based on the L1 norm neural network, which is different from the previous embodiment. The embodiment of the present invention specifically defines and describes S101 in the above embodiment, and the contents of other steps are the same as those in the previous embodiment. The embodiments are substantially the same, and are not repeated here. Specifically, referring to FIG. 2, S101 includes:

S201,将测试样本输入初始网络,得到测试样本的特征描述子。S201, input the test sample into an initial network to obtain a feature descriptor of the test sample.

具体地,将毛孔训练样本作为测试样本输入到初始网络,经过多层卷积、归一操作,得到毛孔尺度的特征描述子。Specifically, the pore training samples are input into the initial network as test samples, and through multi-layer convolution and normalization operations, the feature descriptors of the pore scale are obtained.

S202,利用所述特征描述子最小化基于L1范数的代价函数,训练得到目标网络。S202, using the feature descriptor to minimize a cost function based on the L1 norm, and train to obtain a target network.

具体地,参照图3,图3由上至下分别为卷积层、批归一化层、卷基层、批归一化层、局部响应归一层、全连接层。Specifically, referring to FIG. 3 , from top to bottom, FIG. 3 is a convolution layer, a batch normalization layer, a convolution base layer, a batch normalization layer, a local response normalization layer, and a fully connected layer.

具体地,特征描述子获取单元将毛孔训练样本作为测试样本输入到初始网络,经过多层卷积、归一操作,得到毛孔尺度的特征描述子。Specifically, the feature descriptor acquisition unit inputs the pore training sample as a test sample into the initial network, and obtains the feature descriptor of the pore scale through multi-layer convolution and normalization operations.

目标网络训练单元,用于利用所述特征描述子最小化基于L1范数的代价函数,训练得到目标网络。The target network training unit is configured to use the feature descriptor to minimize the cost function based on the L1 norm, and train to obtain the target network.

具体地,定义

Figure BDA0001368141820000071
为LRN层(局部响应归一层)输出的第一图像分块后的第i块区域图像的128维毛孔尺度特征描述子;
Figure BDA0001368141820000072
为LRN层输出的第二图像分块后的第i块区域图像的128维毛孔尺度特征描述子。Specifically, define
Figure BDA0001368141820000071
It is the 128-dimensional pore scale feature descriptor of the image of the ith block of the first image after the LRN layer (local response normalization layer) output;
Figure BDA0001368141820000072
It is the 128-dimensional pore-scale feature descriptor of the i-th block region image after the second image output by the LRN layer.

定义基于L1范数的匹配对的特征描述子的距离

Figure BDA0001368141820000073
||||1表示L1范数。Define the distance of feature descriptors for matching pairs based on L1 norm
Figure BDA0001368141820000073
|||| 1 means L1 norm.

定义特征描述子的列相似度

Figure BDA0001368141820000074
行相似度
Figure BDA0001368141820000075
则代价函数为
Figure BDA0001368141820000076
Define the column similarity of feature descriptors
Figure BDA0001368141820000074
row similarity
Figure BDA0001368141820000075
Then the cost function is
Figure BDA0001368141820000076

需要说明的是,第一图像为待测试图像,第二图像为待匹配图像。在测试样本中,包括两种图像样本,一个是待测试样本图像作为第一图像,另一个是待匹配测试图像作为第二图像。在下述步骤进行验证时,待验证图像为第一图像,预存图像为第二图像。It should be noted that the first image is an image to be tested, and the second image is an image to be matched. In the test sample, two kinds of image samples are included, one is the image of the sample to be tested as the first image, and the other is the test image to be matched as the second image. During verification in the following steps, the image to be verified is the first image, and the pre-stored image is the second image.

在训练过程中,会不断地产生特征描述子,利用特征描述子以最小化代价函数为手段,确定出目标特征描述子生成网络的参数,确定参数后,目标网络训练完成。In the training process, feature descriptors are continuously generated, and the parameters of the target feature descriptor generation network are determined by using the feature descriptors to minimize the cost function. After the parameters are determined, the target network training is completed.

由此可见,在本方案中目标网络的参数在训练时已确定,在利用目标网络进行验证时参数不会再改变,因此耗费时间极少,同时深度学习的神经网络具有很强大的学习能力,能够充分地学习到毛孔尺寸特征的信息,因此准确度高。It can be seen that in this scheme, the parameters of the target network have been determined during training, and the parameters will not be changed when the target network is used for verification, so it takes very little time. At the same time, the deep learning neural network has a strong learning ability. The information of the pore size feature can be fully learned, so the accuracy is high.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证方法,区别于上一实施例本发明实施例对上述实施例中S102作了具体的限定与说明,其他步骤内容与上一实施例大致相同,此处不再赘述。具体地,参考图4,S102包括:The embodiment of the present invention provides a specific authentication method based on the L1 norm neural network, which is different from the previous embodiment. The embodiment of the present invention specifically defines and describes S102 in the above-mentioned embodiment, and the contents of other steps are the same as those of the previous embodiment. The embodiments are substantially the same, and are not repeated here. Specifically, referring to FIG. 4, S102 includes:

S301,利用初始全连接层得到所述特征描述子的匹配结果。S301, using an initial fully connected layer to obtain a matching result of the feature descriptor.

S302,利用所述匹配结果与测试样本标签的差值,训练得到目标全连接层。S302, using the difference between the matching result and the label of the test sample to train to obtain a target fully connected layer.

具体地,将特征描述子通过全连接层得到匹配结果,最小化匹配结果和测试样本标签的差值,训练得到目标全连接层。Specifically, the feature descriptor is passed through the fully connected layer to obtain the matching result, the difference between the matching result and the test sample label is minimized, and the target fully connected layer is obtained by training.

需要说明的是,匹配结果就是测试样本中待测试样本图像和一个待匹配测试图像的匹配结果,待测试样本图像和待匹配测试图像可以是整张图像,也可以是切块后的图像,在本方案中是切块后的图像。测试样本的标签为已知的毛孔训练样本中待测试样本图像和一个待匹配测试图像的预定匹配结果。It should be noted that the matching result is the matching result between the image of the sample to be tested and a test image to be matched in the test sample. In this scheme, it is the image after dicing. The label of the test sample is the predetermined matching result of the sample image to be tested and a test image to be matched in the known pore training sample.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证方法,区别于上一实施例本发明实施例对上述实施例中S105作了具体的限定与说明,其他步骤内容与上一实施例大致相同,此处不再赘述。具体地,参考图5,S105包括:The embodiment of the present invention provides a specific authentication method based on the L1 norm neural network, which is different from the previous embodiment. The embodiment of the present invention specifically defines and describes S105 in the above embodiment, and the content of other steps is the same as that of the previous embodiment. The embodiments are substantially the same, and are not repeated here. Specifically, referring to FIG. 5, S105 includes:

S401,将每一块未匹配的目标待验证图像块与对应的未匹配的预存图像块作为一个待匹配对,利用所述目标网络得到每一个待匹配对的第一特征描述子与第二特征描述子。S401, take each unmatched target to-be-verified image block and the corresponding unmatched pre-stored image block as a to-be-matched pair, and use the target network to obtain the first feature descriptor and the second feature description of each to-be-matched pair son.

具体地,目标待验证图像块与预存图像都被遍历分块为了多个图像块,其中,每一块目标待验证图像块对应一块预存图像块,对应的一块没进行匹配过的目标待验证图像块与一块没进行匹配过的预存图像块作为一个待匹配对,准备匹配。将一个待匹配对送入目标网络,既可以获得待匹配对的特征描述子,也就是目标待验证图像块的特征描述子与预存图像块的特征描述子,其中目标待验证图像块的特征描述子作为第一特征描述子,预存图像块的特征描述子作为第二特征描述子。Specifically, both the target to-be-verified image block and the pre-stored image are traversed and divided into multiple image blocks, wherein each target to-be-verified image block corresponds to a pre-stored image block, and a corresponding target to-be-verified image block that has not been matched A pre-stored image block that has not been matched is used as a pair to be matched, ready to be matched. Sending a pair to be matched into the target network can obtain the feature descriptor of the pair to be matched, that is, the feature descriptor of the target image block to be verified and the feature descriptor of the pre-stored image block, wherein the feature descriptor of the target image block to be verified as the first feature descriptor, and the feature descriptor of the pre-stored image block as the second feature descriptor.

需要说明的是,遍历分块操作具体为以下步骤:It should be noted that the traversal block operation is as follows:

首先确定预存图像为多少块预存图像块,将目标待验证图像处理为同样的块数,根据块数与待验证图像的尺寸,确定目标待验证图像块的尺寸。利用目标待验证图像块的尺寸,不重叠地遍历目标待验证图像,并舍去多余的边缘。First, determine how many pre-stored image blocks the pre-stored image is, process the target to-be-verified image into the same number of blocks, and determine the size of the target to-be-verified image block according to the number of blocks and the size of the to-be-verified image. Using the size of the target image block to be verified, the target image to be verified is traversed without overlapping, and redundant edges are discarded.

S402,将每一个待匹配对的第一特征描述子与第二特征描述子利用目标全连接层得到每一个待匹配对的匹配结果。S402, using the first feature descriptor and the second feature descriptor of each to-be-matched pair to obtain a matching result of each to-be-matched pair by using the target fully connected layer.

具体地,将第一特征描述子和第二特征描述子送入目标全连接层,得到第一特征描述子和第二特征描述子的匹配结果,也就是判断对应的匹配对中的目标待验证图像块与预测图像块是否匹配。Specifically, the first feature descriptor and the second feature descriptor are sent to the target fully connected layer, and the matching result between the first feature descriptor and the second feature descriptor is obtained, that is, it is determined that the target in the corresponding matching pair is to be verified Whether the image block matches the predicted image block.

S403,统计匹配成功的待匹配对成功总数,将所述待匹配对成功总数与所有待匹配对的总数的比例作为相似度。S403: Count the total number of successful pairs to be matched that are successfully matched, and use the ratio of the total number of successful pairs to be matched to the total number of all pairs to be matched as the similarity.

具体地,将每一块目标待验证图像块对应每一块预存图像块组成的所有匹配对均通过目标网络和目标全连接层进行匹配后,统计所有匹配成功的图像块数,将所有匹配成功的图像块数于所有图像块数的比例作为此次验证的目标待验证图像与预测图像的相似度。判断这个相似度是否大于一个阈值,例如2/3,如果大于等于2/3,那么验证通过,当前用户合法,如果小于2/3,那么验证不通过,当前用户不合法,可以给出相应的提示。也就是说如果待验证图像中的图像块与预存图像中的图像块匹配成功的总数量大于等于两个图像所所有图像块总数量的2/3,那么就可以确定当前用户为合法。需要说明的是,待验证图像为用户验证身份时的用户图像。Specifically, all matching pairs composed of each target image block to be verified corresponding to each pre-stored image block are matched through the target network and the target fully connected layer, and the number of all successfully matched image blocks is counted. The ratio of the number of blocks to the number of all image blocks is used as the similarity between the image to be verified and the predicted image. Determine whether the similarity is greater than a threshold, such as 2/3, if it is greater than or equal to 2/3, then the verification is passed, the current user is legal, if it is less than 2/3, then the verification is not passed, the current user is illegal, you can give the corresponding hint. That is to say, if the total number of image blocks in the image to be verified and the image blocks in the pre-stored image are successfully matched is greater than or equal to 2/3 of the total number of image blocks in the two images, then the current user can be determined to be legitimate. It should be noted that the image to be authenticated is the image of the user when the user authenticates the identity.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证方法,区别于上一实施例本发明实施例对上述实施例中S103作了具体的限定与说明,其他步骤内容与上一实施例大致相同,此处不再赘述。具体地,S103包括:The embodiment of the present invention provides a specific authentication method based on the L1 norm neural network, which is different from the previous embodiment. The embodiment of the present invention specifically defines and describes S103 in the above embodiment, and the content of other steps is the same as that of the previous embodiment. The embodiments are substantially the same, and are not repeated here. Specifically, S103 includes:

将所述待验证图像的人脸部分图像截取,并进行灰度化处理,得到灰度待验证图像;Intercepting the face part of the image to be verified, and performing grayscale processing to obtain a grayscale image to be verified;

将所述灰度待验证图像缩放至预存图像的尺寸,得到目标待验证图像。The grayscale image to be verified is scaled to the size of the pre-stored image to obtain the target image to be verified.

具体地,首先对待验证图像进行人脸检测,定位人脸并截取出人脸部分图像,对截取后的人脸部分图像进行灰度化处理,得到灰度图像,根据检索的环境,预设一个图像尺寸,将灰度人脸图像缩放至预设尺寸,进行以上预处理后,就得到了目标待验证图像。Specifically, first perform face detection on the image to be verified, locate the face and cut out part of the face image, perform grayscale processing on the cutout part of the face image to obtain a grayscale image, and preset one according to the retrieval environment. Image size, the grayscale face image is scaled to a preset size, and after the above preprocessing, the target image to be verified is obtained.

下面对本发明实施例提供的一种基于L1范数神经网络的身份验证装置进行介绍,下文描述的一种基于L1范数神经网络的身份验证装置与上文描述的一种基于L1范数神经网络的身份验证方法可以相互参照。The following describes an identity verification device based on an L1 norm neural network provided by an embodiment of the present invention. The authentication methods can be cross-referenced.

参见图6,本发明实施例提供的一种基于L1范数神经网络的身份验证装置,具体包括:Referring to FIG. 6 , an authentication device based on an L1 norm neural network provided by an embodiment of the present invention specifically includes:

目标网络获取模块501,用于利用测试样本的特征描述子与基于L1范数的代价函数得到目标网络。The target network obtaining module 501 is used for obtaining the target network by using the feature descriptor of the test sample and the cost function based on the L1 norm.

具体地,首先目标网络获取模块501需要利用测试样本得到测试样本的特征描述子,根据特征描述子最小化基于L1范数的代价函数,训练的到目标网络,利用目标网络可以得到图像的特征描述子。Specifically, first, the target network acquisition module 501 needs to use the test sample to obtain the feature descriptor of the test sample, minimize the cost function based on the L1 norm according to the feature descriptor, train the target network, and use the target network to obtain the feature description of the image son.

需要说明的是,在本方案中是利用毛孔训练样本作为测试样本,在验证时,也是对毛孔特征进行提取进行验证。由于毛孔尺度特征极其微小,排列独特,很难被伪造,因此不会造成信息泄露,安全性较高。It should be noted that in this scheme, the pore training sample is used as the test sample, and the pore feature is also extracted for verification during verification. Because the pore-scale features are extremely small and unique in arrangement, it is difficult to be forged, so there will be no information leakage and high security.

目标全连接层获取模块502,用于利用所述特征描述子与初始全连接层得到目标全连接层。The target fully-connected layer obtaining module 502 is configured to obtain the target fully-connected layer by using the feature descriptor and the initial fully-connected layer.

具体地,目标全连接层获取模块502利用目标网络获取模块501得到的特征描述子与初始的全连接层进行训练,得到目标全连接层,两个特征描述子可以通过全连接层得到它们的匹配结果。Specifically, the target fully-connected layer acquisition module 502 uses the feature descriptor obtained by the target network acquisition module 501 to train the initial fully-connected layer to obtain the target fully-connected layer, and the two feature descriptors can be matched through the fully-connected layer. result.

需要说明的是,目标全连接层与目标网络组成了神经网络,在本方案中就是通过神经网络中的目标网络得到待验证图像与预存图像的特征描述子,并将它们的特征描述子通过目标全连接层进行匹配得到匹配结果,根据匹配结果验证用户的身份。It should be noted that the target fully connected layer and the target network form a neural network. In this scheme, the target network in the neural network is used to obtain the feature descriptors of the image to be verified and the pre-stored image, and their feature descriptors are passed through the target. The full connection layer performs matching to obtain the matching result, and verifies the identity of the user according to the matching result.

待验证图像预处理模块503,用于利用预存图像的尺寸对待验证图像预处理得到目标待验证图像。The to-be-verified image preprocessing module 503 is configured to preprocess the to-be-verified image by using the size of the pre-stored image to obtain the target to-be-verified image.

具体地,待验证图像预处理模块503确定预存图像的尺寸,将待验证图像的尺寸处理为与预存图像相同的尺寸,并进行人脸部分截取、灰度化等操作,使进行过预处理的待验证图像符合条件,可以进行后续的验证操作。Specifically, the to-be-verified image preprocessing module 503 determines the size of the pre-stored image, processes the size of the to-be-verified image to be the same size as the pre-stored image, and performs operations such as face part interception, grayscale, etc. If the image to be verified meets the conditions, subsequent verification operations can be performed.

分块模块504,用于利用预存图像块的总数对所述目标待验证图像进行遍历分块得到目标待验证图像块,其中所述目标待验证图像块的总数与所述预存图像块的总数相同。Blocking module 504, configured to traverse and block the target image to be verified by using the total number of pre-stored image blocks to obtain target image blocks to be verified, wherein the total number of target image blocks to be verified is the same as the total number of pre-stored image blocks .

具体地,分块模块504确定预存图像分为了多少块预存图像块,并将目标待验证图像进行遍历分块,分成同样块数的目标待验证图像块。Specifically, the block module 504 determines how many pre-stored image blocks the pre-stored image is divided into, and traverses the target image to be verified into blocks to divide the target image to be verified into the same number of blocks.

相似度计算模块505,用于将所述预存图像块与所述目标待验证图像块送入所述目标网络与目标全连接层得到所述预存图像与所述待验证图像的相似度。The similarity calculation module 505 is configured to send the pre-stored image block and the target image block to be verified into the target network and the target full connection layer to obtain the similarity between the pre-stored image and the to-be-verified image.

具体地,相似度计算模块505逐块地将每一块预存图像块与对应的每一块目标待验证图像块送入目标网络,得到每一块预存图像块的特征描述子,与每一块目标待验证图像块的特征描述子,并将对应的两种图像的图像块的特征描述子送入全连接层,得到对应的每一组图像块的匹配结果,可以根据匹配成功的图像块数与总块数的比例计算得出预存图像与待验证图像的相似度。Specifically, the similarity calculation module 505 sends each pre-stored image block and each corresponding target to-be-verified image block into the target network block by block, and obtains the feature descriptor of each pre-stored image block, which is associated with each target to-be-verified image block. The feature descriptor of the block, and the feature descriptor of the corresponding image blocks of the two images is sent to the fully connected layer, and the matching results of each group of image blocks corresponding to the corresponding image blocks can be obtained. Calculate the similarity between the pre-stored image and the image to be verified.

验证模块506,用于利用所述相似度验证所述待验证图像是否合法。A verification module 506, configured to use the similarity to verify whether the image to be verified is legal.

具体地,验证模块506判断相似度是否大于预设的一个阈值,也就是是否符合合法的条件,如果是,那么验证通过,如果否那么验证不通过,用户不合法。Specifically, the verification module 506 determines whether the similarity is greater than a preset threshold, that is, whether it meets a legal condition, and if so, the verification is passed; if not, the verification fails, and the user is illegal.

通过以上方案可知,本发明提供的一种基于L1范数神经网络的身份验证方法,目标网络获取模块501与目标全连接层获取模块502利用L1范数的代价函数与测试样本的特征描述子得到目标网络和目标全连接层后,相似度计算模块505将待验证图像与测试图像利用目标网络和目标全连接层进行匹配,最终得到两个图像的相似度,验证模块506根据待验证图像与预存图像的相似度判断当前用户是否合法。由于基于LI范数的代价函数得到的目标网络中的参数是确定的,每次验证时不会根据测试图像的不同再重新定义参数,因此在下次匹配时,匹配速度快,耗时很少,同时,基于L1范数的代价函数确定的目标网络为深度学习的目标网络,因此有很强大的学习能力,能够充分地学习到测试图像特征信息,因此准确度很高。It can be seen from the above solutions that in an authentication method based on an L1 norm neural network provided by the present invention, the target network acquisition module 501 and the target fully connected layer acquisition module 502 use the cost function of the L1 norm and the feature descriptor of the test sample to obtain After the target network and the target fully connected layer, the similarity calculation module 505 uses the target network and the target fully connected layer to match the image to be verified and the test image, and finally obtains the similarity of the two images. The similarity of the images determines whether the current user is legitimate. Since the parameters in the target network obtained by the cost function based on the LI norm are deterministic, the parameters will not be redefined according to the different test images during each verification, so the next time the matching is performed, the matching speed is fast and the time-consuming is very small. At the same time, the target network determined by the cost function based on the L1 norm is the target network of deep learning, so it has a strong learning ability and can fully learn the feature information of the test image, so the accuracy is high.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证装置,区别于上一实施例本发明实施例对上述实施例中目标网络获取模块501作了具体的限定与说明,其他内容与上一实施例大致相同,此处不再赘述。具体地,目标网络获取模块501包括:The embodiment of the present invention provides a specific authentication device based on the L1 norm neural network. Different from the previous embodiment, the embodiment of the present invention specifically defines and describes the target network acquisition module 501 in the above embodiment, and other content It is substantially the same as the previous embodiment and will not be repeated here. Specifically, the target network acquisition module 501 includes:

特征描述子获取单元,用于将测试样本输入初始网络,得到测试样本的特征描述子。The feature descriptor obtaining unit is used to input the test sample into the initial network to obtain the feature descriptor of the test sample.

具体地,特征描述子获取单元将毛孔训练样本作为测试样本输入到初始网络,经过多层卷积、归一操作,得到毛孔尺度的特征描述子。Specifically, the feature descriptor acquisition unit inputs the pore training sample as a test sample into the initial network, and obtains the feature descriptor of the pore scale through multi-layer convolution and normalization operations.

目标网络训练单元,用于利用所述特征描述子最小化基于L1范数的代价函数,训练得到目标网络。The target network training unit is configured to use the feature descriptor to minimize the cost function based on the L1 norm, and train to obtain the target network.

具体地,定义

Figure BDA0001368141820000121
为LRN层(局部响应归一层)输出的第一图像分块后的第i块区域图像的128维毛孔尺度特征描述子;
Figure BDA0001368141820000122
为LRN层输出的第二图像分块后的第i块区域图像的128维毛孔尺度特征描述子。Specifically, define
Figure BDA0001368141820000121
It is the 128-dimensional pore scale feature descriptor of the image of the ith block of the first image after the LRN layer (local response normalization layer) output;
Figure BDA0001368141820000122
It is the 128-dimensional pore-scale feature descriptor of the i-th block region image after the second image output by the LRN layer.

定义基于L1范数的匹配对的特征描述子的距离

Figure BDA0001368141820000123
|| ||1表示L1范数。Define the distance of feature descriptors for matching pairs based on L1 norm
Figure BDA0001368141820000123
|| || 1 means L1 norm.

定义特征描述子的列相似度

Figure BDA0001368141820000124
行相似度
Figure BDA0001368141820000125
则代价函数为
Figure BDA0001368141820000126
Define the column similarity of feature descriptors
Figure BDA0001368141820000124
row similarity
Figure BDA0001368141820000125
Then the cost function is
Figure BDA0001368141820000126

需要说明的是,第一图像为待测试图像,第二图像为待匹配图像。在测试样本中,包括两种图像样本,一个是待测试样本图像作为第一图像,另一个是待匹配测试图像作为第二图像。在下述步骤进行验证时,待验证图像为第一图像,预存图像为第二图像。It should be noted that the first image is an image to be tested, and the second image is an image to be matched. In the test sample, two kinds of image samples are included, one is the image of the sample to be tested as the first image, and the other is the test image to be matched as the second image. During verification in the following steps, the image to be verified is the first image, and the pre-stored image is the second image.

在训练过程中,会不断地产生特征描述子,目标网络训练单元利用特征描述子以最小化代价函数为手段,确定出目标特征描述子生成网络的参数,确定参数后,目标网络训练完成。During the training process, feature descriptors are continuously generated. The target network training unit uses the feature descriptors to minimize the cost function to determine the parameters of the target feature descriptor generation network. After the parameters are determined, the target network training is completed.

由此可见,在本方案中目标网络的参数在训练时已确定,在利用目标网络进行验证时参数不会再改变,因此耗费时间极少,同时深度学习的神经网络具有很强大的学习能力,能够充分地学习到毛孔尺寸特征的信息,因此准确度高。It can be seen that in this scheme, the parameters of the target network have been determined during training, and the parameters will not be changed when the target network is used for verification, so it takes very little time, and the deep learning neural network has a strong learning ability. The information of the pore size feature can be fully learned, so the accuracy is high.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证装置,区别于上一实施例本发明实施例对上述实施例中目标全连接层获取模块502作了具体的限定与说明,其他内容与上一实施例大致相同,此处不再赘述。具体地,目标全连接层获取模块502包括:The embodiment of the present invention provides a specific authentication device based on the L1 norm neural network. Different from the previous embodiment, the embodiment of the present invention specifically defines and describes the target fully connected layer acquisition module 502 in the above embodiment. Other contents are substantially the same as those in the previous embodiment, and are not repeated here. Specifically, the target fully connected layer acquisition module 502 includes:

第一匹配结果获取单元,用于利用初始全连接层得到所述特征描述子的匹配结果;a first matching result obtaining unit, used for obtaining the matching result of the feature descriptor by using the initial fully connected layer;

目标全连接层训练单元,用于利用所述匹配结果与测试样本标签的差值,训练得到目标全连接层。The target fully-connected layer training unit is configured to use the difference between the matching result and the test sample label to train to obtain the target fully-connected layer.

具体地,第一匹配结果获取单元将特征描述子通过全连接层得到匹配结果,目标全连接层训练单元最小化匹配结果和测试样本标签的差值,训练得到目标全连接层。Specifically, the first matching result obtaining unit obtains the matching result by passing the feature descriptor through the fully connected layer, and the target fully connected layer training unit minimizes the difference between the matching result and the test sample label, and trains to obtain the target fully connected layer.

需要说明的是,匹配结果就是测试样本中待测试样本图像和一个待匹配测试图像的匹配结果,待测试样本图像和待匹配测试图像可以是整张图像,也可以是切块后的图像,在本方案中是切块后的图像。测试样本的标签为已知的毛孔训练样本中待测试样本图像和一个待匹配测试图像的预定匹配结果。It should be noted that the matching result is the matching result of the sample image to be tested and a test image to be matched in the test sample. The sample image to be tested and the test image to be matched can be the whole image or the image after dicing. In this scheme, it is the image after dicing. The label of the test sample is the predetermined matching result of the sample image to be tested and a test image to be matched in the known pore training sample.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证装置,区别于上一实施例本发明实施例对上述实施例中相似度计算模块505作了具体的限定与说明,其他步骤内容与上一实施例大致相同,此处不再赘述。具体地,相似度计算模块505包括:The embodiment of the present invention provides a specific identity verification device based on the L1 norm neural network. Different from the previous embodiment, the embodiment of the present invention specifically defines and describes the similarity calculation module 505 in the above embodiment, and other steps are The content is substantially the same as that of the previous embodiment, and will not be repeated here. Specifically, the similarity calculation module 505 includes:

匹配对特征描述子获取单元601,将每一块未匹配的目标待验证图像块与对应的未匹配的预存图像块作为一个待匹配对,利用所述目标网络得到每一个待匹配对的第一特征描述子与第二特征描述子。The matching pair feature descriptor acquisition unit 601 takes each unmatched target to-be-verified image block and the corresponding unmatched pre-stored image block as a to-be-matched pair, and uses the target network to obtain the first feature of each to-be-matched pair descriptor and the second feature descriptor.

具体地,目标待验证图像块与预存图像都被遍历分块为了多个图像块,其中,每一块目标待验证图像块对应一块预存图像块,对应的一块没进行匹配过的目标待验证图像块与一块没进行匹配过的预存图像块作为一个待匹配对,准备匹配。匹配对特征描述子获取单元601将一个待匹配对送入目标网络,既可以获得待匹配对的特征描述子,也就是目标待验证图像块的特征描述子与预存图像块的特征描述子,其中目标待验证图像块的特征描述子作为第一特征描述子,预存图像块的特征描述子作为第二特征描述子。Specifically, both the target to-be-verified image block and the pre-stored image are traversed and divided into multiple image blocks, wherein each target to-be-verified image block corresponds to a pre-stored image block, and a corresponding target to-be-verified image block that has not been matched A pre-stored image block that has not been matched is used as a pair to be matched, ready to be matched. The matching pair feature descriptor obtaining unit 601 sends a pair to be matched into the target network, so as to obtain the feature descriptor of the pair to be matched, that is, the feature descriptor of the target image block to be verified and the feature descriptor of the pre-stored image block, wherein The feature descriptor of the target image block to be verified is used as the first feature descriptor, and the feature descriptor of the pre-stored image block is used as the second feature descriptor.

需要说明的是,遍历分块操作具体为以下步骤:It should be noted that the traversal block operation is as follows:

首先确定预存图像为多少块预存图像块,将目标待验证图像处理为同样的块数,根据块数与待验证图像的尺寸,确定目标待验证图像块的尺寸。利用目标待验证图像块的尺寸,不重叠地遍历目标待验证图像,并舍去多余的边缘。First, determine how many pre-stored image blocks the pre-stored image is, process the target to-be-verified image into the same number of blocks, and determine the size of the target to-be-verified image block according to the number of blocks and the size of the to-be-verified image. Using the size of the target image block to be verified, the target image to be verified is traversed without overlapping, and redundant edges are discarded.

第二匹配结果获取单元602,用于将每一个待匹配对的第一特征描述子与第二特征描述子利用目标全连接层得到每一个待匹配对的匹配结果。The second matching result obtaining unit 602 is configured to obtain the matching result of each to-be-matched pair by using the target fully connected layer of the first feature descriptor and the second feature descriptor of each to-be-matched pair.

具体地,第二匹配结果获取单元602将第一特征描述子和第二特征描述子送入目标全连接层,得到第一特征描述子和第二特征描述子的匹配结果,也就是判断对应的匹配对中的目标待验证图像块与预测图像块是否匹配。Specifically, the second matching result obtaining unit 602 sends the first feature descriptor and the second feature descriptor into the target fully connected layer, and obtains the matching result of the first feature descriptor and the second feature descriptor, that is, determines the corresponding The target to-be-verified image block in the matching pair matches the predicted image block.

统计单元603,用于统计匹配成功的待匹配对成功总数,将所述待匹配对成功总数与所有待匹配对的总数的比例作为相似度。The counting unit 603 is configured to count the total number of successful pairs to be matched that are successfully matched, and use the ratio of the total number of successful pairs to be matched to the total number of all pairs to be matched as the similarity.

具体地,统计单元603将每一块目标待验证图像块对应每一块预存图像块组成的所有匹配对均通过目标网络和目标全连接层进行匹配后,统计所有匹配成功的图像块数,将所有匹配成功的图像块数于所有图像块数的比例作为此次验证的目标待验证图像与预测图像的相似度。验证模块506判断这个相似度是否大于一个阈值,例如2/3,如果大于等于2/3,那么验证通过,当前用户合法,如果小于2/3,那么验证不通过,当前用户不合法,可以给出相应的提示。也就是说如果待验证图像中的图像块与预存图像中的图像块匹配成功的总数量大于等于两个图像所所有图像块总数量的2/3,那么就可以确定当前用户为合法。需要说明的是,待验证图像为用户验证身份时的用户图像。Specifically, the statistics unit 603 counts the number of all successfully matched image blocks after matching all matching pairs composed of each target image block to be verified corresponding to each pre-stored image block through the target network and the target fully-connected layer, and counts all matched image blocks. The ratio of the number of successful image blocks to the number of all image blocks is used as the similarity between the image to be verified and the predicted image. The verification module 506 judges whether the similarity is greater than a threshold, such as 2/3, if it is greater than or equal to 2/3, then the verification is passed, and the current user is legal; corresponding prompt. That is to say, if the total number of image blocks in the image to be verified and the image blocks in the pre-stored image are successfully matched is greater than or equal to 2/3 of the total number of image blocks in the two images, then the current user can be determined to be legitimate. It should be noted that the image to be authenticated is the image of the user when the user authenticates the identity.

本发明实施例提供一种具体的基于L1范数神经网络的身份验证装置,区别于上一实施例本发明实施例对上述实施例中待验证图像预处理模块503作了具体的限定与说明,其他内容与上一实施例大致相同,此处不再赘述。具体地,待验证图像预处理模块503包括:The embodiment of the present invention provides a specific identity verification device based on the L1 norm neural network. Different from the previous embodiment, the embodiment of the present invention specifically defines and describes the image preprocessing module 503 to be verified in the above embodiment. Other contents are substantially the same as those in the previous embodiment, and are not repeated here. Specifically, the image preprocessing module 503 to be verified includes:

灰度处理单元,用于将所述待验证图像的人脸部分图像截取,并进行灰度化处理,得到灰度待验证图像;a grayscale processing unit, configured to intercept the face part image of the image to be verified, and perform grayscale processing to obtain a grayscale image to be verified;

缩放单元,用于将所述灰度待验证图像缩放至预存图像的尺寸,得到目标待验证图像。The scaling unit is used for scaling the grayscale image to be verified to the size of the pre-stored image to obtain the target image to be verified.

具体地,灰度处理单元首先对待验证图像进行人脸检测,定位人脸并截取出人脸部分图像,对截取后的人脸部分图像进行灰度化处理,得到灰度图像,根据检索的环境,预设一个图像尺寸,缩放单元将灰度人脸图像缩放至预设尺寸,进行以上预处理后,就可以得到目标待验证图像。Specifically, the grayscale processing unit first performs face detection on the image to be verified, locates the face, and intercepts part of the face image, and performs grayscale processing on the intercepted part of the face image to obtain a grayscale image. According to the retrieval environment , preset an image size, the scaling unit scales the grayscale face image to the preset size, and after the above preprocessing, the target image to be verified can be obtained.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. An identity authentication method based on an L1 norm neural network is characterized by comprising the following steps:
obtaining a target network by using a feature descriptor of a test sample and a cost function based on an L1 norm; parameters in the target network obtained based on the cost function of the LI norm are determined, and the parameters cannot be redefined according to different test samples during verification each time;
obtaining a target full-connection layer by using the feature descriptors and the initial full-connection layer;
preprocessing an image to be verified by using the size of a prestored image to obtain a target image to be verified;
traversing and blocking the target image to be verified by using the total number of prestored image blocks to obtain the target image block to be verified, wherein the total number of the target image block to be verified is the same as the total number of the prestored image blocks;
sending the pre-stored image block and the target image block to be verified into the target network and target full-connection layer to obtain the similarity between the pre-stored image and the image to be verified;
verifying whether the image to be verified is legal or not by utilizing the similarity;
the obtaining of the target network by using the feature descriptors of the test samples and the cost function based on the L1 norm includes: inputting a test sample into an initial network to obtain a feature descriptor of the test sample; and training to obtain a target network by using the feature descriptor to minimize a cost function based on the L1 norm.
2. The identity authentication method according to claim 1, wherein the obtaining a target fully-connected layer by using the feature descriptor and an initial fully-connected layer comprises:
obtaining a matching result of the feature descriptors by using the initial full connection layer;
and training to obtain a target full-connection layer by using the difference value between the matching result and the test sample label.
3. The identity authentication method according to claim 2, wherein the pre-stored image block and the target image block to be authenticated obtain a similarity between the pre-stored image and the image to be authenticated by using the target network and a target full connectivity layer, comprising:
each unmatched target image block to be verified and the corresponding unmatched prestored image block are used as a pair to be matched, and a first feature descriptor and a second feature descriptor of each pair to be matched are obtained by using the target network;
obtaining the matching result of each pair to be matched by using the first characteristic descriptor and the second characteristic descriptor of each pair to be matched through the target full connection layer;
and counting the successful total number of the successfully matched pairs to be matched, and taking the ratio of the successful total number of the pairs to be matched and the total number of all the pairs to be matched as the similarity.
4. The identity authentication method according to any one of claims 1 to 3, wherein the preprocessing the image to be authenticated by using the size of the pre-stored image to obtain the target image to be authenticated comprises:
intercepting the face part image of the image to be verified, and carrying out graying processing to obtain a gray image to be verified;
and zooming the gray-scale image to be verified to the size of a prestored image to obtain a target image to be verified.
5. An identity authentication device based on an L1 norm neural network, comprising:
the target network acquisition module is used for acquiring a target network by utilizing a feature descriptor of a test sample and a cost function based on an L1 norm; parameters in the target network obtained based on the cost function of the LI norm are determined, and the parameters cannot be redefined according to different test samples during verification each time;
the target full-connection layer acquisition module is used for acquiring a target full-connection layer by using the feature descriptor and the initial full-connection layer;
the image to be verified preprocessing module is used for preprocessing the image to be verified by utilizing the size of the prestored image to obtain a target image to be verified;
the blocking module is used for traversing and blocking the target image to be verified by utilizing the total number of prestored image blocks to obtain the target image block to be verified, wherein the total number of the target image block to be verified is the same as that of the prestored image blocks;
the similarity calculation module is used for sending the pre-stored image blocks and the target image blocks to be verified into the target network and target full-connection layer to obtain the similarity between the pre-stored image and the image to be verified;
the verification module is used for verifying whether the image to be verified is legal or not by utilizing the similarity;
wherein, the target network acquisition module includes:
the characteristic descriptor acquisition unit is used for inputting the test sample into the initial network to obtain a characteristic descriptor of the test sample;
and the target network training unit is used for utilizing the feature descriptor to minimize a cost function based on the L1 norm so as to train and obtain a target network.
6. The identity authentication device of claim 5, wherein the target fully-connected layer acquisition module comprises:
the first matching result acquisition unit is used for acquiring the matching result of the feature descriptor by utilizing the initial full-connection layer;
and the target full-connection layer training unit is used for training to obtain a target full-connection layer by utilizing the difference value between the matching result and the test sample label.
7. The authentication apparatus according to claim 6, wherein the similarity calculation module comprises:
a matching pair feature descriptor acquisition unit, which takes each unmatched target image block to be verified and the corresponding unmatched prestored image block as a pair to be matched and utilizes the target network to obtain a first feature descriptor and a second feature descriptor of each pair to be matched;
the second matching result acquisition unit is used for acquiring the matching result of each pair to be matched by using the first feature descriptor and the second feature descriptor of each pair to be matched through the target full-connection layer;
and the counting unit is used for counting the total successful number of the pairs to be matched, which are successfully matched, and taking the ratio of the total successful number of the pairs to be matched to the total number of all the pairs to be matched as the similarity.
8. The identity authentication device according to any one of claims 5 to 7, wherein the image to be authenticated preprocessing module comprises:
the gray processing unit is used for intercepting the face partial image of the image to be verified and carrying out gray processing to obtain a gray image to be verified;
and the scaling unit is used for scaling the gray-scale image to be verified to the size of a pre-stored image to obtain a target image to be verified.
CN201710651409.3A 2017-08-02 2017-08-02 Identity verification method and device based on L1 norm neural network Expired - Fee Related CN107391996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710651409.3A CN107391996B (en) 2017-08-02 2017-08-02 Identity verification method and device based on L1 norm neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710651409.3A CN107391996B (en) 2017-08-02 2017-08-02 Identity verification method and device based on L1 norm neural network

Publications (2)

Publication Number Publication Date
CN107391996A CN107391996A (en) 2017-11-24
CN107391996B true CN107391996B (en) 2021-01-26

Family

ID=60343363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710651409.3A Expired - Fee Related CN107391996B (en) 2017-08-02 2017-08-02 Identity verification method and device based on L1 norm neural network

Country Status (1)

Country Link
CN (1) CN107391996B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950550B (en) * 2021-02-04 2023-11-14 广州中医药大学第一附属医院 A method for image classification of type 2 diabetic kidney lesions based on deep learning

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114909B (en) * 2007-08-17 2011-02-16 上海博康智能信息技术有限公司 Full-automatic video identification authentication system and method
WO2011113478A1 (en) * 2010-03-16 2011-09-22 Carlo Trugenberger Authentication system, method for authenticating an object, apparatus for producing an identication device, method for producing an identification device
CN102799870B (en) * 2012-07-13 2015-07-29 复旦大学 Based on the single training image per person method of the consistent LBP of piecemeal and sparse coding
CN104484684B (en) * 2015-01-05 2018-11-02 苏州大学 A kind of Manuscripted Characters Identification Method and system
CN105760821B (en) * 2016-01-31 2017-06-06 中国石油大学(华东) The face identification method of the grouped accumulation rarefaction representation based on nuclear space
CN106778613A (en) * 2016-12-16 2017-05-31 广东工业大学 An identity verification method and device based on face segmentation area matching
CN106780906B (en) * 2016-12-28 2019-06-21 北京品恩科技股份有限公司 A kind of testimony of a witness unification recognition methods and system based on depth convolutional neural networks

Also Published As

Publication number Publication date
CN107391996A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
US10579784B2 (en) System, device, and method of secure utilization of fingerprints for user authentication
Yang et al. BehaveSense: Continuous authentication for security-sensitive mobile apps using behavioral biometrics
Holz et al. Bodyprint: Biometric user identification on mobile devices using the capacitive touchscreen to scan body parts
KR101755995B1 (en) Method and system for feature vector based remote biometric verification using homomorphic encryption
US8550339B1 (en) Utilization of digit sequences for biometric authentication
US10990805B2 (en) Hybrid mode illumination for facial recognition authentication
US9202035B1 (en) User authentication based on biometric handwriting aspects of a handwritten code
US20150188913A1 (en) Method and apparatus for providing client-side score-based authentication
KR20170025802A (en) Method and apparatus for authentication based on fingerprint recognition
US20220164423A1 (en) Method and apparatus for user recognition
CN108288012A (en) A kind of art work realized based on mobile phone is put on record verification method and its system
US9792421B1 (en) Secure storage of fingerprint related elements
US11361058B2 (en) Method used in a mobile equipment with a trusted execution environment for authenticating a user based on his face
US20180247105A1 (en) High speed reference point independent database filtering for fingerprint identification
CN113051998A (en) Robust anti-spoofing technique using polarization cues in the near-infrared and visible wavelength bands for biomarkers
US20200387589A1 (en) Method and electronic device for authenticating a user
CN111241873A (en) Image reproduction detection method, training method of model thereof, payment method and payment device
Buriro et al. SWIPEGAN: swiping data augmentation using generative adversarial networks for smartphone user authentication
Alshanketi et al. Multimodal mobile keystroke dynamics biometrics combining fixed and variable passwords
CN107317805A (en) One kind checking code verification method and device
CN107391996B (en) Identity verification method and device based on L1 norm neural network
WO2010028517A1 (en) System and method for generating/ identifying cipher code via artificial neural network
CN113313034B (en) Face recognition method and device, electronic equipment and storage medium
WO2019245437A1 (en) Method and electronic device for authenticating a user
US20200184056A1 (en) Method and electronic device for authenticating a user

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210126