[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104899578A - Method and device for face identification - Google Patents

Method and device for face identification Download PDF

Info

Publication number
CN104899578A
CN104899578A CN201510363785.3A CN201510363785A CN104899578A CN 104899578 A CN104899578 A CN 104899578A CN 201510363785 A CN201510363785 A CN 201510363785A CN 104899578 A CN104899578 A CN 104899578A
Authority
CN
China
Prior art keywords
sample
class
training
matrix
inter
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.)
Granted
Application number
CN201510363785.3A
Other languages
Chinese (zh)
Other versions
CN104899578B (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.)
Suzhou University
Original Assignee
Suzhou University
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 Suzhou University filed Critical Suzhou University
Priority to CN201510363785.3A priority Critical patent/CN104899578B/en
Publication of CN104899578A publication Critical patent/CN104899578A/en
Application granted granted Critical
Publication of CN104899578B publication Critical patent/CN104899578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24143Distances to neighbourhood prototypes, e.g. restricted Coulomb energy networks [RCEN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种人脸识别的方法,包括:将获取得到的人脸图像数据作为待测样本;利用投影变换矩阵将所述待测样本映射到低维特征空间中,得到投影后的测试样本;在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本;将所述目标样本的类别确定为所述测试样本的类别;其中,所述投影变换矩阵为通过构造的类内邻接矩阵以及类间邻接矩阵,对所述训练样本集合中的多个样本进行训练得到的变换矩阵,以使类间距离最大、类内距离最小。本发明所提供的人脸识别的方法及装置,为正交判别投影分别构造了两个邻接矩阵:类间和类内邻接矩阵,把类内信息和类间信息分开表示,以得到均衡的信息,从而实现类内最小和类间最大的目的。

The invention discloses a face recognition method, which includes: taking the obtained face image data as a sample to be tested; using a projection transformation matrix to map the sample to be tested into a low-dimensional feature space, and obtaining the projected test sample; in the training sample set, find the standard sample closest to the test sample distance as the target sample; the category of the target sample is determined as the category of the test sample; wherein, the projection transformation matrix is constructed by The intra-class adjacency matrix and the inter-class adjacency matrix are transformation matrices obtained by training multiple samples in the training sample set, so as to maximize the inter-class distance and minimize the intra-class distance. The method and device for face recognition provided by the present invention respectively construct two adjacency matrices for orthogonal discriminant projection: inter-class and intra-class adjacency matrices, which represent intra-class information and inter-class information separately to obtain balanced information , so as to achieve the purpose of the minimum within the class and the maximum among the classes.

Description

一种人脸识别的方法及装置Method and device for face recognition

技术领域technical field

本发明涉及计算机视觉领域,特别是涉及一种人脸识别的方法及装置。The invention relates to the field of computer vision, in particular to a face recognition method and device.

背景技术Background technique

目前人脸识别技术已经发展成为了计算机视觉中非常流行的研究课题,同时也是在图像分析领域最为成功的应用之一。人脸数据是典型的高维小样本数据,对人脸数据进行维数约简是必要的预处理步骤。在近几十年的发展中,相继提出了一系列的维数约简技术。At present, face recognition technology has developed into a very popular research topic in computer vision, and it is also one of the most successful applications in the field of image analysis. Face data is a typical high-dimensional small-sample data, and dimensionality reduction for face data is a necessary preprocessing step. In recent decades of development, a series of dimensionality reduction techniques have been proposed one after another.

目前提出的正交判别投影方法均只构造了一个邻接图,包含类内和类间的信息。而在数据分布不均衡的情况下,类内和类间的信息在邻接图中也会不均衡,会导致不能实现类内距离最小和类间距离最大的目的。The orthogonal discriminant projection methods proposed so far only construct an adjacency graph, which contains information within and between classes. In the case of unbalanced data distribution, the intra-class and inter-class information will also be unbalanced in the adjacency graph, which will lead to the inability to achieve the purpose of the smallest intra-class distance and the largest inter-class distance.

发明内容Contents of the invention

本发明的目的是提供一种人脸识别的方法及装置,目的在于解决现有技术中不能实现类内最小和类间最大的问题。The purpose of the present invention is to provide a method and device for face recognition, aiming to solve the problem that the minimum within a class and the maximum between classes cannot be achieved in the prior art.

为解决上述技术问题,本发明提供一种人脸识别的方法,包括:In order to solve the above-mentioned technical problems, the present invention provides a method for face recognition, including:

将获取得到的人脸图像数据作为待测样本;The acquired face image data is used as a sample to be tested;

利用投影变换矩阵将所述待测样本映射到低维特征空间中,得到投影后的测试样本;Using a projection transformation matrix to map the sample to be tested into a low-dimensional feature space to obtain a projected test sample;

在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本;In the training sample set, find the standard sample closest to the test sample as the target sample;

将所述目标样本的类别确定为所述测试样本的类别;determining the class of the target sample as the class of the test sample;

其中,所述投影变换矩阵为通过构造的类内邻接矩阵以及类间邻接矩阵,对所述训练样本集合中的多个样本进行训练得到的变换矩阵,以使类间距离最大、类内距离最小。Wherein, the projection transformation matrix is a transformation matrix obtained by training multiple samples in the training sample set through the constructed intra-class adjacency matrix and inter-class adjacency matrix, so that the inter-class distance is the largest and the intra-class distance is the smallest .

可选地,所述投影变换矩阵为通过构造的类内邻接矩阵以及类间邻接矩阵,对所述训练样本集合中的多个样本进行训练得到的变换矩阵包括:Optionally, the projection transformation matrix is an intra-class adjacency matrix and an inter-class adjacency matrix constructed, and a transformation matrix obtained by training a plurality of samples in the training sample set includes:

通过构造的类内邻接矩阵Fw以及类间邻接矩阵Fb,根据Sw=X(Dw-Fw)XT以及Sb=X(Db-Fb)XT计算得到类内局部散度矩阵Sw以及类间局部散度矩阵SbThrough the constructed intra-class adjacency matrix F w and inter -class adjacency matrix F b , the intra - class local Scatter matrix S w and between-class local scatter matrix S b ;

通过所述类内局部散度矩阵Sw以及类间局部散度矩阵Sb计算得到投影变换矩阵P,以使类间距离最大、类内距离最小;Calculate the projection transformation matrix P through the intra-class local scatter matrix S w and the inter-class local scatter matrix S b , so that the inter-class distance is the largest and the intra-class distance is the smallest;

其中,in,

t>0,分别是xi的同类近邻和异类近邻集合,Dw和Db均是对角矩阵。t > 0, and are the similar and heterogeneous neighbor sets of x i respectively, D w and D b are both diagonal matrices.

可选地,所述通过所述类内局部散度矩阵Sw以及所述类间局部散度矩阵Sb确定投影变换矩阵P包括:Optionally, the determining the projection transformation matrix P through the intra-class local scatter matrix S w and the inter-class local scatter matrix S b includes:

对所述类内局部散度矩阵Sw以及所述类间局部散度矩阵Sb进行广义特征分解,将获得的特征值按照从大到小的顺序进行排列,取前d个特征值对应的特征向量作为所述投影变换矩阵P,其中d为经投影变换后空间的维数。Perform generalized eigendecomposition on the intra-class local scatter matrix S w and the inter-class local scatter matrix S b , arrange the obtained eigenvalues in order from large to small, and take the first d eigenvalues corresponding to The feature vector is used as the projection transformation matrix P, where d is the dimension of the space after projection transformation.

可选地,所述训练样本集合为预先建立的集合,所述预先建立的过程包括:Optionally, the training sample set is a pre-established set, and the pre-established process includes:

将获取得到的多幅人脸图像作为训练样本;The obtained multiple face images are used as training samples;

利用所述投影变换矩阵将所述训练样本映射到低维特征空间中,得到投影后的标准样本;Using the projection transformation matrix to map the training samples into a low-dimensional feature space to obtain projected standard samples;

将所述标准样本以及所述人脸图像的已知类别进行存储,作为所述训练样本集合。The standard samples and the known categories of the face images are stored as the training sample set.

可选地,所述在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本包括:Optionally, in the training sample set, finding the standard sample closest to the test sample as the target sample includes:

利用最近邻分类器,在所述训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本。Using the nearest neighbor classifier, in the training sample set, find the standard sample closest to the test sample as the target sample.

本发明还提供了一种人脸识别的装置,包括:The present invention also provides a device for face recognition, including:

获取模块,用于将获取得到的人脸图像数据作为待测样本;An acquisition module, configured to use the acquired face image data as a sample to be tested;

映射模块,用于利用投影变换矩阵将所述待测样本映射到低维特征空间中,得到投影后的测试样本;A mapping module, configured to map the sample to be tested to a low-dimensional feature space using a projection transformation matrix to obtain a projected test sample;

查找模块,用于在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本;A search module, configured to search for the standard sample closest to the test sample in the training sample set as the target sample;

确定模块,用于将所述目标样本的类别确定为所述测试样本的类别;a determination module, configured to determine the category of the target sample as the category of the test sample;

其中,所述投影变换矩阵为训练模块通过构造的类内邻接矩阵以及类间邻接矩阵,对所述训练样本集合中的多个样本进行训练得到的变换矩阵,以使类间距离最大、类内距离最小。Wherein, the projection transformation matrix is a transformation matrix obtained by training multiple samples in the training sample set through the intra-class adjacency matrix and the inter-class adjacency matrix constructed by the training module, so that the inter-class distance is the largest and the intra-class Minimum distance.

可选地,所述训练模块包括:Optionally, the training module includes:

训练获取单元,用于将获取得到的多幅人脸图像作为训练样本;A training acquisition unit, configured to use the acquired multiple face images as training samples;

训练映射单元,用于利用所述投影变换矩阵将所述训练样本映射到低维特征空间中,得到投影后的标准样本;A training mapping unit, configured to use the projection transformation matrix to map the training samples into a low-dimensional feature space to obtain projected standard samples;

训练存储单元,用于将所述标准样本以及所述人脸图像的已知类别进行存储,作为所述训练样本集合。The training storage unit is configured to store the standard samples and the known categories of the face images as the training sample set.

可选地,所述查找模块用于在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本包括:Optionally, the search module is used to find the standard sample closest to the test sample in the training sample set as the target sample including:

所述查找模块具体用于利用最近邻分类器,在所述训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本。The search module is specifically configured to use the nearest neighbor classifier to find the standard sample closest to the test sample in the training sample set as the target sample.

本发明所提供的人脸识别的方法及装置,利用投影变换矩阵将获取得到的待测样本映射到低维特征空间中,得到投影后的测试样本。然后在训练样本集合中,查找与测试样本距离最近的标准样本作为目标样本,并将目标样本的类别确定为测试样本的类别,以达到人脸识别的目的。本发明所提供的人脸识别的方法及装置,为正交判别投影分别构造了两个邻接矩阵:类间和类内邻接矩阵,把类内信息和类间信息分开表示,以得到均衡的信息,从而实现类内最小和类间最大的目的。The method and device for face recognition provided by the present invention use a projection transformation matrix to map the acquired samples to be tested into a low-dimensional feature space to obtain projected test samples. Then, in the training sample set, find the standard sample closest to the test sample as the target sample, and determine the category of the target sample as the category of the test sample, so as to achieve the purpose of face recognition. The method and device for face recognition provided by the present invention respectively construct two adjacency matrices for orthogonal discriminant projection: inter-class and intra-class adjacency matrices, which represent intra-class information and inter-class information separately to obtain balanced information , so as to achieve the purpose of the minimum within the class and the maximum among the classes.

附图说明Description of drawings

图1为本发明所提供的人脸识别的方法的一种具体实施方式的方法流程图;Fig. 1 is the method flowchart of a kind of embodiment of the method for face recognition provided by the present invention;

图2为本发明所提供的人脸识别的方法的另一种具体实施方式中投影变换矩阵确定过程的流程图;Fig. 2 is a flow chart of the process of determining the projection transformation matrix in another embodiment of the method for face recognition provided by the present invention;

图3为本发明所提供的人脸识别的方法的另一种具体实施方式中预先建立训练样本集合的过程的流程图;Fig. 3 is the flowchart of the process of pre-establishing the training sample set in another embodiment of the method for face recognition provided by the present invention;

图4为三种算法的分类精度随着维数变化曲线图;Figure 4 is a curve diagram of the classification accuracy of the three algorithms as the dimension changes;

图5为本发明所提供的人脸识别的装置的一种具体实施方式的结构框图。Fig. 5 is a structural block diagram of a specific embodiment of the device for face recognition provided by the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明所提供的人脸识别的方法的一种具体实施方式的方法流程图如图1所示,该方法包括:A method flow chart of a specific embodiment of the method for face recognition provided by the present invention is shown in Figure 1, and the method includes:

步骤S101:将获取得到的人脸图像数据作为待测样本;Step S101: taking the acquired face image data as samples to be tested;

步骤S102:利用投影变换矩阵将所述待测样本映射到低维特征空间中,得到投影后的测试样本;Step S102: using a projection transformation matrix to map the sample to be tested into a low-dimensional feature space to obtain a projected test sample;

步骤S103:在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本;Step S103: In the training sample set, find the standard sample closest to the test sample as the target sample;

步骤S104:将所述目标样本的类别确定为所述测试样本的类别;Step S104: determining the category of the target sample as the category of the test sample;

其中,所述投影变换矩阵为通过构造的类内邻接矩阵以及类间邻接矩阵,对所述训练样本集合中的多个样本进行训练得到的变换矩阵,以使类间距离最大、类内距离最小。Wherein, the projection transformation matrix is a transformation matrix obtained by training multiple samples in the training sample set through the constructed intra-class adjacency matrix and inter-class adjacency matrix, so that the inter-class distance is the largest and the intra-class distance is the smallest .

本发明所提供的人脸识别的方法,利用投影变换矩阵将获取得到的待测样本映射到低维特征空间中,得到投影后的测试样本。然后在训练样本集合中,查找与测试样本距离最近的标准样本作为目标样本,并将目标样本的类别确定为测试样本的类别,以达到人脸识别的目的。本发明所提供的人脸识别的方法,为正交判别投影分别构造了两个邻接矩阵:类间和类内邻接矩阵,把类内信息和类间信息分开表示,以得到均衡的信息,从而实现类内最小和类间最大的目的。The face recognition method provided by the present invention uses a projection transformation matrix to map the obtained samples to be tested into a low-dimensional feature space to obtain projected test samples. Then, in the training sample set, find the standard sample closest to the test sample as the target sample, and determine the category of the target sample as the category of the test sample, so as to achieve the purpose of face recognition. The face recognition method provided by the present invention constructs two adjacency matrices respectively for the orthogonal discriminant projection: inter-class and intra-class adjacency matrices, which separately represent intra-class information and inter-class information to obtain balanced information, thereby To achieve the purpose of the minimum within the class and the maximum among the classes.

需要指出的是,本发明中的类内指同一个类的样本之间的关系;类间指不同类的样本之间的关系。It should be pointed out that the intra-class in the present invention refers to the relationship between samples of the same class; the inter-class refers to the relationship between samples of different classes.

本发明提供了人脸识别的方法的另一种具体实施方式,与上一实施例相比,本实施例增加了投影变换矩阵的确定过程,如图2所示:The present invention provides another specific implementation of the method for face recognition. Compared with the previous embodiment, this embodiment increases the process of determining the projection transformation matrix, as shown in Figure 2:

步骤S201:通过构造的类内邻接矩阵Fw以及类间邻接矩阵Fb,根据Sw=X(Dw-Fw)XT以及Sb=X(Db-Fb)XT计算得到类内局部散度矩阵Sw以及类间局部散度矩阵SbStep S201: Through the constructed intra-class adjacency matrix F w and inter-class adjacency matrix F b , calculate according to S w =X(D w -F w )X T and S b =X(D b -F b )X T Intra-class local scatter matrix S w and between-class local scatter matrix S b ;

步骤S202:通过所述类内局部散度矩阵Sw以及类间局部散度矩阵Sb计算得到投影变换矩阵P,以使类间距离最大、类内距离最小;Step S202: Calculate the projection transformation matrix P through the intra-class local scatter matrix S w and the inter-class local scatter matrix S b , so that the inter-class distance is the largest and the intra-class distance is the smallest;

其中,in,

t>0,分别是xi的同类近邻和异类近邻集合,Dw和Db均是对角矩阵。t > 0, and are the similar and heterogeneous neighbor sets of x i respectively, D w and D b are both diagonal matrices.

作为一种优选实施方式,通过内局部散度矩阵Sw以及类间局部散度矩阵Sb确定投影变换矩阵P可以进一步具体为:As a preferred implementation, the determination of the projection transformation matrix P through the internal local scatter matrix S w and the inter-class local scatter matrix S b can be further specifically:

对所述类内局部散度矩阵Sw以及类间局部散度矩阵Sb进行广义特征分解,将获得的特征值按照从大到小的顺序进行排列,取前d个特征值对应的特征向量作为所述投影变换矩阵P,其中d为经投影变换后空间的维数。Perform generalized eigendecomposition on the intra-class local scatter matrix S w and the inter-class local scatter matrix S b , arrange the obtained eigenvalues in order from large to small, and take the eigenvectors corresponding to the first d eigenvalues As the projection transformation matrix P, where d is the dimension of the space after projection transformation.

在确定了投影变换矩阵后,本实施例还提供了预先建立训练样本集合的过程,如图3所示:After determining the projection transformation matrix, this embodiment also provides a process of pre-establishing a training sample set, as shown in Figure 3:

步骤S301:将获取得到的多幅人脸图像作为训练样本;Step S301: using the obtained multiple face images as training samples;

步骤S302:利用所述投影变换矩阵将所述训练样本映射到低维特征空间中,得到投影后的标准样本;Step S302: using the projection transformation matrix to map the training samples into a low-dimensional feature space to obtain projected standard samples;

步骤S303:将所述标准样本以及所述人脸图像的已知类别进行存储,作为所述训练样本集合。Step S303: Store the standard samples and the known categories of the face images as the training sample set.

本发明还提供了人脸识别的方法的又一种具体实施方式,在本实施例中,ORL人脸数据库包含40个人的400张人脸图像;每个人10张图像。其中有一些人脸的图像是在不同时期拍摄的。人的脸部表情和脸部细节有着不同程度的变化,比如睁眼或者闭眼、戴眼镜或不带眼镜、笑或者不笑;人脸姿态也有相当程度的变化,深度旋转和平面旋转可达200;每幅图像的大小为32×32像素,每个像素是256个灰度等级。从数据库中随机选择50%作为训练样本,余下的50%作为测试样本,重复随机采样10次,报道平均结果。The present invention also provides another specific implementation of the face recognition method. In this embodiment, the ORL face database contains 400 face images of 40 people; 10 images for each person. Some of the images of faces were taken at different times. People's facial expressions and facial details have different degrees of changes, such as opening or closing eyes, wearing glasses or not wearing glasses, smiling or not smiling; facial postures also have considerable changes, depth rotation and plane rotation can reach 200; the size of each image is 32×32 pixels, and each pixel has 256 gray levels. Randomly select 50% from the database as training samples, and the remaining 50% as testing samples, repeat random sampling 10 times, and report the average result.

具体地,本实施例包括经过训练建立人脸训练数据集以及通过该人脸训练数据集对图像进行分类的过程。Specifically, this embodiment includes a process of establishing a face training data set after training and classifying images through the face training data set.

设已有人脸训练数据集为其中xi∈RD是某个人脸数据,yi={1,2,…,c}表示xi的类别标签,c表示类别数,N表示训练样本的总个数,D表示训练样本的维数。Let the existing face training data set be Where x i ∈ R D is a certain face data, y i ={1,2,...,c} indicates the category label of x i , c indicates the number of categories, N indicates the total number of training samples, and D indicates the number of training samples dimension.

本实施例中N=200,c=40,D=1024。当然也可以是其他数值,这都不影响本发明的实现。In this embodiment, N=200, c=40, D=1024. Of course, it can also be other numerical values, which do not affect the realization of the present invention.

为了同时考虑保持低维坐标的几何特征和训练点信息,寻找一个最优变换P,将数据集映射到相对低维的特征空间,如d维空间,且d<<D。在此低维的特征空间中,最大化类间距离且最小化类内距离,即:In order to consider maintaining the geometric features of low-dimensional coordinates and training point information at the same time, find an optimal transformation P, and convert the data set Mapped to a relatively low-dimensional feature space, such as a d-dimensional space, and d<<D. In this low-dimensional feature space, the inter-class distance is maximized and the intra-class distance is minimized, namely:

mm aa xx PP tt rr aa cc ee (( PP TT SS bb PP PP TT SS ww PP ))

其中trace是求矩阵迹函数,Sb是类间局部散度矩阵,Sw类内局部散度矩阵。为了计算这两个局部散度矩阵,我们构造两个邻接矩阵,类内邻接矩阵Fw和类间邻接矩阵Fb。则Sw=X(Dw-Fw)XT和Sb=X(Db-Fb)XT,其中Dw和Db均是对角矩阵,Fw和Fb定义如下:Where trace is the matrix trace function, S b is the inter-class local scatter matrix, and S w is the intra-class local scatter matrix. To compute these two local scatter matrices, we construct two adjacency matrices, the within-class adjacency matrix F w and the between-class adjacency matrix F b . Then S w =X(D w -F w )X T and S b =X(D b -F b )X T , where D w and D b are both diagonal matrices, and F w and F b are defined as follows:

and

其中t>0为函数的参数,分别是xi的同类近邻和异类近邻集合。在本实施例中,t=8。Where t>0 is the parameter of the function, and are the similar and heterogeneous neighbor sets of xi , respectively. In this embodiment, t=8.

为了获得P,我们对Sb和Sw进行广义特征分解。把获得的特征值按照从大到小的顺序进行排序,取前其d个特征值对应的特征向量组成矩阵P=[p1,p2,…,pd],其中pi是特征分解后的特征向量。To obtain P, we perform generalized eigendecomposition on Sb and Sw . Sort the obtained eigenvalues in descending order, and take the eigenvectors corresponding to the first d eigenvalues to form a matrix P=[p 1 ,p 2 ,…,p d ], where p i is the eigenvectors of .

在得到了投影矩阵P后,通过投影把原样本空间的样本投影到低维特征空间,zi=PTxi,其中zi是xi在低维空间的投影,zi∈Rd。令为投影后的训练样本集。本实施例中,d值从1变化到50。After obtaining the projection matrix P, the samples of the original sample space are projected to the low-dimensional feature space by projection, z i =P T xi , where z i is the projection of x i in the low-dimensional space, z i ∈ R d . make is the projected training sample set. In this example, the value of d varies from 1 to 50.

对某个待测样本x∈RD,利用投影变换P把它映射到低维特征空间中,得到投影后的测试样本z=PTx∈RdFor a test sample x∈R D , use the projection transformation P to map it to the low-dimensional feature space, and obtain the projected test sample z=P T x∈R d .

利用最近邻分类器,对投影后的测试样本z在低维特征空间进行分类。也就是说,在训练样本集合中,找到和测试样本距离最近的样本,然后再把该样本的类别赋予投影测试样本z。这样就完成对x的分类。在本实施例中待测样本有200个,重复分类模块200次。Using the nearest neighbor classifier, classify the projected test sample z in the low-dimensional feature space. That is to say, in the training sample set , find the sample closest to the test sample, and then assign the category of the sample to the projected test sample z. This completes the classification of x. In this embodiment, there are 200 samples to be tested, and the classification module is repeated 200 times.

图4给出了三种算法的分类精度随着维数变化曲线图。三种对比方法为:正交判别投影(ODP),判别近邻嵌入(DNE)以及本发明。可以看到本发明的识别率是高于其他两种方法的。表1给出了三种方法在降维数为1到50之间时最好性能的对比,括号中是对应的最好维数。本发明在较低维数时就取得了最好性能。Figure 4 shows the curves of the classification accuracy of the three algorithms as the dimension changes. The three comparison methods are: Orthogonal Discriminant Projection (ODP), Discriminant Neighbor Embedding (DNE) and the present invention. It can be seen that the recognition rate of the present invention is higher than the other two methods. Table 1 shows the comparison of the best performance of the three methods when the dimensionality reduction is between 1 and 50, and the corresponding best dimensions are in parentheses. The present invention achieves the best performance at lower dimensions.

表1Table 1

本发明所所提供的人脸识别的装置的一种具体实施方式的结构框图如图5所示,该装置包括:A structural block diagram of a specific embodiment of the device for face recognition provided by the present invention is shown in Figure 5, the device includes:

获取模块100,用于将获取得到的人脸图像数据作为待测样本;Acquisition module 100, is used for using the face image data that obtains as the sample to be tested;

映射模块200,用于利用投影变换矩阵将所述待测样本映射到低维特征空间中,得到投影后的测试样本;A mapping module 200, configured to use a projection transformation matrix to map the sample to be tested into a low-dimensional feature space to obtain a projected test sample;

查找模块300,用于在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本;A search module 300, configured to search for a standard sample closest to the test sample in the training sample set as a target sample;

确定模块400,用于将所述目标样本的类别确定为所述测试样本的类别;A determining module 400, configured to determine the category of the target sample as the category of the test sample;

其中,所述投影变换矩阵为训练模块500通过构造的类内邻接矩阵以及类间邻接矩阵,对所述训练样本集合中的多个样本进行训练得到的变换矩阵,以使类间距离最大、类内距离最小。Wherein, the projection transformation matrix is a transformation matrix obtained by training multiple samples in the training sample set through the intra-class adjacency matrix and the inter-class adjacency matrix constructed by the training module 500, so that the inter-class distance is the largest and the class The inner distance is the smallest.

本发明所提供的人脸识别的装置,利用投影变换矩阵将获取得到的待测样本映射到低维特征空间中,得到投影后的测试样本。然后在训练样本集合中,查找与测试样本距离最近的标准样本作为目标样本,并将目标样本的类别确定为测试样本的类别,以达到人脸识别的目的。本发明所提供的人脸识别的装置,为正交判别投影分别构造了两个邻接矩阵:类间和类内邻接矩阵,把类内信息和类间信息分开表示,以得到均衡的信息,从而实现类内最小和类间最大的目的。The device for face recognition provided by the present invention uses a projection transformation matrix to map the obtained samples to be tested into a low-dimensional feature space to obtain projected test samples. Then, in the training sample set, find the standard sample closest to the test sample as the target sample, and determine the category of the target sample as the category of the test sample, so as to achieve the purpose of face recognition. The device for face recognition provided by the present invention constructs two adjacency matrices respectively for the orthogonal discriminant projection: an inter-class adjacency matrix and an intra-class adjacency matrix, which separately represent intra-class information and inter-class information to obtain balanced information, thereby To achieve the purpose of the minimum within the class and the maximum among the classes.

本发明所提供的人脸识别的装置中的训练模块500进一步可以包括:The training module 500 in the face recognition device provided by the present invention may further include:

训练获取单元501,用于将获取得到的多幅人脸图像作为训练样本;A training acquisition unit 501, configured to use acquired multiple face images as training samples;

训练映射单元502,用于利用所述投影变换矩阵将所述训练样本映射到低维特征空间中,得到投影后的标准样本;A training mapping unit 502, configured to use the projection transformation matrix to map the training samples into a low-dimensional feature space to obtain projected standard samples;

训练存储单元503,用于将所述标准样本以及所述人脸图像的已知类别进行存储,作为所述训练样本集合。The training storage unit 503 is configured to store the standard samples and the known categories of the face images as the training sample set.

作为一种具体实施方式,查找模块用于在训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本包括:As a specific implementation, the search module is used to find the standard sample closest to the test sample in the training sample set as the target sample including:

查找模块利用最近邻分类器,在所述训练样本集合中,查找与所述测试样本距离最近的标准样本作为目标样本。The search module utilizes the nearest neighbor classifier to find the standard sample closest to the test sample in the training sample set as the target sample.

本发明提供的人脸识别的装置其他具体设置与方法相似,在此不再赘述。Other specific settings and methods of the face recognition device provided by the present invention are similar and will not be repeated here.

本发明所提供的人脸识别的装置,利用投影变换矩阵将获取得到的待测样本映射到低维特征空间中,得到投影后的测试样本。然后在训练样本集合中,查找与测试样本距离最近的标准样本作为目标样本,并将目标样本的类别确定为测试样本的类别,以达到人脸识别的目的。本发明所提供的人脸识别的装置,为正交判别投影分别构造了两个邻接矩阵:类间和类内邻接矩阵,把类内信息和类间信息分开表示,以得到均衡的信息,从而实现类内最小和类间最大的目的。本发明与正交判别投影算法相比,本发明能处理数据样本分布不均衡问题,且识别率较高。The device for face recognition provided by the present invention uses a projection transformation matrix to map the obtained samples to be tested into a low-dimensional feature space to obtain projected test samples. Then, in the training sample set, find the standard sample closest to the test sample as the target sample, and determine the category of the target sample as the category of the test sample, so as to achieve the purpose of face recognition. The device for face recognition provided by the present invention constructs two adjacency matrices respectively for the orthogonal discriminant projection: an inter-class adjacency matrix and an intra-class adjacency matrix, which separately represent intra-class information and inter-class information to obtain balanced information, thereby To achieve the purpose of the minimum within the class and the maximum among the classes. Compared with the orthogonal discriminant projection algorithm, the present invention can deal with the problem of unbalanced distribution of data samples, and has higher recognition rate.

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

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not 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. A method of face recognition, comprising:
taking the obtained face image data as a sample to be detected;
mapping the sample to be tested to a low-dimensional feature space by using a projection transformation matrix to obtain a projected test sample;
in a training sample set, searching a standard sample closest to the test sample as a target sample;
determining a category of the target sample as a category of the test sample;
the projective transformation matrix is a transformation matrix obtained by training a plurality of samples in the training sample set through a constructed intra-class adjacency matrix and an inter-class adjacency matrix, so that the inter-class distance is maximum and the intra-class distance is minimum.
2. The method of claim 1, wherein the projective transformation matrix is a transformation matrix obtained by training a plurality of samples in the training sample set through a constructed intra-class adjacency matrix and an inter-class adjacency matrix, and comprises:
by constructed intra-class adjacency matrix FwAnd inter-class adjacency matrix FbAccording to Sw=X(Dw-Fw)XTAnd Sb=X(Db-Fb)XTCalculating to obtain an intra-class local divergence matrix SwAnd inter-class local divergence matrix Sb
By said intra-class local divergence matrix SwAnd inter-class local divergence matrix SbCalculating to obtain a projection transformation matrix P so as to enable the inter-class distance to be maximum and the intra-class distance to be minimum;
wherein,
t>0,andare each xiSet of homogeneous and heterogeneous neighbors of DwAnd DbAre all diagonal matrices.
3. The method of claim 2, wherein the passing of the intra-class local divergence matrix SwAnd the inter-class local divergence matrix SbDetermining the projective transformation matrix P comprises:
for the intra-class local divergence matrix SwAnd the inter-class local divergence matrix SbAnd carrying out generalized eigen decomposition, arranging the obtained eigenvalues in a descending order, and taking eigenvectors corresponding to the first d eigenvalues as the projection transformation matrix P, wherein d is the dimension of the space after projection transformation.
4. A method for face recognition as claimed in any one of claims 1 to 3, wherein the set of training samples is a pre-established set, and the pre-established process comprises:
taking the obtained multiple face images as training samples;
mapping the training sample to a low-dimensional feature space by using the projective transformation matrix to obtain a projected standard sample;
and storing the standard sample and the known class of the face image as the training sample set.
5. The method of any one of claims 1 to 3, wherein the searching for the standard sample closest to the test sample as the target sample in the training sample set comprises:
and searching a standard sample closest to the test sample in the training sample set by using a nearest neighbor classifier as a target sample.
6. An apparatus for face recognition, comprising:
the acquisition module is used for taking the acquired face image data as a sample to be detected;
the mapping module is used for mapping the sample to be tested to a low-dimensional feature space by using a projection transformation matrix to obtain a projected test sample;
the searching module is used for searching a standard sample closest to the test sample in the training sample set as a target sample;
a determining module for determining the category of the target sample as the category of the test sample;
the projection transformation matrix is obtained by training a plurality of samples in the training sample set through a constructed intra-class adjacent matrix and an inter-class adjacent matrix by a training module so as to enable the inter-class distance to be maximum and the intra-class distance to be minimum.
7. The apparatus for face recognition as defined in claim 6, wherein the training module comprises:
the training acquisition unit is used for taking the acquired multiple face images as training samples;
the training mapping unit is used for mapping the training sample to a low-dimensional feature space by using the projection transformation matrix to obtain a projected standard sample;
and the training storage unit is used for storing the standard sample and the known class of the face image as the training sample set.
8. The apparatus for face recognition according to claim 6, wherein the searching module is configured to search, as the target sample, a standard sample closest to the test sample in the training sample set, and includes:
the searching module is specifically configured to search, in the training sample set, a standard sample closest to the test sample as a target sample by using a nearest neighbor classifier.
CN201510363785.3A 2015-06-26 2015-06-26 A method and device for face recognition Active CN104899578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510363785.3A CN104899578B (en) 2015-06-26 2015-06-26 A method and device for face recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510363785.3A CN104899578B (en) 2015-06-26 2015-06-26 A method and device for face recognition

Publications (2)

Publication Number Publication Date
CN104899578A true CN104899578A (en) 2015-09-09
CN104899578B CN104899578B (en) 2019-02-12

Family

ID=54032232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510363785.3A Active CN104899578B (en) 2015-06-26 2015-06-26 A method and device for face recognition

Country Status (1)

Country Link
CN (1) CN104899578B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825236A (en) * 2016-03-18 2016-08-03 苏州大学 Method and system for building sample detection model
CN106257488A (en) * 2016-07-07 2016-12-28 电子科技大学 A kind of radar target identification method based on neighborhood characteristics space discriminatory analysis
CN107203786A (en) * 2017-06-06 2017-09-26 苏州大学 Image-recognizing method and device based on sparse border Fisher algorithms
CN107480623A (en) * 2017-08-07 2017-12-15 西安电子科技大学 The neighbour represented based on cooperation keeps face identification method
CN110738248A (en) * 2019-09-30 2020-01-31 朔黄铁路发展有限责任公司 State perception data feature extraction method and device and system performance evaluation method
CN112308097A (en) * 2019-07-23 2021-02-02 北京京东尚科信息技术有限公司 Sample identification method and device
CN113780327A (en) * 2021-03-25 2021-12-10 北京沃东天骏信息技术有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679162A (en) * 2014-01-03 2014-03-26 苏州大学 Human-face identifying method and system
CN103679161A (en) * 2014-01-03 2014-03-26 苏州大学 Human-face identifying method and device
US8687880B2 (en) * 2012-03-20 2014-04-01 Microsoft Corporation Real time head pose estimation
CN103870848A (en) * 2014-04-01 2014-06-18 苏州大学 Obtaining and sample classification method for projection transformation matrix

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8687880B2 (en) * 2012-03-20 2014-04-01 Microsoft Corporation Real time head pose estimation
CN103679162A (en) * 2014-01-03 2014-03-26 苏州大学 Human-face identifying method and system
CN103679161A (en) * 2014-01-03 2014-03-26 苏州大学 Human-face identifying method and device
CN103870848A (en) * 2014-04-01 2014-06-18 苏州大学 Obtaining and sample classification method for projection transformation matrix

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825236A (en) * 2016-03-18 2016-08-03 苏州大学 Method and system for building sample detection model
CN106257488A (en) * 2016-07-07 2016-12-28 电子科技大学 A kind of radar target identification method based on neighborhood characteristics space discriminatory analysis
CN106257488B (en) * 2016-07-07 2019-11-19 电子科技大学 A Radar Target Recognition Method Based on Neighborhood Feature Space Discriminant Analysis
CN107203786A (en) * 2017-06-06 2017-09-26 苏州大学 Image-recognizing method and device based on sparse border Fisher algorithms
CN107480623A (en) * 2017-08-07 2017-12-15 西安电子科技大学 The neighbour represented based on cooperation keeps face identification method
CN112308097A (en) * 2019-07-23 2021-02-02 北京京东尚科信息技术有限公司 Sample identification method and device
CN110738248A (en) * 2019-09-30 2020-01-31 朔黄铁路发展有限责任公司 State perception data feature extraction method and device and system performance evaluation method
CN110738248B (en) * 2019-09-30 2022-09-27 朔黄铁路发展有限责任公司 State perception data feature extraction method and device and system performance evaluation method
CN113780327A (en) * 2021-03-25 2021-12-10 北京沃东天骏信息技术有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN104899578B (en) 2019-02-12

Similar Documents

Publication Publication Date Title
CN104899578B (en) A method and device for face recognition
CN106372581B (en) Method for constructing and training face recognition feature extraction network
US10049262B2 (en) Method and system for extracting characteristic of three-dimensional face image
Harandi et al. Graph embedding discriminant analysis on Grassmannian manifolds for improved image set matching
Grauman et al. The pyramid match kernel: Efficient learning with sets of features.
Phillips et al. The good, the bad, and the ugly face challenge problem
US8571332B2 (en) Methods, systems, and media for automatically classifying face images
WO2019015246A1 (en) Image feature acquisition
US20120310864A1 (en) Adaptive Batch Mode Active Learning for Evolving a Classifier
US8805653B2 (en) Supervised nonnegative matrix factorization
CN103679161B (en) A kind of face identification method and device
CN104680179B (en) Method of Data with Adding Windows based on neighborhood similarity
CN104616000B (en) A kind of face identification method and device
CN105469117B (en) A kind of image-recognizing method and device extracted based on robust features
CN104966075B (en) A kind of face identification method and system differentiating feature based on two dimension
Wang et al. Active learning for solving the incomplete data problem in facial age classification by the furthest nearest-neighbor criterion
CN110414299A (en) A computer vision-based method for kinship analysis of monkey faces
CN110781766A (en) Glassmann Manifold Discriminant Analysis Image Recognition Method Based on Eigenspectrum Regularization
CN105512674A (en) RGB-D object identification method and apparatus based on dense matching sub adaptive similarity measure
CN112668482A (en) Face recognition training method and device, computer equipment and storage medium
CN116612324A (en) Small sample image classification method and device based on semantic self-adaptive fusion mechanism
TW201828156A (en) Image identification method, measurement learning method, and image source identification method and device capable of effectively dealing with the problem of asymmetric object image identification so as to possess better robustness and higher accuracy
CN103870848B (en) Obtaining and sample classification method for projection transformation matrix
CN103927561B (en) Behavior recognition method based on probability fusion and dimensionality reduction technology
Huo et al. Ensemble of sparse cross-modal metrics for heterogeneous face recognition

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant