WO2021218060A1 - Face recognition method and device based on deep learning - Google Patents

Face recognition method and device based on deep learning Download PDF

Info

Publication number
WO2021218060A1
WO2021218060A1 PCT/CN2020/122220 CN2020122220W WO2021218060A1 WO 2021218060 A1 WO2021218060 A1 WO 2021218060A1 CN 2020122220 W CN2020122220 W CN 2020122220W WO 2021218060 A1 WO2021218060 A1 WO 2021218060A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
training
neural network
class
convolutional neural
Prior art date
Application number
PCT/CN2020/122220
Other languages
French (fr)
Chinese (zh)
Inventor
张芳健
刘军
程炜
裴炜冬
李六武
Original Assignee
深圳英飞拓智能技术有限公司
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 深圳英飞拓智能技术有限公司 filed Critical 深圳英飞拓智能技术有限公司
Publication of WO2021218060A1 publication Critical patent/WO2021218060A1/en

Links

Images

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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/168Feature extraction; Face representation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • CNN Convolutional Neural Network
  • the model training of the above-mentioned softmax loss method can correctly distinguish faces of different categories, but its effect cannot make the interval between different categories large enough, which leads to the effect of face recognition is not ideal.
  • the RegularFace method is often used to recognize faces.
  • the RegularFace method can ensure that a certain safe interval is formed between different categories, and can control the distribution of categories. But its existence: 1. When training the loss function of RegularFace, if there are more training samples in a certain category, it may cause greater interference between the distances between classes and make the distance between the categories not uniform; 2.
  • the first technical solution adopted by the present invention is to provide a face recognition method based on deep learning, including:
  • Construct a convolutional neural network model and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, where the training specifically includes using the Arcface loss function to perform the convolutional neural network
  • the model is trained in the first stage to obtain the state of convergence of the convolutional neural network model, and the second-stage training of the convolutional neural network model is performed using the intra-class and inter-class loss function;
  • the face image to be tested is compared with the face feature to be tested to recognize the face image to be tested.
  • the comparison of the face features to be tested in the face image to be tested according to the trained face recognition model to recognize the face image to be tested specifically includes:
  • the method further includes:
  • the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
  • the first stage training of the convolutional neural network model by using the Arcface loss function to obtain the convolutional neural network model convergence state includes:
  • the Arcface loss function is used to guide the convolutional neural network model for training, and the convergence state of the convolutional neural network model is obtained.
  • the second-stage training of the convolutional neural network model using the intra-class and inter-class loss function includes:
  • the intra-class and inter-class loss functions are calculated
  • the face training features and the weight parameters of the fully connected layer in the convolutional neural network model are respectively normalized, and the Arcface loss function is calculated in the loss layer of the convolutional neural network model, which specifically includes:
  • the Arcface loss function is formed according to the angle of the feature category and the angle of the modified feature category.
  • the intra-class and inter-class loss function is calculated according to the input parameters of the loss layer and the weight parameters of the fully connected layer, which specifically includes:
  • the mean value of the inter-class distance and the variance of the inter-class distance of the feature categories are calculated respectively, and the inter-class distance is obtained according to the sum of the mean value of the inter-class distance and the variance of the inter-class distance distance;
  • the second technical solution adopted by the present invention is to provide a face recognition device based on deep learning, including:
  • the extraction module is used to extract face training features from face image training samples, and to extract face features to be tested from face images to be tested;
  • the construction module is used to build a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, wherein the training specifically includes using the Arcface loss function Carry out the first stage training of the convolutional neural network model to obtain the state of convergence of the convolutional neural network model, and use the intra-class and inter-class loss function to conduct the second-stage training of the convolutional neural network model;
  • the recognition module is used to compare the face features of the face images to be tested with the face images to be tested according to the trained face recognition model, so as to recognize the face images to be tested.
  • the fourth technical solution adopted by the present invention is to provide a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
  • the technical scheme of the present invention first obtains the face picture training sample and the face picture to be tested, then extracts the face training features from the face picture training sample, and extracts the face features to be tested from the face picture to be tested, and then constructs the volume Integral neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain the face recognition model, and finally treat the person to be tested for the face image according to the trained face recognition model
  • the face features are compared to recognize the face image to be tested.
  • Figure 3 is a schematic diagram of the face training feature distribution that uses the Arcface loss function to guide the training of the convolutional neural network model;
  • Figure 4 is a schematic diagram of the face training feature distribution that uses the intra-class and inter-class loss function to guide the training of the convolutional neural network model;
  • FIG. 6 is a block diagram of modules of a face recognition device based on deep learning according to a third embodiment of the present invention.
  • Fig. 7 is a block diagram of modules of an electronic device according to a fourth embodiment of the present invention.
  • the present invention provides a face recognition method based on deep learning, which can make The spacing between classes is more uniform, and more types of training data can be trained at the same time, enabling large-scale face data training.
  • the face recognition method based on deep learning please refer to the following embodiments.
  • this embodiment is applied to face recognition applications such as office building deployment control, construction site monitoring, and access control check-in.
  • face recognition multiple face image training samples are acquired, the face image training samples are used to form a face recognition database, and the face recognition database is used to recognize the face image to be tested. Both the face image training sample and the face image to be tested can extract the set face area from the collected image to facilitate subsequent face comparison.
  • S103 Construct a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, where the training specifically includes using the Arcface loss function to convolve
  • the neural network model is trained in the first stage to obtain the state of convergence of the convolutional neural network model, and the second-stage training of the convolutional neural network model is performed using the intra-class and inter-class loss function.
  • the face feature to be tested of the face picture to be tested is compared with the face training feature of the face recognition model, and the face picture to be tested is identified according to the comparison result.
  • this embodiment uses a traversal method for comparison.
  • the face ID corresponding to the face training feature in the face recognition model is obtained, and the face ID is the person to be tested.
  • the recognition result of the face image when the comparison fails, the face image to be tested is compared with the next face training feature in the face recognition model until the correct face training feature is compared. If there is no comparison result, it will return the face image recognition failure to be tested.
  • the method further includes:
  • the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
  • the number of face IDs when the number of face IDs is unique, it can be regarded as a 1V1 comparison.
  • the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared the cosine distance between the two
  • the facial features to be tested and the compared face ID can be identified as the same person; when the cosine distance between the two is beyond the set range, the facial features to be tested and the compared face ID can be identified as Different people.
  • the first-stage training of the convolutional neural network model by using the Arcface loss function to obtain the state of convergence of the convolutional neural network model includes:
  • S132 Use the Arcface loss function to guide the convolutional neural network model for training, and obtain a convergent state of the convolutional neural network model.
  • the Arcface loss function is formed by calculating the angle information between the face training feature and the weight parameter of the fully connected layer, which can increase the angle interval of different categories.
  • the FC output of the fully connected layer can be regarded as the cross product of the feature and the weight parameter weight.
  • the face training feature x i and the weight parameter weight of the fully connected layer in the convolutional neural network model are normalized, the face is obtained.
  • the angle ⁇ can be obtained. Extract the angle of the corresponding category position of the face training image by training the label information in each iteration, then add an interval value m, and put the modified angle and cosine distance back into the classification loss function softmax loss to form
  • the final Arcface loss function L the specific formula is as follows, where m is usually taken as 0.5:
  • s represents the modulus of x i
  • m represents the angular interval value
  • the Arcface loss function L conducts training through the angle information between the face training features, and adds the angle interval value m to achieve a better classification purpose and increase the interval between different categories.
  • the representation of the feature (before normalization) in the multi-dimensional space is reduced to the representation in the two-dimensional space, please refer to Figure 3.
  • the features of the same ID are basically gathered in the same angle range, and there will be a certain interval between different IDs.
  • S134 Calculate the intra-class and inter-class loss functions according to the input parameters of the loss layer and the weight parameters of the fully connected layer;
  • S133 can also be executed in advance.
  • a face recognition model with good performance has been trained to achieve good classification.
  • the face recognition model still needs to be improved, because the Arcface loss function can only ensure that there are enough intervals between categories, and cannot make the intervals evenly distributed in the entire feature space.
  • the second stage of training is performed after the above steps. The training in this stage is based on the regular face loss function and is improved. The final goal is to make the categories evenly distributed. Please refer to Figure 4 for details.
  • the normalized face training features and the weight parameter weight are used as the input of the loss function parameter at this stage.
  • the first is to find the information that characterizes the center of the category.
  • the vector multiplication result of the normalized weight parameter W and the face training feature x represents the cosine distance between the two. The closer the cosine value is to 1, it represents The greater the probability that the face training feature x is the category in the position of the weight parameter W.
  • the cosine distance between the weight parameter W vector and itself is equal to 1, so the weight parameter W can be regarded as the center of each category. Since the Arcface loss function has been trained, the position represented by the weight parameter W has sufficient credibility. This step is to train the position to achieve a more uniform distribution without increasing the distance within the class.
  • the calculation to obtain the intra-class and inter-class loss function according to the input parameters of the loss layer and the weight parameters of the fully connected layer includes:
  • the mean value of the inter-class distance and the variance of the inter-class distance of the feature category are respectively calculated, and the inter-class distance is obtained according to the sum of the mean value of the inter-class distance and the variance of the inter-class distance distance;
  • the intra-class and inter-class loss function is obtained.
  • the intra-class and inter-class loss function is composed of the part that only represents the intra-class distance and only limits the intra-class distance during training.
  • the specific formula is as follows:
  • Ls represents and only represents the intra-class distance.
  • the intra-class distance is measured by using angle information.
  • the normalized cross product mentioned above can get the cosine information, and according to the label information in each iteration, take out the cosine value of each face training feature and the weight parameter W of the category, and make a negative logarithmic change to get
  • the final Ls value is as follows:
  • Adding a coefficient k greater than 1 to the angular distance ⁇ can achieve a better intra-class angular distance limitation effect, and ensure that the larger the angular distance, the greater the display effect.
  • the purpose of using negative logarithms after the cosine distance is to make the cosine The value converges to 1, that is, the intra-class angle converges to 0.
  • the angle between classes means that each class takes the value closest to the cosine distance of the class, which is the class distance.
  • all inter-class information can be selected from the set of inter-class information corresponding to each category.
  • the specific formula is as follows:
  • the former on the right side of the equal sign represents the mean value of the inter-class distance of all C categories, and the latter represents the variance of the inter-class distance.
  • ⁇ 1 and ⁇ 2 represent the weight coefficients of the mean value of the inter-class distance and the variance of the inter-class distance, respectively.
  • Ls and Lr respectively represent the distance between the classes and the distance between classes, and there is no mutual functional overlap, so there will be no mutual influence during training.
  • the intra-class inter-class loss function is implemented in a computer program.
  • the cosine distance Since the number of categories will be large when training on a large data set, matrix multiplication will rely on particularly large computing resources, so matrix multiplication can be performed in batches during calculation to reduce the amount of calculations processed at the same time. Please refer to FIG. 5, as shown by the dashed box in FIG. 5, which represents the calculation of the cosine distance between some categories and all other categories.
  • the embodiments of the present invention have at least the following advantages:
  • the function is divided into a part that only characterizes the distance between classes and a part that only characterizes the distance between classes. The sum of the two is used as a guide for the second training stage.
  • the functions of the two parts of the loss function do not overlap each other, so there is no interference, which makes the distance distribution between classes more uniform.
  • the split calculation is used to make the calculation amount at the same time smaller, to ensure that the computer does not overflow the calculation amount, and realize the training of large-scale data.
  • FIG. 6 is a block diagram of modules of a face recognition apparatus based on deep learning according to a third embodiment of the present invention.
  • the face recognition device based on deep learning includes:
  • the obtaining module 101 is used to obtain training samples of face pictures and face pictures to be tested;
  • the extraction module 102 is used for extracting face training features from the face image training samples, and extracting face features to be tested from the face image to be tested;
  • the construction module 103 is used to construct a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, wherein the training specifically includes the use of Arcface loss
  • the function performs the first stage training of the convolutional neural network model to obtain the state of convergence of the convolutional neural network model, and uses the intra-class and inter-class loss function to perform the second-stage training of the convolutional neural network model;
  • the recognition module 104 is configured to compare the face features of the face images to be tested with the face images to be tested according to the trained face recognition model, so as to recognize the face images to be tested.
  • the face image training sample and the face image to be tested can be acquired, and the face training feature can be extracted from the face image training sample and the face image to be tested through the extraction module 102
  • the construction module 103 a convolutional neural network model can be constructed, and the convolutional neural network model can be used to train the face training features of the face image training samples to obtain a face recognition model.
  • the recognition module 104 The facial features to be tested in the face picture to be tested can be compared according to the trained face recognition model to recognize the face picture to be tested.
  • the spacing between classes can be made more uniform, and at the same time more types of training data can be trained, and large-scale face data training can be realized. In this way, the efficiency of face recognition can be improved, and the human face can be improved. Face recognition effect.
  • the identification module 104 is specifically used for:
  • the identification module 104 is also used for:
  • the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
  • the building module 103 is used for:
  • the Arcface loss function is used to guide the convolutional neural network model for training, and the convergence state of the convolutional neural network model is obtained.
  • the building module 103 is also used for:
  • the intra-class and inter-class loss functions are calculated
  • the building module 103 is also used for:
  • the Arcface loss function is formed according to the angle of the feature category and the angle of the modified feature category.
  • the building module 103 is also used for:
  • the mean value of the inter-class distance of the feature category and the variance of the inter-class distance are calculated respectively;
  • the intra-class inter-class loss function is obtained.
  • FIG. 7 is a module block diagram of an electronic device according to a fourth embodiment of the present invention.
  • the electronic device can be used to implement the face recognition method based on deep learning in the foregoing embodiment.
  • the electronic device mainly includes: a memory 301, a processor 302, a bus 303, and a computer program stored on the memory 301 and running on the processor 302.
  • the memory 301 and the processor 302 are connected by the bus 303.
  • the processor 302 executes the computer program, it implements the face recognition method based on deep learning in the foregoing embodiment.
  • the number of processors can be one or more.
  • the memory 301 may be a high-speed random access memory (RAM, Random Access Memory) memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • RAM Random Access Memory
  • non-volatile memory non-volatile memory
  • the memory 301 is used to store executable program codes, and the processor 302 is coupled with the memory 301.
  • a computer program is stored on the readable storage medium, and when the program is executed by the processor, the deep learning-based face recognition method in the foregoing embodiment is implemented.
  • the computer storage medium may also be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), RAM, a magnetic disk, or an optical disk, and other various media that can store program codes.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division, and there may be other divisions in actual implementation, for example, multiple modules or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or modules, and may be in electrical, mechanical or other forms.
  • the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a readable storage.
  • the medium includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned readable storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

A face recognition method and device based on deep learning. The method comprises: obtaining a face image training sample and a face image to be detected (S101); extracting a face training feature from the face image training sample, and extracting a face feature to be detected from said face image (S102); constructing a convolutional neural network model, and training the face training feature of the face image training sample by using the convolutional neural network model to obtain a face recognition model (S103); and comparing said face feature of said face image according to the trained face recognition model so as to recognize said face image (S104). The inter-class spacing can be more uniform, more types of training data can be trained, large-scale face data training can be implemented, and thus, the face recognition efficiency can be improved and the face recognition performance can be improved.

Description

基于深度学习的人脸识别方法及装置Face recognition method and device based on deep learning
本申请要求于2020年4月29日在中国专利局提交的、申请号为202010358934.8的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with application number 202010358934.8 filed at the Chinese Patent Office on April 29, 2020, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种基于深度学习的人脸识别方法、装置及可读存储介质。The present invention relates to the technical field of image processing, in particular to a face recognition method, device and readable storage medium based on deep learning.
背景技术Background technique
随着人脸识别技术的发展,各种人脸识别相关的产品已经广泛应用于人们生活中。目前人脸识别技术的主要识别功能是基于卷积神经网络(Convolutional Neural Network,CNN)来实现。使用数量很大的人脸图片数据集,对卷积神经网络进行训练,使得在卷积神经网络训练收敛后拥有人脸识别的能力。考虑到目前许多产品需要针对数以百万计的人员身份,导致网络模型的训练难度增加。为此,当前许多训练方法是通过分类激活函数softmax进行身份定义,使模型训练的过程可转化为对分类损失函数softmax loss的训练迭代优化,以此来降低训练的复杂度和增加效果。With the development of face recognition technology, various face recognition related products have been widely used in people's lives. At present, the main recognition function of face recognition technology is based on Convolutional Neural Network (CNN). Use a large number of face image data sets to train the convolutional neural network, so that after the convolutional neural network training converges, it has the ability of face recognition. Considering that many products currently need to target millions of people, the difficulty of training the network model increases. For this reason, many current training methods use the classification activation function softmax to define the identity, so that the process of model training can be transformed into the iterative training optimization of the classification loss function softmax loss, so as to reduce the complexity of training and increase the effect.
上述的softmax loss方法的模型训练,可以令不同分类的人脸正确区分开来,但是其效果不能让不同类别间的间隔足够大,进而导致人脸识别的效果并不太理想。为增大不同类别间的人脸特征间隔,目前常采用RegularFace方式来对人脸进行识别。RegularFace方法能够保证不同分类间形成一定的安全的间隔,且能够控制类别的分布情况。但其存在:1、在对RegularFace的损失函数进行训练时,如果某个类别的训练样本较多,可能会导致类间距离干扰更大,令类别间的间距不够均匀;2、在训练的前期,由于模型并未形成较好的分类功能,即卷积层的W参数所表示的各个类别的中心点未足够的分离,会导致延长训练时长;3、当训练样本类别数较多的时候,求取出的类间余弦距离的计算量会非常大,导致当前大部分计算机难以或不能运行。The model training of the above-mentioned softmax loss method can correctly distinguish faces of different categories, but its effect cannot make the interval between different categories large enough, which leads to the effect of face recognition is not ideal. In order to increase the facial feature interval between different categories, the RegularFace method is often used to recognize faces. The RegularFace method can ensure that a certain safe interval is formed between different categories, and can control the distribution of categories. But its existence: 1. When training the loss function of RegularFace, if there are more training samples in a certain category, it may cause greater interference between the distances between classes and make the distance between the categories not uniform; 2. In the early stages of training , Because the model does not form a good classification function, that is, the center points of each category represented by the W parameter of the convolutional layer are not sufficiently separated, which will lead to prolonged training time; 3. When the number of training sample categories is large, The amount of calculation to find the cosine distance between classes will be very large, which makes it difficult or impossible for most computers to run at present.
有鉴于此,有必要提出对目前的人脸识别技术进行进一步的改进。In view of this, it is necessary to propose further improvements to the current face recognition technology.
技术问题technical problem
为解决上述至少一技术问题,本发明的主要目的是提供一种基于深度学习 的人脸识别方法、装置及可读存储介质。In order to solve at least one of the above technical problems, the main purpose of the present invention is to provide a face recognition method, device and readable storage medium based on deep learning.
技术解决方案Technical solutions
为实现上述目的,本发明采用的第一个技术方案为:提供一种基于深度学习的人脸识别方法,包括:In order to achieve the above objective, the first technical solution adopted by the present invention is to provide a face recognition method based on deep learning, including:
获取人脸图片训练样本及待测人脸图片;Obtain face image training samples and face images to be tested;
从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征;Extracting face training features from face image training samples, and extracting face features to be tested from face images to be tested;
构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,其中,所述训练具体包括利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,以及利用类内类间损失函数对卷积神经网络模型进行第二阶段训练;Construct a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, where the training specifically includes using the Arcface loss function to perform the convolutional neural network The model is trained in the first stage to obtain the state of convergence of the convolutional neural network model, and the second-stage training of the convolutional neural network model is performed using the intra-class and inter-class loss function;
根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。According to the trained face recognition model, the face image to be tested is compared with the face feature to be tested to recognize the face image to be tested.
其中,所述根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别,具体包括:Wherein, the comparison of the face features to be tested in the face image to be tested according to the trained face recognition model to recognize the face image to be tested specifically includes:
根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对;According to the trained face recognition model, compare the face features of the face images to be tested;
在比对成功时,获取人脸识别模型中人脸训练特征对应的人脸ID;以及When the comparison is successful, obtain the face ID corresponding to the face training feature in the face recognition model; and
将人脸ID作为待测人脸图片识别结果。Use the face ID as the recognition result of the face picture to be tested.
其中,所述获取人脸识别模型中人脸训练特征对应的人脸ID之后,还包括:Wherein, after obtaining the face ID corresponding to the face training feature in the face recognition model, the method further includes:
检测比对后的人脸识别模型的人脸ID的数量是否唯一;Check whether the number of face IDs of the face recognition model after the comparison is unique;
在人脸ID数量唯一时,根据待测人脸特征与比对成功的人脸识别模型的人脸训练特征的余弦距离,识别待测人脸特征与比对的人脸ID是否为同一人。When the number of face IDs is unique, the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
其中,所述利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,包括:Wherein, the first stage training of the convolutional neural network model by using the Arcface loss function to obtain the convolutional neural network model convergence state includes:
对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,并在卷积神经网络模型中损失层计算出Arcface损失函数;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model respectively, and calculate the Arcface loss function in the loss layer of the convolutional neural network model;
利用Arcface损失函数引导卷积神经网络模型进行训练,得到卷积神经网络模型收敛的状态。The Arcface loss function is used to guide the convolutional neural network model for training, and the convergence state of the convolutional neural network model is obtained.
其中,所述利用类内类间损失函数对卷积神经网络模型进行第二阶段训 练,包括:Wherein, the second-stage training of the convolutional neural network model using the intra-class and inter-class loss function includes:
对卷积神经网络模型中损失层的输入参数进行归一化;Normalize the input parameters of the loss layer in the convolutional neural network model;
根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the intra-class and inter-class loss functions are calculated;
利用类内类间损失函数引导引导卷积神经网络模型进行训练,得到人脸识别模型。Use the intra-class and inter-class loss function to guide and guide the convolutional neural network model to train, and obtain the face recognition model.
其中,所述对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,并在卷积神经网络模型中损失层计算出Arcface损失函数,具体包括:Wherein, the face training features and the weight parameters of the fully connected layer in the convolutional neural network model are respectively normalized, and the Arcface loss function is calculated in the loss layer of the convolutional neural network model, which specifically includes:
对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,得到人脸训练特征与对应的权重参数之间的余弦距离;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model to obtain the cosine distance between the face training features and the corresponding weight parameters;
通过余弦距离进行反三角函数计算,得到特征类别的角度;Calculate the inverse trigonometric function through the cosine distance to obtain the angle of the feature category;
将特征类别的角度增加间隔值,得到修改后的特征类别的角度;Increase the angle of the feature category by the interval value to get the angle of the modified feature category;
根据特征类别的角度及修改后的特征类别的角度形成Arcface损失函数。The Arcface loss function is formed according to the angle of the feature category and the angle of the modified feature category.
其中,所述根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数,具体包括:Wherein, the intra-class and inter-class loss function is calculated according to the input parameters of the loss layer and the weight parameters of the fully connected layer, which specifically includes:
对修改后的特征类别的角度进行负对数变化,得到类内角度距离;Perform a negative logarithmic change on the angle of the modified feature category to obtain the intra-class angle distance;
根据损失层的输入参数与全连接层的权重参数分别计算出特征类别的类间距离的均值及类间距离的方差,并根据类间距离的均值与类间距离的方差之和,得到类间距离;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the mean value of the inter-class distance and the variance of the inter-class distance of the feature categories are calculated respectively, and the inter-class distance is obtained according to the sum of the mean value of the inter-class distance and the variance of the inter-class distance distance;
根据类内角度距离与类间距离之和,得到类内类间损失函数。According to the sum of the angular distance within the class and the distance between the classes, the intra-class and inter-class loss function is obtained.
为实现上述目的,本发明采用的第二个技术方案为:提供一种基于深度学习的人脸识别装置,包括:In order to achieve the above objective, the second technical solution adopted by the present invention is to provide a face recognition device based on deep learning, including:
获取模块,用于获取人脸图片训练样本及待测人脸图片;The acquisition module is used to acquire training samples of face pictures and face pictures to be tested;
提取模块,用于从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征;The extraction module is used to extract face training features from face image training samples, and to extract face features to be tested from face images to be tested;
构建模块,用于构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,其中,所述训练具体包括利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,以及利用类内类间损失函数对卷积神经网络模型进行第二阶段训练;The construction module is used to build a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, wherein the training specifically includes using the Arcface loss function Carry out the first stage training of the convolutional neural network model to obtain the state of convergence of the convolutional neural network model, and use the intra-class and inter-class loss function to conduct the second-stage training of the convolutional neural network model;
识别模块,用于根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。The recognition module is used to compare the face features of the face images to be tested with the face images to be tested according to the trained face recognition model, so as to recognize the face images to be tested.
为实现上述目的,本发明采用的第三个技术方案为:提供一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现上述方法中的步骤。In order to achieve the above objective, the third technical solution adopted by the present invention is to provide an electronic device including: a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the computer program, it realizes the steps in the above method.
为实现上述目的,本发明采用的第四个技术方案为:提供一种可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现上述方法中的步骤。In order to achieve the above objective, the fourth technical solution adopted by the present invention is to provide a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
有益效果Beneficial effect
本发明的技术方案采用先获取人脸图片训练样本及待测人脸图片,然后从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征,再构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,最后根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。通过本发明的技术方案的实施,能够使类间的间距更加均匀,同时可以训练更多类别的训练数据,能够实现大规模的人脸数据训练,如此,能够提高人脸识别效率,提升的人脸识别效果。The technical scheme of the present invention first obtains the face picture training sample and the face picture to be tested, then extracts the face training features from the face picture training sample, and extracts the face features to be tested from the face picture to be tested, and then constructs the volume Integral neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain the face recognition model, and finally treat the person to be tested for the face image according to the trained face recognition model The face features are compared to recognize the face image to be tested. Through the implementation of the technical solution of the present invention, the spacing between classes can be made more uniform, and at the same time more types of training data can be trained, and large-scale face data training can be realized. In this way, the efficiency of face recognition can be improved, and the human face can be improved. Face recognition effect.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, without creative work, other drawings can be obtained based on the structure shown in these drawings.
图1为本发明第一实施例基于深度学习的人脸识别方法的方法流程图;FIG. 1 is a method flowchart of a face recognition method based on deep learning according to the first embodiment of the present invention;
图2为本发明中利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练的具体流程图;2 is a specific flow chart of the present invention using the convolutional neural network model to train the face training features of the face image training samples;
图3为利用Arcface损失函数引导卷积神经网络模型训练的人脸训练特征分布示意图;Figure 3 is a schematic diagram of the face training feature distribution that uses the Arcface loss function to guide the training of the convolutional neural network model;
图4为利用类内类间损失函数引导卷积神经网络模型训练的人脸训练特征分布示意图;Figure 4 is a schematic diagram of the face training feature distribution that uses the intra-class and inter-class loss function to guide the training of the convolutional neural network model;
图5为本发明一部分类别与其他全部类别之间的余弦距离的计算示意图;Fig. 5 is a schematic diagram of calculating the cosine distance between some categories of the present invention and all other categories;
图6为本发明第三实施例基于深度学习的人脸识别装置的模块方框图;6 is a block diagram of modules of a face recognition device based on deep learning according to a third embodiment of the present invention;
图7为本发明第四实施例电子设备的模块方框图。Fig. 7 is a block diagram of modules of an electronic device according to a fourth embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the objectives, functional characteristics and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
需要说明,本发明中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。It should be noted that the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on what can be achieved by a person of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist. , Is not within the protection scope of the present invention.
区别于现有技术在人脸识别特征训练中,由于各个特征类别的中心点未足够的分离,导致训练时间较长的问题,本发明提供了一种基于深度学习的人脸识别方法,能够使类间的间距更加均匀,同时可以训练更多类别的训练数据,能够实现大规模的人脸数据训练。基于深度学习的人脸识别方法的具体实施方式,请参照下述的实施例。Different from the prior art in the face recognition feature training, because the center points of each feature category are not sufficiently separated, the training time is longer. The present invention provides a face recognition method based on deep learning, which can make The spacing between classes is more uniform, and more types of training data can be trained at the same time, enabling large-scale face data training. For the specific implementation of the face recognition method based on deep learning, please refer to the following embodiments.
请参照图1,图1为本发明第一实施例基于深度学习的人脸识别方法的方法流程图。在本发明实施例中,该基于深度学习的人脸识别方法,包括:Please refer to FIG. 1, which is a method flowchart of a face recognition method based on deep learning according to a first embodiment of the present invention. In the embodiment of the present invention, the face recognition method based on deep learning includes:
S101、获取人脸图片训练样本及待测人脸图片。S101. Obtain a training sample of a face picture and a face picture to be tested.
具体的,本实施例应用于办公楼布控、工地监测及门禁打卡等人脸识别应用中。在人脸识别前,先获取多个人脸图片训练样本,利用人脸图片训练样本形成人脸识别库,利用人脸识别库对待测人脸图片进行识别。人脸图片训练样本及待测人脸图片均可以从采集的图片中提取设定的人脸区域,以方便后续的人脸比对。Specifically, this embodiment is applied to face recognition applications such as office building deployment control, construction site monitoring, and access control check-in. Before face recognition, multiple face image training samples are acquired, the face image training samples are used to form a face recognition database, and the face recognition database is used to recognize the face image to be tested. Both the face image training sample and the face image to be tested can extract the set face area from the collected image to facilitate subsequent face comparison.
S102、从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征。S102. Extracting face training features from the face image training samples, and extracting face features to be tested from the face image to be tested.
具体的,本实施例中,对人脸图片训练样本及待测人脸图片分别进行特征提取,提取的特征可以为人脸区域、鼻子、眼睛、眉毛及嘴巴等等。Specifically, in this embodiment, feature extraction is performed on the training sample of the face image and the face image to be tested, and the extracted features may be the face region, nose, eyes, eyebrows, mouth, and so on.
S103、构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,其中,所述训练具体包括利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,以及利用类内类间损失函数对卷积神经网络模型进行第二阶段训练。S103. Construct a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, where the training specifically includes using the Arcface loss function to convolve The neural network model is trained in the first stage to obtain the state of convergence of the convolutional neural network model, and the second-stage training of the convolutional neural network model is performed using the intra-class and inter-class loss function.
具体的,本实施例中,上述的训练包括Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态。利用Arcface损失函数,可以有效的训练出性能良好的人脸识别神经网络模型,在训练数据中的类内距离小,且类间距离有足够的间隔,实现较好的分类。利用类内类间损失函数对卷积神经网络模型进行第二阶段训练。依据regularface损失函数并进行改进,最终目标是使得类别均匀分布。上述的卷积神经网络模型包括损失层、全连接层、池化层及若干卷积层等。卷积神经网络模型的人脸训练特征经过最后一个全连接层得到最终作为分类的全连接层FC输出,该全连接层FC的权重参数为weight。Specifically, in this embodiment, the above-mentioned training includes the Arcface loss function to perform the first-stage training of the convolutional neural network model to obtain the state of convergence of the convolutional neural network model. Using the Arcface loss function, you can effectively train a good-performance face recognition neural network model. The intra-class distance in the training data is small, and the inter-class distance has enough intervals to achieve better classification. The second-stage training of the convolutional neural network model is carried out using the intra-class and inter-class loss function. According to the regularface loss function and make improvements, the ultimate goal is to make the categories evenly distributed. The aforementioned convolutional neural network model includes a loss layer, a fully connected layer, a pooling layer, and several convolutional layers. The face training feature of the convolutional neural network model passes through the last fully connected layer to obtain the final fully connected layer FC output for classification, and the weight parameter of the fully connected layer FC is weight.
S104、根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。S104: Compare the face features to be tested in the face image to be tested according to the trained face recognition model, so as to recognize the face image to be tested.
具体的,将待测人脸图片的待测人脸特征与人脸识别模型的人脸训练特征进行比对,根据比对结果识别将待测人脸图片。Specifically, the face feature to be tested of the face picture to be tested is compared with the face training feature of the face recognition model, and the face picture to be tested is identified according to the comparison result.
进一步的,所述根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别,具体包括:Further, the comparison of the features of the face to be tested in the face image to be tested according to the trained face recognition model to recognize the face image to be tested specifically includes:
根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对;According to the trained face recognition model, compare the face features of the face images to be tested;
在比对成功时,获取人脸识别模型中人脸训练特征对应的人脸ID;以及When the comparison is successful, obtain the face ID corresponding to the face training feature in the face recognition model; and
将人脸ID作为待测人脸图片识别结果。Use the face ID as the recognition result of the face picture to be tested.
具体的,在比对过程中,本实施例采用遍历方式进行比对,在比对成功时,获取人脸识别模型中人脸训练特征对应的人脸ID,该人脸ID即为待测人脸图片的识别结果;在比对失败时,将待测人脸图片与人脸识别模型中的下一个人脸训练特征进行比对,直至比对出正确的人脸训练特征。若没有比对出结果,则返回待测人脸图片识别失败。Specifically, during the comparison process, this embodiment uses a traversal method for comparison. When the comparison is successful, the face ID corresponding to the face training feature in the face recognition model is obtained, and the face ID is the person to be tested. The recognition result of the face image; when the comparison fails, the face image to be tested is compared with the next face training feature in the face recognition model until the correct face training feature is compared. If there is no comparison result, it will return the face image recognition failure to be tested.
进一步的,所述获取人脸识别模型中人脸训练特征对应的人脸ID之后, 还包括:Further, after obtaining the face ID corresponding to the face training feature in the face recognition model, the method further includes:
检测比对后的人脸识别模型的人脸ID的数量是否唯一;Check whether the number of face IDs of the face recognition model after the comparison is unique;
在人脸ID数量唯一时,根据待测人脸特征与比对成功的人脸识别模型的人脸训练特征的余弦距离,识别待测人脸特征与比对的人脸ID是否为同一人。When the number of face IDs is unique, the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
本实施例中,在人脸ID数量唯一时,则可以视为1V1比对,根据待测人脸特征与比对成功的人脸识别模型的人脸训练特征的余弦距离,在两者余弦距离在设定范围时,则可识别待测人脸特征与比对的人脸ID为同一人;两者余弦距离超出设定范围时,则识别待测人脸特征与比对的人脸ID为不同人。In this embodiment, when the number of face IDs is unique, it can be regarded as a 1V1 comparison. According to the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared, the cosine distance between the two When the range is set, the facial features to be tested and the compared face ID can be identified as the same person; when the cosine distance between the two is beyond the set range, the facial features to be tested and the compared face ID can be identified as Different people.
请参照图2,图2为本发明中利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练的具体流程图。图3为利用Arcface损失函数引导卷积神经网络模型训练的人脸训练特征分布示意图;图4为利用类内类间损失函数引导卷积神经网络模型训练的人脸训练特征分布示意图;图5为本发明一部分类别与其他全部类别之间的余弦距离计算示意图。Please refer to FIG. 2. FIG. 2 is a specific flow chart of using the convolutional neural network model to train the face training features of the face image training samples in the present invention. Figure 3 is a schematic diagram of the face training feature distribution using the Arcface loss function to guide the training of the convolutional neural network model; Figure 4 is a schematic diagram of the face training feature distribution using the intra-class and inter-class loss function to guide the training of the convolutional neural network model; Figure 5 is A schematic diagram of calculating the cosine distance between some categories of the present invention and all other categories.
进一步的,所述利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,包括:Further, the first-stage training of the convolutional neural network model by using the Arcface loss function to obtain the state of convergence of the convolutional neural network model includes:
S131、对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,并在卷积神经网络模型中损失层计算出Arcface损失函数;S131. Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model, respectively, and calculate the Arcface loss function in the loss layer of the convolutional neural network model;
S132、利用Arcface损失函数引导卷积神经网络模型进行训练,得到卷积神经网络模型收敛的状态。S132: Use the Arcface loss function to guide the convolutional neural network model for training, and obtain a convergent state of the convolutional neural network model.
具体的,本实施例中,通过计算人脸训练特征与全连接层的权重参数之间的角度信息,形成Arcface损失函数,能够加大不同类别的角度间隔。Specifically, in this embodiment, the Arcface loss function is formed by calculating the angle information between the face training feature and the weight parameter of the fully connected layer, which can increase the angle interval of different categories.
进一步的,所述对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,并在卷积神经网络模型中损失层计算出Arcface损失函数,具体包括:Further, said normalizing the face training features and the weight parameters of the fully connected layer in the convolutional neural network model respectively, and calculating the Arcface loss function in the loss layer of the convolutional neural network model, specifically includes:
对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,得到人脸训练特征与对应的权重参数之间的余弦距离;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model to obtain the cosine distance between the face training features and the corresponding weight parameters;
通过余弦距离进行反三角函数计算,得到特征类别的角度;Calculate the inverse trigonometric function through the cosine distance to obtain the angle of the feature category;
将特征类别的角度增加间隔值,得到修改后的特征类别的角度;Increase the angle of the feature category by the interval value to get the angle of the modified feature category;
根据特征类别的角度及修改后的特征类别的角度形成Arcface损失函数。The Arcface loss function is formed according to the angle of the feature category and the angle of the modified feature category.
具体的,全连接层FC输出可以看做特征与权重参数weight的叉乘,当人脸训练特征x i及卷积神经网络模型中全连接层的权重参数weight归一化后,得 到该人脸训练特征与每个全连接层的权重参数W j之间的余弦距离,具体公式如下: Specifically, the FC output of the fully connected layer can be regarded as the cross product of the feature and the weight parameter weight. When the face training feature x i and the weight parameter weight of the fully connected layer in the convolutional neural network model are normalized, the face is obtained The specific formula for the cosine distance between the training feature and the weight parameter W j of each fully connected layer is as follows:
Figure PCTCN2020122220-appb-000001
Figure PCTCN2020122220-appb-000001
其中,
Figure PCTCN2020122220-appb-000002
表示全连接层FC输出,x i表示第i个人脸训练特征,θ j表示角度。
in,
Figure PCTCN2020122220-appb-000002
Represents the FC output of the fully connected layer, x i represents the i-th face training feature, and θ j represents the angle.
通过余弦距离进行反三角函数变化,可得到角度θ。通过训练每一次迭代中的标签信息取出该人脸训练图片相应类别位置的角度,然后加上一个间隔值m,并将修改后的角度及其余弦距离放回到分类损失函数softmax loss中,形成最终的Arcface损失函数L,具体公式如下,其中m通常取值为0.5:Through the inverse trigonometric function change of the cosine distance, the angle θ can be obtained. Extract the angle of the corresponding category position of the face training image by training the label information in each iteration, then add an interval value m, and put the modified angle and cosine distance back into the classification loss function softmax loss to form The final Arcface loss function L, the specific formula is as follows, where m is usually taken as 0.5:
Figure PCTCN2020122220-appb-000003
Figure PCTCN2020122220-appb-000003
其中,s表示x i的模,m表示角度间隔值。 Among them, s represents the modulus of x i , and m represents the angular interval value.
Arcface损失函数L通过人脸训练特征间的角度信息进行引导训练,并加入角度间隔值m,实现更好的分类目的,增大了不同类别间的间隔。经过Arcface损失函数引导训练之后,特征(归一化前)在多维空间中的表示降维到二维空间中的表示图,请参照图3。同一个ID的特征都基本聚集在同样的角度范围之内,而不同的ID之间会有一定的间隔。The Arcface loss function L conducts training through the angle information between the face training features, and adds the angle interval value m to achieve a better classification purpose and increase the interval between different categories. After the Arcface loss function guides the training, the representation of the feature (before normalization) in the multi-dimensional space is reduced to the representation in the two-dimensional space, please refer to Figure 3. The features of the same ID are basically gathered in the same angle range, and there will be a certain interval between different IDs.
上述的分类损失函数softmax loss可以对训练进行迭代优化,如此,能够降低训练的复杂度,提高处理效率。The above classification loss function softmax loss can perform iterative optimization on training. In this way, the complexity of training can be reduced and the processing efficiency can be improved.
其中,所述利用类内类间损失函数对卷积神经网络模型进行第二阶段训练,包括:Wherein, the second-stage training of the convolutional neural network model using the intra-class and inter-class loss function includes:
S133、对卷积神经网络模型中损失层的输入参数进行归一化;S133: Normalize the input parameters of the loss layer in the convolutional neural network model;
S134、根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数;S134: Calculate the intra-class and inter-class loss functions according to the input parameters of the loss layer and the weight parameters of the fully connected layer;
S135、利用类内类间损失函数引导引导卷积神经网络模型进行训练,得到人脸识别模型。S135. Use the intra-class and inter-class loss function to guide and guide the convolutional neural network model for training to obtain a face recognition model.
本实施例中,S133还可以提前执行。已经训练出性能良好的人脸识别模型,可以实现良好的分类。不过该人脸识别模型仍有待改进的地方,因为Arcface损失函数只能保证类别间有足够的间隔,并不能让间隔均匀的分布于整个特征空间。为了得到均匀分布的类别,本实施例中,在上述步骤过后进行 第二阶段的训练,这个阶段的训练是依据regularface损失函数并进行改进,最终目标是使得类别均匀分布,具体请参照图4。In this embodiment, S133 can also be executed in advance. A face recognition model with good performance has been trained to achieve good classification. However, the face recognition model still needs to be improved, because the Arcface loss function can only ensure that there are enough intervals between categories, and cannot make the intervals evenly distributed in the entire feature space. In order to obtain uniformly distributed categories, in this embodiment, the second stage of training is performed after the above steps. The training in this stage is based on the regular face loss function and is improved. The final goal is to make the categories evenly distributed. Please refer to Figure 4 for details.
利用归一化之后的人脸训练特征以及权重参数weight作为本阶段的loss函数参数输入。首先是来寻找表征类别中心的信息,基于Arcface损失函数,归一化后的权重参数W与人脸训练特征x的向量乘法结果代表着两者的余弦距离,余弦值越接近1,则代表着该人脸训练特征x是该权重参数W位置中的类别的概率越大。而同时权重参数W向量与自己本身的余弦距离衡为1,因此可以将权重参数W视作每个类别的中心。由于已经经过了Arcface损失函数训练,因此,权重参数W所代表的位置已经有足够的可信度,本步骤是将该位置通过训练达到更均匀的分布,同时不会使得类内距离变大。The normalized face training features and the weight parameter weight are used as the input of the loss function parameter at this stage. The first is to find the information that characterizes the center of the category. Based on the Arcface loss function, the vector multiplication result of the normalized weight parameter W and the face training feature x represents the cosine distance between the two. The closer the cosine value is to 1, it represents The greater the probability that the face training feature x is the category in the position of the weight parameter W. At the same time, the cosine distance between the weight parameter W vector and itself is equal to 1, so the weight parameter W can be regarded as the center of each category. Since the Arcface loss function has been trained, the position represented by the weight parameter W has sufficient credibility. This step is to train the position to achieve a more uniform distribution without increasing the distance within the class.
进一步的,所述根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数,具体包括:Further, the calculation to obtain the intra-class and inter-class loss function according to the input parameters of the loss layer and the weight parameters of the fully connected layer includes:
对修改后的特征类别的角度进行负对数变化,得到类内角度距离;Perform a negative logarithmic change on the angle of the modified feature category to obtain the intra-class angle distance;
根据损失层的输入参数与全连接层的权重参数分别计算出特征类别的类间距离的均值及类间距离的方差,并根据类间距离的均值与类间距离的方差之和,得到类间距离;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the mean value of the inter-class distance and the variance of the inter-class distance of the feature category are respectively calculated, and the inter-class distance is obtained according to the sum of the mean value of the inter-class distance and the variance of the inter-class distance distance;
根据类内角度距离与类间距离之和,得到类内类间损失函数。According to the sum of the angular distance within the class and the distance between the classes, the intra-class and inter-class loss function is obtained.
具体的,类内类间损失函数是由只表征类内距离并在训练中只对类内距离限制的部分,如下式等号左边的前者,即L s(θ+w),与只对类间距离起作用的部分组合而成,如下式等号左边后者,即L r(W),具体公式如下: Specifically, the intra-class and inter-class loss function is composed of the part that only represents the intra-class distance and only limits the intra-class distance during training. The former on the left side of the equal sign in the following equation, namely L s (θ+w), It is composed of the parts that play a role in the distance between them, and the latter on the left side of the equation is L r (W). The specific formula is as follows:
L(θ,W)=L s(θ,W)+L r(W), L(θ,W)=L s (θ,W)+L r (W),
其中,Ls代表且仅代表着类内距离,本实施例对于类内距离,采用角度信息进行衡量。如上述的归一化后的叉乘即可得到余弦信息,并依据每一次迭代中的标签信息,取出每个人脸训练特征与所属类别的权重参数W的余弦值,并做负对数变化得到最终的Ls值,如下式:Among them, Ls represents and only represents the intra-class distance. In this embodiment, the intra-class distance is measured by using angle information. For example, the normalized cross product mentioned above can get the cosine information, and according to the label information in each iteration, take out the cosine value of each face training feature and the weight parameter W of the category, and make a negative logarithmic change to get The final Ls value is as follows:
Figure PCTCN2020122220-appb-000004
Figure PCTCN2020122220-appb-000004
在角度距离θ中加入一个大于1的系数k,可达到更好的类内角度距离限制效果,并保证角度距离越大则显示效果更大,在余弦距离之后采用负对数的目的在于使得余弦值向1收敛,即类内角度向0收敛。Adding a coefficient k greater than 1 to the angular distance θ can achieve a better intra-class angular distance limitation effect, and ensure that the larger the angular distance, the greater the display effect. The purpose of using negative logarithms after the cosine distance is to make the cosine The value converges to 1, that is, the intra-class angle converges to 0.
类间的角度表示每个类别取与其余弦距离最接近类别的值,为其类间距 离,显然的,全部类间信息可以选取每个类别所对应的类间信息的集合,具体公式如下:The angle between classes means that each class takes the value closest to the cosine distance of the class, which is the class distance. Obviously, all inter-class information can be selected from the set of inter-class information corresponding to each category. The specific formula is as follows:
Figure PCTCN2020122220-appb-000005
Figure PCTCN2020122220-appb-000005
其中,等号右边的前者代表了全部C个类别的类间距离均值,后者代表类间距离的方差,λ1、λ2分别表示类间距离均值与类间距离方差的权重系数。随着Lr的下降,类间距离会变小并且每个距离的差距也会会缩小,从而使得类间距离均匀。Among them, the former on the right side of the equal sign represents the mean value of the inter-class distance of all C categories, and the latter represents the variance of the inter-class distance. λ1 and λ2 represent the weight coefficients of the mean value of the inter-class distance and the variance of the inter-class distance, respectively. With the decrease of Lr, the distance between classes will become smaller and the gap of each distance will also be reduced, so that the distance between classes will be uniform.
上述Ls与Lr分别代表着类内距离与类间距离,并且不存在相互的功能重叠部分,因此训练中不会造成相互影响。The above Ls and Lr respectively represent the distance between the classes and the distance between classes, and there is no mutual functional overlap, so there will be no mutual influence during training.
通过上述步骤构造的类内类间损失函数,可以训练出类别分布更加均匀的模型,得到更好的人脸识别效果。类内类间损失函数在电脑程序中实现是,在求取每个类对应的类间距离的时候,需要用权重参数weight与自己的转置矩阵做矩阵乘法,以获得每一个类与其他类的余弦距离。由于在大数据集上进行训练时,类别数量会很大,以此做矩阵乘法会依赖特别大的运算资源,因此计算时候可分批进行矩阵乘法,减低同一时间处理的计算量。请参照图5,如图5中的虚线框所示,代表一部分类别与其他全部类别之间的余弦距离的计算。Through the intra-class and inter-class loss function constructed through the above steps, a model with more uniform class distribution can be trained, and a better face recognition effect can be obtained. The intra-class inter-class loss function is implemented in a computer program. When calculating the inter-class distance corresponding to each class, you need to use the weight parameter weight and your own transpose matrix to do matrix multiplication to obtain each class and other classes. The cosine distance. Since the number of categories will be large when training on a large data set, matrix multiplication will rely on particularly large computing resources, so matrix multiplication can be performed in batches during calculation to reduce the amount of calculations processed at the same time. Please refer to FIG. 5, as shown by the dashed box in FIG. 5, which represents the calculation of the cosine distance between some categories and all other categories.
综上所述,本发明的实施例至少具有如下优点:In summary, the embodiments of the present invention have at least the following advantages:
1、分阶段训练,先利用Arcface方式训练神经网络模型,使得模型已经有良好的分类功能,其类别的位置较为可信。随后进行改进的regularface方式训练,用前面阶段训练出来的参数进行类间距离的均匀化的训练,并同时保持类内距离足够小。1. Training in stages, first use the Arcface method to train the neural network model, so that the model already has a good classification function, and the position of its category is more credible. Subsequently, the improved regularface training is carried out, using the parameters trained in the previous stage to uniformize the distance between classes, and at the same time keep the distance within the class sufficiently small.
2、采用类内类间间距离损失函数训练,该函数分为只表征类内距离的部分,和只表征类间距离的部分,两者之和作为第二个训练阶段的引导。该损失函数的两个部分的功能相互没有重叠部分,因此不会形成干扰,使得类间距离分布更加均匀。2. Use the intra-class and inter-class distance loss function to train. The function is divided into a part that only characterizes the distance between classes and a part that only characterizes the distance between classes. The sum of the two is used as a guide for the second training stage. The functions of the two parts of the loss function do not overlap each other, so there is no interference, which makes the distance distribution between classes more uniform.
3、利用最后的全连接层参数,计算出类间距离的均值与方差,并以此作为损失函数的一部分,可更直接的表征训练的目的。3. Using the final fully connected layer parameters, calculate the mean value and variance of the distance between classes, and use this as a part of the loss function, which can more directly represent the purpose of training.
4、对于每个类别对应的最小类间距离计算,使用拆分式的计算,使得同一时间的计算量更小,保证计算机不会计算量溢出,实现了大规模数据的训练。4. For the calculation of the minimum inter-class distance corresponding to each category, the split calculation is used to make the calculation amount at the same time smaller, to ensure that the computer does not overflow the calculation amount, and realize the training of large-scale data.
请参照图6,图6为本发明第三实施例基于深度学习的人脸识别装置的模块方框图。本发明的实施例中,该基于深度学习的人脸识别装置,包括:Please refer to FIG. 6, which is a block diagram of modules of a face recognition apparatus based on deep learning according to a third embodiment of the present invention. In an embodiment of the present invention, the face recognition device based on deep learning includes:
获取模块101,用于获取人脸图片训练样本及待测人脸图片;The obtaining module 101 is used to obtain training samples of face pictures and face pictures to be tested;
提取模块102,用于从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征;The extraction module 102 is used for extracting face training features from the face image training samples, and extracting face features to be tested from the face image to be tested;
构建模块103,用于构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,其中,所述训练具体包括利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,以及利用类内类间损失函数对卷积神经网络模型进行第二阶段训练;The construction module 103 is used to construct a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, wherein the training specifically includes the use of Arcface loss The function performs the first stage training of the convolutional neural network model to obtain the state of convergence of the convolutional neural network model, and uses the intra-class and inter-class loss function to perform the second-stage training of the convolutional neural network model;
识别模块104,用于根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。The recognition module 104 is configured to compare the face features of the face images to be tested with the face images to be tested according to the trained face recognition model, so as to recognize the face images to be tested.
本实施例中,通过获取模块101,可以获取人脸图片训练样本及待测人脸图片,通过提取模块102,可以从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征,通过构建模块103,可以构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,通过识别模块104,可以根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。通过本发明的技术方案的实施,能够使类间的间距更加均匀,同时可以训练更多类别的训练数据,能够实现大规模的人脸数据训练,如此,能够提高人脸识别效率,提升的人脸识别效果。In this embodiment, through the acquiring module 101, the face image training sample and the face image to be tested can be acquired, and the face training feature can be extracted from the face image training sample and the face image to be tested through the extraction module 102 For the face features to be tested, through the construction module 103, a convolutional neural network model can be constructed, and the convolutional neural network model can be used to train the face training features of the face image training samples to obtain a face recognition model. The recognition module 104 , The facial features to be tested in the face picture to be tested can be compared according to the trained face recognition model to recognize the face picture to be tested. Through the implementation of the technical solution of the present invention, the spacing between classes can be made more uniform, and at the same time more types of training data can be trained, and large-scale face data training can be realized. In this way, the efficiency of face recognition can be improved, and the human face can be improved. Face recognition effect.
其中,所述识别模块104,具体用于:Wherein, the identification module 104 is specifically used for:
根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对;According to the trained face recognition model, compare the face features of the face images to be tested;
在比对成功时,获取人脸识别模型中人脸训练特征对应的人脸ID;以及When the comparison is successful, obtain the face ID corresponding to the face training feature in the face recognition model; and
将人脸ID作为待测人脸图片识别结果。Use the face ID as the recognition result of the face picture to be tested.
其中,所述识别模块104,还用于:Wherein, the identification module 104 is also used for:
检测比对后的人脸识别模型的人脸ID的数量是否唯一;Check whether the number of face IDs of the face recognition model after the comparison is unique;
在人脸ID数量唯一时,根据待测人脸特征与比对成功的人脸识别模型的人脸训练特征的余弦距离,识别待测人脸特征与比对的人脸ID是否为同一人。When the number of face IDs is unique, the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
其中,所述构建模块103,用于:Wherein, the building module 103 is used for:
对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归 一化,并在卷积神经网络模型中损失层计算出Arcface损失函数;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model respectively, and calculate the Arcface loss function in the loss layer of the convolutional neural network model;
利用Arcface损失函数引导卷积神经网络模型进行训练,得到卷积神经网络模型收敛的状态。The Arcface loss function is used to guide the convolutional neural network model for training, and the convergence state of the convolutional neural network model is obtained.
其中,所述构建模块103,还用于:Wherein, the building module 103 is also used for:
对卷积神经网络模型中损失层的输入参数进行归一化;Normalize the input parameters of the loss layer in the convolutional neural network model;
根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the intra-class and inter-class loss functions are calculated;
利用类内类间损失函数引导引导卷积神经网络模型进行训练,得到人脸识别模型。Use the intra-class and inter-class loss function to guide and guide the convolutional neural network model to train, and obtain the face recognition model.
其中,所述构建模块103,还用于:Wherein, the building module 103 is also used for:
对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,得到人脸训练特征与对应的权重参数之间的余弦距离;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model to obtain the cosine distance between the face training features and the corresponding weight parameters;
通过余弦距离进行反三角函数计算,得到特征类别的角度;Calculate the inverse trigonometric function through the cosine distance to obtain the angle of the feature category;
将特征类别的角度增加间隔值,得到修改后的特征类别的角度;Increase the angle of the feature category by the interval value to get the angle of the modified feature category;
根据特征类别的角度及修改后的特征类别的角度形成Arcface损失函数。The Arcface loss function is formed according to the angle of the feature category and the angle of the modified feature category.
其中,所述构建模块103,还用于:Wherein, the building module 103 is also used for:
根据损失层的输入参数与全连接层的权重参数分别计算出特征类别的类间距离的均值及类间距离的方差;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the mean value of the inter-class distance of the feature category and the variance of the inter-class distance are calculated respectively;
根据类间距离的均值与类间距离的方差之和得到类内类间损失函数。According to the sum of the mean value of the inter-class distance and the variance of the inter-class distance, the intra-class inter-class loss function is obtained.
请参阅图7,图7为本发明第四实施例电子设备的模块方框图。该电子设备可用于实现前述实施例中的基于深度学习的人脸识别方法。如图7所示,该电子设备主要包括:存储器301、处理器302、总线303及存储在存储器301上并可在处理器302上运行的计算机程序,存储器301和处理器302通过总线303连接。处理器302执行该计算机程序时,实现前述实施例中的基于深度学习的人脸识别方法。其中,处理器的数量可以是一个或多个。Please refer to FIG. 7, which is a module block diagram of an electronic device according to a fourth embodiment of the present invention. The electronic device can be used to implement the face recognition method based on deep learning in the foregoing embodiment. As shown in FIG. 7, the electronic device mainly includes: a memory 301, a processor 302, a bus 303, and a computer program stored on the memory 301 and running on the processor 302. The memory 301 and the processor 302 are connected by the bus 303. When the processor 302 executes the computer program, it implements the face recognition method based on deep learning in the foregoing embodiment. Among them, the number of processors can be one or more.
存储器301可以是高速随机存取记忆体(RAM,Random Access Memory)存储器,也可为非不稳定的存储器(non-volatile memory),例如磁盘存储器。存储器301用于存储可执行程序代码,处理器302与存储器301耦合。The memory 301 may be a high-speed random access memory (RAM, Random Access Memory) memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. The memory 301 is used to store executable program codes, and the processor 302 is coupled with the memory 301.
进一步的,本申请实施例还提供了一种可读存储介质,该可读存储介质可以是设置于上述各实施例中的电子设备中,该可读存储介质可以是前述图7所示实施例中的存储器。Further, an embodiment of the present application also provides a readable storage medium, which may be an electronic device provided in each of the above embodiments, and the readable storage medium may be the embodiment shown in FIG. 7 In the memory.
该可读存储介质上存储有计算机程序,该程序被处理器执行时实现前述实施例中的基于深度学习的人脸识别方法。进一步的,该计算机可存储介质还可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A computer program is stored on the readable storage medium, and when the program is executed by the processor, the deep learning-based face recognition method in the foregoing embodiment is implemented. Further, the computer storage medium may also be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), RAM, a magnetic disk, or an optical disk, and other various media that can store program codes.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division, and there may be other divisions in actual implementation, for example, multiple modules or components can be combined or integrated. To another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or modules, and may be in electrical, mechanical or other forms.
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a readable storage. The medium includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned readable storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施 例,所涉及的动作和模块并不一定都是本申请所必须的。It should be noted that for the foregoing method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited by the described sequence of actions. Because according to this application, some steps can be performed in other order or at the same time. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the involved actions and modules are not necessarily all required by this application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For a part that is not described in detail in an embodiment, reference may be made to related descriptions of other embodiments.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是在本发明的技术方案构思下,利用本发明说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本发明的专利保护范围内。The above descriptions are only the preferred embodiments of the present invention, and do not limit the scope of the present invention. Under the conception of the technical solution of the present invention, equivalent structural transformations made by using the content of the description and drawings of the present invention, or direct/indirect Applications in other related technical fields are included in the scope of patent protection of the present invention.

Claims (10)

  1. 一种基于深度学习的人脸识别方法,其特征在于,所述基于深度学习的人脸识别方法包括:A face recognition method based on deep learning, characterized in that the face recognition method based on deep learning includes:
    获取人脸图片训练样本及待测人脸图片;Obtain face image training samples and face images to be tested;
    从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征;Extracting face training features from face image training samples, and extracting face features to be tested from face images to be tested;
    构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,其中,所述训练具体包括利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,以及利用类内类间损失函数对卷积神经网络模型进行第二阶段训练;Construct a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, where the training specifically includes using the Arcface loss function to perform the convolutional neural network The model is trained in the first stage to obtain the state of convergence of the convolutional neural network model, and the second-stage training of the convolutional neural network model is performed using the intra-class and inter-class loss function;
    根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。According to the trained face recognition model, the face image to be tested is compared with the face feature to be tested to recognize the face image to be tested.
  2. 如权利要求1所述的基于深度学习的人脸识别方法,其特征在于,所述根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别,具体包括:The face recognition method based on deep learning according to claim 1, wherein the face recognition model to be tested according to the trained face recognition model compares the face features of the face to be tested, so as to compare the face to be tested. Picture recognition, including:
    根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对;According to the trained face recognition model, compare the face features of the face images to be tested;
    在比对成功时,获取人脸识别模型中人脸训练特征对应的人脸ID;以及When the comparison is successful, obtain the face ID corresponding to the face training feature in the face recognition model; and
    将人脸ID作为待测人脸图片识别结果。Use the face ID as the recognition result of the face picture to be tested.
  3. 如权利要求2所述的基于深度学习的人脸识别方法,其特征在于,所述获取人脸识别模型中人脸训练特征对应的人脸ID之后,还包括:The face recognition method based on deep learning according to claim 2, wherein after obtaining the face ID corresponding to the face training feature in the face recognition model, the method further comprises:
    检测比对后的人脸识别模型的人脸ID的数量是否唯一;Check whether the number of face IDs of the face recognition model after the comparison is unique;
    在人脸ID数量唯一时,根据待测人脸特征与比对成功的人脸识别模型的人脸训练特征的余弦距离,识别待测人脸特征与比对的人脸ID是否为同一人。When the number of face IDs is unique, the cosine distance between the face feature to be tested and the face training feature of the face recognition model that has been successfully compared is used to identify whether the face feature to be tested and the compared face ID are the same person.
  4. 如权利要求1所述的基于深度学习的人脸识别方法,其特征在于,所述利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到卷积神经网络模型收敛的状态,包括:The face recognition method based on deep learning according to claim 1, wherein the first stage training of the convolutional neural network model by using the Arcface loss function to obtain the convolutional neural network model convergence state comprises:
    对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,并在卷积神经网络模型中损失层计算出Arcface损失函数;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model respectively, and calculate the Arcface loss function in the loss layer of the convolutional neural network model;
    利用Arcface损失函数引导卷积神经网络模型进行训练,得到卷积神经网络模型收敛的状态。The Arcface loss function is used to guide the convolutional neural network model for training, and the convergence state of the convolutional neural network model is obtained.
  5. 如权利要求4所述的基于深度学习的人脸识别方法,其特征在于,所述利用类内类间损失函数对卷积神经网络模型进行第二阶段训练,包括:The face recognition method based on deep learning according to claim 4, wherein the second-stage training of the convolutional neural network model using the intra-class and inter-class loss function comprises:
    对卷积神经网络模型中损失层的输入参数进行归一化;Normalize the input parameters of the loss layer in the convolutional neural network model;
    根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the intra-class and inter-class loss functions are calculated;
    利用类内类间损失函数引导引导卷积神经网络模型进行训练,得到人脸识别模型。Use the intra-class and inter-class loss function to guide and guide the convolutional neural network model to train, and obtain the face recognition model.
  6. 如权利要求5所述的基于深度学习的人脸识别方法,其特征在于,所述对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,并在卷积神经网络模型中损失层计算出Arcface损失函数,具体包括:The face recognition method based on deep learning according to claim 5, wherein the face training feature and the weight parameters of the fully connected layer in the convolutional neural network model are respectively normalized, and the convolution The loss layer in the neural network model calculates the Arcface loss function, which includes:
    对人脸训练特征及卷积神经网络模型中全连接层的权重参数分别进行归一化,得到人脸训练特征与对应的权重参数之间的余弦距离;Normalize the face training features and the weight parameters of the fully connected layer in the convolutional neural network model to obtain the cosine distance between the face training features and the corresponding weight parameters;
    通过余弦距离进行反三角函数计算,得到特征类别的角度;Calculate the inverse trigonometric function through the cosine distance to obtain the angle of the feature category;
    将特征类别的角度增加间隔值,得到修改后的特征类别的角度;Increase the angle of the feature category by the interval value to get the angle of the modified feature category;
    根据特征类别的角度及修改后的特征类别的角度形成Arcface损失函数。The Arcface loss function is formed according to the angle of the feature category and the angle of the modified feature category.
  7. 如权利要求6所述的基于深度学习的人脸识别方法,其特征在于,所述根据损失层的输入参数与全连接层的权重参数,计算得到类内类间损失函数,具体包括:The face recognition method based on deep learning according to claim 6, characterized in that the calculation to obtain the intra-class and inter-class loss function according to the input parameters of the loss layer and the weight parameters of the fully connected layer specifically includes:
    对修改后的特征类别的角度进行负对数变化,得到类内角度距离;Perform a negative logarithmic change on the angle of the modified feature category to obtain the intra-class angle distance;
    根据损失层的输入参数与全连接层的权重参数分别计算出特征类别的类间距离的均值及类间距离的方差,并根据类间距离的均值与类间距离的方差之和,得到类间距离;According to the input parameters of the loss layer and the weight parameters of the fully connected layer, the mean value of the inter-class distance and the variance of the inter-class distance of the feature categories are calculated respectively, and the inter-class distance is obtained according to the sum of the mean value of the inter-class distance and the variance of the inter-class distance distance;
    根据类内角度距离与类间距离之和,得到类内类间损失函数。According to the sum of the angular distance within the class and the distance between the classes, the intra-class and inter-class loss function is obtained.
  8. 一种基于深度学习的人脸识别装置,其特征在于,所述基于深度学习的人脸识别装置包括:A face recognition device based on deep learning, characterized in that the face recognition device based on deep learning comprises:
    获取模块,用于获取人脸图片训练样本及待测人脸图片;The acquisition module is used to acquire training samples of face pictures and face pictures to be tested;
    提取模块,用于从人脸图片训练样本提取人脸训练特征,以及从待测人脸图片提取待测人脸特征;The extraction module is used to extract face training features from face image training samples, and to extract face features to be tested from face images to be tested;
    构建模块,用于构建卷积神经网络模型,并利用卷积神经网络模型对人脸图片训练样本的人脸训练特征进行训练,得到人脸识别模型,其中,所述训练具体包括利用Arcface损失函数对卷积神经网络模型进行第一阶段训练,得到 卷积神经网络模型收敛的状态,以及利用类内类间损失函数对卷积神经网络模型进行第二阶段训练;The construction module is used to build a convolutional neural network model, and use the convolutional neural network model to train the face training features of the face image training samples to obtain a face recognition model, wherein the training specifically includes using the Arcface loss function Carry out the first stage training of the convolutional neural network model to obtain the state of convergence of the convolutional neural network model, and use the intra-class and inter-class loss function to conduct the second-stage training of the convolutional neural network model;
    识别模块,用于根据训练好的人脸识别模型对待测人脸图片的待测人脸特征进行比对,以对待测人脸图片进行识别。The recognition module is used to compare the face features of the face images to be tested with the face images to be tested according to the trained face recognition model, so as to recognize the face images to be tested.
  9. 一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,实现权利要求1至7中任意一项所述方法中的步骤。An electronic device comprising: a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor implements claim 1 when the computer program is executed by the processor Steps in the method described in any one of to 7.
  10. 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现权利要求1至7中的任意一项所述方法中的步骤。A readable storage medium having a computer program stored thereon, wherein the computer program implements the steps in the method of any one of claims 1 to 7 when the computer program is executed by a processor.
PCT/CN2020/122220 2020-04-29 2020-10-20 Face recognition method and device based on deep learning WO2021218060A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010358934.8A CN111639535B (en) 2020-04-29 2020-04-29 Face recognition method and device based on deep learning
CN202010358934.8 2020-04-29

Publications (1)

Publication Number Publication Date
WO2021218060A1 true WO2021218060A1 (en) 2021-11-04

Family

ID=72328811

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/122220 WO2021218060A1 (en) 2020-04-29 2020-10-20 Face recognition method and device based on deep learning

Country Status (2)

Country Link
CN (1) CN111639535B (en)
WO (1) WO2021218060A1 (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989906A (en) * 2021-11-26 2022-01-28 江苏科技大学 A face recognition method
CN114120430A (en) * 2022-01-26 2022-03-01 杭州魔点科技有限公司 Mask face recognition method based on double-branch weight fusion homology self-supervision
CN114140642A (en) * 2021-11-17 2022-03-04 深圳集智数字科技有限公司 A filing method, apparatus, electronic device, and computer-readable storage medium
CN114417994A (en) * 2022-01-18 2022-04-29 中山大学 Full-supervised learning image classification method based on self-adaption and interval repulsion loss
CN114596608A (en) * 2022-01-19 2022-06-07 中国科学院自动化研究所 A multi-cue-based dual-stream video face forgery detection method and system
CN114663965A (en) * 2022-05-24 2022-06-24 之江实验室 Testimony comparison method and device based on two-stage alternating learning
CN114708460A (en) * 2022-04-12 2022-07-05 济南博观智能科技有限公司 Image classification method, system, electronic equipment and storage medium
CN114783013A (en) * 2021-11-26 2022-07-22 南京烽火星空通信发展有限公司 Face recognition method
CN114839613A (en) * 2022-02-25 2022-08-02 哈尔滨工程大学 Unknown signal identification method based on zero-time learning
CN114839616A (en) * 2022-06-14 2022-08-02 中国人民解放军海军航空大学 Intelligent identification method for radar target constraint element learning device
CN114859317A (en) * 2022-06-14 2022-08-05 中国人民解放军海军航空大学 Adaptive Reverse Truncation Intelligent Recognition Method of Radar Target
CN114859316A (en) * 2022-06-14 2022-08-05 中国人民解放军海军航空大学 An Intelligent Recognition Method of Radar Target Based on Task Relevance Weighting
CN114879185A (en) * 2022-06-14 2022-08-09 中国人民解放军海军航空大学 Radar target intelligent recognition method based on task experience transfer
CN115249376A (en) * 2022-07-29 2022-10-28 浙江工业大学 An acceleration method for massive face comparison based on deep learning
CN116246301A (en) * 2022-12-08 2023-06-09 华南理工大学 A Two-Stage Pig Face Recognition Method Based on Metric Learning
CN116453201A (en) * 2023-06-19 2023-07-18 南昌大学 Face recognition method and system based on adjacent edge loss
CN116681985A (en) * 2023-06-05 2023-09-01 北京远舢智能科技有限公司 Feature extraction optimization method and system based on convolutional neural network
CN118175544A (en) * 2024-04-09 2024-06-11 山东衡昊信息技术有限公司 Adaptive face recognition and verification method based on 5G communication network

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111639535B (en) * 2020-04-29 2023-08-22 深圳英飞拓智能技术有限公司 Face recognition method and device based on deep learning
CN112258559B (en) * 2020-10-26 2024-05-07 上海萱闱医疗科技有限公司 Intelligent running timing scoring system and method based on multi-target tracking
CN112329589B (en) * 2020-10-30 2023-03-24 四川天翼网络股份有限公司 Face recognition method based on high-dimensional feature algorithm
CN112651467B (en) * 2021-01-18 2024-05-07 第四范式(北京)技术有限公司 Training method and system and prediction method and system for convolutional neural network
CN113762019B (en) * 2021-01-22 2024-04-09 北京沃东天骏信息技术有限公司 Training method of feature extraction network, face recognition method and device
CN112800921A (en) * 2021-01-22 2021-05-14 广东电网有限责任公司广州供电局 Multi-band light source face recognition method based on convolutional neural network
CN113069080B (en) * 2021-03-22 2021-12-21 上海交通大学医学院附属第九人民医院 A method and device for evaluating difficult airway based on artificial intelligence
CN113191461B (en) * 2021-06-29 2021-09-17 苏州浪潮智能科技有限公司 Picture identification method, device and equipment and readable storage medium
CN113723205A (en) * 2021-08-04 2021-11-30 中国人民解放军陆军勤务学院 Face recognition method based on face bottom library feature grouping
CN113449704B (en) * 2021-08-31 2022-03-25 北京的卢深视科技有限公司 Face recognition model training method and device, electronic equipment and storage medium
CN115311705B (en) * 2022-07-06 2023-08-15 南京邮电大学 Face cloud recognition system based on deep learning
CN118799930A (en) * 2023-09-13 2024-10-18 中移动金融科技有限公司 Training method, device, equipment and storage medium for face recognition model

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170351905A1 (en) * 2016-06-06 2017-12-07 Samsung Electronics Co., Ltd. Learning model for salient facial region detection
CN107679513A (en) * 2017-10-20 2018-02-09 北京达佳互联信息技术有限公司 Image processing method, device and server
CN108647583A (en) * 2018-04-19 2018-10-12 浙江大承机器人科技有限公司 A kind of face recognition algorithms training method based on multiple target study
CN109815801A (en) * 2018-12-18 2019-05-28 北京英索科技发展有限公司 Face identification method and device based on deep learning
CN109858362A (en) * 2018-12-28 2019-06-07 浙江工业大学 A kind of mobile terminal method for detecting human face based on inversion residual error structure and angle associated losses function
CN111639535A (en) * 2020-04-29 2020-09-08 深圳英飞拓智能技术有限公司 Face recognition method and device based on deep learning

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778867B (en) * 2016-12-15 2020-07-07 北京旷视科技有限公司 Target detection method and device, and neural network training method and device
CN108009528B (en) * 2017-12-26 2020-04-07 广州广电运通金融电子股份有限公司 Triple Loss-based face authentication method and device, computer equipment and storage medium
CN108171191B (en) * 2018-01-05 2019-06-28 百度在线网络技术(北京)有限公司 Method and apparatus for detecting face
KR20200000824A (en) * 2018-06-25 2020-01-03 한국과학기술원 Method for recognizing facial expression based on deep-learning model using center-dispersion loss function
CN109165566B (en) * 2018-08-01 2021-04-27 中国计量大学 A Convolutional Neural Network Training Method for Face Recognition Based on a Novel Loss Function
CN109214360B (en) * 2018-10-15 2021-03-26 北京亮亮视野科技有限公司 Construction method and application of face recognition model based on Parasoft Max loss function

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170351905A1 (en) * 2016-06-06 2017-12-07 Samsung Electronics Co., Ltd. Learning model for salient facial region detection
CN107679513A (en) * 2017-10-20 2018-02-09 北京达佳互联信息技术有限公司 Image processing method, device and server
CN108647583A (en) * 2018-04-19 2018-10-12 浙江大承机器人科技有限公司 A kind of face recognition algorithms training method based on multiple target study
CN109815801A (en) * 2018-12-18 2019-05-28 北京英索科技发展有限公司 Face identification method and device based on deep learning
CN109858362A (en) * 2018-12-28 2019-06-07 浙江工业大学 A kind of mobile terminal method for detecting human face based on inversion residual error structure and angle associated losses function
CN111639535A (en) * 2020-04-29 2020-09-08 深圳英飞拓智能技术有限公司 Face recognition method and device based on deep learning

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140642A (en) * 2021-11-17 2022-03-04 深圳集智数字科技有限公司 A filing method, apparatus, electronic device, and computer-readable storage medium
CN113989906A (en) * 2021-11-26 2022-01-28 江苏科技大学 A face recognition method
CN114783013A (en) * 2021-11-26 2022-07-22 南京烽火星空通信发展有限公司 Face recognition method
CN114417994A (en) * 2022-01-18 2022-04-29 中山大学 Full-supervised learning image classification method based on self-adaption and interval repulsion loss
CN114596608A (en) * 2022-01-19 2022-06-07 中国科学院自动化研究所 A multi-cue-based dual-stream video face forgery detection method and system
CN114120430A (en) * 2022-01-26 2022-03-01 杭州魔点科技有限公司 Mask face recognition method based on double-branch weight fusion homology self-supervision
CN114839613A (en) * 2022-02-25 2022-08-02 哈尔滨工程大学 Unknown signal identification method based on zero-time learning
CN114708460A (en) * 2022-04-12 2022-07-05 济南博观智能科技有限公司 Image classification method, system, electronic equipment and storage medium
CN114663965A (en) * 2022-05-24 2022-06-24 之江实验室 Testimony comparison method and device based on two-stage alternating learning
CN114859317A (en) * 2022-06-14 2022-08-05 中国人民解放军海军航空大学 Adaptive Reverse Truncation Intelligent Recognition Method of Radar Target
CN114839616A (en) * 2022-06-14 2022-08-02 中国人民解放军海军航空大学 Intelligent identification method for radar target constraint element learning device
CN114859316A (en) * 2022-06-14 2022-08-05 中国人民解放军海军航空大学 An Intelligent Recognition Method of Radar Target Based on Task Relevance Weighting
CN114879185A (en) * 2022-06-14 2022-08-09 中国人民解放军海军航空大学 Radar target intelligent recognition method based on task experience transfer
CN115249376A (en) * 2022-07-29 2022-10-28 浙江工业大学 An acceleration method for massive face comparison based on deep learning
CN115249376B (en) * 2022-07-29 2025-06-27 浙江工业大学 A method for accelerating massive face comparison based on deep learning
CN116246301A (en) * 2022-12-08 2023-06-09 华南理工大学 A Two-Stage Pig Face Recognition Method Based on Metric Learning
CN116681985A (en) * 2023-06-05 2023-09-01 北京远舢智能科技有限公司 Feature extraction optimization method and system based on convolutional neural network
CN116453201A (en) * 2023-06-19 2023-07-18 南昌大学 Face recognition method and system based on adjacent edge loss
CN116453201B (en) * 2023-06-19 2023-09-01 南昌大学 Face recognition method and system based on adjacent edge loss
CN118175544A (en) * 2024-04-09 2024-06-11 山东衡昊信息技术有限公司 Adaptive face recognition and verification method based on 5G communication network

Also Published As

Publication number Publication date
CN111639535A (en) 2020-09-08
CN111639535B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
WO2021218060A1 (en) Face recognition method and device based on deep learning
US11487995B2 (en) Method and apparatus for determining image quality
US20230087526A1 (en) Neural network training method, image classification system, and related device
WO2019119505A1 (en) Face recognition method and device, computer device and storage medium
WO2020015076A1 (en) Facial image comparison method and apparatus, computer device, and storage medium
WO2022105118A1 (en) Image-based health status identification method and apparatus, device and storage medium
WO2022100337A1 (en) Face image quality assessment method and apparatus, computer device and storage medium
WO2017088432A1 (en) Image recognition method and device
CN112084856A (en) Face posture detection method and device, terminal equipment and storage medium
CN107679546A (en) Face image data acquisition method, device, terminal device and storage medium
Zheng et al. Harmonic mean linear discriminant analysis
CN113887538A (en) Model training method, face recognition method, electronic device and storage medium
CN112418059B (en) Emotion recognition method and device, computer equipment and storage medium
CN113449704A (en) Face recognition model training method and device, electronic equipment and storage medium
CN104915684B (en) A kind of image-recognizing method and device based on the more plane SVMs of robust
WO2021031817A1 (en) Emotion recognition method and device, computer device, and storage medium
CN112529029B (en) Information processing method, device and storage medium
CN114120454A (en) Training method and device of living body detection model, electronic equipment and storage medium
WO2021217856A1 (en) Face image generation method and apparatus, electronic device, and readable storage medium
CN113327191A (en) Face image synthesis method and device
CN113780234B (en) Edge-guided human eye image analysis method
CN114399808A (en) A face age estimation method, system, electronic device and storage medium
CN115169384A (en) Electroencephalogram classification model training method, intention identification method, equipment and medium
CN111666976B (en) Feature fusion method, device and storage medium based on attribute information
CN110638472B (en) Emotion recognition method, apparatus, electronic device, and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20933915

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20933915

Country of ref document: EP

Kind code of ref document: A1