CN108446660A - The method and apparatus of facial image for identification - Google Patents
The method and apparatus of facial image for identification Download PDFInfo
- Publication number
- CN108446660A CN108446660A CN201810271618.XA CN201810271618A CN108446660A CN 108446660 A CN108446660 A CN 108446660A CN 201810271618 A CN201810271618 A CN 201810271618A CN 108446660 A CN108446660 A CN 108446660A
- Authority
- CN
- China
- Prior art keywords
- similarity
- face
- feature vector
- groups
- pair
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/30—Scenes; Scene-specific elements in albums, collections or shared content, e.g. social network photos or video
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
本申请实施例公开了一种用于识别人脸图像的方法和装置。方法的一个具体实施方式包括:从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列;将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量;从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。该方法能够提高识别多张人脸图像中的人脸是否为同一张人脸的效率。
The embodiment of the present application discloses a method and device for recognizing a human face image. A specific implementation of the method includes: respectively acquiring image sequences of key parts from two face images to obtain two sets of image sequences of key parts; respectively inputting the two sets of image sequences of key parts into the convolutional layer of the convolutional neural network to obtain two sets of image sequences of key parts. Group eigenvectors; read a corresponding pair of eigenvectors from two groups of eigenvectors, and calculate the similarity of the pair of eigenvectors; based on the similarity of the pair of eigenvectors, determine whether the faces in the two face images are The same face. The method can improve the efficiency of identifying whether the faces in multiple face images are the same face.
Description
技术领域technical field
本申请涉及计算机技术领域,具体涉及计算机网络技术领域,尤其涉及用于识别人脸图像的方法和装置。The present application relates to the field of computer technology, in particular to the field of computer network technology, and in particular to a method and device for recognizing human face images.
背景技术Background technique
人脸识别,是基于人的脸部特征信息进行身份识别的一种生物识别技术。用摄像机或摄像头采集含有人脸的图像或视频流,并自动在图像中检测和跟踪人脸,进而对检测到的人脸进行脸部的图像预处理、图像特征提取以及匹配与识别等一系列相关技术,通常也叫做人像识别或面部识别。Face recognition is a biometric technology for identification based on human facial feature information. Use a camera or camera to collect images or video streams containing faces, and automatically detect and track faces in the images, and then perform a series of face image preprocessing, image feature extraction, matching and recognition on the detected faces Related technologies are also commonly called portrait recognition or facial recognition.
目前的人脸识别方法,在识别两张人脸图像中的人脸是否为同一张人脸时,会分别对两张人脸图像进行处理。处理过程包括:在图形特征提取时定位到人脸上的多个(如88或68个)关键点,进而通过将这些关键点输入机器学习模型来提取人脸特征。之后,若提取的人脸特征的相似度的加权和大于预定阈值,确定两张人脸图像中的人脸为同一张人脸。In the current face recognition method, when identifying whether the faces in the two face images are the same face, the two face images will be processed separately. The processing process includes: locating multiple (such as 88 or 68) key points on the human face during graphic feature extraction, and then extracting human face features by inputting these key points into the machine learning model. Afterwards, if the weighted sum of the similarities of the extracted face features is greater than a predetermined threshold, it is determined that the faces in the two face images are the same face.
发明内容Contents of the invention
本申请实施例提出一种用于识别人脸图像的方法和装置。Embodiments of the present application propose a method and device for recognizing a human face image.
第一方面,本申请实施例提供了一种用于识别人脸图像的方法,包括:从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列;将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量;从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。In the first aspect, the embodiment of the present application provides a method for recognizing human face images, including: respectively obtaining key part image sequences from two human face images to obtain two sets of key part image sequences; The image sequence is respectively input into the convolutional layer of the convolutional neural network to obtain two sets of feature vectors; read the corresponding pair of feature vectors from the two sets of feature vectors, and calculate the similarity of the pair of feature vectors; based on the pair of feature vectors Similarity, to determine whether the faces in two face images are the same face.
在一些实施例中,基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸包括:响应于该对特征向量的相似度小于预设相似度阈值,确定两张人脸图像中的人脸并非同一张人脸。In some embodiments, based on the similarity of the pair of feature vectors, determining whether the faces in the two face images are the same face includes: in response to the similarity of the pair of feature vectors being less than a preset similarity threshold, determining The faces in the two face images are not the same face.
在一些实施例中,基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸还包括:响应于该对特征向量的相似度大于预设相似度阈值且该对特征向量并非两组特征向量中的最后一对特征向量,跳转至从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。In some embodiments, based on the similarity of the pair of feature vectors, determining whether the faces in the two face images are the same face further includes: in response to the similarity of the pair of feature vectors being greater than a preset similarity threshold and The pair of eigenvectors is not the last pair of eigenvectors in the two groups of eigenvectors, jump to read the corresponding pair of eigenvectors from the two groups of eigenvectors, and calculate the similarity of the pair of eigenvectors; based on the pair of eigenvectors to determine whether the faces in the two face images are the same face.
在一些实施例中,基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸还包括:响应于该对特征向量的相似度大于预设相似度阈值且该对特征向量为两组特征向量中的最后一对特征向量,确定两张人脸图像中的人脸为同一张人脸。In some embodiments, based on the similarity of the pair of feature vectors, determining whether the faces in the two face images are the same face further includes: in response to the similarity of the pair of feature vectors being greater than a preset similarity threshold and The pair of feature vectors is the last pair of feature vectors in the two groups of feature vectors, and it is determined that the faces in the two face images are the same face.
在一些实施例中,关键部位图像序列中的关键部位包括:左眼、右眼、鼻子、左嘴角和右嘴角。In some embodiments, the key parts in the key part image sequence include: left eye, right eye, nose, left corner of mouth and right corner of mouth.
在一些实施例中,计算该对特征向量的相似度包括计算该对特征向量的以下任意一项:皮尔逊相关系数、欧氏距离、余弦相似度、曼哈顿距离和切比雪夫距离。In some embodiments, calculating the similarity of the pair of eigenvectors includes calculating any one of the following of the pair of eigenvectors: Pearson correlation coefficient, Euclidean distance, cosine similarity, Manhattan distance and Chebyshev distance.
第二方面,本申请实施例提供了一种用于识别人脸图像的装置,包括:图像序列获取单元,用于从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列;特征向量获取单元,用于将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量;相似度计算单元,用于从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;相同人脸确定单元,用于基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。In the second aspect, the embodiment of the present application provides a device for recognizing human face images, including: an image sequence acquisition unit, which is used to obtain key part image sequences from two human face images respectively, and obtain two sets of key part images sequence; the feature vector acquisition unit is used to input two sets of key part image sequences into the convolutional layer of the convolutional neural network respectively to obtain two sets of feature vectors; the similarity calculation unit is used to read the corresponding A pair of eigenvectors, calculating the similarity of the pair of eigenvectors; the same face determination unit is used to determine whether the faces in the two face images are the same face based on the similarity of the pair of eigenvectors.
在一些实施例中,相同人脸确定单元进一步用于:响应于该对特征向量的相似度小于预设相似度阈值,确定两张人脸图像中的人脸并非同一张人脸。In some embodiments, the same face determining unit is further configured to: determine that the faces in the two face images are not the same face in response to the similarity between the pair of feature vectors being less than a preset similarity threshold.
在一些实施例中,相同人脸确定单元进一步用于:响应于该对特征向量的相似度大于预设相似度阈值且该对特征向量并非两组特征向量中的最后一对特征向量,跳转至从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。In some embodiments, the same face determination unit is further configured to: in response to the similarity of the pair of feature vectors being greater than a preset similarity threshold and the pair of feature vectors being not the last pair of feature vectors in the two groups of feature vectors, jumping To read the corresponding pair of feature vectors from the two sets of feature vectors, calculate the similarity of the pair of feature vectors; based on the similarity of the pair of feature vectors, determine whether the faces in the two face images are the same person Face.
在一些实施例中,相同人脸确定单元进一步用于:响应于该对特征向量的相似度大于预设相似度阈值且该对特征向量为两组特征向量中的最后一对特征向量,确定两张人脸图像中的人脸为同一张人脸。In some embodiments, the same face determining unit is further used for: in response to the similarity of the pair of feature vectors being greater than a preset similarity threshold and the pair of feature vectors being the last pair of feature vectors in the two groups of feature vectors, determine two The faces in the face images are the same face.
在一些实施例中,图像序列获取单元中的关键部位图像序列中的关键部位包括:左眼、右眼、鼻子、左嘴角和右嘴角。In some embodiments, the key parts in the image sequence acquisition unit The key parts in the image sequence include: left eye, right eye, nose, left corner of mouth and right corner of mouth.
在一些实施例中,相似度计算单元中计算该对特征向量的相似度包括计算该对特征向量的以下任意一项:皮尔逊相关系数、欧氏距离、余弦相似度、曼哈顿距离和切比雪夫距离。In some embodiments, calculating the similarity of the pair of feature vectors in the similarity calculation unit includes calculating any of the following of the pair of feature vectors: Pearson correlation coefficient, Euclidean distance, cosine similarity, Manhattan distance and Chebyshev distance.
第三方面,本申请实施例提供了一种设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如上任一所述的一种用于识别人脸图像的方法。In a third aspect, the embodiment of the present application provides a device, including: one or more processors; a storage device for storing one or more programs; when one or more programs are executed by one or more processors, Make one or more processors realize the method for recognizing a human face image as described above.
第四方面,本申请实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如上任一所述的一种用于识别人脸图像的方法。In a fourth aspect, the embodiment of the present application provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method for recognizing a face image as described above is implemented.
本申请实施例提供的用于识别人脸图像的方法和装置,首先从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列;之后,将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量;之后,从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;最后,基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。在这一过程中,基于读取的一对特征向量的相似度是否小于相似度阈值,可以快速确定读取的一对特征向量对应的关键部位图像是否相似度较高,从而确定两张人脸图像中的人脸是否为同一张人脸,因此,该用于识别人脸图像的方法提高了识别人脸图像中同一人脸的效率。In the method and device for recognizing human face images provided in the embodiments of the present application, firstly, the image sequences of key parts are respectively obtained from two face images to obtain two sets of image sequences of key parts; after that, the two sets of image sequences of key parts are separately Enter the convolutional layer of the convolutional neural network to obtain two sets of feature vectors; then, read the corresponding pair of feature vectors from the two sets of feature vectors, and calculate the similarity of the pair of feature vectors; finally, based on the pair of feature vectors to determine whether the faces in the two face images are the same face. In this process, based on whether the similarity of the read pair of feature vectors is less than the similarity threshold, it can be quickly determined whether the key part images corresponding to the read pair of feature vectors have a high similarity, so as to determine the two faces Whether the human faces in the image are the same human face, therefore, the method for identifying the human face image improves the efficiency of identifying the same human face in the human face image.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1示出了本申请实施例可以应用于其中的示例性系统架构;FIG. 1 shows an exemplary system architecture to which the embodiment of the present application can be applied;
图2是根据本申请实施例的用于识别人脸图像的方法的一个实施例的示意性流程图;Fig. 2 is a schematic flowchart of an embodiment of a method for recognizing a face image according to an embodiment of the present application;
图3是根据本申请实施例的用于识别人脸图像的方法的实施例的示例性应用场景;FIG. 3 is an exemplary application scenario of an embodiment of a method for recognizing a face image according to an embodiment of the present application;
图4是根据本申请实施例的用于识别人脸图像的方法的又一个实施例的示意性流程图;FIG. 4 is a schematic flowchart of another embodiment of a method for recognizing a face image according to an embodiment of the present application;
图5是根据本申请实施例的用于识别人脸图像的装置的一个实施例的示例性结构图;FIG. 5 is an exemplary structural diagram of an embodiment of a device for recognizing a face image according to an embodiment of the present application;
图6是适于用来实现本申请实施例的终端设备或服务器的计算机系统的结构示意图。Fig. 6 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.
请参考图1,图1示出了可以应用本申请的用于识别人脸图像的方法或用于识别人脸图像的装置的实施例的示例性系统架构100。Please refer to FIG. 1 , which shows an exemplary system architecture 100 to which embodiments of the method for recognizing a human face image or the device for recognizing a human face image of the present application can be applied.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105、106。网络104用以在终端设备101、102、103和服务器105、106之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and servers 105 , 106 . The network 104 serves as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the servers 105 , 106 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.
用户110可以使用终端设备101、102、103通过网络104与服务器105、106交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如拍摄类应用、搜索引擎类应用、购物类应用、即时通信工具、邮箱客户端、社交平台软件、视频播放类应用等。The user 110 can use the terminal device 101 , 102 , 103 to interact with the server 105 , 106 through the network 104 to receive or send messages and the like. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as shooting applications, search engine applications, shopping applications, instant messaging tools, email clients, social platform software, video playback applications, etc.
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。The terminal devices 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, laptops and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as a plurality of software or software modules (for example, to provide distributed services), or as a single software or software module. No specific limitation is made here.
服务器105、106可以是提供各种服务的服务器。例如服务器105、106可以是对终端设备101、102、103提供支持的后台服务器。后台服务器可以对终端提交的数据进行分析、存储或计算等处理,并将获得的数据处理结果推送给终端设备。The servers 105, 106 may be servers that provide various services. For example, the servers 105 , 106 may be background servers that provide support for the terminal devices 101 , 102 , 103 . The background server can analyze, store or calculate the data submitted by the terminal, and push the obtained data processing results to the terminal device.
通常情况下,本申请实施例所提供的用于识别人脸图像的方法一般由服务器105、106执行,相应地,用于识别人脸图像的装置一般设置于服务器105、106中。Usually, the method for recognizing a human face image provided by the embodiment of the present application is generally executed by the servers 105 and 106 , and correspondingly, the device for recognizing a human face image is generally set in the servers 105 and 106 .
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
进一步参考图2,图2示出了根据本申请实施例的用于识别人脸图像的方法的一个实施例的示意性流程图。Further referring to FIG. 2 , FIG. 2 shows a schematic flowchart of an embodiment of a method for recognizing a face image according to an embodiment of the present application.
如图2所示,用于识别人脸图像的方法200包括:As shown in FIG. 2, a method 200 for recognizing a face image includes:
在步骤210中,从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列。In step 210, image sequences of key parts are respectively acquired from the two face images to obtain two sets of image sequences of key parts.
在本实施例中,用于识别人脸图像的方法的执行主体(例如图1所示的服务器105、106)可以接收从终端设备(例如图1中所示的终端设备101、102、103)提交的原始采集图像,例如不同位置、不同表情的静态图像、动态图像等。In this embodiment, the execution subject of the method for recognizing a face image (for example, the servers 105, 106 shown in FIG. 1 ) may receive the The submitted original collected images, such as static images and dynamic images of different positions and expressions.
此时的原始采集图像,由于受到各种条件的限制和随机干扰,往往不能直接使用,必须在图像处理的早期阶段对它进行灰度校正、噪声过滤等图像预处理。对于人脸图像而言,其预处理过程主要包括人脸图像的光线补偿、灰度变换、直方图均衡化、归一化、几何校正、滤波以及锐化等。At this time, the original captured image cannot be used directly due to the limitation of various conditions and random interference, and image preprocessing such as grayscale correction and noise filtering must be performed on it in the early stage of image processing. For face images, the preprocessing process mainly includes light compensation, grayscale transformation, histogram equalization, normalization, geometric correction, filtering and sharpening of face images.
在对原始采集图像进行预处理后,可以采用检测算法检测出人脸图像的关键部位,例如眉毛、眼睛、鼻子、嘴巴、耳朵等。之后,上述执行主体可以采用标注算法以关键部位的关键点(例如眉头、眉尾、内眼角、外眼角、瞳孔中心、鼻尖、左嘴角、右嘴角、左耳顶点、右耳顶点等)为中心、以预定尺寸的矩形框标注这些关键部位,并将矩形框中的图像作为关键部位图像。按照获取关键部位图像的顺序,可以得到关键部位图像序列。应当理解,这些采用预定尺寸的矩形框标注的关键部位图像,其中的矩形框中的图像有可能部分重叠。After preprocessing the original collected images, detection algorithms can be used to detect key parts of the face image, such as eyebrows, eyes, nose, mouth, ears, etc. Afterwards, the above-mentioned executive body can use the labeling algorithm to center on the key points of key parts (such as the head of the eyebrow, the tail of the eyebrow, the inner corner of the eye, the outer corner of the eye, the center of the pupil, the tip of the nose, the corner of the left mouth, the corner of the right mouth, the vertex of the left ear, the vertex of the right ear, etc.) 1. Mark these key parts with a rectangular frame of predetermined size, and use the image in the rectangular frame as the image of the key part. According to the order in which the images of the key parts are obtained, an image sequence of the key parts can be obtained. It should be understood that, among the images of key parts marked with rectangular frames of a predetermined size, the images in the rectangular frames may partially overlap.
备选地或附加地,在对原始采集图像进行预处理后,还可以采用检测算法检测出人脸图像的关键部位,例如眉毛、眼睛、鼻子、嘴巴、耳朵等。之后,上述执行主体可以采用标注算法标注这些关键部位的轮廓,并将该轮廓中的图像作为关键部位图像。按照获取关键部位图像的顺序,可以得到关键部位图像序列。例如,若标注关键部位的轮廓的顺序为眼睛、鼻子和嘴巴,那么得到的关键部位图像序列中将依次包括眼睛图像、鼻子图像和嘴巴图像。Alternatively or additionally, after preprocessing the original captured image, a detection algorithm may also be used to detect key parts of the face image, such as eyebrows, eyes, nose, mouth, ears, etc. Afterwards, the above-mentioned executive body may use a labeling algorithm to mark the contours of these key parts, and use the images in the contours as images of key parts. According to the order in which the images of the key parts are obtained, an image sequence of the key parts can be obtained. For example, if the order of marking the contours of key parts is eyes, nose and mouth, then the obtained key part image sequence will include eye images, nose images and mouth images in sequence.
具体地,在一些可选的实现方式中,关键部位图像序列中的关键部位可以包括:左眼、右眼、鼻子、左嘴角和右嘴角。Specifically, in some optional implementation manners, the key parts in the key part image sequence may include: the left eye, the right eye, the nose, the left corner of the mouth, and the right corner of the mouth.
在步骤220中,将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量。In step 220, two sets of image sequences of key parts are respectively input into the convolution layer of the convolutional neural network to obtain two sets of feature vectors.
在本实施例中,将上述从两张人脸图像中分别获取的关键部位图像序列输入预先训练的神经网络中的卷积层,可以得到分别对应各个关键部位图像序列的两组特征向量。例如,若一组关键部位图像序列包括眼睛图像、鼻子图像和嘴巴图像,那么得到的对应该组关键部位图像序列的一组特征向量可以包括:眼睛图像对应的特征向量、鼻子图像对应的特征向量和嘴巴图像对应的特征向量。In this embodiment, the aforementioned image sequences of key parts obtained from the two face images are input into the convolutional layer of the pre-trained neural network, and two sets of feature vectors respectively corresponding to the image sequences of key parts can be obtained. For example, if a set of key part image sequences includes eye images, nose images and mouth images, then the obtained set of feature vectors corresponding to the set of key part image sequences may include: feature vectors corresponding to eye images, feature vectors corresponding to nose images The feature vector corresponding to the mouth image.
这里的卷积层,具有N×N(N为大于1的自然数,例如2或3等)大小的卷积核。假设每一层卷积层进行步长为1的卷积操作,表示卷积核每次向右移动一个像素(当移动到边界时回到最左端并向下移动一个单位)。卷积核的权重是经过学习得到的,并且在卷积过程中卷积核的权重是不会改变的。卷积核的每个单元内有一个权重,也即一个卷积核内有N2个权重。在卷积核移动的过程中,可以将图片上的像素和卷积核的对应权重相乘,最后将所有乘积相加得到一个输出。在这里,可以使用多层卷积层来得到各关键部位更深层次的特征向量,也即提取各关键部位更具有鉴别力的特征。The convolution layer here has a convolution kernel with a size of N×N (N is a natural number greater than 1, such as 2 or 3, etc.). Assuming that each convolutional layer performs a convolution operation with a step size of 1, it means that the convolution kernel moves to the right one pixel at a time (when moving to the boundary, it returns to the leftmost end and moves down by one unit). The weight of the convolution kernel is learned, and the weight of the convolution kernel will not change during the convolution process. There is a weight in each unit of the convolution kernel, that is, there are N 2 weights in a convolution kernel. During the movement of the convolution kernel, the pixels on the picture can be multiplied by the corresponding weights of the convolution kernel, and finally all the products are added to obtain an output. Here, multiple convolutional layers can be used to obtain deeper feature vectors of each key part, that is, to extract more discriminative features of each key part.
在步骤230中,从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度。In step 230, a corresponding pair of feature vectors is read from the two groups of feature vectors, and the similarity of the pair of feature vectors is calculated.
在本实施例中,可以根据两组特征向量中特征向量的排列顺序,从两组特征向量中读取一对相对应的特征向量,之后计算这对特征向量的相似度。在这里,计算相似度的方法可以为现有技术或未来发展的技术中计算相似度的方法,本申请对此不作限定。例如,计算相似度的方法可以通过以下任意一项来完成:皮尔逊相关系数、欧氏距离、余弦相似度、曼哈顿距离和切比雪夫距离等。In this embodiment, a pair of corresponding feature vectors may be read from the two groups of feature vectors according to the arrangement order of the feature vectors in the two groups of feature vectors, and then the similarity of the pair of feature vectors may be calculated. Here, the method for calculating the similarity may be a method for calculating the similarity in the existing technology or a technology developed in the future, which is not limited in the present application. For example, the method of computing similarity can be done by any of the following: Pearson correlation coefficient, Euclidean distance, cosine similarity, Manhattan distance, and Chebyshev distance, etc.
在步骤240中,基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。In step 240, based on the similarity of the pair of feature vectors, it is determined whether the faces in the two face images are the same face.
在本实施例中,根据读取的这一对特征向量的相似度,可以确定两张人脸图像中的人脸是否为同一张人脸。例如,在根据相似度确定两张人脸图像中的人脸是否为同一张人脸时,若当前这对特征向量的相似度低于相似度阈值,表明该对特征向量对应的一对关键部位图像的相似度较低,那么可以确定这两张人脸图像中的人脸并非同一张人脸。若当前这对特征向量的相似度不低于相似度阈值,表明该对特征向量对应的一对关键部位图像的相似度较高,那么可以基于这一结果,确定这两张人脸图像中的人脸是否为同一张人脸。In this embodiment, according to the read similarity of the pair of feature vectors, it can be determined whether the faces in the two face images are the same face. For example, when determining whether the faces in two face images are the same face according to the similarity, if the similarity of the current pair of feature vectors is lower than the similarity threshold, it indicates that a pair of key parts corresponding to the pair of feature vectors If the similarity of the images is low, it can be determined that the faces in the two face images are not the same face. If the similarity of the current pair of feature vectors is not lower than the similarity threshold, it indicates that the similarity of a pair of key part images corresponding to the pair of feature vectors is relatively high, so based on this result, it is possible to determine the Whether the faces are the same face.
本申请上述实施例提供的用于识别人脸图像的方法,可以获取两张人脸图像的关键部位图像序列,之后由每组关键部位图像序列得到一组特征向量,之后获取两组特征向量中相对应的一对特征向量,并计算这对特征相量的相似度,之后基于该相似度确定两张人脸图像中的人脸是否为同一张人脸。在这一过程中,基于读取的一对特征向量的相似度是否小于相似度阈值,可以快速确定两张人脸图像中的人脸是否为同一张人脸,因此,该用于识别人脸图像的方法提高了识别人脸图像中同一人脸的效率。The method for identifying human face images provided by the above-mentioned embodiments of the present application can obtain the key part image sequences of two human face images, and then obtain a set of feature vectors from each group of key part image sequences, and then obtain the two sets of feature vectors. A corresponding pair of eigenvectors, and calculate the similarity of the pair of eigenphasors, and then determine whether the faces in the two face images are the same face based on the similarity. In this process, based on whether the similarity of the read pair of feature vectors is less than the similarity threshold, it can be quickly determined whether the faces in the two face images are the same face. The image method improves the efficiency of recognizing the same face in face images.
进一步地,请参考图3,图3示出了根据本申请实施例的用于识别人脸图像的方法的一个示例性应用场景。Further, please refer to FIG. 3 , which shows an exemplary application scenario of the method for recognizing a face image according to an embodiment of the present application.
如图3所示,用于识别人脸图像的方法运行于电子设备320中,方法包括:As shown in FIG. 3, the method for recognizing a human face image runs in an electronic device 320, and the method includes:
首先,从人脸图像301中获取关键部位图像序列302;从人脸图像303中获取关键部位图像序列304。Firstly, the key part image sequence 302 is obtained from the face image 301 ; the key part image sequence 304 is obtained from the face image 303 .
之后,将关键部位图像序列302和关键部位图像序列304分别输入卷积神经网络的卷积层305,得到对应关键部位图像序列302的一组特征向量306,以及对应关键部位图像序列304的一组特征向量307。After that, the key part image sequence 302 and the key part image sequence 304 are respectively input into the convolutional layer 305 of the convolutional neural network to obtain a set of feature vectors 306 corresponding to the key part image sequence 302 and a set of corresponding key part image sequences 304 Eigenvector307.
之后,从两组特征向量组306和307中读取相对应的一对特征向量308和309,计算该对特征向量308和309的相似度310。Afterwards, read a corresponding pair of feature vectors 308 and 309 from the two sets of feature vectors 306 and 307 , and calculate the similarity 310 of the pair of feature vectors 308 and 309 .
最后,基于该对特征向量308和309的相似度310,确定两张人脸图像中的人脸是否为同一张人脸311。Finally, based on the similarity 310 of the pair of feature vectors 308 and 309 , it is determined whether the faces in the two face images are the same face 311 .
应当理解,上述图3中所示出的用于识别人脸图像的方法,仅为用于识别人脸图像的方法的示例性应用场景,并不代表对本申请的限定。例如,上述的计算该对特征向量308和309的相似度310,可以采用多种相似度计算方法来完成,在此不再赘述。应当理解,本申请的上述应用场景中提供的用于识别人脸图像的方法,可以提高确定两张人脸图像中的人脸是否为同一张人脸的效率。It should be understood that the method for recognizing a human face image shown in FIG. 3 is only an exemplary application scenario of the method for recognizing a human face image, and does not represent a limitation to the present application. For example, the above-mentioned calculation of the similarity 310 of the pair of feature vectors 308 and 309 can be accomplished by using various similarity calculation methods, which will not be repeated here. It should be understood that the method for identifying human face images provided in the above application scenarios of the present application can improve the efficiency of determining whether the human faces in two human face images are the same human face.
进一步地,请参考图4,图4示出了根据本申请实施例的用于识别人脸图像的方法的又一个实施例的示意性流程图。Further, please refer to FIG. 4 , which shows a schematic flowchart of another embodiment of a method for recognizing a human face image according to an embodiment of the present application.
如图4所示,用于识别人脸图像的方法400包括:As shown in FIG. 4, a method 400 for recognizing a face image includes:
在步骤410中,从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列。In step 410, image sequences of key parts are respectively acquired from the two face images to obtain two sets of image sequences of key parts.
在步骤420中,将两组所述关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量。In step 420, the two sets of key part image sequences are respectively input into the convolution layer of the convolutional neural network to obtain two sets of feature vectors.
在步骤430中,从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度。In step 430, a corresponding pair of feature vectors is read from the two groups of feature vectors, and the similarity of the pair of feature vectors is calculated.
应当理解,本实施例中的步骤410、步骤420和步骤430,分别对应于图2所示的实施例中的步骤210、步骤220和步骤230,在此不再赘述。It should be understood that step 410, step 420, and step 430 in this embodiment correspond to step 210, step 220, and step 230 in the embodiment shown in FIG. 2 respectively, and details are not repeated here.
在步骤440中,判断该对特征向量的相似度是否小于预设相似度阈值,若是,跳转至步骤450,若否,跳转至步骤460。In step 440 , it is judged whether the similarity of the pair of feature vectors is smaller than a preset similarity threshold, if yes, go to step 450 , if not, go to step 460 .
在本实施例中,相似度阈值为预先基于历史数据或人工经验确定的两张人脸图像中的人脸为同一人脸所设定的相似度概率阈值,当步骤430中计算的相似度小于相似度阈值时,两张人脸图像中对应于改对特征向量的关键部位图像的相似度较低,可以认为两张人脸图像中的人脸并非同一人脸;当步骤430中计算的相似度不小于相似度阈值时,两张人脸图像中对应于该对特征向量的关键部位图像相似度较高,两张人脸图像中的人脸可能为同一人脸。In this embodiment, the similarity threshold is the similarity probability threshold set by the same human face in two face images determined in advance based on historical data or artificial experience. When the similarity calculated in step 430 is less than When the similarity threshold is reached, the similarity of the key part images corresponding to the eigenvectors in the two face images is low, and it can be considered that the faces in the two face images are not the same face; when the similarity calculated in step 430 When the degree is not less than the similarity threshold, the image similarity of key parts corresponding to the pair of feature vectors in the two face images is relatively high, and the faces in the two face images may be the same face.
在步骤450中,确定两张人脸图像中的人脸并非同一张人脸。In step 450, it is determined that the faces in the two face images are not the same face.
在本实施例中,由于相似度阈值表征两张人脸图像中的人脸为同一人脸的概率阈值,那么当相似度小于相似度阈值时,说明两张人脸图像中的人脸为同一人脸的概率小于概率阈值,也即两张人脸图像中的人脸并非同一张人脸。In this embodiment, since the similarity threshold represents the probability threshold that the faces in the two face images are the same face, when the similarity is less than the similarity threshold, it means that the faces in the two face images are the same. The probability of the face is less than the probability threshold, that is, the faces in the two face images are not the same face.
在步骤460中,判断该对特征向量是否为两组特征向量中的最后一对特征向量,若是,则执行步骤470,若否,则跳转至执行步骤430。In step 460 , it is judged whether the pair of eigenvectors is the last pair of eigenvectors in the two groups of eigenvectors, if yes, execute step 470 , if not, skip to execute step 430 .
在本实施例中,在基于不小于相似度阈值的相似度进行进一步的特征确认,以判断两张人脸图像中的人脸是否为同一人脸时,可以跳转至步骤430,读取两组特征向量中的下一对特征向量,并计算相似度,进而根据相似度与相似度阈值的比较结果来确定是否继续判断下一对特征向量,直至两组特征向量中再无其它向量。在判断的过程中,若有一对特征向量的相似度小于相似度阈值,则表明该对特征向量对应的关键部位图像的相似度较低,那么可以确定两张人脸图像中的人脸并非同一人脸。In this embodiment, when performing further feature confirmation based on the similarity not less than the similarity threshold to determine whether the faces in the two face images are the same face, you can jump to step 430 and read the two face images. The next pair of eigenvectors in the group eigenvectors, and calculate the similarity, and then determine whether to continue to judge the next pair of eigenvectors according to the comparison result of the similarity and the similarity threshold, until there are no other vectors in the two groups of eigenvectors. In the process of judging, if the similarity of a pair of feature vectors is less than the similarity threshold, it indicates that the similarity of the key part images corresponding to the pair of feature vectors is low, so it can be determined that the faces in the two face images are not the same human face.
在步骤470中,确定两张人脸图像中的人脸为同一张人脸。In step 470, it is determined that the faces in the two face images are the same face.
在本实施例中,若最后一对特征向量的相似度仍不小于相似度阈值,则表明两组特征向量中的每一对特征向量的相似度均大于相似度阈值,也即每一组关键部位图像均为同一关键部位图像,因此,可以确定两张人脸图像中的人脸为同一人脸。In this embodiment, if the similarity of the last pair of feature vectors is still not less than the similarity threshold, it indicates that the similarity of each pair of feature vectors in the two groups of feature vectors is greater than the similarity threshold, that is, each group of key The part images are all images of the same key part, therefore, it can be determined that the faces in the two face images are the same face.
应当理解,上述图4中所示出的用于识别人脸图像的方法,仅为用于识别人脸图像的方法的示例性实施例,并不代表对本申请的限定,例如,本申请步骤410中的从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列,其中的关键部位可以为参考人脸图像的95个关键点、85个关键点或68个关键点等确定的关键部位。It should be understood that the method for recognizing a human face image shown in FIG. 4 above is only an exemplary embodiment of the method for recognizing a human face image, and does not represent a limitation to this application. For example, step 410 of this application The key part image sequences are obtained from two face images respectively, and two sets of key part image sequences are obtained, in which the key parts can be 95 key points, 85 key points or 68 key points of the reference face image, etc. identified key areas.
进一步参考图5,作为对上述方法的实现,本申请实施例提供了一种用于识别人脸图像的装置的一个实施例,该用于识别人脸图像的装置的实施例与图1至图4所示的用于识别人脸图像的方法的实施例相对应,由此,上文针对图1至图4中用于识别人脸图像的方法描述的操作和特征同样适用于用于识别人脸图像的装置500及其中包含的单元,在此不再赘述。Further referring to FIG. 5 , as an implementation of the above method, an embodiment of the present application provides an embodiment of a device for recognizing a face image, and the embodiment of the device for recognizing a face image is the same as that shown in FIGS. 4 corresponds to the embodiment of the method for recognizing a human face image, thus, the operations and features described above for the method for recognizing a human face image in FIGS. The face image device 500 and the units included therein will not be described in detail here.
如图5所示,该用于识别人脸图像的装置500可以包括:图像序列获取单元510,用于从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列;特征向量获取单元520,用于将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量;相似度计算单元530,用于从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;相同人脸确定单元540,用于基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。As shown in FIG. 5, the device 500 for recognizing human face images may include: an image sequence acquisition unit 510, which is used to acquire key part image sequences from two human face images respectively to obtain two sets of key part image sequences; The vector acquisition unit 520 is used to input two groups of key part image sequences into the convolutional layer of the convolutional neural network respectively to obtain two groups of feature vectors; the similarity calculation unit 530 is used to read the corresponding two groups of feature vectors. A pair of eigenvectors, calculating the similarity of the pair of eigenvectors; the same face determination unit 540 is used to determine whether the faces in the two face images are the same face based on the similarity of the pair of eigenvectors.
在本实施例的一些可选实现方式中,相同人脸确定单元540进一步用于:响应于该对特征向量的相似度小于预设相似度阈值,确定两张人脸图像中的人脸并非同一张人脸。In some optional implementations of this embodiment, the same face determining unit 540 is further configured to: determine that the faces in the two face images are not the same in response to the similarity between the pair of feature vectors being less than a preset similarity threshold face.
在本实施例的一些可选实现方式中,相同人脸确定单元540进一步用于:响应于该对特征向量的相似度大于预设相似度阈值且该对特征向量并非两组特征向量中的最后一对特征向量,跳转至从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。In some optional implementations of this embodiment, the same face determination unit 540 is further configured to: respond to the similarity of the pair of feature vectors being greater than a preset similarity threshold and the pair of feature vectors is not the last of the two groups of feature vectors A pair of eigenvectors, jump to read the corresponding pair of eigenvectors from the two sets of eigenvectors, and calculate the similarity of the pair of eigenvectors; based on the similarity of the pair of eigenvectors, determine the Whether the faces are the same face.
在本实施例的一些可选实现方式中,相同人脸确定单元540进一步用于:响应于该对特征向量的相似度大于预设相似度阈值且该对特征向量为两组特征向量中的最后一对特征向量,确定两张人脸图像中的人脸为同一张人脸。In some optional implementations of this embodiment, the same face determining unit 540 is further configured to: in response to the similarity of the pair of feature vectors being greater than a preset similarity threshold and the pair of feature vectors being the last of the two groups of feature vectors A pair of eigenvectors, identifying the faces in the two face images as the same face.
在本实施例的一些可选实现方式中,图像序列获取单元510中的关键部位图像序列中的关键部位包括:左眼、右眼、鼻子、左嘴角和右嘴角。In some optional implementations of this embodiment, the key parts in the key part image sequence in the image sequence acquiring unit 510 include: left eye, right eye, nose, left corner of mouth, and right corner of mouth.
在本实施例的一些可选实现方式中,相似度计算单元530中计算该对特征向量的相似度包括计算该对特征向量的以下任意一项:皮尔逊相关系数、欧氏距离、余弦相似度、曼哈顿距离和切比雪夫距离。In some optional implementations of this embodiment, calculating the similarity of the pair of feature vectors in the similarity calculation unit 530 includes calculating any of the following items of the pair of feature vectors: Pearson correlation coefficient, Euclidean distance, cosine similarity , Manhattan distance and Chebyshev distance.
本申请还提供了一种设备的实施例,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如上任意一项所述的用于识别人脸图像的方法。The present application also provides an embodiment of a device, including: one or more processors; a storage device for storing one or more programs; when one or more programs are executed by one or more processors, a or a plurality of processors to implement the method for recognizing a human face image as described in any one of the above.
本申请还提供了一种计算机可读介质的实施例,其上存储有计算机程序,该程序被处理器执行时实现如上任意一项所述的用于识别人脸图像的方法。The present application also provides an embodiment of a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method for recognizing a human face image as described in any one of the above items is implemented.
下面参考图6,其示出了适于用来实现本申请实施例的终端设备或服务器的计算机系统600的结构示意图。图6示出的终端设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring now to FIG. 6 , it shows a schematic structural diagram of a computer system 600 suitable for implementing a terminal device or a server according to an embodiment of the present application. The terminal device shown in FIG. 6 is only an example, and should not limit the functions and scope of use of this embodiment of the present application.
如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分606加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6 , a computer system 600 includes a central processing unit (CPU) 601 that can execute programs according to programs stored in a read-only memory (ROM) 602 or loaded from a storage section 606 into a random-access memory (RAM) 603 Instead, various appropriate actions and processes are performed. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601 , ROM 602 , and RAM 603 are connected to each other through a bus 604 . An input/output (I/O) interface 605 is also connected to the bus 604 .
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 608 including a hard disk, etc. and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 610 as necessary so that a computer program read therefrom is installed into the storage section 608 as necessary.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,所述计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本申请的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program including program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 609 and/or installed from removable media 611 . When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are performed.
需要说明的是,本申请所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读信号介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable signal medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which computer-readable program codes are carried. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. . Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个单元、程序段、或代码的一部分,所述单元、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a unit, program segment, or portion of code that contains one or more logic devices for implementing the specified Executable instructions for a function. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括图像序列获取单元、特征向量获取单元、相似度计算单元和相同人脸确定单元。这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,图像序列获取单元还可以被描述为“从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列的单元”。The units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware. The described units can also be set in a processor, for example, it can be described as: a processor includes an image sequence acquisition unit, a feature vector acquisition unit, a similarity calculation unit and an identical face determination unit. The names of these units do not constitute a limitation of the unit itself in some cases. For example, the image sequence acquisition unit can also be described as "obtaining the image sequence of key parts from two face images respectively, and obtaining two sets of key parts A unit of an image sequence".
作为另一方面,本申请还提供了一种非易失性计算机存储介质,该非易失性计算机存储介质可以是上述实施例中所述装置中所包含的非易失性计算机存储介质;也可以是单独存在,未装配入终端中的非易失性计算机存储介质。上述非易失性计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备:从两张人脸图像中分别获取关键部位图像序列,得到两组关键部位图像序列;将两组关键部位图像序列分别输入卷积神经网络的卷积层,得到两组特征向量;从两组特征向量中读取相对应的一对特征向量,计算该对特征向量的相似度;基于该对特征向量的相似度,确定两张人脸图像中的人脸是否为同一张人脸。As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium contained in the device described in the above embodiments; It may be a non-volatile computer storage medium that exists independently and is not assembled into the terminal. The above-mentioned non-volatile computer storage medium stores one or more programs, and when the one or more programs are executed by a device, the device: acquires key part image sequences from two face images respectively, and obtains Two sets of image sequences of key parts; input the two sets of image sequences of key parts into the convolutional layer of the convolutional neural network to obtain two sets of feature vectors; read the corresponding pair of feature vectors from the two sets of feature vectors, and calculate the pair The similarity of the feature vectors; based on the similarity of the pair of feature vectors, it is determined whether the faces in the two face images are the same face.
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principle. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, and should also cover the technical solutions formed by the above-mentioned technical features or without departing from the above-mentioned inventive concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with technical features with similar functions disclosed in (but not limited to) this application.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810271618.XA CN108446660A (en) | 2018-03-29 | 2018-03-29 | The method and apparatus of facial image for identification |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810271618.XA CN108446660A (en) | 2018-03-29 | 2018-03-29 | The method and apparatus of facial image for identification |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108446660A true CN108446660A (en) | 2018-08-24 |
Family
ID=63197712
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810271618.XA Pending CN108446660A (en) | 2018-03-29 | 2018-03-29 | The method and apparatus of facial image for identification |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108446660A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109726756A (en) * | 2018-12-25 | 2019-05-07 | 北京旷视科技有限公司 | Image processing method, device, electronic equipment and storage medium |
| CN110335265A (en) * | 2019-07-03 | 2019-10-15 | 金钱猫科技股份有限公司 | A kind of network witness management method and device based on artificial intelligence image recognition |
| CN115273181A (en) * | 2022-07-07 | 2022-11-01 | 浙江大华技术股份有限公司 | A face recognition method, device and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101281598A (en) * | 2008-05-23 | 2008-10-08 | 清华大学 | Face recognition method based on multi-component multi-feature fusion |
| CN101986328A (en) * | 2010-12-06 | 2011-03-16 | 东南大学 | Local descriptor-based three-dimensional face recognition method |
| CN103246880A (en) * | 2013-05-15 | 2013-08-14 | 中国科学院自动化研究所 | Human face recognizing method based on multi-level local obvious mode characteristic counting |
| CN105678232A (en) * | 2015-12-30 | 2016-06-15 | 中通服公众信息产业股份有限公司 | Face image feature extraction and comparison method based on deep learning |
| CN105956552A (en) * | 2016-04-29 | 2016-09-21 | 中国人民解放军国防科学技术大学 | Face black list monitoring method |
-
2018
- 2018-03-29 CN CN201810271618.XA patent/CN108446660A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101281598A (en) * | 2008-05-23 | 2008-10-08 | 清华大学 | Face recognition method based on multi-component multi-feature fusion |
| CN101986328A (en) * | 2010-12-06 | 2011-03-16 | 东南大学 | Local descriptor-based three-dimensional face recognition method |
| CN103246880A (en) * | 2013-05-15 | 2013-08-14 | 中国科学院自动化研究所 | Human face recognizing method based on multi-level local obvious mode characteristic counting |
| CN105678232A (en) * | 2015-12-30 | 2016-06-15 | 中通服公众信息产业股份有限公司 | Face image feature extraction and comparison method based on deep learning |
| CN105956552A (en) * | 2016-04-29 | 2016-09-21 | 中国人民解放军国防科学技术大学 | Face black list monitoring method |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109726756A (en) * | 2018-12-25 | 2019-05-07 | 北京旷视科技有限公司 | Image processing method, device, electronic equipment and storage medium |
| CN110335265A (en) * | 2019-07-03 | 2019-10-15 | 金钱猫科技股份有限公司 | A kind of network witness management method and device based on artificial intelligence image recognition |
| CN115273181A (en) * | 2022-07-07 | 2022-11-01 | 浙江大华技术股份有限公司 | A face recognition method, device and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109214343B (en) | Method and device for generating face key point detection model | |
| CN111368685B (en) | Method and device for identifying key points, readable medium and electronic equipment | |
| CN108446390B (en) | Method and device for pushing information | |
| CN107578017B (en) | Method and apparatus for generating image | |
| CN107330904B (en) | Image processing method, device, electronic device and storage medium | |
| CN109993150B (en) | Method and device for identifying age | |
| CN106682632B (en) | Method and device for processing face image | |
| CN110648289B (en) | Image noise adding processing method and device | |
| CN109034069B (en) | Method and apparatus for generating information | |
| CN113177892B (en) | Method, apparatus, medium and program product for generating image restoration model | |
| CN110866469B (en) | Facial five sense organs identification method, device, equipment and medium | |
| JP2015529354A (en) | Method and apparatus for face recognition | |
| CN108509994B (en) | Method and device for clustering character images | |
| WO2020078119A1 (en) | Method, device and system for simulating user wearing clothing and accessories | |
| WO2020024484A1 (en) | Method and device for outputting data | |
| US11126827B2 (en) | Method and system for image identification | |
| CN114898266B (en) | Training methods, image processing methods, devices, electronic equipment and storage media | |
| CN108446658A (en) | The method and apparatus of facial image for identification | |
| CN110516598A (en) | Method and device for generating images | |
| CN111292333B (en) | Method and apparatus for segmenting an image | |
| CN108491812B (en) | Method and device for generating face recognition model | |
| CN114360015B (en) | Liveness detection method, device, equipment and storage medium | |
| CN114463859A (en) | Anti-attack method and device for living body detection, electronic equipment and storage medium | |
| US12327299B2 (en) | Facial expression image processing method and apparatus, and electronic device | |
| CN108446660A (en) | The method and apparatus of facial image for identification |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180824 |