CN110866469A - A method, device, equipment and medium for facial feature recognition - Google Patents
A method, device, equipment and medium for facial feature recognition Download PDFInfo
- Publication number
- CN110866469A CN110866469A CN201911047655.3A CN201911047655A CN110866469A CN 110866469 A CN110866469 A CN 110866469A CN 201911047655 A CN201911047655 A CN 201911047655A CN 110866469 A CN110866469 A CN 110866469A
- Authority
- CN
- China
- Prior art keywords
- facial
- facial features
- feature
- features
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000001815 facial effect Effects 0.000 title claims abstract description 363
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000000605 extraction Methods 0.000 claims abstract description 42
- 238000013145 classification model Methods 0.000 claims abstract description 33
- 238000012549 training Methods 0.000 claims abstract description 26
- 238000002372 labelling Methods 0.000 claims abstract description 18
- 238000010801 machine learning Methods 0.000 claims abstract description 12
- 210000000697 sensory organ Anatomy 0.000 claims abstract 27
- 210000004709 eyebrow Anatomy 0.000 claims description 45
- 238000003062 neural network model Methods 0.000 claims description 16
- 210000001508 eye Anatomy 0.000 claims description 14
- 238000001514 detection method Methods 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 description 21
- 238000012545 processing Methods 0.000 description 15
- 238000013473 artificial intelligence Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 239000013598 vector Substances 0.000 description 4
- 241000124033 Salix Species 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 210000005069 ears Anatomy 0.000 description 2
- 210000000214 mouth Anatomy 0.000 description 2
- 210000001331 nose Anatomy 0.000 description 2
- 235000006040 Prunus persica var persica Nutrition 0.000 description 1
- 240000006413 Prunus persica var. persica Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000013526 transfer learning Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Human Computer Interaction (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本发明涉及互联网通信技术领域,尤其涉及一种人脸五官识别方法、装置、设备及介质。The present invention relates to the technical field of Internet communication, and in particular, to a method, device, device and medium for identifying facial features.
背景技术Background technique
随着互联网通信技术的发展,各种各样的生物特征识别技术也应运而生,人脸识别便是其中的一种。人脸识别,属于计算机视觉领域,是基于人的脸部特征信息进行身份识别的一种生物识别技术。人脸作为人体的重要的生物特征,人脸具有唯一性和不易被复制的良好特性,同时人脸图像的采集也相对方便,因而人脸识别在很多领域都有着重要的作用。With the development of Internet communication technology, various biometric identification technologies have emerged, and face recognition is one of them. Face recognition, which belongs to the field of computer vision, is a biometric technology for identification based on human facial feature information. As an important biological feature of the human body, the face has the good characteristics of uniqueness and is not easy to be copied. At the same time, the collection of face images is relatively convenient, so face recognition plays an important role in many fields.
人脸中的五官(眉、眼、耳、鼻和口)往往也有着对应的五官属性类型。比如,眉毛有柳叶眉、剑眉等,眼睛有桃花眼、丹凤眼等。进行更细粒度的人脸五官识别也具有重要的意义。然而,现有技术中,得到的人脸五官识别方案需要对大量的脸部五官样本图像进行五官属性类型的标注,这样存在着标注工作量大的问题,比如给每个眉毛样本图像标注对应的五官属性类型(柳叶眉、剑眉等)。此外可以基于不同的分类维度进行五官属性类型的标注(比如,对于眉毛样本图像可以以眉形分类维度来标注,也可以以眉毛浓密分类维度来标注),不同的分类维度之间的差异可能造成标识时区分难度大的问题。现有技术中存在的问题影响着建立相关模型进行人脸五官识别的效率。因此,需要提供对人脸五官更有效的识别方案。The facial features (eyebrows, eyes, ears, nose, and mouth) in a human face often have corresponding facial features. For example, eyebrows include willow leaf eyebrows, sword eyebrows, etc., and eyes include peach blossom eyes, Danfeng eyes, etc. It is also of great significance to perform more fine-grained facial feature recognition. However, in the prior art, the obtained facial feature recognition solution needs to label a large number of facial feature sample images with facial feature attribute types, so there is a problem of a large amount of labeling workload, such as labeling each eyebrow sample image corresponding to Types of facial features (willow leaf eyebrow, sword eyebrow, etc.). In addition, the types of facial features can be marked based on different classification dimensions (for example, eyebrow sample images can be marked with the eyebrow shape classification dimension, or the eyebrow thickness classification dimension). Differences between different classification dimensions may cause Identifying difficult problems. The problems existing in the prior art affect the efficiency of establishing a relevant model for facial feature recognition. Therefore, it is necessary to provide a more effective recognition solution for facial features.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术应用在对人脸五官进行识别时,建立相关模型效率低、成本高等问题,本发明提供了一种人脸五官识别方法、装置、设备及介质:In order to solve the problems of low efficiency and high cost of establishing related models when the prior art is applied to recognize facial features, the present invention provides a facial feature recognition method, device, equipment and medium:
一方面,本发明提供了一种人脸五官识别方法,所述方法包括:In one aspect, the present invention provides a method for identifying facial features, the method comprising:
获取待识别脸部五官图像;Obtain the facial features image to be recognized;
通过特征提取模型从所述待识别脸部五官图像中提取出五官特征;Extracting facial features from the facial facial features image to be recognized through a feature extraction model;
基于所述五官特征与多个标准五官特征间的相似度,确定与所述五官特征相匹配的标准五官特征,每个所述标准五官特征标注有对应的五官属性类型;Based on the similarity between the facial features and a plurality of standard facial features, determine standard facial features that match the facial features, and each of the standard facial features is marked with a corresponding facial feature type;
获取所述相匹配的标准五官特征对应的五官属性类型;Obtain the facial feature attribute type corresponding to the matched standard facial feature;
将所述相匹配的标准五官特征对应的五官属性类型作为所述待识别脸部五官图像的五官属性类型;Taking the facial feature attribute type corresponding to the matched standard facial features as the facial feature attribute type of the facial facial features image to be recognized;
其中,所述特征提取模型对应脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构,所述脸部五官分类模型是通过多个脸部五官样本图像进行机器学习训练获得的,所述脸部五官样本图像携带有所属用户的分类标注信息。Wherein, the feature extraction model corresponds to a network structure used for extracting feature information of facial features in a facial feature classification model, and the facial feature classification model is obtained by performing machine learning training on multiple facial feature sample images, The facial features sample image carries the classification and labeling information of the user to which it belongs.
另一方面提供了一种人脸五官识别装置,所述装置包括:Another aspect provides a facial feature recognition device, the device comprising:
图像获取模块:用于获取待识别脸部五官图像;Image acquisition module: used to acquire facial features images to be recognized;
特征提取模块:用于通过特征提取模型从所述待识别脸部五官图像中提取出五官特征;Feature extraction module: used to extract facial features from the facial features image to be recognized through a feature extraction model;
特征匹配模块:用于基于所述五官特征与多个标准五官特征间的相似度,确定与所述五官特征相匹配的标准五官特征,每个所述标准五官特征标注有对应的五官属性类型;Feature matching module: used to determine the standard facial features matching the facial features based on the similarity between the facial features and a plurality of standard facial features, and each of the standard facial features is marked with a corresponding facial feature type;
五官属性类型获取模块:用于获取所述相匹配的标准五官特征对应的五官属性类型;The facial features attribute type acquisition module: used to obtain the facial feature attribute types corresponding to the matched standard facial features;
五官属性类型标注模块:用于将所述相匹配的标准五官特征对应的五官属性类型作为所述待识别脸部五官图像的五官属性类型;Facial feature attribute type labeling module: used to use the facial feature attribute type corresponding to the matched standard facial feature feature as the facial feature attribute type of the facial facial feature image to be recognized;
其中,所述特征提取模型对应脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构,所述脸部五官分类模型是通过多个脸部五官样本图像进行机器学习训练获得的,所述脸部五官样本图像携带有所属用户的分类标注信息。Wherein, the feature extraction model corresponds to a network structure used for extracting feature information of facial features in a facial feature classification model, and the facial feature classification model is obtained by performing machine learning training on multiple facial feature sample images, The facial features sample image carries the classification and labeling information of the user to which it belongs.
另一方面提供了一种电子设备,所述电子设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述的人脸五官识别方法。Another aspect provides an electronic device, the electronic device includes a processor and a memory, the memory stores at least one instruction, at least a piece of program, a code set or an instruction set, the at least one instruction, the at least one piece of The program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned method for facial feature recognition.
另一方面提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述的人脸五官识别方法。Another aspect provides a computer-readable storage medium, the storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, the code set Or the instruction set is loaded and executed by the processor to implement the above-mentioned method for recognizing facial features.
本发明提供的一种人脸五官识别方法、装置、设备及介质,具有如下技术效果:A method, device, equipment and medium for facial feature recognition provided by the present invention have the following technical effects:
本发明训练得到脸部五官分类模型,基于该脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构构建特征提取模型。通过该特征提取模型得到待识别脸部五官图像的五官特征。基于该五官特征与标准五官特征间的相似度,为该待识别脸部五官图像标注相匹配的标准五官特征对应的五官属性类型。在相关模型的训练中,不需要为脸部五官样本图像标注具体的五官属性类型,减少人工标注的难度及工作量。以特征比较的形式识别出用户的五官属性类型,能够精确地获得人脸细粒度五官的信息。The invention obtains a facial feature classification model by training, and constructs a feature extraction model based on the network structure in the facial feature classification model for extracting facial feature image feature information. The facial features of the facial facial features image to be recognized are obtained through the feature extraction model. Based on the similarity between the facial features and the standard facial features, label the facial facial features image corresponding to the facial facial features corresponding to the standard facial features to be recognized. In the training of related models, there is no need to label specific facial feature attribute types for facial facial feature sample images, which reduces the difficulty and workload of manual labeling. The user's facial features are identified in the form of feature comparison, and the information of the fine-grained facial features of the face can be accurately obtained.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本发明实施例提供的一种应用环境的示意图;1 is a schematic diagram of an application environment provided by an embodiment of the present invention;
图2是本发明实施例提供的一种人脸五官识别方法的流程示意图;2 is a schematic flowchart of a method for identifying facial features according to an embodiment of the present invention;
图3是本发明实施例提供的获取待识别脸部五官图像的一种流程示意图;FIG. 3 is a schematic flow chart of obtaining an image of facial features to be recognized according to an embodiment of the present invention;
图4是本发明实施例提供的训练得到脸部五官分类模型的一种流程示意图;FIG. 4 is a schematic flowchart of a facial feature classification model obtained by training according to an embodiment of the present invention;
图5是本发明实施例提供的一种特征提取模型的应用场景的示意图;5 is a schematic diagram of an application scenario of a feature extraction model provided by an embodiment of the present invention;
图6也是是本发明实施例提供的一种特征提取模型的应用场景的示意图;6 is also a schematic diagram of an application scenario of a feature extraction model provided by an embodiment of the present invention;
图7也是是本发明实施例提供的一种特征提取模型的应用场景的示意图;7 is also a schematic diagram of an application scenario of a feature extraction model provided by an embodiment of the present invention;
图8是本发明实施例提供的一种人脸五官识别装置的组成框图;8 is a block diagram of a configuration of a device for identifying facial features provided by an embodiment of the present invention;
图9是本发明实施例提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或服务器不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "comprising" and "having" in the description and claims of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusion, for example, including a series of steps or units A process, method, system, product or server is not necessarily limited to those steps or units expressly listed, but may include other steps or units not expressly listed or inherent to such process, method, product or device.
请参阅图1,图1是本发明实施例提供的一种应用环境的示意图,可以包括客户端01和服务器02,客户端与服务器通过网络连接。待识别脸部五官图像可以由客户端发送至服务器。服务器基于对接收到的待识别脸部五官图像作图像处理以为其标注对应的五官属性类型。需要说明的是,图1仅仅是一种示例。Please refer to FIG. 1. FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present invention, which may include a
具体的,客户端01可以包括智能手机、台式电脑、平板电脑、笔记本电脑、数字助理、智能可穿戴设备等类型的实体设备,也可以包括运行于实体设备中的软体,例如一些服务商提供给用户的网页页面,也可以为该些服务商提供给用户的应用。Specifically, the
具体的,所述服务器02可以包括一个独立运行的服务器,或者分布式服务器,或者由多个服务器组成的服务器集群。服务器02可以包括有网络通信单元、处理器和存储器等等。具体的,所述服务器02可以为上述客户端提供后台服务。Specifically, the
在实际应用中,本发明实施例提供的方案可以涉及人工智能的相关技术,在下述的具体实施例中会进行说明。人工智能(Artificial Intelligence,AI),是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门新的技术科学。人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。随着人工智能技术研究和进步,人工智能技术在多个领域展开研究和应用,例如常见的智能家居、智能穿戴设备、虚拟助理、智能音箱、智能营销、无人驾驶、自动驾驶、无人机、机器人、智能医疗、智能客服等,相信随着技术的发展,人工智能技术将在更多的领域得到应用,并发挥越来越重要的价值。In practical applications, the solutions provided by the embodiments of the present invention may involve related technologies of artificial intelligence, which will be described in the following specific embodiments. Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, including both hardware-level technology and software-level technology. The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning. With the research and progress of artificial intelligence technology, artificial intelligence technology has been researched and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important value.
其中,机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。Among them, Machine Learning (ML) is a multi-field interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or realize human learning behaviors to acquire new knowledge or skills, and to reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications are in all fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, teaching learning and other technologies.
以下介绍本发明一种人脸五官识别方法的具体实施例,图2是本发明实施例提供的一种人脸五官识别方法的流程示意图,本说明书提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的系统或服务器产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。具体的如图2、6所示,所述方法可以包括:A specific embodiment of a method for recognizing facial features of the present invention is described below. FIG. 2 is a schematic flowchart of a method for recognizing facial features according to an embodiment of the present invention. This specification provides the method described in the embodiment or the flowchart. operational steps, but may include more or fewer operational steps based on routine or non-creative work. The sequence of steps enumerated in the embodiments is only one of the execution sequences of many steps, and does not represent the only execution sequence. When an actual system or server product is executed, it can be executed sequentially or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the embodiments or the methods shown in the accompanying drawings. Specifically, as shown in Figures 2 and 6, the method may include:
S201:获取待识别脸部五官图像;S201: Obtain an image of facial features of the face to be recognized;
在本发明实施例中,待识别脸部五官图像可以是由利用光学原理成像并记录影像的设备采集得到的图像。利用光学原理成像并记录影像的设备可以是数码相机、终端设备的摄像头(比如智能眼镜的摄像头、手机的摄像头)。采集得到的待识别脸部五官图像可以尺寸大小各异,相应的,所述待识别脸部五官图像的尺寸范围可以相对广泛。待识别脸部五官图像可以是利用光学原理成像并记录影像的设备直接成像的图像,也可以是对上述直接成像的图像进行预处理后的图像。预处理方式可以包括对图像的去噪处理、灰度处理等。In this embodiment of the present invention, the facial features image to be recognized may be an image collected by a device that uses optical principles to image and record images. The device that uses optical principles to image and record images may be a digital camera, a camera of a terminal device (such as a camera of smart glasses, a camera of a mobile phone). The collected facial feature images to be recognized may have different sizes, and accordingly, the size range of the facial feature images to be recognized may be relatively wide. The facial features image to be recognized may be an image directly imaged by a device that uses optical principles to image and record images, or an image that has been preprocessed on the above directly imaged image. The preprocessing method may include denoising processing, grayscale processing, etc. on the image.
在一个具体的实施例中,如图3所示,所述获取待识别脸部五官图像的步骤,包括:In a specific embodiment, as shown in FIG. 3 , the step of acquiring an image of facial features to be recognized includes:
S301:采集待识别图像;S301: collect the image to be recognized;
待识别图像可以是数码相机、摄像头所拍摄的图像,或者,待识别图像还可以是从数码相机、摄像头拍摄的视频中截取的图像,或者,待识别图像也可以是用户通过网络上传到服务器的图像。其中,待识别图像可以是静态图像,也可以是动态图像。当然,待识别图像的获取方式还可以包括其他可能的方式,本发明实施例对此不做限制。The image to be recognized can be an image captured by a digital camera or a camera, or the image to be recognized can also be an image captured from a video captured by a digital camera or a camera, or the image to be recognized can also be uploaded by the user to the server through the network. image. The image to be recognized may be a static image or a dynamic image. Certainly, the acquisition manner of the image to be recognized may also include other possible manners, which are not limited in this embodiment of the present invention.
S302:对所述待识别图像进行人脸检测得到人脸图像;S302: performing face detection on the to-be-recognized image to obtain a face image;
人脸检测(脸部检测)可以对于任意一幅给定的图像,采用智能策略对其进行搜索以确定其中是否含有人脸。利用人脸检测技术,可以过滤掉不包含人脸的待识别图像。对于包含人脸的待识别图像,也可以将其中的人脸区域裁剪出来,得到人图像。Face detection (face detection) can search for any given image using intelligent strategies to determine whether it contains a human face. Using face detection technology, images to be recognized that do not contain faces can be filtered out. For an image to be recognized that contains a face, the face region in the image can also be cropped out to obtain a human image.
S303:对所述人脸图像进行人脸关键点检测,得到至少一个所述待识别脸部五官图像;S303: Perform face key point detection on the face image to obtain at least one facial feature image to be identified;
人脸关键点检测可以是定位五官关键点在人脸上的位置,五官关键点可以包括从眉毛、眼睛、耳朵、鼻子和口组成的群组中选择的至少一个。利用人脸关键点检测技术,可以将不包含人脸关键点的区域从人脸图像中裁除,相应的,可以将人脸图像中包含人脸关键点的区域分别裁剪出来,得到至少一个待识别脸部五官图像。所述待识别脸部五官图像中包括眉部对象、眼部对象、耳部对象、鼻部对象或者口部对象。这样可以减少冗余特征对人脸五官识别的干扰,减少识别过程中的计算量。The face key point detection may be to locate the position of the facial feature key points on the human face, and the facial feature key points may include at least one selected from the group consisting of eyebrows, eyes, ears, nose, and mouth. Using the face key point detection technology, the area that does not contain the face key points can be cut out from the face image. Correspondingly, the areas containing the face key points in the face image can be cut out respectively to obtain at least one to be Identify facial features. The facial features images to be recognized include eyebrow objects, eye objects, ear objects, nose objects or mouth objects. In this way, the interference of redundant features on the recognition of facial features can be reduced, and the amount of calculation in the recognition process can be reduced.
在实际应用中,获取到采集的视频数据后,从该视频数据中提取具有脸部特征的帧。然后对所述帧进行脸部检测,得到脸部坐标矩形框。再根据所述脸部坐标矩形框进行五官关键点定位,得到五官关键点。再根据所述五官关键点确定脸部五官的坐标位置。再根据所述脸部五官的坐标位置确定具体的眉部位置、眼部位置、耳部位置、鼻部位置或者口部位置,相应的,得到眉部图像、眼部图像、耳部图像、鼻部图像或者口部图像。In practical applications, after acquiring the collected video data, frames with facial features are extracted from the video data. Then face detection is performed on the frame to obtain a rectangular frame of face coordinates. Then, according to the facial coordinate rectangle frame, the facial features key points are positioned to obtain the facial features key points. Then, the coordinate positions of the facial features are determined according to the key points of the facial features. Then determine the specific eyebrow position, eye position, ear position, nose position or mouth position according to the coordinate positions of the facial features, and correspondingly, obtain the eyebrow image, eye image, ear image, nose image Oral image or oral image.
S202:通过特征提取模型从所述待识别脸部五官图像中提取出五官特征;S202: Extract facial features from the to-be-recognized facial features image by using a feature extraction model;
在本发明实施例中,所述特征提取模型对应脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构,所述脸部五官分类模型是通过多个脸部五官样本图像进行机器学习训练获得的,所述脸部五官样本图像携带有所属用户的分类标注信息。In the embodiment of the present invention, the feature extraction model corresponds to the network structure used to extract the feature information of facial features in the facial feature classification model, and the facial feature classification model is a machine-generated facial feature classification model based on a plurality of facial feature sample images. Obtained through learning and training, the facial feature sample image carries the classification and labeling information of the user to which it belongs.
在一个具体的实施例中,所述通过特征提取模型从所述待识别脸部五官图像中提取出五官特征,包括:根据所述待识别脸部五官图像中的五官对象确定与所述五官对象对应的目标特征提取模型;通过所述目标特征提取模型从所述待识别脸部五官图像中提取出所述五官特征。In a specific embodiment, the extracting the facial features from the to-be-recognized facial feature image by using a feature extraction model includes: determining a relationship with the facial feature object according to the facial feature object in the to-be-recognized facial feature image The corresponding target feature extraction model; the facial features are extracted from the facial features image to be recognized through the target feature extraction model.
五官对象可以是眉部对象、眼部对象、耳部对象、鼻部对象或者口部对象。目标特征提取模型对应针对同一五官对象的脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构。比如,待识别脸部五官图像中的五官对象为眉部对象,那么目标特征提取模型是用于提取眉部特征的,构建该目标特征提取模型利用的网络结构所指向的脸部五官分类模型也是用于实现眉部分类的。The facial features objects may be eyebrow objects, eye objects, ear objects, nose objects, or mouth objects. The target feature extraction model corresponds to the network structure used to extract the feature information of facial features in the facial features classification model for the same feature object. For example, if the facial features in the facial features image to be recognized are eyebrow objects, the target feature extraction model is used to extract eyebrow features, and the facial features classification model pointed to by the network structure used to construct the target feature extraction model is also Used to implement eyebrow classification.
在实际应用中,对于接收到的人脸图像,可以基于五官对象进行裁剪得到至少一个待识别脸部五官图像,再将各个待识别脸部五官图像分别输入对应的目标特征提取模型。比如将眉部图像输入用于提取眉部特征的特征提取模型,将眼部图像输入用于提取眼部特征的特征提取模型。In practical applications, for the received face image, at least one facial feature image to be recognized can be obtained by cropping based on facial feature objects, and then each facial feature image to be recognized is respectively input into the corresponding target feature extraction model. For example, the eyebrow image is input into the feature extraction model for extracting eyebrow features, and the eye image is input into the feature extraction model for extracting eye features.
在另一个具体的实施例中,如图4、5所示,所述脸部五官分类模型的训练过程包括如下步骤:In another specific embodiment, as shown in Figures 4 and 5, the training process of the facial features classification model includes the following steps:
S401:获取脸部五官样本图像;S401: Obtain a sample image of facial features;
所述脸部五官样本图像中包括眉部对象、眼部对象、耳部对象、鼻部对象或者口部对象。脸部五官样本图像可以是基于人脸关键点检测对人脸样本图像进行裁剪得到的,这里可以参考前述步骤S303基于人脸关键点检测对人脸图像进行裁剪得到待识别脸部五官图像的相关过程,不再赘述。人脸样本图像可以对应人脸识别模型的训练,这样脸部五官样本图像所携带的所属用户的分类标注信息可以复用人脸样本图像的标注信息(身份标签)。The facial features sample image includes eyebrow object, eye object, ear object, nose object or mouth object. The facial feature sample image may be obtained by cropping the face sample image based on the detection of the key points of the face. Here, referring to the aforementioned step S303, the face image is cropped based on the detection of the key points of the face to obtain the correlation of the facial feature image to be recognized. The process will not be repeated. The face sample image can correspond to the training of the face recognition model, so that the classification and labeling information of the user carried by the facial feature sample image can reuse the labeling information (identity label) of the face sample image.
具体的,可以确定第一数量阈值和第二数量阈值,所述第一数量阈值表征候选用户的数量,所述第二数量阈值表征对应同一候选用户的图像数量。然后,根据所述第一数量阈值和所述第二数量阈值获取所述脸部五官样本图像。在获取训练用样本图像时,设置了候选用户的数量的维度以及同一候选用户的图像数量的维度。进一步的,可以根据所述第一数量阈值和所述第二数量阈值获取所述人脸样本图像(对应人脸识别模型的训练),比如获取N个人的图像,每个人100-300张不定的图像数。再基于人脸关键点检测对人脸样本图像进行裁剪得到脸部五官样本图像,复用人脸样本图像及其携带的标注信息。Specifically, a first number threshold and a second number threshold may be determined, where the first number threshold represents the number of candidate users, and the second number threshold represents the number of images corresponding to the same candidate user. Then, the facial feature sample image is acquired according to the first quantity threshold and the second quantity threshold. When acquiring sample images for training, the dimension of the number of candidate users and the dimension of the number of images of the same candidate user are set. Further, the face sample images (corresponding to the training of the face recognition model) can be obtained according to the first quantity threshold and the second quantity threshold, such as obtaining images of N people, each of which is 100-300 indefinite. number of images. Then, based on the detection of the key points of the face, the face sample image is cropped to obtain the facial feature sample image, and the face sample image and the annotation information carried by it are reused.
S402:将所述脸部五官样本图像输入神经网络模型进行图像分类训练;S402: Input the facial features sample image into a neural network model for image classification training;
可以确定尺寸阈值,然后根据所述尺寸阈值调整所述人脸五官样本图像的尺寸数值,再将尺寸数值调整后的所述人脸五官样本图像输入所述神经网络模型进行图像分类训练。设置输入神经网络模型的脸部五官样本的尺寸为M*N像素(比如112*56像素),对人脸五官样本图像的初始尺寸进行对应的调整。当然,也可以在前述步骤S303中对人脸图像按照所述尺寸阈值进行裁剪以得到待识别脸部五官图像。A size threshold can be determined, and then the size value of the facial features sample image is adjusted according to the size threshold, and then the face feature sample image with the size value adjusted is input into the neural network model for image classification training. Set the size of the facial feature sample input to the neural network model to M*N pixels (for example, 112*56 pixels), and adjust the initial size of the facial feature sample image accordingly. Of course, in the aforementioned step S303, the face image can also be cropped according to the size threshold to obtain the facial features image to be recognized.
所述神经网络模型的网络结构中包括用于提取脸部五官图像特征信息的残差网络ResNet18(可以由卷积层,池化层,全连接层构成)以及用于基于该脸部五官图像特征信息进行脸部五官分类的分类器(或者分类层)。当然,可以对神经网络模型的网络结构作增减卷积层的调整,以及神经网络模型的网络结构不限于此。The network structure of the neural network model includes a residual network ResNet18 (which can be composed of a convolutional layer, a pooling layer, and a fully connected layer) for extracting facial features image feature information and a feature based on the facial features image features. A classifier (or classification layer) for classifying facial features. Of course, the network structure of the neural network model can be adjusted by adding or subtracting convolutional layers, and the network structure of the neural network model is not limited to this.
在实际应用中,将符合尺寸阈值要求的眉部样本图像输入所述神经网络模型。然后,由ResNet18得到眉部样本图像的特征,该特征可以是256维的,该特征可以具体由ResNet18中的conv5-3层(第五个卷积块里面的第三个卷积层)输出。再由分类器(或者分类层)基于该特征进行分类。In practical applications, the eyebrow sample images that meet the size threshold requirements are input into the neural network model. Then, the feature of the eyebrow sample image is obtained by ResNet18. The feature can be 256-dimensional, and the feature can be specifically output by the conv5-3 layer (the third convolution layer in the fifth convolution block) in ResNet18. A classifier (or classification layer) is then used to classify based on this feature.
S403:在训练过程中,调整所述神经网络模型的模型参数至所述神经网络模型输出的分类结果与输入的所述脸部五官样本图像的所述分类标注信息相匹配;S403: During the training process, adjust the model parameters of the neural network model so that the classification result output by the neural network model matches the classification and annotation information of the input facial features sample image;
所述模型参数的调整过程包括如下步骤:根据中间值与标注值得到损失值,所述中间值对应所述神经网络模型输出的分类结果,所述标注值对应输入的所述脸部五官样本图像的所述分类标注信息;根据所述损失值得到所述模型参数的梯度;基于所述模型参数的梯度更新所述模型参数。损失值对应模型训练的前向计算阶段,在该阶段,模型会采样一定数量的样本图像用于当前迭代的训练。每个样本图像经过模型的前向计算会产生损失值,损失值的大小表示了此样本图像学习的好坏。之后在模型训练的反向传播阶段,通过损失值计模型算参数的梯度,进而调整模型参数。The adjustment process of the model parameters includes the following steps: obtaining a loss value according to an intermediate value and a labeled value, the intermediate value corresponds to the classification result output by the neural network model, and the labeled value corresponds to the input facial features sample image. the classification and labeling information; obtain the gradient of the model parameter according to the loss value; update the model parameter based on the gradient of the model parameter. The loss value corresponds to the forward computation phase of model training, in which the model samples a certain number of sample images for the current iteration of training. The forward calculation of each sample image will generate a loss value, and the size of the loss value indicates the learning quality of this sample image. Then, in the back-propagation stage of model training, the gradient of the model parameters is calculated through the loss value, and then the model parameters are adjusted.
S404:将调整后的所述模型参数对应的所述神经网络模型作为所述人脸五官分类模型;S404: Use the neural network model corresponding to the adjusted model parameters as the facial feature classification model;
训练得到的人脸五官分类模型可以输出待预测图像所属用户的分类结果,比如待预测图像表征的眉毛属于哪个用户。使用多个已标注的脸部五官样本图像进行机器学习训练得到人脸五官分类模型,由此得到的人脸五官分类模型具有高泛化能力,可以提高进行图像分类的适应能力,可以提高图像分类的可靠性和有效性。The trained facial features classification model can output the classification result of the user to which the image to be predicted belongs, such as which user the eyebrows represented by the image to be predicted belong to. Use multiple labeled facial features sample images to perform machine learning training to obtain a facial feature classification model. The obtained facial feature classification model has high generalization ability, which can improve the adaptability of image classification, and can improve image classification. reliability and validity.
在实际应用中,所述特征提取模型对应脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构。通过特征提取模型从所述待识别脸部五官图像中提取出五官特征可以根据下述步骤实现:将待识别脸部五官图像输入人脸五官分类模型,取出人脸五官分类模型的中间层的输出结果,该中间层对应人脸五官分类模型中用于提取脸部五官图像特征信息的残差网络ResNet18,具体的可以是conv5-3层的输出结果。这里的输出结果便是五官特征。In practical applications, the feature extraction model corresponds to the network structure used for extracting feature information of facial features in the facial features classification model. Extracting the facial features from the to-be-recognized facial features image through the feature extraction model can be achieved according to the following steps: input the facial features image to be recognized into the facial facial features classification model, and take out the output of the middle layer of the facial facial features classification model. As a result, the middle layer corresponds to the residual network ResNet18 used to extract the feature information of facial features in the facial features classification model, specifically the output results of the conv5-3 layers. The output here is the facial features.
S203:基于所述五官特征与多个标准五官特征间的相似度,确定与所述五官特征相匹配的标准五官特征,每个所述标准五官特征标注有对应的五官属性类型;S203: Based on the similarity between the facial features and a plurality of standard facial features, determine standard facial features that match the facial features, and each of the standard facial features is marked with a corresponding facial feature type;
在本发明实施例中,同一五官对象可以对应多个标准五官特征,每个所述标准五官特征标注有对应的五官属性类型。标准五官特征指向的五官对象之间一定的差异性,同时每个标准五官特征指向的五官对象在相关图像中特征清晰。比如,眉部对象的多个标准五官特征可以包括指向柳叶眉的标准五官特征、指向剑眉的标准五官特征、指向拱形眉的标准五官特征以及指向高挑眉的标准五官特征等等,相应的,“柳叶眉”、“剑眉”、“拱形眉”以及“高挑眉”可以分别作为对应标准五官特征所标注的五官属性类型。进一步的,可以定义标准五官,获取携带有标准五官对象的标准脸部五官图像,将标准脸部五官图像输入所述特征提取模型以得到标准五官特征。所述标准脸部五官图像携带有描述对应的五官属性类型的类型标注。当然,定义标准五官可以基于不同的维度,比如种族、性别、形状、颜色等等。In the embodiment of the present invention, the same facial feature object may correspond to a plurality of standard facial features, and each of the standard facial features is marked with a corresponding facial feature attribute type. There is a certain difference between the facial features pointed to by the standard facial features, and the facial features pointed to by each standard facial feature have clear features in the relevant images. For example, multiple standard facial features of an eyebrow object may include standard facial features pointing to Liu Yemei, standard facial features pointing to sword eyebrows, standard facial features pointing to arched eyebrows, and standard facial features pointing to tall eyebrows, etc. Correspondingly, " Willow eyebrows, sword eyebrows, arched eyebrows, and tall eyebrows can be used as the types of facial features marked by the corresponding standard facial features, respectively. Further, standard facial features can be defined, a standard facial feature image carrying a standard facial feature object can be obtained, and the standard facial feature image can be input into the feature extraction model to obtain standard facial features. The standard facial feature image carries a type annotation describing the corresponding facial feature attribute type. Of course, defining standard facial features can be based on different dimensions, such as race, gender, shape, color, and more.
所述相似度可以采用包括从欧式距离(欧几里得度量,euclidean metric:指在m维空间中两个点之间的真实距离,或者向量的自然长度)、余弦相似度(余弦相似性:是通过计算两个向量的夹角余弦值来评估他们的相似度;将向量根据坐标值,绘制到向量空间中,如最常见的二维空间)、相对熵(Kullback-Leibler散度,是两个概率分布间差异的非对称性度量)组成的群组中选择的至少一个确定。The similarity can be calculated from Euclidean distance (Euclidean metric, euclidean metric: refers to the true distance between two points in m-dimensional space, or the natural length of a vector), cosine similarity (cosine similarity: It is to evaluate their similarity by calculating the cosine value of the angle between the two vectors; the vector is drawn into a vector space according to the coordinate value, such as the most common two-dimensional space), relative entropy (Kullback-Leibler divergence, is two At least one selected from the group consisting of an asymmetry measure of the difference between probability distributions) is determined.
在一个具体的实施例中,可以将所述五官特征分别与所述多个标准五官特征进行相似度计算,得到相似度集合。比如,所述五官特征对应眉部对象,相应的,多个标准五官特征为多个标准眉部特征:标准眉部特征1、标准眉部特征2和标准眉部特征3。将所述五官特征分别与所述多个标准眉部特征进行相似度计算,分别得到所述五官特征对应各标准眉部特征的相似度:相似度1(对应标准眉部特征1)、相似度2(对应标准眉部特征2)和相似度3(对应标准眉部特征3)。相似度1、相似度2和相似度3组成相似度集合。然后,在所述相似度集合中确定出最大相似度。比如,相似度1为70%,相似度2为65%,相似度3为90%。那么最大相似度为相似度3。再将所述最大相似度对应的标准五官特征确定为所述相匹配的标准五官特征。这样所述相匹配的标准五官特征为标准眉部特征3(对应最大相似度:相似度3)。In a specific embodiment, similarity calculation may be performed on the facial features and the plurality of standard facial features, respectively, to obtain a similarity set. For example, the facial features corresponds to the eyebrow object, and correspondingly, the multiple standard facial features are multiple standard eyebrow features: standard eyebrow feature 1 , standard eyebrow feature 2 , and standard eyebrow feature 3 . The facial features are calculated by similarity with the multiple standard eyebrow features, respectively, to obtain the similarity of the facial features corresponding to each standard eyebrow feature: similarity 1 (corresponding to standard eyebrow feature 1), similarity 2 (corresponding to standard eyebrow feature 2) and similarity 3 (corresponding to standard eyebrow feature 3). Similarity 1, similarity 2 and similarity 3 form a similarity set. Then, the maximum similarity is determined in the similarity set. For example, similarity 1 is 70%, similarity 2 is 65%, and similarity 3 is 90%. Then the maximum similarity is similarity 3. Then, the standard facial feature corresponding to the maximum similarity is determined as the matched standard facial feature. In this way, the matched standard facial features are standard eyebrow feature 3 (corresponding to the maximum similarity: similarity 3).
S204:获取所述相匹配的标准五官特征对应的五官属性类型;S204: Obtain the facial feature attribute type corresponding to the matched standard facial feature;
在本发明实施例中,可以定义标准五官,获取携带有标准五官对象的标准脸部五官图像,将标准脸部五官图像输入所述特征提取模型以得到标准五官特征。所述标准脸部五官图像携带有描述对应的五官属性类型的类型标注。可以将标准五官特征与对应的五官属性类型预先存储起来,当确定出所述相匹配的标准五官特征后,基于存储数据中的对应关系获取所述相匹配的标准五官特征对应的五官属性类型。In the embodiment of the present invention, standard facial features can be defined, a standard facial feature image carrying a standard facial feature object is obtained, and the standard facial feature image is input into the feature extraction model to obtain standard facial features. The standard facial feature image carries a type annotation describing the corresponding facial feature attribute type. Standard facial features and corresponding facial feature types may be pre-stored, and after the matched standard facial features are determined, the facial features corresponding to the matched standard facial features are acquired based on the correspondence in the stored data.
S205:将所述相匹配的标准五官特征对应的五官属性类型作为所述待识别脸部五官图像的五官属性类型;S205: Use the facial feature attribute type corresponding to the matched standard facial features as the facial feature attribute type of the facial facial feature image to be recognized;
在本发明实施例中,利用所述相匹配的标准五官特征对应的五官属性类型对所述待识别脸部五官图像进行标注。In the embodiment of the present invention, the facial feature image of the face to be recognized is annotated by using the facial feature attribute type corresponding to the matched standard facial feature feature.
在实际应用中,对于接收到的人脸图像,可以基于五官对象进行裁剪得到至少一个待识别脸部五官图像,再将各个待识别脸部五官图像分别输入对应的特征提取模型。可参考步骤S202-S205,每个待识别脸部五官图像依次进行特征提取、相似度计算、五官属性类型获取与标注,进而实现对人脸图像的更准确的脸部五官标注,如图7所示,可以以此展示给用户。In practical applications, for the received face image, at least one facial feature image to be recognized can be obtained by cropping based on facial feature objects, and then each facial feature image to be recognized is input into the corresponding feature extraction model. Referring to steps S202-S205, each to-be-recognized facial feature image is sequentially subjected to feature extraction, similarity calculation, facial feature type acquisition and labeling, and then more accurate facial facial features labeling on the face image is realized, as shown in Figure 7. display, which can be displayed to the user.
由以上本说明书实施例提供的技术方案可见,本说明书实施例中训练得到脸部五官分类模型,基于该脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构构建特征提取模型。通过该特征提取模型得到待识别脸部五官图像的五官特征。基于该五官特征与标准五官特征间的相似度,为该待识别脸部五官图像标注相匹配的标准五官特征对应的五官属性类型。在相关模型的训练中,不需要为脸部五官样本图像标注具体的五官属性类型,减少人工标注的难度及工作量。以特征比较的形式识别出用户的五官属性类型,能够精确地获得人脸细粒度五官的信息。It can be seen from the technical solutions provided by the above embodiments of this specification that a facial feature classification model is obtained by training in the embodiments of this specification, and a feature extraction model is constructed based on the network structure in the facial feature classification model for extracting facial feature image feature information. The facial features of the facial facial features image to be recognized are obtained through the feature extraction model. Based on the similarity between the facial features and the standard facial features, label the facial facial features image corresponding to the facial facial features corresponding to the standard facial features to be recognized. In the training of related models, there is no need to label specific facial feature attribute types for facial facial feature sample images, which reduces the difficulty and workload of manual labeling. The user's facial features are identified in the form of feature comparison, and the information of the fine-grained facial features of the face can be accurately obtained.
本发明实施例还提供了一种人脸五官识别装置,如图8所示,所述装置包括:The embodiment of the present invention also provides a facial feature recognition device, as shown in FIG. 8 , the device includes:
图像获取模块810:用于获取待识别脸部五官图像;Image acquisition module 810: used to acquire an image of facial features to be recognized;
特征提取模块820:用于通过特征提取模型从所述待识别脸部五官图像中提取出五官特征;Feature extraction module 820: used to extract facial features from the to-be-recognized facial features image through a feature extraction model;
特征匹配模块830:用于基于所述五官特征与多个标准五官特征间的相似度,确定与所述五官特征相匹配的标准五官特征,每个所述标准五官特征标注有对应的五官属性类型;Feature matching module 830: for determining the standard facial features matching the facial features based on the similarity between the facial features and a plurality of standard facial features, and each of the standard facial features is marked with a corresponding facial feature type ;
五官属性类型获取模块840:用于获取所述相匹配的标准五官特征对应的五官属性类型;A facial feature type acquisition module 840: used to acquire the facial feature attribute type corresponding to the matched standard facial features;
五官属性类型标注模块850:用于将所述相匹配的标准五官特征对应的五官属性类型作为所述待识别脸部五官图像的五官属性类型;Facial feature attribute type labeling module 850: used to use the facial feature attribute type corresponding to the matched standard facial feature feature as the facial feature attribute type of the facial facial feature image to be recognized;
其中,所述特征提取模型对应脸部五官分类模型中用于提取脸部五官图像特征信息的网络结构,所述脸部五官分类模型是通过多个脸部五官样本图像进行机器学习训练获得的,所述脸部五官样本图像携带有所属用户的分类标注信息。Wherein, the feature extraction model corresponds to a network structure used for extracting feature information of facial features in a facial feature classification model, and the facial feature classification model is obtained by performing machine learning training on multiple facial feature sample images, The facial features sample image carries the classification and labeling information of the user to which it belongs.
需要说明的,所述装置实施例中的装置与方法实施例基于同样的发明构思。It should be noted that the apparatus and method embodiments in the apparatus embodiments are based on the same inventive concept.
本发明实施例提供了一种电子设备,该电子设备包括处理器和存储器,该存储器中存储有至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或指令集由该处理器加载并执行以实现如上述方法实施例所提供的人脸五官识别方法。An embodiment of the present invention provides an electronic device, the electronic device includes a processor and a memory, the memory stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, the at least one piece of program, the The code set or the instruction set is loaded and executed by the processor to implement the facial feature recognition method provided by the above method embodiments.
进一步地,图9示出了一种用于实现本发明实施例所提供的人脸五官识别方法的电子设备的硬件结构示意图,所述电子设备可以参与构成或包含本发明实施例所提供的人脸五官识别装置。如图9所示,电子设备90可以包括一个或多个(图中采用902a、902b,……,902n来示出)处理器902(处理器902可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器904、以及用于通信功能的传输装置906。除此以外,还可以包括:显示器、输入/输出接口(I/O接口)、通用串行总线(USB)端口(可以作为I/O接口的端口中的一个端口被包括)、网络接口、电源和/或相机。本领域普通技术人员可以理解,图9所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,电子设备90还可包括比图9中所示更多或者更少的组件,或者具有与图9所示不同的配置。Further, FIG. 9 shows a schematic diagram of a hardware structure of an electronic device for implementing the method for recognizing human face and facial features provided by an embodiment of the present invention. Face recognition device. As shown in FIG. 9, the electronic device 90 may include one or more (shown as 902a, 902b, . processing means of a logic device FPGA or the like), a
应当注意到的是上述一个或多个处理器902和/或其他数据处理电路在本文中通常可以被称为“数据处理电路”。该数据处理电路可以全部或部分的体现为软件、硬件、固件或其他任意组合。此外,数据处理电路可为单个独立的处理模块,或全部或部分的结合到电子设备90(或移动设备)中的其他元件中的任意一个内。如本申请实施例中所涉及到的,该数据处理电路作为一种处理器控制(例如与接口连接的可变电阻终端路径的选择)。It should be noted that the one or more processors 902 and/or other data processing circuits described above may generally be referred to herein as "data processing circuits." The data processing circuit may be embodied in whole or in part as software, hardware, firmware or any other combination. Furthermore, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the electronic device 90 (or mobile device). As referred to in the embodiments of the present application, the data processing circuit acts as a kind of processor control (eg, selection of a variable resistance termination path connected to an interface).
存储器904可用于存储应用软件的软件程序以及模块,如本发明实施例中所述的方法对应的程序指令/数据存储装置,处理器902通过运行存储在存储器94内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的一种人脸五官识别方法。存储器904可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器904可进一步包括相对于处理器902远程设置的存储器,这些远程存储器可以通过网络连接至电子设备90。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The
传输装置906用于经由一个网络接收或者发送数据。上述的网络具体实例可包括电子设备90的通信供应商提供的无线网络。在一个实例中,传输装置906包括一个网络适配器(NetworkInterfaceController,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实施例中,传输装置906可以为射频(RadioFrequency,RF)模块,其用于通过无线方式与互联网进行通讯。Transmission means 906 is used to receive or transmit data via a network. The specific example of the above-mentioned network may include a wireless network provided by the communication provider of the electronic device 90 . In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through the base station so as to communicate with the Internet. In one embodiment, the transmission device 906 may be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.
显示器可以例如触摸屏式的液晶显示器(LCD),该液晶显示器可使得用户能够与电子设备90(或移动设备)的用户界面进行交互。The display may be, for example, a touch screen-style liquid crystal display (LCD) that enables a user to interact with the user interface of the electronic device 90 (or mobile device).
本发明的实施例还提供了一种存储介质,所述存储介质可设置于电子设备之中以保存用于实现方法实施例中一种人脸五官识别方法相关的至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或指令集由该处理器加载并执行以实现上述方法实施例提供的人脸五官识别方法。An embodiment of the present invention further provides a storage medium, which can be set in an electronic device to store at least one instruction, at least one section of program, at least one instruction, at least one section of program, A code set or instruction set, the at least one instruction, the at least one piece of program, the code set or the instruction set is loaded and executed by the processor to implement the facial feature recognition method provided by the above method embodiments.
可选地,在本实施例中,上述存储介质可以位于计算机网络的多个网络服务器中的至少一个网络服务器。可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may be located in at least one network server among multiple network servers of a computer network. Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk Or various media such as optical discs that can store program codes.
需要说明的是:上述本发明实施例先后顺序仅仅为了描述,不代表实施例的优劣。且上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be noted that: the above-mentioned order of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置和电子设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus and electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, refer to the partial descriptions of the method embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911047655.3A CN110866469B (en) | 2019-10-30 | 2019-10-30 | Facial five sense organs identification method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911047655.3A CN110866469B (en) | 2019-10-30 | 2019-10-30 | Facial five sense organs identification method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110866469A true CN110866469A (en) | 2020-03-06 |
CN110866469B CN110866469B (en) | 2024-07-16 |
Family
ID=69653147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911047655.3A Active CN110866469B (en) | 2019-10-30 | 2019-10-30 | Facial five sense organs identification method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110866469B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950421A (en) * | 2020-08-05 | 2020-11-17 | 广东金杭科技有限公司 | Face recognition system and trajectory tracking system |
CN112241689A (en) * | 2020-09-24 | 2021-01-19 | 北京澎思科技有限公司 | Face recognition method and device, electronic equipment and computer readable storage medium |
CN112613415A (en) * | 2020-12-25 | 2021-04-06 | 深圳数联天下智能科技有限公司 | Face nose type recognition method and device, electronic equipment and medium |
CN112836661A (en) * | 2021-02-07 | 2021-05-25 | Oppo广东移动通信有限公司 | Face recognition method, device, electronic device and storage medium |
CN112884961A (en) * | 2021-01-21 | 2021-06-01 | 吉林省吉科软信息技术有限公司 | Face recognition gate system for epidemic situation prevention and control |
CN113569614A (en) * | 2021-02-23 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Virtual image generation method, device, device and storage medium |
CN114202789A (en) * | 2021-11-30 | 2022-03-18 | 苏州亿歌网络科技有限公司 | Face element classification method, device, equipment and storage medium |
CN115376196A (en) * | 2022-10-25 | 2022-11-22 | 上海联息生物科技有限公司 | Image processing method, and financial privacy data security processing method and device |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107844781A (en) * | 2017-11-28 | 2018-03-27 | 腾讯科技(深圳)有限公司 | Face character recognition methods and device, electronic equipment and storage medium |
CN108021905A (en) * | 2017-12-21 | 2018-05-11 | 广东欧珀移动通信有限公司 | Image processing method, device, terminal equipment and storage medium |
CN108345849A (en) * | 2018-01-31 | 2018-07-31 | 深圳港云科技有限公司 | A kind of face recognition method and its equipment |
CN108510456A (en) * | 2018-03-27 | 2018-09-07 | 华南理工大学 | The sketch of depth convolutional neural networks based on perception loss simplifies method |
WO2019071664A1 (en) * | 2017-10-09 | 2019-04-18 | 平安科技(深圳)有限公司 | Human face recognition method and apparatus combined with depth information, and storage medium |
CN109727350A (en) * | 2018-12-14 | 2019-05-07 | 深圳壹账通智能科技有限公司 | A kind of Door-access control method and device based on recognition of face |
CN109784154A (en) * | 2018-12-10 | 2019-05-21 | 平安科技(深圳)有限公司 | Emotion identification method, apparatus, equipment and medium based on deep neural network |
CN109902660A (en) * | 2019-03-18 | 2019-06-18 | 腾讯科技(深圳)有限公司 | A kind of expression recognition method and device |
CN109993125A (en) * | 2019-04-03 | 2019-07-09 | 腾讯科技(深圳)有限公司 | Model training method, face identification method, device, equipment and storage medium |
CN110069985A (en) * | 2019-03-12 | 2019-07-30 | 北京三快在线科技有限公司 | Aiming spot detection method based on image, device, electronic equipment |
CN110321437A (en) * | 2019-05-27 | 2019-10-11 | 腾讯科技(深圳)有限公司 | A kind of corpus data processing method, device, electronic equipment and medium |
-
2019
- 2019-10-30 CN CN201911047655.3A patent/CN110866469B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019071664A1 (en) * | 2017-10-09 | 2019-04-18 | 平安科技(深圳)有限公司 | Human face recognition method and apparatus combined with depth information, and storage medium |
CN107844781A (en) * | 2017-11-28 | 2018-03-27 | 腾讯科技(深圳)有限公司 | Face character recognition methods and device, electronic equipment and storage medium |
CN108021905A (en) * | 2017-12-21 | 2018-05-11 | 广东欧珀移动通信有限公司 | Image processing method, device, terminal equipment and storage medium |
CN108345849A (en) * | 2018-01-31 | 2018-07-31 | 深圳港云科技有限公司 | A kind of face recognition method and its equipment |
CN108510456A (en) * | 2018-03-27 | 2018-09-07 | 华南理工大学 | The sketch of depth convolutional neural networks based on perception loss simplifies method |
CN109784154A (en) * | 2018-12-10 | 2019-05-21 | 平安科技(深圳)有限公司 | Emotion identification method, apparatus, equipment and medium based on deep neural network |
CN109727350A (en) * | 2018-12-14 | 2019-05-07 | 深圳壹账通智能科技有限公司 | A kind of Door-access control method and device based on recognition of face |
CN110069985A (en) * | 2019-03-12 | 2019-07-30 | 北京三快在线科技有限公司 | Aiming spot detection method based on image, device, electronic equipment |
CN109902660A (en) * | 2019-03-18 | 2019-06-18 | 腾讯科技(深圳)有限公司 | A kind of expression recognition method and device |
CN109993125A (en) * | 2019-04-03 | 2019-07-09 | 腾讯科技(深圳)有限公司 | Model training method, face identification method, device, equipment and storage medium |
CN110321437A (en) * | 2019-05-27 | 2019-10-11 | 腾讯科技(深圳)有限公司 | A kind of corpus data processing method, device, electronic equipment and medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950421A (en) * | 2020-08-05 | 2020-11-17 | 广东金杭科技有限公司 | Face recognition system and trajectory tracking system |
CN112241689A (en) * | 2020-09-24 | 2021-01-19 | 北京澎思科技有限公司 | Face recognition method and device, electronic equipment and computer readable storage medium |
CN112613415A (en) * | 2020-12-25 | 2021-04-06 | 深圳数联天下智能科技有限公司 | Face nose type recognition method and device, electronic equipment and medium |
CN112613415B (en) * | 2020-12-25 | 2025-03-28 | 深圳数联天下智能科技有限公司 | Facial nose shape recognition method, device, electronic device and medium |
CN112884961A (en) * | 2021-01-21 | 2021-06-01 | 吉林省吉科软信息技术有限公司 | Face recognition gate system for epidemic situation prevention and control |
CN112836661A (en) * | 2021-02-07 | 2021-05-25 | Oppo广东移动通信有限公司 | Face recognition method, device, electronic device and storage medium |
CN113569614A (en) * | 2021-02-23 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Virtual image generation method, device, device and storage medium |
CN114202789A (en) * | 2021-11-30 | 2022-03-18 | 苏州亿歌网络科技有限公司 | Face element classification method, device, equipment and storage medium |
CN115376196A (en) * | 2022-10-25 | 2022-11-22 | 上海联息生物科技有限公司 | Image processing method, and financial privacy data security processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110866469B (en) | 2024-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110866469B (en) | Facial five sense organs identification method, device, equipment and medium | |
CN112287820B (en) | Face detection neural network and training method, face detection method, storage medium | |
CN111680678B (en) | Target area identification method, device, equipment and readable storage medium | |
CN111553267B (en) | Image processing method, image processing model training method and device | |
EP3968179A1 (en) | Place recognition method and apparatus, model training method and apparatus for place recognition, and electronic device | |
CN110765882B (en) | Video tag determination method, device, server and storage medium | |
CN112101329B (en) | Video-based text recognition method, model training method and model training device | |
CN108288051B (en) | Pedestrian re-recognition model training method and device, electronic equipment and storage medium | |
CN112395979B (en) | Image-based health state identification method, device, equipment and storage medium | |
CN109034069B (en) | Method and apparatus for generating information | |
CN106874826A (en) | Face key point-tracking method and device | |
CN111626126A (en) | Face emotion recognition method, device, medium and electronic equipment | |
CN113706550B (en) | Image scene recognition and model training method, device and computer equipment | |
WO2021127916A1 (en) | Facial emotion recognition method, smart device and computer-readabel storage medium | |
CN111507285A (en) | Face attribute recognition method and device, computer equipment and storage medium | |
Song et al. | Discriminative feature extraction for video person re-identification via multi-task network | |
CN113298158A (en) | Data detection method, device, equipment and storage medium | |
Li et al. | Global co-occurrence feature learning and active coordinate system conversion for skeleton-based action recognition | |
CN113822134B (en) | A video-based instance tracking method, device, equipment and storage medium | |
CN112381118B (en) | A method and device for evaluating university dance examination | |
Arif et al. | Video representation by dense trajectories motion map applied to human activity recognition | |
CN116958626A (en) | Image classification model training, image classification method and device and electronic equipment | |
CN115222047A (en) | Model training method, device, equipment and storage medium | |
HK40022143A (en) | Method and device for recognizing human facial, apparatus and medium | |
CN117173731B (en) | Model training method, image processing method and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40022143 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment | ||
TG01 | Patent term adjustment |