WO2021217912A1 - Facial recognition-based information generation method and apparatus, computer device and storage medium - Google Patents

Facial recognition-based information generation method and apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2021217912A1
WO2021217912A1 PCT/CN2020/103796 CN2020103796W WO2021217912A1 WO 2021217912 A1 WO2021217912 A1 WO 2021217912A1 CN 2020103796 W CN2020103796 W CN 2020103796W WO 2021217912 A1 WO2021217912 A1 WO 2021217912A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
user
current user
welcome
face
Prior art date
Application number
PCT/CN2020/103796
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 WO2021217912A1 publication Critical patent/WO2021217912A1/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/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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
    • 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
    • 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/174Facial expression recognition

Landscapes

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

Abstract

A facial recognition-based information generation method and apparatus, a computer device and a storage medium, which relate to the technical field of image recognition in artificial intelligence. Said method comprises: if a current user image acquired by a camera is received, performing facial recognition on the current user image, so as to obtain corresponding current user identity recognition information; if welcome information corresponding to the current user identity recognition information is stored, sending the welcome information to a corresponding display device for display; if a user facial image acquired by the camera is received, performing emotion recognition on the user facial image, so as to obtain corresponding current user emotion information; and if the current user emotion information indicates a happy emotion, automatically adding, to the welcome information, a label indicating that the information can be reserved. The present invention generates and deploys welcome information efficiently, and can acquire feedback information of the users on the welcome information on the basis of emotion recognition results of users.

Description

基于人脸识别的信息生成方法、装置、计算机设备及存储介质Information generation method, device, computer equipment and storage medium based on face recognition
本申请要求于2020年04月28日提交中国专利局、申请号为202010351274.0,发明名称为“基于人脸识别的信息生成方法、装置、计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 28, 2020, the application number is 202010351274.0, and the invention title is "Information Generation Method, Apparatus, and Computer Equipment Based on Face Recognition". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及图像识别技术领域,尤其涉及一种基于人脸识别的信息生成方法、装置、计算机设备及存储介质。This application relates to the field of image recognition technology, and in particular to an information generation method, device, computer equipment, and storage medium based on face recognition.
背景技术Background technique
目前,较常见的迎宾装置是门头迎宾服务设备,门头迎宾服务设备主要包括喷绘横幅、语音播报迎宾设备、屏幕播放迎宾设备等。At present, the more common welcoming device is the door-front welcoming service equipment. The door-front welcoming service equipment mainly includes inkjet banners, voice broadcast welcoming equipment, and screen broadcast welcoming equipment.
其中喷绘横幅的制作时间长且不可回收重复利用,语音播报迎宾设备及屏幕播放迎宾设备中的迎宾词需维护人员人工编辑,发明人意识到上述常见的门头迎宾服务设备需人工制作或编辑迎宾词,导致效率低下、展现方式单一,而且无法检测待迎宾用户对迎宾词的满意程度。Among them, inkjet banners take a long time to make and cannot be recycled and reused. The voice broadcast welcome device and the welcome word in the screen broadcast welcome device need to be edited manually by maintenance personnel. The inventor realized that the above-mentioned common door welcome service equipment requires labor The production or editing of the welcome speech results in low efficiency and single presentation, and it is impossible to detect the degree of satisfaction of the welcome user with the welcome speech.
发明内容Summary of the invention
本申请实施例提供了一种基于人脸识别的信息生成方法、装置、计算机设备及存储介质,旨在解决现有技术中门头迎宾服务设备需人工编辑或制作,导致效率低下、展现方式单一的问题。The embodiments of the present application provide a method, device, computer equipment and storage medium for information generation based on face recognition, aiming to solve the problem of manual editing or production of door welcoming service equipment in the prior art, resulting in low efficiency and display mode Single problem.
第一方面,本申请实施例提供了一种基于人脸识别的信息生成方法,其包括:In the first aspect, an embodiment of the present application provides a method for generating information based on face recognition, which includes:
判断是否接收到摄像头所采集的当前用户图像;Determine whether the current user image collected by the camera is received;
若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;If the current user image collected by the camera is received, face recognition is performed on the current user image to obtain corresponding current user identification information;
判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;Judging whether there is welcoming information corresponding to the current user identification information; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information;
若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;If the welcome information corresponding to the current user identification information is stored, sending the welcome information to the corresponding display device for display;
判断是否接收到摄像头所采集的用户面部图像;Determine whether the user's facial image collected by the camera is received;
若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息;If the user's facial image collected by the camera is received, emotion recognition is performed on the user's facial image to obtain corresponding current user emotional information;
判断所述当前用户情感信息是高兴情绪或是生气情绪;以及Determine whether the current user emotional information is happy mood or angry mood; and
若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。If the former user's emotion information is happy emotion, a retainable tag is automatically added to the welcome information.
第二方面,本申请实施例提供了一种基于人脸识别的信息生成装置,其包括:In the second aspect, an embodiment of the present application provides an information generation device based on face recognition, which includes:
第一图像判断单元,用于判断是否接收到摄像头所采集的当前用户图像;The first image judging unit is used to judge whether the current user image collected by the camera is received;
用户身份识别单元,用于若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;The user identification unit is configured to, if the current user image collected by the camera is received, perform face recognition on the current user image to obtain corresponding current user identification information;
迎宾信息判断单元,用于判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;The welcoming information judging unit is used to determine whether the welcoming information corresponding to the current user identification information is stored; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information ;
迎宾信息发送单元,用于若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;The welcome information sending unit is configured to send the welcome information to the corresponding display device for display if the welcome information corresponding to the current user identification information is stored;
第二图像判断单元,用于判断是否接收到摄像头所采集的用户面部图像;The second image judging unit is used to judge whether the user's facial image collected by the camera is received;
情绪识别单元,用于若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息;The emotion recognition unit is configured to perform emotion recognition on the user's facial image if the user's facial image collected by the camera is received, to obtain corresponding current user's emotion information;
情绪判断单元,用于判断所述当前用户情感信息是高兴情绪或是生气情绪;以及An emotion judgment unit for judging whether the current user emotion information is happy mood or angry mood; and
第一标签设置单元,用于若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。The first label setting unit is configured to automatically add a retainable label to the welcome message if the previous user's emotional information is happy mood.
第三方面,本申请实施例又提供了一种计算机设备,其包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的基于人脸识别的信息生成方法。In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor executes the computer The program implements the information generation method based on face recognition described in the first aspect above.
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行上述第一方面所述的基于人脸识别的信息生成方法。In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the above-mentioned first On the one hand, the information generation method based on face recognition.
本申请实施例提供了一种基于人脸识别的信息生成方法、装置、计算机设备及存储介质,包括判断是否接收到摄像头所采集的当前用户图像;若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;判断是否接收到摄像头所采集的用户面部图像;若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息;判断所述当前用户情感信息是高兴情绪或是生气情绪;以及若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。该方法实现了迎宾信息的生成和部署更加高效,而且能基于用户的情绪识别结果来获取用户对迎宾信息的反馈信息。The embodiments of the present application provide a method, device, computer equipment and storage medium for information generation based on face recognition, including determining whether the current user image collected by the camera is received; if the current user image collected by the camera is received, correct Perform face recognition on the current user image to obtain corresponding current user identification information; determine whether there is welcome information corresponding to the current user identification information; wherein the welcome information includes welcome text information , Welcome audio information, or welcome video information; if the welcome information corresponding to the current user identification information is stored, send the welcome information to the corresponding display device for display; determine whether the camera is received The collected facial image of the user; if the facial image of the user collected by the camera is received, emotion recognition is performed on the facial image of the user to obtain the corresponding current user emotion information; it is judged whether the current user emotion information is happy emotion or angry emotion And if the former user’s emotional information is a happy mood, a retainable tag is automatically added to the welcoming information. This method realizes that the generation and deployment of welcome information is more efficient, and can obtain the user's feedback information on the welcome information based on the user's emotion recognition result.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的基于人脸识别的信息生成方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a method for generating information based on face recognition provided by an embodiment of the application;
图2为本申请实施例提供的基于人脸识别的信息生成方法的流程示意图;2 is a schematic flowchart of a method for generating information based on face recognition provided by an embodiment of the application;
图3为本申请实施例提供的基于人脸识别的信息生成方法的子流程示意图;FIG. 3 is a schematic diagram of a sub-process of a method for generating information based on face recognition provided by an embodiment of the application;
图4为本申请实施例提供的基于人脸识别的信息生成方法的另一子流程示意图;4 is a schematic diagram of another sub-flow of the method for generating information based on face recognition provided by an embodiment of the application;
图5为本申请实施例提供的基于人脸识别的信息生成装置的示意性框图;FIG. 5 is a schematic block diagram of an information generation device based on face recognition provided by an embodiment of the application;
图6为本申请实施例提供的基于人脸识别的信息生成装置的子单元示意性框图;FIG. 6 is a schematic block diagram of subunits of the apparatus for generating information based on face recognition according to an embodiment of the application;
图7为本申请实施例提供的基于人脸识别的信息生成装置的另一子单元示意性框图;7 is a schematic block diagram of another subunit of the apparatus for generating information based on face recognition according to an embodiment of the application;
图8为本申请实施例提供的计算机设备的示意性框图。FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and appended claims, the terms "including" and "including" indicate the existence of the described features, wholes, steps, operations, elements and/or components, but do not exclude one or The existence or addition of multiple other features, wholes, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .
请参阅图1和图2,图1为本申请实施例提供的基于人脸识别的信息生成方法的应用场景示意图;图2为本申请实施例提供的基于人脸识别的信息生成方法的流程示意图,该基于人脸识别的信息生成方法应用于本地终端机中,该方法通过安装于本地终端机中的应用软件进行执行。Please refer to Figure 1 and Figure 2. Figure 1 is a schematic diagram of an application scenario of a method for generating information based on face recognition provided by an embodiment of this application; Figure 2 is a schematic flowchart of a method for generating information based on face recognition provided by an embodiment of this application The method for generating information based on face recognition is applied to a local terminal, and the method is executed by application software installed in the local terminal.
如图2所示,该方法包括步骤S110~S180。As shown in Figure 2, the method includes steps S110 to S180.
S110、判断是否接收到摄像头所采集的当前用户图像。S110: Determine whether the current user image collected by the camera is received.
在本实施例中,通过在需要迎宾的场所设置迎宾系统(例如会展场馆、体育场馆、运动员住所、高级宾馆、饭店、旅游景点等场所),该迎宾系统至少包括摄像头、显示设备和服务器,本申请是在服务器的角度描述技术方案。其中,服务器中存储的迎宾信息和已采集的海量的人脸图片可以由用户终端(即用户使用的智能手机或平板电脑等终端)上传至服务器,用户终端通过与服务器对应的用户交互界面进行上述上传操作。In this embodiment, by setting up a welcoming system (for example, exhibition venues, stadiums, athletes’ residences, high-end hotels, restaurants, tourist attractions, etc.) in places where welcoming guests are needed, the welcoming system includes at least a camera, a display device, and Server, this application describes the technical solution from the perspective of the server. Among them, the welcome information stored in the server and the massive face pictures that have been collected can be uploaded to the server by the user terminal (that is, a terminal such as a smart phone or tablet computer used by the user), and the user terminal performs the process through the user interaction interface corresponding to the server. The above upload operation.
在迎宾系统中,摄像头上设置有红外传感器,用于检测到有用户与摄像头之间的间距小于预设的距离阈值(如2-10m)时,采集用户的当前用户图像之后发送至服务器。当服务器接收到当前用户图像后进行人脸识别后若有目标用户存在,则将与该目标用户对应的迎宾信息发送至显示设备进行显示,从而实现迎宾效果。In the welcoming system, the camera is equipped with an infrared sensor for detecting that the distance between the user and the camera is less than a preset distance threshold (such as 2-10m), and then collecting the user's current user image and sending it to the server. After the server receives the image of the current user and performs face recognition, if there is a target user, the welcome information corresponding to the target user is sent to the display device for display, thereby achieving the welcome effect.
若摄像头检测到有用户与摄像头之间的间距小于所述距离阈值时,由摄像头采集当前用户图像,将所当前用户图像发送至服务器。If the camera detects that the distance between the user and the camera is less than the distance threshold, the camera collects the current user image and sends the current user image to the server.
S120、若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息。S120: If the current user image collected by the camera is received, perform face recognition on the current user image to obtain corresponding current user identity recognition information.
在本实施例中,当摄像头上传当前用户图像后,服务器采用人脸识别的1:N模式来判断当前用户图像是否为待迎宾用户对应的人脸图像。In this embodiment, after the camera uploads the current user image, the server adopts the 1:N mode of face recognition to determine whether the current user image is a face image corresponding to the user to be welcomed.
人脸识别做的是1:N的比对,即服务器接收了“我”的一张照片之后,从海量的人像数据库中找到与当前使用者(也即“我”)的人脸数据相符合的图像,并进行匹配,找出来“我是谁”。Face recognition does a 1:N comparison, that is, after the server receives a photo of "me", it finds from the massive database of portraits that it matches the face data of the current user (ie "me") Image and match it to find out "who am I".
在一实施例中,如图3所示,步骤S120包括:In one embodiment, as shown in FIG. 3, step S120 includes:
S121、对所述当前用户图像进行灰度校正及噪声过滤,得到预处理后图片;S121: Perform grayscale correction and noise filtering on the current user image to obtain a preprocessed picture;
S122、通过卷积神经网络模型获取与所述预处理后图片对应的特征向量;S122: Obtain a feature vector corresponding to the preprocessed picture through a convolutional neural network model;
S123、将所述当前用户图像对应的特征向量与人脸数据库中已存储的特征模板进行比对,以判断人脸数据库中已存储的特征模板中是否存在与所述当前用户图像对应的特征向量相同的特征模板;S123. Compare the feature vector corresponding to the current user image with the feature template stored in the face database to determine whether there is a feature vector corresponding to the current user image in the feature template stored in the face database The same feature template;
S124、若人脸数据库中已存储的特征模板中存在与所述当前用户图像对应的特征向量相同的特征模板,获取对应的当前用户身份识别信息。S124: If there is a feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, obtain corresponding current user identification information.
在本实施例中,进行1:N模式的人脸识别的具体步骤如上述步骤S121-S124,对于当前用户图像预处理是基于人脸检测结果,对图像进行处理并最终服务于特征提取的过程。服务器获取的原始图像由于受到各种条件的限制和随机干扰,往往不能直接使用,必须在图像处理的早期阶段对它进行灰度校正、噪声过滤等图像预处理。对于人脸图像而言,其预处理过程主要包括人脸图像的光线补偿、灰度变换、直方图均衡化、归一化、几何校正、滤波以及锐化等。In this embodiment, the specific steps for face recognition in the 1:N mode are as the above steps S121-S124. The preprocessing of the current user image is based on the face detection result, the image is processed and finally serves the process of feature extraction . Due to various conditions and random interference, the original image obtained by the server cannot be used directly. It must be preprocessed in the early stages of image processing such as gray-scale correction and noise filtering. For face images, the preprocessing process mainly includes light compensation, gray scale transformation, histogram equalization, normalization, geometric correction, filtering and sharpening of the face image.
在获取所述当前用户图像的特征向量时,先获取与预处理后图片对应的像素矩阵,然后将预处理后图片对应的像素矩阵作为卷积神经网络模型中输入层的输入,得到多个特征图,之后将特征图输入池化层,得到每一特征图对应的最大值所对应一维向量,最后将每一特征图对应的最大值所对应一维向量输入至全连接层,得到与预处理后图片对应的特征向量。When obtaining the feature vector of the current user image, first obtain the pixel matrix corresponding to the preprocessed picture, and then use the pixel matrix corresponding to the preprocessed picture as the input of the input layer in the convolutional neural network model to obtain multiple features After that, the feature map is input to the pooling layer to obtain the one-dimensional vector corresponding to the maximum value corresponding to each feature map. Finally, the one-dimensional vector corresponding to the maximum value corresponding to each feature map is input to the fully connected layer to obtain the The feature vector corresponding to the processed image.
其中,人脸数据库中已存储的特征模板可以是用户主动上传至服务器,也可以是用户在不断使用的过程中,不断新增在历史人脸数据库中不存在的特征模板,从而积累得到人脸数据库中已存储的特征模板。例如待迎宾用户在未到达迎宾现场之前,服务器的管理人员可以先直接将待迎宾用户的头部图像上传至服务器进行特征向量提取,从而得到该待迎宾用户的 特征模板,之后将该待迎宾用户的特征模板存储至人脸数据库即可。Among them, the feature templates stored in the face database can be actively uploaded to the server by the user, or they can be continuously added to the feature templates that do not exist in the historical face database during the process of continuous use by the user, so as to accumulate the face. Feature templates stored in the database. For example, before the welcoming user arrives at the welcoming site, the administrator of the server can directly upload the head image of the welcoming user to the server for feature vector extraction, thereby obtaining the characteristic template of the welcoming user, and then The feature template of the to-be-welcoming user can be stored in the face database.
人脸识别的1:N模式是即服务器接收了“我”的一张照片之后,从海量的人像数据库中找到与当前使用者(也即“我”)的人脸数据相符合的图像,并进行匹配,找出来“我是谁”,也即上述步骤S121-S124的执行过程。The 1:N mode of face recognition is that after the server receives a photo of "me", it finds an image that matches the face data of the current user (ie "me") from the massive database of portraits, and Perform matching to find out "who am I", that is, the execution process of the above steps S121-S124.
由于人脸数据库中已存储的特征模板中存储了已采集的海量的人脸图片对应的特征向量,也即每一个人的人脸均对应唯一的特征向量,有了这些海量的特征模板为数据基础后,可以用来确定预处理后图片对应的一个或多个人,从而实现人脸识别。Since the feature templates stored in the face database store the feature vectors corresponding to the massive amount of face images that have been collected, that is, each person’s face corresponds to a unique feature vector. With these massive feature templates as data After the foundation, it can be used to determine one or more people corresponding to the preprocessed picture, so as to realize face recognition.
最后,所得到的用户身份识别信息可以是用户的身份证号,由于每一公民的身份证号是唯一的,可以作为其唯一识别码。Finally, the obtained user identification information can be the user's ID number. Since each citizen's ID number is unique, it can be used as its unique identification code.
在一实施例中,如图3所示,步骤S123之后还包括:In an embodiment, as shown in FIG. 3, after step S123, the method further includes:
S125、若人脸数据库中已存储的特征模板中不存在与所述当前用户图像对应的特征向量相同的特征模板,进行未识别到目标用户的提示,执行结束流程的步骤。S125: If there is no feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, a prompt is made that the target user is not recognized, and the step of ending the process is executed.
在本实施例中,当摄像头所采集的当前用户图像对应的特征向量与人脸数据库中已存储的特征模板君不相同,此时表示当前用户图像对应的用户不是待迎宾用户,此时无需执行后续步骤进行迎宾,此时直接跳转执行结束流程的步骤。In this embodiment, when the feature vector corresponding to the current user image captured by the camera is not the same as the feature template stored in the face database, it means that the user corresponding to the current user image is not the user to be welcomed. Perform the following steps to welcome the guests, and then jump directly to the step that ends the process.
其中,若未接收到摄像头所采集的当前用户图像,等待预设的延迟等待时间,返回执行步骤S110;Wherein, if the current user image collected by the camera is not received, wait for the preset delay waiting time, and return to step S110;
也即,当迎宾系统中的摄像头一直未采集到当前用户图像,也就导致了摄像头不能将当前用户图像发送至服务器,此时服务器等待预设的延迟等待时间之后,返回执行步骤S110即可。That is, when the camera in the welcome system has not collected the current user image, the camera cannot send the current user image to the server. At this time, the server waits for the preset delay waiting time, and then returns to step S110. .
S130、判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息。S130: Determine whether the welcome information corresponding to the current user identification information is stored; wherein the welcome information includes welcome text information, welcome audio information, or welcome video information.
在本实施例中,当识别到当前用户图像对应待迎宾用户,此时需要在服务器中检索是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息。也就是判断服务器中是否存储有预先完成编辑的且与该待迎宾用户对应的迎宾信息,这一判断过程也是为了快速检索到与待迎宾用户对应的个性化定制迎宾信息。In this embodiment, when it is recognized that the current user image corresponds to the user to be greeted, it is necessary to retrieve in the server whether the welcome information corresponding to the current user identification information is stored; wherein, in the welcome information It includes welcome text information, welcome audio information, or welcome video information. That is, it is judged whether the pre-edited welcome information corresponding to the user to be greeted is stored in the server. This judgment process is also to quickly retrieve the personalized welcome information corresponding to the user to be greeted.
S140、若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示。S140: If the welcome information corresponding to the current user identification information is stored, the welcome information is sent to a corresponding display device for display.
在本实施例中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息,也即所述迎宾信息的具体内容是多种多样的,可以是纯文本的迎宾文本信息(如“欢迎XXX光临”,该迎宾文本信息在显示设备上滚动展示或静止展示),也可以是迎宾音频信息(如“欢迎XXX光临”,该迎宾音频信息通过显示设备自带的扬声器进行外放,播放总次数、播放周期和播放总时长可以是用户自定义设置),还可以是迎宾视频信息(如通过显示设备播放通过动画文字的方式及各种背景视频组成的迎宾视频,播放总次数、播放周期和播放总时长可以是用户自定义设置)。除了采用上述三种举例的一种或多种方式组成的信息,还可以是其他更为复杂的迎宾方式,本申请中因篇幅限制不再详细举例。而且,本申请中迎宾信息时因待迎宾用户的具体身份而对应推送至显示设备显示,也即服务器可自动控制显示设备所显示的迎宾信息,所述显示设备并不是一次性使用而是多次重复利用,避免了采用定制带迎宾词的红绸横幅而带来的低效制作过程。In this embodiment, the welcome information includes welcome text information, welcome audio information, or welcome video information, that is, the specific content of the welcome information is diverse, and may be in plain text. Welcome text information (such as "Welcome XXX", the welcome text information is displayed on the display device scrolling or static display), or it can be welcome audio information (such as "Welcome XXX", the welcome audio information is displayed by The built-in speaker of the device is used for external playback. The total number of playbacks, playback period, and total playback duration can be user-defined settings), or welcome video information (such as playing through the display device through animated text and various background videos) For the composed welcome video, the total number of times of playing, the playing period and the total playing time can be user-defined settings). In addition to the information composed of one or more of the above three examples, it can also be other more complicated ways of welcoming guests. This application will not give detailed examples due to space limitations. Moreover, the welcome information in this application is pushed to the display device for display due to the specific identity of the user to be greeted, that is, the server can automatically control the welcome information displayed by the display device, and the display device is not for one-time use. It is reused many times to avoid the inefficient production process caused by the use of customized red silk banners with welcome words.
通过将迎宾信息发送至显示设备进行显示后,此时即实现了对待迎宾用户多种展示方式的迎宾,但是为了进一步优化迎宾信息的更新或替换,此时步骤S140之后还需执行用户的情绪识别的步骤。After the welcome information is sent to the display device for display, a variety of display methods for the welcoming user are realized at this time, but in order to further optimize the update or replacement of the welcome information, it is necessary to perform step S140 at this time Steps to identify the user’s emotions.
其中,在服务器中未存储有与所述当前用户身份识别信息对应的迎宾信息,获取预先存储的通用迎宾信息,将所述通用迎宾信息发送至对应的显示设备以进行显示。Wherein, the welcome information corresponding to the current user identification information is not stored in the server, the pre-stored general welcome information is acquired, and the general welcome information is sent to the corresponding display device for display.
即若未针对待迎宾用户设置相应的迎宾信息,此时为了快速展示迎宾信息,此时可获取 预先存储的通用迎宾信息,将所述通用迎宾信息发送至对应的显示设备以进行显示。That is, if the corresponding welcome information is not set for the user to be greeted, in order to quickly display the welcome information at this time, the pre-stored general welcome information can be obtained at this time, and the general welcome information can be sent to the corresponding display device. To display.
S150、判断是否接收到摄像头所采集的用户面部图像。S150: Determine whether the user's facial image collected by the camera is received.
在本实施例中,当摄像头所采集的用户面部图像与步骤S110中的当前用户图像不是同一张图像,而且用户面部图像的采集时间与当前用户图像的采集时间也是不相同的,一般用户面部图像的采集时间是晚于当前用户图像的采集时间(例如用户面部图像的采集时间是在当前用户图像的采集时间的5-10s之后),也即在完成了由对当前用户图像进行识别而对应显示迎宾信息之后,摄像头再采集一张用户面部图像。In this embodiment, when the user's facial image collected by the camera is not the same image as the current user image in step S110, and the collection time of the user's facial image is also different from the collection time of the current user's image, generally the user's facial image The acquisition time is later than the acquisition time of the current user image (for example, the acquisition time of the user's face image is 5-10s after the acquisition time of the current user image), that is, after the completion of the recognition of the current user image, the corresponding display After the welcome message, the camera collects an image of the user's face.
S160、若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息。S160: If the user's facial image collected by the camera is received, perform emotion recognition on the user's facial image to obtain corresponding current user emotion information.
在本实施例中,基于用户面部图像进行情绪识别,是为了进一步判断用户在看到所述迎宾信息后的当前情绪种类。例如若用户看到迎宾信息后是开心的情绪,表示用户对所述迎宾信息的内容很满意;例如若用户看到迎宾信息后是生气的情绪,表示用户对所述迎宾信息的内容不满意;例如若用户看到迎宾信息后是正常的情绪,表示用户对所述迎宾信息的内容为中性的态度。In this embodiment, the purpose of performing emotion recognition based on the user's facial image is to further determine the current emotion type of the user after seeing the welcome message. For example, if the user is happy after seeing the welcome message, it means that the user is satisfied with the content of the welcome message; for example, if the user is angry after seeing the welcome message, it means that the user is angry with the welcome message. The content is not satisfactory; for example, if the user is in a normal mood after seeing the welcome message, it means that the user has a neutral attitude towards the content of the welcome message.
在一实施例中,所述当前用户身份识别信息和对应的迎宾信息存储于区块链网络中,通过区块链实现信息在不同平台之间的共享。当获取到当前用户身份识别信息时,通过区块链网络中存储的信息查找与当前用户身份识别信息对应的迎宾信息。In an embodiment, the current user identification information and the corresponding welcome information are stored in a blockchain network, and the information is shared between different platforms through the blockchain. When the current user identification information is obtained, the information stored in the blockchain network is used to find the welcome information corresponding to the current user identification information.
区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层。Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
在一实施例中,如图4所示,步骤S160包括:In an embodiment, as shown in FIG. 4, step S160 includes:
S161、通过预先存储的人脸检测器获取所述用户面部图像中的人脸特征点;S161. Obtain the facial feature points in the user's facial image through a pre-stored face detector;
S162、获取将所述用户面部图像中的人脸特征点全部包围的人脸边界框;S162. Obtain a face bounding box that surrounds all the face feature points in the user's face image.
S163、获取所述用户面部图像中的人脸特征点中所包括的嘴部特征点集;S163. Acquire a mouth feature point set included in the facial feature points in the user's facial image;
S164、获取嘴部特征点集合中最上端的上端嘴部特征点与最下端的下端嘴部特征点之间的纵向坐标间距值,根据纵向坐标间距值与人脸边界框的长度之比,获取对应的用户张嘴程度值;S164. Obtain the longitudinal coordinate spacing value between the uppermost mouth feature point and the lowermost mouth feature point in the mouth feature point set, and obtain the corresponding value according to the ratio of the longitudinal coordinate spacing value to the length of the face bounding box The value of the user's mouth opening degree;
S165、判断所述用户张嘴程度值是否小于预设的张嘴程度阈值;S165. Determine whether the user's mouth opening degree value is less than a preset mouth opening degree threshold;
S166、若用户张嘴程度值小于所述张嘴程度阈值,将当前用户情感信息的取值置为生气情绪;S166: If the user's mouth opening degree value is less than the mouth opening degree threshold value, the value of the current user's emotional information is set as an angry mood;
S167、若用户张嘴程度值大于或等于所述张嘴程度阈值,将当前用户情感信息的取值置为高兴情绪。S167: If the user's mouth opening degree value is greater than or equal to the mouth opening degree threshold value, the current value of the user's emotional information is set as a happy mood.
在本实施例中,具体是通过OpenCV(是一个跨平台计算机视觉库,实现了图像处理和计算机视觉方面的很多通用算法)中的人脸检测器来获取所述用户面部图像中的68个人脸特征点。In this embodiment, specifically, the face detector in OpenCV (a cross-platform computer vision library that implements many general algorithms in image processing and computer vision) is used to obtain 68 faces in the user's facial image. Feature points.
一般68个人脸特征点中有16-20个嘴部特征点,上述16-20个嘴部特征点组成嘴部特征点集合。其中,16-20个嘴部特征点中每一个嘴部特征点可与人脸边界框均放置于同一个直角坐标系下,此时嘴部特征点集合中最上端的上端嘴部特征点其y值在16-20个嘴部特征点中为最大值,嘴部特征点集合中最下端的下端嘴部特征点其y值在16-20个嘴部特征点中为最小值。Generally, there are 16-20 mouth feature points among 68 facial feature points, and the above-mentioned 16-20 mouth feature points constitute a mouth feature point set. Among them, each of the 16-20 mouth feature points can be placed in the same Cartesian coordinate system as the face bounding box. At this time, the uppermost mouth feature point in the mouth feature point set has its y The value is the maximum among the 16-20 mouth feature points, and the y value of the lowermost mouth feature point in the mouth feature point set is the minimum among the 16-20 mouth feature points.
在步骤S166和S167中,通过用户张嘴程度值与预设的张嘴程度阈值的大小关系来确定当前用户情感信息,上述步骤中仅以区分高兴情绪和不高兴情绪为例而具体说明,具体实施时并不限定于仅识别高兴情绪和不高兴情绪。In steps S166 and S167, the current user emotional information is determined based on the relationship between the user's mouth opening degree value and the preset mouth opening degree threshold. In the above steps, only the distinction between happy emotions and unhappy emotions is used as an example for specific explanation. It is not limited to only identifying happy emotions and unhappy emotions.
在一实施例中,步骤S162包括:In an embodiment, step S162 includes:
调用人脸边界框创建指令,对应创建当前人脸边界框;其中,所述当前人脸边界框的初始边界框为预先设置的初始人脸边界框;Invoke the face bounding box creation instruction to correspondingly create the current face bounding box; wherein the initial bounding box of the current face bounding box is a preset initial face bounding box;
判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域;Judging whether the facial feature points in the user's facial image are all located in the area within the current face bounding box;
若所述用户面部图像中的人脸特征点不是均位于当前人脸边界框的框内区域,将所述初始人脸边界框的长度和宽度均按照预设的扩大比例值进行扩大,以更新当前人脸边界框,返回执行所述判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域的步骤;If the facial feature points in the user's facial image are not all located in the area of the current face bounding box, the length and width of the initial face bounding box are expanded according to the preset expansion ratio value to update The current face bounding box, returning to the step of judging whether the face feature points in the user's facial image are all located within the area of the current face bounding box;
若所述用户面部图像中的人脸特征点均位于当前人脸边界框的框内区域,将当前人脸边界框作为将所述用户面部图像中的人脸特征点全部包围的人脸边界框。If the facial feature points in the user's facial image are all located in the area of the current face bounding box, the current face bounding box is taken as the face bounding box that encloses all the facial feature points in the user's facial image .
在本实施例中,通过逐步放大当前人脸边界框长度和宽度的试探法,即可得到为将所述用户面部图像中的人脸特征点全部包围的人脸边界框。In this embodiment, through the heuristic method of gradually enlarging the length and width of the current face bounding box, a face bounding box that encloses all the face feature points in the user's face image can be obtained.
S170、判断所述当前用户情感信息是高兴情绪或是生气情绪。S170: Determine whether the current user emotion information is a happy mood or an angry mood.
在本实施例中,当通过情绪识别获取待迎宾用户的当前用户情感信息后,此时需具体判断该用户的当前情绪是高兴情绪或是生气情绪,从而判断进一步判断用户对所述迎宾信息的满意程度。一般用户看到迎宾信息后是开心的情绪(也即高兴情绪),表示用户对所述迎宾信息的内容很满意;例如若用户看到迎宾信息后是生气的情绪(也即生气情绪),表示用户对所述迎宾信息的内容不满意。In this embodiment, when the current user emotion information of the user to be welcomed is obtained through emotion recognition, it is necessary to determine whether the current emotion of the user is happy or angry, so as to determine whether the user is greeted by the user. Satisfaction of the information. Generally, the user is happy after seeing the welcome message (that is, happy emotion), indicating that the user is satisfied with the content of the welcome message; for example, if the user is angry after seeing the welcome message (that is, angry ), indicating that the user is not satisfied with the content of the welcome message.
S180、若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。S180: If the former user's emotional information is a happy mood, automatically add a retainable tag to the welcome message.
在本实施例中,若当前用户情感信息是高兴情绪,表示无需对该用户对应的所述迎宾信息进行修改,直接保留该迎宾信息即可,下次该用户再次来临时,可直接调用该用户对应的迎宾信息进行展示。In this embodiment, if the current user’s emotional information is happy, it means that there is no need to modify the welcome information corresponding to the user, and the welcome information can be directly retained. Next time the user comes again, it can be called directly The welcome information corresponding to the user is displayed.
在一实施例中,步骤S170之后还包括:In an embodiment, after step S170, the method further includes:
若所述前用户情感信息是生气情绪,对所述迎宾信息自动增加待调整的标签。If the former user's emotional information is angry, the tag to be adjusted is automatically added to the welcome information.
在本实施例中,若当前用户情感信息是生气情绪,表示需对该用户对应的所述迎宾信息进行修改,下次该用户再次来临时,可调用该用户对应的修改后的迎宾信息进行展示。In this embodiment, if the current user emotional information is angry, it means that the welcome information corresponding to the user needs to be modified. Next time the user comes again, the modified welcome information corresponding to the user can be called To show.
在一实施例中,所述若所述前用户情感信息是生气情绪,对所述迎宾信息自动增加待调整的标签的步骤之后还包括:In an embodiment, after the step of automatically adding a label to be adjusted to the welcome message if the previous user's emotional information is an angry mood, the method further includes:
调用本地的当前待推荐迎宾信息,将标签为待调整的迎宾信息更新为当前待推荐迎宾信息。Call the local current welcome information to be recommended, and update the welcome information labeled as to be adjusted to the current welcome information to be recommended.
在本实施例中,为了及时的调整各标签为待调整的迎宾信息,此时可以获取服务器中本地的当前待推荐迎宾信息,将标签为待调整的迎宾信息更新为当前待推荐迎宾信息。通过这一方式,能够及时对用户不满意的迎宾信息进行调整。In this embodiment, in order to adjust each label to the welcome information to be adjusted in time, the current welcome information to be recommended in the server can be obtained at this time, and the welcome information whose label is to be adjusted is updated to the current welcome information to be recommended. Guest information. In this way, the welcoming information that the user is not satisfied with can be adjusted in time.
该方法实现了迎宾信息的生成和部署更加高效,而且能基于用户的情绪识别结果来获取用户对迎宾信息的反馈信息。This method realizes that the generation and deployment of welcome information is more efficient, and can obtain the user's feedback information on the welcome information based on the user's emotion recognition result.
本申请实施例还提供一种基于人脸识别的信息生成装置,该基于人脸识别的信息生成装置用于执行前述基于人脸识别的信息生成方法的任一实施例。具体地,请参阅图5,图5是本申请实施例提供的基于人脸识别的信息生成装置的示意性框图。The embodiment of the present application also provides an information generation device based on face recognition, and the information generation device based on face recognition is used to execute any embodiment of the aforementioned information generation method based on face recognition. Specifically, please refer to FIG. 5, which is a schematic block diagram of an information generating apparatus based on face recognition provided by an embodiment of the present application.
如图5所示,基于人脸识别的信息生成装置100包括:第一图像判断单元110、用户身份识别单元120、迎宾信息判断单元130、迎宾信息发送单元140、第二图像判断单元150、情绪识别单元160、情绪判断单元170、第一标签设置单元180。As shown in FIG. 5, the information generation device 100 based on face recognition includes: a first image determination unit 110, a user identity recognition unit 120, a welcome information determination unit 130, a welcome information transmission unit 140, and a second image determination unit 150 , The emotion recognition unit 160, the emotion judgment unit 170, and the first label setting unit 180.
第一图像判断单元110,用于判断是否接收到摄像头所采集的当前用户图像。The first image judging unit 110 is used to judge whether the current user image collected by the camera is received.
用户身份识别单元120,用于若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息。The user identification unit 120 is configured to, if the current user image collected by the camera is received, perform face recognition on the current user image to obtain corresponding current user identification information.
在一实施例中,如图6所示,用户身份识别单元120包括:In an embodiment, as shown in FIG. 6, the user identification unit 120 includes:
图片预处理单元121,用于对所述当前用户图像进行灰度校正及噪声过滤,得到预处理后图片;The picture preprocessing unit 121 is configured to perform grayscale correction and noise filtering on the current user image to obtain a preprocessed picture;
特征向量获取单元122,用于通过卷积神经网络模型获取与所述预处理后图片对应的特征向量;The feature vector obtaining unit 122 is configured to obtain a feature vector corresponding to the preprocessed picture through a convolutional neural network model;
向量比对单元123,用于将所述当前用户图像对应的特征向量与人脸数据库中已存储的特征模板进行比对,以判断人脸数据库中已存储的特征模板中是否存在与所述当前用户图像对应的特征向量相同的特征模板;The vector comparison unit 123 is configured to compare the feature vector corresponding to the current user image with the feature template stored in the face database to determine whether the feature template stored in the face database is similar to the current one. Feature templates with the same feature vector corresponding to the user image;
用户信息获取单元124,用于若人脸数据库中已存储的特征模板中存在与所述当前用户图像对应的特征向量相同的特征模板,获取对应的当前用户身份识别信息。The user information obtaining unit 124 is configured to obtain corresponding current user identification information if there is a feature template that is the same as the feature vector corresponding to the current user image in the feature templates stored in the face database.
在一实施例中,如图6所示,用户身份识别单元120还包括:In an embodiment, as shown in FIG. 6, the user identification unit 120 further includes:
匹配失败提示单元125,用于若人脸数据库中已存储的特征模板中不存在与所述当前用户图像对应的特征向量相同的特征模板,进行未识别到目标用户的提示,执行结束流程的步骤。The matching failure prompt unit 125 is configured to, if there is no feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, perform a prompt that the target user is not recognized, and execute the step of ending the process .
迎宾信息判断单元130,用于判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息。The welcoming information judging unit 130 is used to determine whether there is welcoming information corresponding to the current user identification information stored; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information.
迎宾信息发送单元140,用于若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示。The welcome information sending unit 140 is configured to, if the welcome information corresponding to the current user identification information is stored, send the welcome information to the corresponding display device for display.
第二图像判断单元150,用于判断是否接收到摄像头所采集的用户面部图像。The second image judging unit 150 is used to judge whether the user's facial image collected by the camera is received.
情绪识别单元160,用于若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息。The emotion recognition unit 160 is configured to, if the user's facial image collected by the camera is received, perform emotion recognition on the user's facial image to obtain corresponding current user emotion information.
在一实施例中,如图7所示,情绪识别单元160包括:In an embodiment, as shown in FIG. 7, the emotion recognition unit 160 includes:
人脸特征点获取单元161,用于通过预先存储的人脸检测器获取所述用户面部图像中的人脸特征点;The facial feature point acquiring unit 161 is configured to acquire the facial feature points in the user's facial image through a pre-stored face detector;
人脸边界框获取单元162,用于获取将所述用户面部图像中的人脸特征点全部包围的人脸边界框;The face bounding box obtaining unit 162 is configured to obtain a face bounding box that encloses all the facial feature points in the user's facial image;
嘴部特征点集获取单元163,用于获取所述用户面部图像中的人脸特征点中所包括的嘴部特征点集;The mouth feature point set acquiring unit 163 is configured to acquire the mouth feature point set included in the facial feature points in the user's facial image;
用户张嘴程度值获取单元164,用于获取嘴部特征点集合中最上端的上端嘴部特征点与最下端的下端嘴部特征点之间的纵向坐标间距值,根据纵向坐标间距值与人脸边界框的长度之比,获取对应的用户张嘴程度值;The user mouth opening degree value obtaining unit 164 is used to obtain the vertical coordinate spacing value between the uppermost mouth feature point and the lowermost mouth feature point in the mouth feature point set, according to the vertical coordinate spacing value and the face boundary The ratio of the length of the box to obtain the corresponding value of the user's mouth opening degree;
张嘴程度值比较单元165,用于判断所述用户张嘴程度值是否小于预设的张嘴程度阈值;The mouth opening degree value comparison unit 165 is configured to determine whether the user's mouth opening degree value is less than a preset mouth opening degree threshold;
生气情绪识别单元166,用于若用户张嘴程度值小于所述张嘴程度阈值,将当前用户情感信息的取值置为生气情绪;An angry emotion recognition unit 166, configured to set the value of the current user's emotion information as an angry emotion if the user's mouth opening degree value is less than the mouth opening degree threshold;
高兴情绪识别单元167,用于若用户张嘴程度值大于或等于所述张嘴程度阈值,将当前用户情感信息的取值置为高兴情绪。The happy emotion recognition unit 167 is configured to set the value of the current user's emotion information as happy emotion if the user's mouth opening degree value is greater than or equal to the mouth opening degree threshold value.
在一实施例中,人脸边界框获取单元162包括:In an embodiment, the face bounding box acquiring unit 162 includes:
初始边界框创建单元,用于调用人脸边界框创建指令,对应创建当前人脸边界框;其中,所述当前人脸边界框的初始边界框为预先设置的初始人脸边界框;The initial bounding box creation unit is used to call the face bounding box creation instruction to correspondingly create the current face bounding box; wherein the initial bounding box of the current face bounding box is a preset initial face bounding box;
区域内判断单元,用户判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域;An in-area judging unit, the user judges whether the facial feature points in the user's facial image are all located in the area within the current face bounding box;
边界框调整单元,用于若所述用户面部图像中的人脸特征点不是均位于当前人脸边界框的框内区域,将所述初始人脸边界框的长度和宽度均按照预设的扩大比例值进行扩大,以更新当前人脸边界框,返回执行所述判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域的步骤;The bounding box adjustment unit is configured to expand the length and width of the initial face bounding box according to a preset if the face feature points in the user's face image are not all located in the area within the current face bounding box The scale value is expanded to update the current face bounding box, and return to the step of determining whether the face feature points in the user's face image are all located in the area of the current face bounding box;
边界框选定单元,用于若所述用户面部图像中的人脸特征点均位于当前人脸边界框的框内区域,将当前人脸边界框作为将所述用户面部图像中的人脸特征点全部包围的人脸边界框。The bounding box selection unit is configured to use the current face bounding box as the face feature in the user facial image if the facial feature points in the user's facial image are all located in the area within the current face bounding box Click the bounding box of the face surrounded by all.
情绪判断单元170,用于判断所述当前用户情感信息是高兴情绪或是生气情绪。The emotion judging unit 170 is used to judge whether the current user emotion information is a happy mood or an angry mood.
第一标签设置单元180,用于若所述前用户情感信息是高兴情绪,对所述迎宾信息自动 增加可保留的标签。The first tag setting unit 180 is configured to automatically add a retainable tag to the welcome message if the previous user's emotion information is happy emotion.
在一实施例中,基于人脸识别的信息生成装置100还包括:In an embodiment, the information generating apparatus 100 based on face recognition further includes:
第二标签设置单元,用于若所述前用户情感信息是生气情绪,对所述迎宾信息自动增加待调整的标签。The second label setting unit is configured to automatically add a label to be adjusted to the welcome message if the previous user's emotional information is angry.
在一实施例中,基于人脸识别的信息生成装置100还包括:In an embodiment, the information generating apparatus 100 based on face recognition further includes:
推荐迎宾信息更新单元,用于调用本地的当前待推荐迎宾信息,将标签为待调整的迎宾信息更新为当前待推荐迎宾信息The recommended welcome information update unit is used to call the local current welcome information to be recommended, and update the welcome information labeled as to be adjusted to the current welcome information to be recommended
上述基于人脸识别的信息生成装置可以实现为计算机程序的形式,该计算机程序可以在如图8所示的计算机设备上运行。The above-mentioned information generating apparatus based on face recognition can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 8.
请参阅图8,图8是本申请实施例提供的计算机设备的示意性框图。该计算机设备500是服务器,服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。Please refer to FIG. 8, which is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 is a server, and the server may be an independent server or a server cluster composed of multiple servers.
参阅图8,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。Referring to FIG. 8, the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行基于人脸识别的信息生成方法。The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute the information generation method based on face recognition.
该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。The processor 502 is used to provide calculation and control capabilities, and support the operation of the entire computer device 500.
该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行基于人脸识别的信息生成方法。The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the information generation method based on face recognition.
该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The network interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现本申请实施例公开的基于人脸识别的信息生成方法。Wherein, the processor 502 is configured to run a computer program 5032 stored in a memory to implement the information generation method based on face recognition disclosed in the embodiment of the present application.
本领域技术人员可以理解,图8中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图8所示实施例一致,在此不再赘述。Those skilled in the art can understand that the embodiment of the computer device shown in FIG. 8 does not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or less components than those shown in the figure. Or combine certain components, or different component arrangements. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structures and functions of the memory and the processor are consistent with the embodiment shown in FIG. 8 and will not be repeated here.
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in this embodiment of the application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
在本申请的另一实施例中提供计算机可读存储介质。该计算机可读存储介质可以为非易失性的计算机可读存储介质,也可以是易失性的计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序被处理器执行时实现本申请实施例公开的基于人脸识别的信息生成方法。In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, where the computer program is executed by a processor to implement the information generation method based on face recognition disclosed in the embodiments of the present application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described equipment, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both, in order to clearly illustrate the hardware and software Interchangeability, in the above description, the composition and steps of each example have been generally described in accordance with the function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为逻辑功能划分,实际实现时可以有另外的划分方式,也可以将具有相同功能的单元集合成一个单元,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed equipment, device, and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, or the units with the same function may be combined into one. Units, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted 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 units, and may also be electrical, mechanical or other forms of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application is 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 storage medium. It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种基于人脸识别的信息生成方法,其中,包括:An information generation method based on face recognition, which includes:
    判断是否接收到摄像头所采集的当前用户图像;Determine whether the current user image collected by the camera is received;
    若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;If the current user image collected by the camera is received, face recognition is performed on the current user image to obtain corresponding current user identification information;
    判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;Judging whether there is welcoming information corresponding to the current user identification information; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information;
    若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;If the welcome information corresponding to the current user identification information is stored, sending the welcome information to the corresponding display device for display;
    判断是否接收到摄像头所采集的用户面部图像;Determine whether the user's facial image collected by the camera is received;
    若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息;If the user's facial image collected by the camera is received, emotion recognition is performed on the user's facial image to obtain corresponding current user emotional information;
    判断所述当前用户情感信息是高兴情绪或是生气情绪;以及Determine whether the current user emotional information is happy mood or angry mood; and
    若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。If the former user's emotion information is happy emotion, a retainable tag is automatically added to the welcome information.
  2. 根据权利要求1所述的基于人脸识别的信息生成方法,其中,所述对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息,包括:The method for generating information based on face recognition according to claim 1, wherein said performing face recognition on said current user image to obtain corresponding current user identification information comprises:
    对所述当前用户图像进行灰度校正及噪声过滤,得到预处理后图片;Performing grayscale correction and noise filtering on the current user image to obtain a preprocessed picture;
    通过卷积神经网络模型获取与所述预处理后图片对应的特征向量;Obtaining a feature vector corresponding to the pre-processed picture through a convolutional neural network model;
    将所述当前用户图像对应的特征向量与人脸数据库中已存储的特征模板进行比对,以判断人脸数据库中已存储的特征模板中是否存在与所述当前用户图像对应的特征向量相同的特征模板;The feature vector corresponding to the current user image is compared with the feature template stored in the face database to determine whether the feature vector stored in the face database is the same as the feature vector corresponding to the current user image. Feature template
    若人脸数据库中已存储的特征模板中存在与所述当前用户图像对应的特征向量相同的特征模板,获取对应的当前用户身份识别信息。If there is a feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, the corresponding current user identification information is obtained.
  3. 根据权利要求1所述的基于人脸识别的信息生成方法,其中,所述对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息,包括:The method for generating information based on face recognition according to claim 1, wherein said performing emotion recognition on said user's facial image to obtain corresponding current user emotion information comprises:
    通过预先存储的人脸检测器获取所述用户面部图像中的人脸特征点;Acquiring the facial feature points in the facial image of the user through a pre-stored facial detector;
    获取将所述用户面部图像中的人脸特征点全部包围的人脸边界框;Acquiring a face bounding box that surrounds all the face feature points in the user's face image;
    获取所述用户面部图像中的人脸特征点中所包括的嘴部特征点集;Acquiring a mouth feature point set included in the facial feature points in the user's facial image;
    获取嘴部特征点集合中最上端的上端嘴部特征点与最下端的下端嘴部特征点之间的纵向坐标间距值,根据纵向坐标间距值与人脸边界框的长度之比,获取对应的用户张嘴程度值;Obtain the longitudinal coordinate spacing value between the uppermost mouth feature point and the lowermost mouth feature point in the mouth feature point set, and obtain the corresponding user according to the ratio of the longitudinal coordinate spacing value to the length of the face bounding box Mouth opening degree value;
    判断所述用户张嘴程度值是否小于预设的张嘴程度阈值;Judging whether the user's mouth opening degree value is less than a preset mouth opening degree threshold;
    若用户张嘴程度值小于所述张嘴程度阈值,将当前用户情感信息的取值置为生气情绪;If the user's mouth opening degree value is less than the mouth opening degree threshold value, the value of the current user's emotional information is set as an angry mood;
    若用户张嘴程度值大于或等于所述张嘴程度阈值,将当前用户情感信息的取值置为高兴情绪。If the user's mouth opening degree value is greater than or equal to the mouth opening degree threshold value, the value of the current user's emotional information is set as a happy mood.
  4. 根据权利要求3所述的基于人脸识别的信息生成方法,其中,所述获取将所述用户面部图像中的人脸特征点全部包围的人脸边界框,包括:The method for generating information based on face recognition according to claim 3, wherein said acquiring a face bounding box enclosing all the face feature points in said user's facial image comprises:
    调用人脸边界框创建指令,对应创建当前人脸边界框;其中,所述当前人脸边界框的初始边界框为预先设置的初始人脸边界框;Invoke the face bounding box creation instruction to correspondingly create the current face bounding box; wherein the initial bounding box of the current face bounding box is a preset initial face bounding box;
    判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域;Judging whether the facial feature points in the user's facial image are all located in the area within the current face bounding box;
    若所述用户面部图像中的人脸特征点不是均位于当前人脸边界框的框内区域,将所述初始人脸边界框的长度和宽度均按照预设的扩大比例值进行扩大,以更新当前人脸边界框,返回执行所述判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域的步骤;If the facial feature points in the user's facial image are not all located in the area of the current face bounding box, the length and width of the initial face bounding box are expanded according to the preset expansion ratio value to update The current face bounding box, returning to the step of judging whether the face feature points in the user's facial image are all located within the area of the current face bounding box;
    若所述用户面部图像中的人脸特征点均位于当前人脸边界框的框内区域,将当前人脸边界框作为将所述用户面部图像中的人脸特征点全部包围的人脸边界框。If the facial feature points in the user's facial image are all located in the area of the current face bounding box, the current face bounding box is taken as the face bounding box that encloses all the facial feature points in the user's facial image .
  5. 根据权利要求2所述的基于人脸识别的信息生成方法,其中,所述将所述当前用户图像对应的特征向量与人脸数据库中已存储的特征模板进行比对,以判断人脸数据库中已存储的特征模板中是否存在与所述当前用户图像对应的特征向量相同的特征模板之后,还包括:The method for generating information based on face recognition according to claim 2, wherein the feature vector corresponding to the current user image is compared with a feature template stored in the face database to determine After whether there is a feature template that is the same as the feature vector corresponding to the current user image among the stored feature templates, it also includes:
    若人脸数据库中已存储的特征模板中不存在与所述当前用户图像对应的特征向量相同的特征模板,进行未识别到目标用户的提示,执行结束流程的步骤。If there is no feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, a prompt is made that the target user is not recognized, and the step of ending the process is executed.
  6. 根据权利要求1所述的基于人脸识别的信息生成方法,其中,所述判断所述当前用户情感信息是高兴情绪或是生气情绪之后,还包括:The method for generating information based on face recognition according to claim 1, wherein after determining whether the current user emotion information is happy emotion or angry emotion, the method further comprises:
    若所述前用户情感信息是生气情绪,对所述迎宾信息自动增加待调整的标签;If the former user's emotional information is angry, automatically add a label to be adjusted to the welcome message;
    调用本地的当前待推荐迎宾信息,将标签为待调整的迎宾信息更新为当前待推荐迎宾信息。Call the local current welcome information to be recommended, and update the welcome information labeled as to be adjusted to the current welcome information to be recommended.
  7. 根据权利要求1所述的基于人脸识别的信息生成方法,其中,所述当前用户身份识别信息和对应的迎宾信息存储于区块链网络中。The method for generating information based on face recognition according to claim 1, wherein the current user identification information and the corresponding welcome information are stored in a blockchain network.
  8. 根据权利要求1所述的基于人脸识别的信息生成方法,其中,所述判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息之后,还包括:The method for generating information based on face recognition according to claim 1, wherein said determining whether there is welcome information corresponding to said current user identification information is stored; wherein said welcome information includes welcome text After the message, the welcome audio message, or the welcome video message, it also includes:
    在服务器中未存储有与所述当前用户身份识别信息对应的迎宾信息,获取预先存储的通用迎宾信息,将所述通用迎宾信息发送至对应的显示设备以进行显示。The server does not store welcome information corresponding to the current user identification information, obtains the pre-stored general welcome information, and sends the general welcome information to the corresponding display device for display.
  9. 根据权利要求1所述的基于人脸识别的信息生成方法,其中,所述判断是否接收到摄像头所采集的当前用户图像之后,还包括:The method for generating information based on face recognition according to claim 1, wherein after the determining whether the current user image collected by the camera is received, the method further comprises:
    若未接收到摄像头所采集的当前用户图像,等待预设的延迟等待时间,返回执行所述判断是否接收到摄像头所采集的当前用户图像的步骤。If the current user image collected by the camera is not received, wait for the preset delay waiting time, and return to the step of determining whether the current user image collected by the camera is received.
  10. 一种基于人脸识别的信息生成装置,其中,包括:An information generating device based on face recognition, which includes:
    第一图像判断单元,用于判断是否接收到摄像头所采集的当前用户图像;The first image judging unit is used to judge whether the current user image collected by the camera is received;
    用户身份识别单元,用于若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;The user identification unit is configured to, if the current user image collected by the camera is received, perform face recognition on the current user image to obtain corresponding current user identification information;
    迎宾信息判断单元,用于判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;The welcoming information judging unit is used to determine whether the welcoming information corresponding to the current user identification information is stored; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information ;
    迎宾信息发送单元,用于若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;The welcome information sending unit is configured to send the welcome information to the corresponding display device for display if the welcome information corresponding to the current user identification information is stored;
    第二图像判断单元,用于判断是否接收到摄像头所采集的用户面部图像;The second image judging unit is used to judge whether the user's facial image collected by the camera is received;
    情绪识别单元,用于若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息;The emotion recognition unit is configured to perform emotion recognition on the user's facial image if the user's facial image collected by the camera is received, to obtain corresponding current user's emotion information;
    情绪判断单元,用于判断所述当前用户情感信息是高兴情绪或是生气情绪;以及An emotion judgment unit for judging whether the current user emotion information is happy mood or angry mood; and
    第一标签设置单元,用于若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。The first label setting unit is configured to automatically add a retainable label to the welcome message if the previous user's emotional information is happy mood.
  11. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:A computer device includes a memory, a processor, and a computer program that is stored on the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    判断是否接收到摄像头所采集的当前用户图像;Determine whether the current user image collected by the camera is received;
    若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;If the current user image collected by the camera is received, face recognition is performed on the current user image to obtain corresponding current user identification information;
    判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;Judging whether there is welcoming information corresponding to the current user identification information; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information;
    若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;If the welcome information corresponding to the current user identification information is stored, sending the welcome information to the corresponding display device for display;
    判断是否接收到摄像头所采集的用户面部图像;Determine whether the user's facial image collected by the camera is received;
    若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应 的当前用户情感信息;If the user's facial image collected by the camera is received, emotion recognition is performed on the user's facial image to obtain corresponding current user emotional information;
    判断所述当前用户情感信息是高兴情绪或是生气情绪;以及Determine whether the current user emotional information is happy mood or angry mood; and
    若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。If the former user's emotion information is happy emotion, a retainable tag is automatically added to the welcome information.
  12. 根据权利要求11所述的计算机设备,其中,所述对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息,包括:The computer device according to claim 11, wherein said performing face recognition on said current user image to obtain corresponding current user identification information comprises:
    对所述当前用户图像进行灰度校正及噪声过滤,得到预处理后图片;Performing grayscale correction and noise filtering on the current user image to obtain a preprocessed picture;
    通过卷积神经网络模型获取与所述预处理后图片对应的特征向量;Obtaining a feature vector corresponding to the pre-processed picture through a convolutional neural network model;
    将所述当前用户图像对应的特征向量与人脸数据库中已存储的特征模板进行比对,以判断人脸数据库中已存储的特征模板中是否存在与所述当前用户图像对应的特征向量相同的特征模板;The feature vector corresponding to the current user image is compared with the feature template stored in the face database to determine whether the feature vector stored in the face database is the same as the feature vector corresponding to the current user image. Feature template
    若人脸数据库中已存储的特征模板中存在与所述当前用户图像对应的特征向量相同的特征模板,获取对应的当前用户身份识别信息。If there is a feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, the corresponding current user identification information is obtained.
  13. 根据权利要求11所述的计算机设备,其中,所述对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息,包括:The computer device according to claim 11, wherein said performing emotion recognition on said user's facial image to obtain corresponding current user emotion information comprises:
    通过预先存储的人脸检测器获取所述用户面部图像中的人脸特征点;Acquiring the facial feature points in the facial image of the user through a pre-stored facial detector;
    获取将所述用户面部图像中的人脸特征点全部包围的人脸边界框;Acquiring a face bounding box that surrounds all the face feature points in the user's face image;
    获取所述用户面部图像中的人脸特征点中所包括的嘴部特征点集;Acquiring a mouth feature point set included in the facial feature points in the user's facial image;
    获取嘴部特征点集合中最上端的上端嘴部特征点与最下端的下端嘴部特征点之间的纵向坐标间距值,根据纵向坐标间距值与人脸边界框的长度之比,获取对应的用户张嘴程度值;Obtain the longitudinal coordinate spacing value between the uppermost mouth feature point and the lowermost mouth feature point in the mouth feature point set, and obtain the corresponding user according to the ratio of the longitudinal coordinate spacing value to the length of the face bounding box Mouth opening degree value;
    判断所述用户张嘴程度值是否小于预设的张嘴程度阈值;Judging whether the user's mouth opening degree value is less than a preset mouth opening degree threshold;
    若用户张嘴程度值小于所述张嘴程度阈值,将当前用户情感信息的取值置为生气情绪;If the user's mouth opening degree value is less than the mouth opening degree threshold value, the value of the current user's emotional information is set as an angry mood;
    若用户张嘴程度值大于或等于所述张嘴程度阈值,将当前用户情感信息的取值置为高兴情绪。If the user's mouth opening degree value is greater than or equal to the mouth opening degree threshold value, the value of the current user's emotional information is set as a happy mood.
  14. 根据权利要求13所述的计算机设备,其中,所述获取将所述用户面部图像中的人脸特征点全部包围的人脸边界框,包括:The computer device according to claim 13, wherein said acquiring a face bounding box that encloses all the face feature points in the user's facial image comprises:
    调用人脸边界框创建指令,对应创建当前人脸边界框;其中,所述当前人脸边界框的初始边界框为预先设置的初始人脸边界框;Invoke the face bounding box creation instruction to correspondingly create the current face bounding box; wherein the initial bounding box of the current face bounding box is a preset initial face bounding box;
    判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域;Judging whether the facial feature points in the user's facial image are all located in the area within the current face bounding box;
    若所述用户面部图像中的人脸特征点不是均位于当前人脸边界框的框内区域,将所述初始人脸边界框的长度和宽度均按照预设的扩大比例值进行扩大,以更新当前人脸边界框,返回执行所述判断所述用户面部图像中的人脸特征点是否均位于当前人脸边界框的框内区域的步骤;If the facial feature points in the user's facial image are not all located in the area of the current face bounding box, the length and width of the initial face bounding box are expanded according to the preset expansion ratio value to update The current face bounding box, returning to the step of judging whether the face feature points in the user's facial image are all located within the area of the current face bounding box;
    若所述用户面部图像中的人脸特征点均位于当前人脸边界框的框内区域,将当前人脸边界框作为将所述用户面部图像中的人脸特征点全部包围的人脸边界框。If the facial feature points in the user's facial image are all located in the area of the current face bounding box, the current face bounding box is taken as the face bounding box that encloses all the facial feature points in the user's facial image .
  15. 根据权利要求12所述的计算机设备,其中,所述将所述当前用户图像对应的特征向量与人脸数据库中已存储的特征模板进行比对,以判断人脸数据库中已存储的特征模板中是否存在与所述当前用户图像对应的特征向量相同的特征模板之后,还包括:The computer device according to claim 12, wherein the feature vector corresponding to the current user image is compared with the feature template stored in the face database to determine whether the feature template is stored in the face database. After whether there is a feature template that is the same as the feature vector corresponding to the current user image, it also includes:
    若人脸数据库中已存储的特征模板中不存在与所述当前用户图像对应的特征向量相同的特征模板,进行未识别到目标用户的提示,执行结束流程的步骤。If there is no feature template that is the same as the feature vector corresponding to the current user image among the feature templates stored in the face database, a prompt is made that the target user is not recognized, and the step of ending the process is executed.
  16. 根据权利要求11所述的计算机设备,其中,所述判断所述当前用户情感信息是高兴情绪或是生气情绪之后,还包括:The computer device according to claim 11, wherein, after determining whether the current user emotion information is a happy mood or an angry mood, the method further comprises:
    若所述前用户情感信息是生气情绪,对所述迎宾信息自动增加待调整的标签;If the former user's emotional information is angry, automatically add a label to be adjusted to the welcome message;
    调用本地的当前待推荐迎宾信息,将标签为待调整的迎宾信息更新为当前待推荐迎宾信息。Call the local current welcome information to be recommended, and update the welcome information labeled as to be adjusted to the current welcome information to be recommended.
  17. 根据权利要求11所述的计算机设备,其中,所述当前用户身份识别信息和对应的迎宾信息存储于区块链网络中。The computer device according to claim 11, wherein the current user identification information and the corresponding welcome information are stored in a blockchain network.
  18. 根据权利要求11所述的计算机设备,其中,所述判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息之后,还包括:11. The computer device according to claim 11, wherein said determining whether to store welcome information corresponding to said current user identification information; wherein said welcome information includes welcome text information and welcome audio information , Or after the welcome video message, it also includes:
    在服务器中未存储有与所述当前用户身份识别信息对应的迎宾信息,获取预先存储的通用迎宾信息,将所述通用迎宾信息发送至对应的显示设备以进行显示。The server does not store welcome information corresponding to the current user identification information, obtains the pre-stored general welcome information, and sends the general welcome information to the corresponding display device for display.
  19. 根据权利要求11所述的计算机设备,其中,所述判断是否接收到摄像头所采集的当前用户图像之后,还包括:The computer device according to claim 11, wherein after said determining whether the current user image collected by the camera is received, it further comprises:
    若未接收到摄像头所采集的当前用户图像,等待预设的延迟等待时间,返回执行所述判断是否接收到摄像头所采集的当前用户图像的步骤。If the current user image collected by the camera is not received, wait for the preset delay waiting time, and then return to the step of determining whether the current user image collected by the camera is received.
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行以下操作:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to perform the following operations:
    判断是否接收到摄像头所采集的当前用户图像;Determine whether the current user image collected by the camera is received;
    若接收到摄像头所采集的当前用户图像,对所述当前用户图像进行人脸识别,得到对应的当前用户身份识别信息;If the current user image collected by the camera is received, face recognition is performed on the current user image to obtain corresponding current user identification information;
    判断是否存储有与所述当前用户身份识别信息对应的迎宾信息;其中,所述迎宾信息中包括迎宾文本信息、迎宾音频信息、或迎宾视频信息;Judging whether there is welcoming information corresponding to the current user identification information; wherein the welcoming information includes welcoming text information, welcoming audio information, or welcoming video information;
    若存储有与所述当前用户身份识别信息对应的迎宾信息,将所述迎宾信息发送至对应的显示设备以进行显示;If the welcome information corresponding to the current user identification information is stored, sending the welcome information to the corresponding display device for display;
    判断是否接收到摄像头所采集的用户面部图像;Determine whether the user's facial image collected by the camera is received;
    若接收到摄像头所采集的用户面部图像,对所述用户面部图像进行情绪识别,得到对应的当前用户情感信息;If the user's facial image collected by the camera is received, emotion recognition is performed on the user's facial image to obtain corresponding current user emotional information;
    判断所述当前用户情感信息是高兴情绪或是生气情绪;以及Determine whether the current user emotional information is happy mood or angry mood; and
    若所述前用户情感信息是高兴情绪,对所述迎宾信息自动增加可保留的标签。If the former user's emotion information is happy emotion, a retainable tag is automatically added to the welcome information.
PCT/CN2020/103796 2020-04-28 2020-07-23 Facial recognition-based information generation method and apparatus, computer device and storage medium WO2021217912A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010351274.0A CN111639534A (en) 2020-04-28 2020-04-28 Information generation method and device based on face recognition and computer equipment
CN202010351274.0 2020-04-28

Publications (1)

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

Family

ID=72331889

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103796 WO2021217912A1 (en) 2020-04-28 2020-07-23 Facial recognition-based information generation method and apparatus, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN111639534A (en)
WO (1) WO2021217912A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115052193A (en) * 2022-05-25 2022-09-13 天翼爱音乐文化科技有限公司 Video recommendation method, system, device and storage medium
WO2023173785A1 (en) * 2022-03-18 2023-09-21 珠海优特电力科技股份有限公司 Access permission verification method, device, and system and identity authentication terminal
GB2620664A (en) * 2022-03-18 2024-01-17 Zhuhai Unitech Power Tech Co Access permission verification method, device, and system and identity authentication terminal

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112936299A (en) * 2021-01-25 2021-06-11 浙江合众新能源汽车有限公司 Face recognition-based user boarding welcome system
CN115735190A (en) * 2021-06-09 2023-03-03 京东方科技集团股份有限公司 Interaction method, interaction system and electronic equipment
CN113408421B (en) * 2021-06-21 2023-04-07 湖北央中巨石信息技术有限公司 Face recognition method and system based on block chain
CN115551139A (en) * 2022-10-11 2022-12-30 扬州华彩光电有限公司 LED lamp visual interaction method and system based on artificial intelligence

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9117198B1 (en) * 2010-02-22 2015-08-25 Iheartmedia Management Services, Inc. Listener survey tool with time stamping
CN107845168A (en) * 2017-10-26 2018-03-27 广州云从信息科技有限公司 A kind of VIP recognition methods based on recognition of face certification
CN208156743U (en) * 2018-05-11 2018-11-27 江苏腾武信息技术有限公司 Recognition of face Intelligent greeting system
CN109598827A (en) * 2018-09-25 2019-04-09 深圳神目信息技术有限公司 A kind of face welcome hybrid system and its working method
CN109934705A (en) * 2019-03-27 2019-06-25 浪潮金融信息技术有限公司 A kind of full channel customer welcome method applied to bank

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9117198B1 (en) * 2010-02-22 2015-08-25 Iheartmedia Management Services, Inc. Listener survey tool with time stamping
CN107845168A (en) * 2017-10-26 2018-03-27 广州云从信息科技有限公司 A kind of VIP recognition methods based on recognition of face certification
CN208156743U (en) * 2018-05-11 2018-11-27 江苏腾武信息技术有限公司 Recognition of face Intelligent greeting system
CN109598827A (en) * 2018-09-25 2019-04-09 深圳神目信息技术有限公司 A kind of face welcome hybrid system and its working method
CN109934705A (en) * 2019-03-27 2019-06-25 浪潮金融信息技术有限公司 A kind of full channel customer welcome method applied to bank

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023173785A1 (en) * 2022-03-18 2023-09-21 珠海优特电力科技股份有限公司 Access permission verification method, device, and system and identity authentication terminal
GB2620664A (en) * 2022-03-18 2024-01-17 Zhuhai Unitech Power Tech Co Access permission verification method, device, and system and identity authentication terminal
CN115052193A (en) * 2022-05-25 2022-09-13 天翼爱音乐文化科技有限公司 Video recommendation method, system, device and storage medium
CN115052193B (en) * 2022-05-25 2023-07-18 天翼爱音乐文化科技有限公司 Video recommendation method, system, device and storage medium

Also Published As

Publication number Publication date
CN111639534A (en) 2020-09-08

Similar Documents

Publication Publication Date Title
WO2021217912A1 (en) Facial recognition-based information generation method and apparatus, computer device and storage medium
US20200412975A1 (en) Content capture with audio input feedback
US11169675B1 (en) Creator profile user interface
CN115004145B (en) Sub-display designation for remote content source device
CN107153496B (en) Method and device for inputting emoticons
US20210405831A1 (en) Updating avatar clothing for a user of a messaging system
JP2019117646A (en) Method and system for providing personal emotional icons
WO2016026402A2 (en) System and methods of generating user facial expression library for messaging and social networking applications
US20060018522A1 (en) System and method applying image-based face recognition for online profile browsing
US20140281975A1 (en) System for adaptive selection and presentation of context-based media in communications
WO2020207413A1 (en) Content pushing method, apparatus, and device
EP4172792A1 (en) Updating an avatar status in a messaging system
US20230410811A1 (en) Augmented reality-based translation of speech in association with travel
US11943283B2 (en) Dynamically assigning storage locations for messaging system data
US20200218772A1 (en) Method and apparatus for dynamically identifying a user of an account for posting images
US20210404831A1 (en) Augmented reality-based translations associated with travel
CN114846433A (en) Gesture-based method and system for designating sub-display screen
US20200311426A1 (en) Contextual media filter search
US20200265238A1 (en) Methods and Systems for Identification and Augmentation of Video Content
CN114930280A (en) Sub-display notification handling
US20200112838A1 (en) Mobile device that creates a communication group based on the mobile device identifying people currently located at a particular location
CN104243276A (en) Method and device for contact person recommendation
KR20230003057A (en) Messaging system using content trend analysis
US20230022826A1 (en) Media content discard notification system
KR20230063772A (en) Metaverse personalized content creation and authentication method and apparutus and system therefor

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: 20933078

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/02/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20933078

Country of ref document: EP

Kind code of ref document: A1